86aa98d3c95db087f84e322295eba79f01b8d60f
[fw/sdcc] / ChangeLog
1 2005-11-01 Borut Razem <borut.razem AT siol.net>
2
3         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
4           enabled sockets on WIN32
5
6 2005-10-31 Borut Razem <borut.razem AT siol.net>
7
8         * support/regression/generate-cases.py: escape backslashes in {testcase}:
9           WIN32 backslash path delimiters should be escaped when used in C strings
10         * support/regression/tests/bitfields.c: exclude failing assertions for
11           __CYGWIN32__ and __MINGW32__ hosts
12
13 2005-10-30 Borut Razem <borut.razem AT siol.net>
14
15         * src/SDCCutil.c: corrected double comparison typo
16
17 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
18
19         * device/lib/medium/Makefile: added for new memory model medium
20         * device/include/asm/mcs51/features.h: updated for medium/pdata
21         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
22           added Multiply & Accumulate sbit's and MAC0_PAGE define
23         * device/include/mcs51/c8051f300.h: added sfr16 definitions
24         * device/include/mcs51/c8051f310.h: added sfr16 definitions
25         * device/lib/_mullong.c: update for medium model
26         * device/lib/incl.mk: added medium model
27         * doc/sdccman.lyx: documented medium model
28         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
29         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
30         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
31         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
32           (allocParms): set SCLS and OCLS to pdata for medium model
33         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
34           for pdata,
35           (powof2): return <0 if not power of 2
36         * src/avr/gen.c (genBitWise): use updated powof2
37         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
38           (shiftR2Left2Result): small optimization in setup, save acc when storing,
39           (shiftLLeftOrResult): use B if necessary
40         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
41         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
42         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
43         * support/regression/Makefile.in: added test-mcs51-medium
44         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
45
46 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
47
48         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
49         specifier unsigned
50         * device/lib/time.c (mktime): fixed bug 1334315
51
52 2005-10-28 Raphael Neider <rneider AT web.de>
53
54         * device/include/pic/p16f_common.inc: added common declarations
55         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
56
57 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
58
59         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
60           (aopPutUsesAcc): added to predict accumulator use,
61           (assignResultValue): save acc if necessary,
62           (genMinusDec): store result if indirectly addressed,
63           (genDivOneByte):  save acc if necessary,
64           (movLeft2Result): bugfix if left already in acc,
65           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
66             attention to accumulator use (esp. pdata),
67           (genReceive): receive pdata correctly
68         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
69         * src/SDCCicode.h: added isOperandInPagedSpace prototype
70
71 2005-10-27 Raphael Neider <rneider AT web.de>
72
73         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
74
75 2005-10-27 Raphael Neider <rneider AT web.de>
76
77         * .version: changed version to 2.5.4
78         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
79         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
80           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
81             arithmetics support routines
82         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
83         * device/lib/Makefile.in: also create installdir for pic
84
85         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
86           pic14 port as well
87         * src/pic/device.c (dump_sfr): rewritten to delegate register
88           placement to the linker (use `extern sym' rather than sym EQU addr),
89           (validAddress): fixed to check last specified address
90         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
91           (popGetLit): truncate literal value to 8 bit,
92           (popGet): moved assert to more appropriate place
93           (popGetExternal): create pCode operand from and mark the according
94             symbol as being `extern'
95           (popGetAddr): added sanity check on immediate's offset, provide
96             GPOINTER tag on demand
97           (aopPut): fixed for immediates,
98           (mov2w_op): move operand's address or contents to WREG (depending on
99             operand type), safer variant of mov2w,
100           (movwf,call_libraryfunc): NEW, handy abbreviations,
101           (get_argument_pcop,get_return_val_pcop,pass_argument,
102           get_returnvalue): interface for accessing function parameters and
103             return values,
104           (assignResultValuei,genRet): use new parameter/return value interface
105           (pic14_getDataSize): back to old version handling generic pointers,
106           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
107             provided implementation and/or fixed old one,
108           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
109             calls, removed legacy 8051 reference code
110           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
111           (loadSignToC): NEW, move the operands sign bit to CARRY,
112           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
113             genRightShiftSigned, accepts negative shift counts,
114           (setup_fsr): load FSR and adjust IRP (indirect memory access),
115           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
116             generic pointers, __data pointers and __code pointers,
117           (genUnpackBits,genPackBits): rewritten to work with generic pointers
118             and signed bitfields, limit bitfields to 8 bit,
119           (genDataPointerGet): fixed number of bytes read,
120           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
121           (genPointerGet,genPointerSet): fixed handling of __code pointers,
122             pointers to constant data are no longer assumed to point to __code
123             space, removed invalid pointer types,
124           (bitpatternFromVal): retrieve the PICs representation of an integer
125             or float literal,
126           (genDataPointerSet): fixed assigning to po_immediate operands,
127           (genGenPointerSet): implemented as library call,
128           (genIfx): fixed incorrect condition,
129           (genAddrOf): limit generic pointers' addresses to 2 bytes,
130             provide GPOINTER tag according to destination's storage class,
131           (genCast): added code to handle casting to generic pointers, added
132             sign-/zero extension of the result
133           (aop_isLitLike,op_isLitLike): fixed handling of immediates
134         * src/pic/gen.h: added macros to access IRP bit in STATUS register
135         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
136           extend the result
137         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
138           address/register resides in the shared banks
139           (emitSymbolToFile): improved to handle global and `pinned' symbols,
140             put all variables into separate sections (have the linker arrange
141             them)
142           (picglue): put init code and interrupt handlers in separate sections
143         * src/pic/main.c: added port specific options table, modified to PORT
144           structure to make GPOINTERs 3 byte, added pic14_options
145           (_pic14_do_link): private linking routine (update paths to libraries,
146             add libsdcc.lib by default)
147         * src/pic/main.h: declare pic14_options
148         * src/pic/pcode.c: fixed instructions i/o relations,
149           (RegCond): reverted to correct version,
150           (newpCodeOpLit): truncate literals to 8 bit,
151           (genericPrint): added debug output,
152           (getRegFromInstruction): fixed for various operand types, simplified
153           (BuildFlow): fixed broken handling of isntructions with labels
154           (LinkFlow): start at last instruction in flow (skip trailing comments),
155             pass the flow on to the next instruction after CALL
156           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
157           (insertPCodeInstruction): fixed inserting after a skip instruction,
158           (DoBankSelect): fixed for labeled instructions
159           (OptimizepBlock): honor --nopeep switch
160           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
161         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
162         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
163           (pCodeOptime2pCodes): allow disabling this optimization via
164             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
165             but is still buggy), started implementation of a dataflow based
166             pCode optimization (CSE + dead code elimination)
167           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
168         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
169           names are independant of the stack location and therefore portable across
170           devices
171
172 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
173
174         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
175           (selectSpil): fixed bug 1337835 by not spilling bit variables
176         * support/regression/tests/bug1337835.c: added test for this bug
177         * src/mcs51/peeph.def: restart after rule 3.c,
178           addded rules 263.x to optimize loading constants
179
180 2005-10-26 Raphael Neider <rneider AT web.de>
181
182         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
183         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
184           (genAssign): emit warning when casting literals to generic pointer
185             type, also applies when taking the address of a fixed variable,
186           (genCast): improved casting to generic pointers
187         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
188           extern variables, added verbose error message
189         * device/include/pic16/{string.h,errno.h}: added #pragma library c
190
191 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
192
193         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
194         carry must be complemented too
195         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
196         could be emitted by genMinus
197         * src/SDCCval.c (constVal): fixed bug 1305065
198
199 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
200
201         * src/SDCCast.c (addCast): added promotion for bit variables
202         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
203         promotion casts + optimisation
204         (optimizeGetWord): fix warning 'i' might be used uninitialized
205         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
206         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
207
208 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
209
210         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
211         all chars are promoted to int; promotion should be handled in SDCCast.c
212
213 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
214
215         * device/lib/_strcmp.c: Fixed bug 1326457
216
217 2005-10-11 Raphael Neider <rneider AT web.de>
218
219         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
220         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
221
222 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
223
224         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
225         * support/regression/tests/sfr16.c: added test for the sfr32 bug
226
227 2005-10-04 Raphael Neider <rneider AT web.de>
228
229         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
230           device/lib/pic16/pics.all: added pic18f1320
231         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
232
233 2005-09-30 Raphael Neider <rneider AT web.de>
234
235         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
236         * src/pic16/devices.inc: NEW, provides device descriptions
237         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
238
239 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
240
241         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
242           GETHBIT
243
244 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
245
246         * doc/sdccman.lyx: updated Highest Order Bit documentation,
247           documented Any Order Bit, Higher Order Byte and Higher Order Word
248         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
249         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
250           (optimizeGetAbit): new, to get any bit, not only the high bit,
251           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
252           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
253           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
254           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
255             RIGHT_OP: also try GETBYTE, GETWORD optimization,
256             GETABIT, GETBYTE, GETWORD: decorate them,
257           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
258           (ast_print): added GETABIT, GETBYTE, GETWORD
259         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
260         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
261           (geniCodeBinary): new generic binary icode,
262           (ast2iCode): added GETABIT, GETBYTE, GETWORD
263         * src/port.h: updated comment for PORT.hasExtBitOp
264         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
265           (genGetByte): new, to get a single byte,
266           (genGetWord): new, to get a word from a long,
267           (gen51Code): added GETABIT, GETBYTE, GETWORD
268         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
269
270 2005-09-23 Raphael Neider <rneider AT web.de>
271
272         * configure.in, configure: have device/lib/pic configured
273         * device/lib/Makefile.in: added model-pic14
274         * device/lib/clean.mk: added pic/ to clean rule
275         * device/lib/pic: added rudimentary pic14 library providing support
276           functions for multiplication/division/generic pointer access
277         * src/SDCCopt.c (convilong): mark support functions as extern
278           for pic14 port as well
279         * src/pic/gen.c (genMult): added assertions,
280           (genpic14Code): emit warning on unhandled iCodes
281         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
282         * src/pic/pcode.c (pCodeOpCopy),
283         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
284           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
285           SFR_REGISTER}), made safe for future extensions
286         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
287           instructions even if preceeded by SKIP instructions (also remove
288           them); removed unused code
289         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
290           prevents leaving parts of the structure uninitialized after copying
291
292 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
293
294         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
295           ago by me
296         * support/regression/tests/addsub.c: added test for the bug
297
298 2005-09-21 Raphael Neider <rneider AT web.de>
299
300         * device/include/pic16/pic18f1220.h,
301           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
302         * device/lib/pic16/Makefile.rules: added missing opening paren
303         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
304           are provided in genutils.c,
305           (genUminusFloat,genUminus,genCmpEq): added asserts on different
306           operand/result sizes,
307           (genCmp): assert on NULL pointers first, then check deref'ed values
308         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
309           result size
310
311 2005-09-18 Raphael Neider <rneider AT web.de>
312
313         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
314           as these are now unused,
315           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
316         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
317           local, avoids uninitialized pointer dereference on r->name
318         * src/pic16/ralloc.c (newReg): fixed indentation
319
320 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
321
322         * src/SDCCval.c (constVal): fixed bug 730366
323         * support/Util/SDCCerr.c,
324         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
325
326 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
327
328         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
329
330 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
331
332         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
333
334 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
335
336         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
337           (hex2dec): made hex_digit unsigned char, removed ascii dependance
338         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
339           (hex2dec): made hex_digit unsigned char, removed ascii dependance
340         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
341         * packihx/packihx.c (hexDigit): made c unsigned char
342         * as/mcs51/lklibr.c (fndsym),
343         * link/z80/lkgb.c (gb),
344         * link/z80/lklibr.c (fndsym),
345         * link/z80/lkrloc.c (relr),
346         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
347         * src/SDCC.lex (checkCurrFile, process_pragma),
348         * src/SDCCglue.c (spacesToUnderscores),
349         * src/SDCCmain.c (setParseWithComma, processFile),
350         * src/asm.c (tvsprintf, printCLine),
351         * src/avr/gen.c (emitcode, aopPut),
352         * src/ds390/gen.c (emitcode),
353         * src/hc08/gen.c (emitcode, emitinline),
354         * src/mcs51/gen.c (emitcode, genInline),
355         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
356           tokenizeLineNode),
357         * src/pic/ralloc.c (debugLog),
358         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
359           tokenizeLineNode),
360         * src/pic16/ralloc.c (debugLog),
361         * src/z80/main.c (_process_pragma):
362            made all ctype.h function calls safe
363         * src/SDCCopt.c: include math.h for fabs
364         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
365           and used them throughout the code to make ctype.h function calls safe
366         * src/ds390/main.c (asmLineNodeFromLineNode),
367         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
368         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
369            unsigned char*
370         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
371           (newpCodeAsmDir): made ctype.h function calls safe
372         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
373           pic16_emitcode):  made lbp unsigned char*
374         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
375           (pic16_newpCodeAsmDir): made ctype.h function calls safe
376         * src/xa51/gen.c (emitcode),
377         * src/z80/gen.c (_emit2): made lbp unsigned char*
378         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
379            char*
380
381 2005-09-05 Raphael Neider <rneider AT web.de>
382
383         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
384           access bank splitpoint
385
386 2005-09-05 Raphael Neider <rneider AT web.de>
387
388         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
389
390 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
391
392         * .version: changed to version 2.5.3
393         * doc/sdccman.lyx: changed version to 2.5.3,
394           documented --codeseg and --constseg and pragma codeseg and constseg,
395           documented bit parameters (reentrant) and bit returning
396         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
397            currFunc->recvSize, but is this ok for all ports?
398           (ast2iCode): result of ~ on unsigned char must be cast to int for
399            bool to work
400         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
401           function pointers in bit space
402         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
403           (processFuncArgs): call port.reg_parm() with reentrancy info
404         * src/port.h,
405         * src/avr/main.c,
406         * src/ds390/main.c,
407         * src/hc08/main.c,
408         * src/pic/main.c,
409         * src/pic16/main.c,
410         * src/xa51/main.c,
411         * src/z80/main.c: port.reg_parm prototype extended with
412           "bool reentrant" parameter
413         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
414           options.stackAuto for allocating bit register parameters
415         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
416           (genSend): set BitBankUsed if it is,
417           (selectRegBank): factored out of genCall for use in genPcall,
418           (genCall): removed redundant dtype assignmen, use selectRegBank,
419           (genPcall): handle returning in Carry properly, save in F0 if needed,
420           (genReceive): handle bit register parameters
421         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
422           (mcs51_assignRegisters): enable bit registers for all reentrant
423            functions and don't set BitBankUsed unconditionally
424         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
425         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
426         * support/regression/tests/funptrs.c: added tests for BOOL and for return
427
428 2005-08-27 Borut Razem <borut.razem AT siol.net>
429
430         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
431         ppc-osx (Darwin) does not support -u option. It seems that it is
432         supported only on Linux - GNU cp
433
434 2005-08-25 Borut Razem <borut.razem AT siol.net>
435
436         * sim/ucsim/gui.src/serio.src/Makefile.in,
437           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
438           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
439           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
440           install and strip, since the strip at /usr/ccs/bin should be used
441           on solaris
442
443 2005-08-24 Borut Razem <borut.razem AT siol.net>
444
445         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
446
447 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
448
449         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
450         ffffffffu
451
452 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
453
454         * as/mcs51/aslink.h: completed lkrloc.c prototypes
455         * as/mcs51/lkmain.c (link_main): fixed warning
456         * device/include/stdbool.h: ds390 has no advanced bit support yet
457         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
458         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
459         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
460           and updated their macros
461         * src/SDCCval.c (constVal): updated comment for renamed b_long
462
463 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
464
465         * as/mcs51/asdata.c: changed ctype['['] to BINOP
466         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
467           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
468           (oprio): set priority for '['
469         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
470            and adb_24_bit
471         * as/mcs51/asm.h: added defines R_BIT and S_BIT
472         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
473         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
474         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
475           added overlayable BIT_BANK area
476         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
477           (summary2): explain 'T' in legenda
478         * as/mcs51/lkrloc.c: replaced old K&R style,
479           (relr): added R_BIT processing,
480           (errmsg): added "Bit-addressable relocation error",
481           (adb_bit): added for converting from byte- to bit-addressable space,
482           (adb_24_bit): added for converting from byte- to bit-addressable space
483         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
484            used in reentrant functions now even as return value
485         * device/lib/_gptrput.c (_gptrput): removed obsolete code
486         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
487           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
488         * src/SDCCglobl.h: added indicator BitBankUsed
489         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
490            the bit registers b0-b7
491         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
492           (geniCodeCast): fixed bug 1263853,
493           (geniCodeLogicAndOr): put result in bool or char,
494           (geniCodeReceive): added parameter func for accessing the return type,
495           (geniCodeFunctionBody): pass func to geniCodeReceive
496         * src/SDCCmain.c: added indicator BitBankUsed
497         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
498         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
499           (checkSClass): don't put automatic bool/bit on stack,
500           (checkFunction): removed check on function cannot return bit
501         * src/SDCCsymt.h: added newBoolLink prototype
502         * src/mcs51/gen.c (rb1regs): added bit registers,
503           (movc): created for assigning to carry,
504           (pushReg, popReg): created for pushing registers,
505           (sameRegs): check both AOP_REG and AOP_CRY types,
506           (aopOp): handle bit registers,
507           (aopPut): optimization no self-assign,
508           (saveRegisters): push reg->base (bits) only once for bit registers,
509            and use pushReg,
510           (unsaveRegisters): pop reg->base only once and use popReg,
511           (assignResultValue): added parameter func and return in carry for bits,
512           (genIpush): optimization no reload in A if not changed,
513           (genSend): bit parameters in reentrant functions are passed in bit
514            registers by first assigning to bits in B, then save registers and
515            copy B to bits,
516           (genCall): handle returning in Carry properly, save it in F0 if needed,
517           (genPcall): updated assignResultValue call, this is not safe yet for bit
518            returning function !!!
519           (genFunction): don't generate equ's for bit registers and use pushReg,
520           (genEndFunction): take care of bit returning functions and use popReg,
521           (genRet): return bit in Carry,
522           (genIfx): optimize bit registers and other directly addressable bits,
523           (genReceive): updated assignResultValue call
524         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
525           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
526            registers when using stack-auto
527         * src/mcs51/ralloc.c (_G): added allBitregs,
528           (regs8051): added the bit registers,
529           (createStackSpil): use macro IS_BIT,
530           (getRegBit): added to allocate a bit register, else spill,
531           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
532           (updateRegUsage): factored out to ease stepping while debugging,
533           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
534            also allocate bit registers,
535           (fillGaps): handle bit registers,
536           (findAllBitregs): added to create bit vector with all bit registers,
537           (mcs51_allBitregs): returns this bit vector,
538           (mcs51_assignRegisters): when using stack-auto use bit registers for
539            passing parameters and creating local variables
540         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
541
542 2005-08-22 Borut Razem <borut.razem AT siol.net>
543
544         * device/lib/Makefile.in: replaced find option -or with -o
545           to make it run on solaris
546
547 2005-08-22 Raphael Neider <rneider AT web.de>
548
549         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
550           fixes #1265442 (crash on Solaris)
551
552 2005-08-20 Borut Razem <borut.razem AT siol.net>
553
554         * configure, configure.in: added tests for libsocket and libnsl libraries,
555           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
556           from support/regression/Makefile.in
557         * support/regression/Makefile.in: added
558         * device/lib/pic16/Makefile.common.in: force make to use bash shell
559         * sim/ucsim/libtool: regenerated on sparc-solaris
560         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
561           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
562           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
563           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
564           sparc-solaris, which doesn't use GNU ld linker
565         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
566         * as/Makefile: find on sparc-solaris does not support -maxdepth option
567
568 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
569
570         * src/mcs51/peeph.def: updated comments
571
572 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
573
574         * device/lib/_gptrget.c,
575         * device/lib/_gptrput.c: slightly shorter
576         * doc/sdccman.lyx: incremented version
577         * src/mcs51/peeph.def: moved peephole comments to the line of first
578           change to better keep line correlation, reanimated 186.e
579         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
580
581 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
582
583         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
584           David Saxton with quotes around file name.
585
586 2005-08-15 Borut Razem <borut.razem AT siol.net>
587
588         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
589           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
590           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
591           make tests run on x86_64 platform
592
593 2005-08-13 Raphael Neider <rneider AT web.de>
594
595         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
596           as it might be executed DURING a build (parallel make is wonderful)
597
598 2005-08-13 Raphael Neider <rneider AT web.de>
599
600         * device/lib/Makefile.in (port-specific-objects-pic16):
601           revert to cp $(PORT)/bin/*.* $(PORTDIR)
602         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
603           dependency
604         * device/lib/pic16/Makefile.rules: build subdirs before creating
605           the library, removed builddir rule, create $(builddir) early in
606           recurse rule, use empty recurse rule for leaf directories
607         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
608           mkdir errors (race condition), removed duplicate suffix "hex"
609           from clean rules
610         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
611         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
612           prevents mkdir -p from aborting on Alpha
613
614 2005-08-12 Raphael Neider <rneider AT web.de>
615
616         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
617           db-statements in order to allow for arrays of pointers in code
618           sections to be placed without interspersed 0-padding, fixes
619           bug #1256215
620         * (emitStatistics): fixed division by zero for pic18f1220
621         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
622           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
623         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
624         * (pic16_pCodeConstString): keep track of already emitted string
625           literals to prevent "duplicate definitions of symbol _str_NR"
626         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
627           debug message
628         * device/lib/Makefile.in: ignore failing PIC16 library builds
629         * device/lib/pic16/Makefile: do not build if gputils are missing
630         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
631
632 2005-08-10 Raphael Neider <rneider AT web.de>
633
634         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
635           my last commit)
636
637 2005-08-10 Raphael Neider <rneider AT web.de>
638
639         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
640           Rokas' patch to add the new fixed point type "__fixed16x16"
641         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
642           functions for __fixed16x16 arithmetics
643         * device/lib/pic16: reimplemented the build system to support
644           a separate build directory, better handling of libio (create
645           the library in a separate subdir for each architecture) and
646           easier configuration (centralized in Makefile.common)
647
648 2005-08-07 Raphael Neider <rneider AT web.de>
649
650         * src/pic16/gen.c (genrshTwo): fixed sign extension
651         * src/pic16/device.c: added pic18f2320, 4220 and 4320
652         * device/include/pic16/pic18f2220.h: changed some bit definitions,
653           added T0CONbits
654         * device/include/pic16/pic18f4220.h: NEW, header for
655           pic18f4220 and pic18f4320
656         * device/include/pic16/pic18fregs.h: added new devices,
657           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
658         * device/include/pic16/signal.h: resolved name clashes
659           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
660           to also allow testing for interrupt enable bits, added
661           comments on how to use the macros
662         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
663         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
664           register definitions for the devices
665         * device/lib/pic16/pics.all: added new devices
666         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
667           allocated memory
668         * device/lib/pic16/libc/stdlib/memfree: do not count
669           the block header as free memory
670         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
671           simplified and added missing end-of-blocklist-marker
672           (reported by Peter Onion, fixes #1252814)
673         * (_mergeHeapBlock): fixed loop condition
674         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
675           len==0, restructured code
676         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
677           up a bit, reduced bitfield accesses, prevent endless loops
678           in case of heap corruption
679         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
680           "unreferenced arguments/must return a value" warnings
681         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
682           replaced BAUDREG with SPBRG
683         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
684           device/lib/pic16/debug/gstack/gstack.c: replaced
685           _naked, _asm, _endasm with __naked, __asm, __endasm
686
687 2005-08-05 Raphael Neider <rneider AT web.de>
688
689         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
690           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
691
692 2005-08-05 Borut Razem <borut.razem AT siol.net>
693
694         * device/lib/Makefile.in: added missing ';'
695         * configure: removed ^M characters
696
697 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
698
699         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
700           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
701           License
702
703 2005-08-04 Borut Razem <borut.razem AT siol.net>
704
705         * configure.in: pic16 libraries build 2nd try - enable running
706           configure in device/lib/pic16
707         * configure: regenerated from configure.in
708         * device/lib/Makefile.in: create $(PORT)/bin directory
709
710 2005-08-03 Raphael Neider <rneider AT web.de>
711
712         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
713           to get/set values via pointers
714         * (genUnpackBits,genPackBits): changed detection of
715           ptr->bitfield vs. sym.bitfield, fixed access via generic
716           pointers, removed dead (wrong) code for multibyte bitfields
717         * (genNearPointerGet, genGenPointerGet): removed useless code,
718           fixed bitfield detection, fixes #1250594
719         * (genNearPointerSet): removed useless code
720         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
721           and introduced macro pic16_emitpcode that conditionally emits
722           the origin of the following pCode (useful for debugging SDCC)
723         * src/pic16/pcode.c: changed (and disabled) some debug outputs
724         * (createDefmap): fixed handling of LFSR for --optimize-df
725
726 2005-08-02 Borut Razem <borut.razem AT siol.net>
727
728         * device/lib/Makefile.in: pic16 libraries build enabled since
729           gputils-0.13.2 are now localy installed at sourceforge's compile farm
730
731 2005-08-02 Raphael Neider <rneider AT web.de>
732
733         * src/pic16/gen.c (genPackBits): removed deprecated warning
734         * (genGenPointerSet): fixed bitfield detection
735
736 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
737
738         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
739
740 2005-07-31 Raphael Neider <rneider AT web.de>
741
742         * device/lib/pic16/libdev/pic18f458.c,
743           device/include/pic16/pic18f458.h: added missing T0CONbits
744
745 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
746
747         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
748
749 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
750
751         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
752
753 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
754
755         * device/include/mcs51/at89c51ed2.h: added.
756
757 2005-07-23 Raphael Neider <rneider AT web.de>
758
759         * src/pic/gen.h: added emitpcode macro for debugging
760         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
761           and replace by macro adding debug information on demand
762         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
763         * (gencjne): tried to fix; replaced with correct (slower) code
764         * (gen{Unp,P}ackBits): fixed single bit access
765         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
766         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
767           previous instruction
768         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
769           register has to be handled with care (forbidding movement
770           of assignments/uses, removing assignments completely, ...)
771         * (pCodeOptime2pCodes): make use of regIsSpecial
772         * added lots of debugging output (commented out)
773         * src/pic/rallloc.c (deassignLRs): prevent operand registers
774           from being reused as result UNLESS it is known to work
775
776 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
777
778         * support/Util/dbuf.h: include <stddef.h> for size_t
779         * .version: changed to version 2.5.2
780
781 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
782
783         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
784
785 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
786
787         * src/hc08/gen.c (genMinus): fixed bug #1241835,
788           (genModOneByte): removed needless psha/pula
789
790 2005-07-22 Raphael Neider <rneider AT web.de>
791
792         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
793           have PIC14 handled like PIC16, fixes broken pic14 linker calls
794         * src/pic/gen.c (resolveIfx): do not "invent" labels
795         * (genSkipc): changed to positive logic
796         * (genSkipCond): removed as no longer needed
797         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
798           backport from PIC16
799         * (genLeftShift): check operands are in different registers
800         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
801           INCF does not update CARRY...
802         * src/pic/main.c: fixed _linkCmd
803         * src/pic/pcode.c (unlinkpCode): added inactive code
804         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
805           alive (do not assign result and operand overlapping registers)
806
807 2005-07-22 Raphael Neider <rneider AT web.de>
808
809         * src/pic/device.c (dump_sfr): replaced register declaration with
810           call to emitSymbolToFile() to avoid duplicate symbols
811         * (assignRelocatableRegisters): do not declare external symbols
812         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
813           right (take size of type, not etype)
814         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
815         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
816         * (packRegsForAccUse): disabled assignment of WREG as
817           the result reg to prevent occurence of just fixed #1235003,
818           fixes #1242954
819         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
820           symbols (avoids duplicate symbols in .asm file)
821         * (pic14emitRegularMap): use emitSymbolToFile()
822         * src/pic/gen.c (aopOp): fixed spillLocation handling
823         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
824         * (genDataPointerSet): removed unneccessary variables/output
825
826 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
827
828         * as/mcs51/lkarea.c: enlarged codemap for banked memory
829         * device/lib/mcs51/crtbank.asm: added # to 0x0F
830
831 2005-07-21 Raphael Neider <rneider AT web.de>
832
833         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
834           architecture cannot handle them efficiently, fixes bug #1235003
835         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
836           check for empty sets before using them (fixes bug #1232190)
837
838 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
839
840         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
841           (lnksect2): generate warnings for memory overlap
842         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
843           constseg to set the name of these segments so you can instruct the linker
844           to place them in banks
845         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
846         * src/SDCCglobl.h: added MODEL_HUGE to enum,
847           added code_seg and const_seg to options
848         * src/SDCCglue.c (emitMaps): use options.const_seg,
849           (createInterruptVect): put interrupt vectors in segment HOME,
850           (glue): put HOME before static segment and put the main glue in HOME,
851           (glue): use options.code_seg
852         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
853         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
854           these segments so you can instruct the linker to place them in banks
855           (linkEdit): use code_loc for HOME segment which should be the first
856           segment in code memory now
857         * src/SDCCmem.c: fixed more stuff like bug 1238386
858         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
859           (changePointer): don't change function pointers to code pointers for
860           banked functions,
861           (compareType): added exceptional check for banked function pointers
862         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
863         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
864           after static in code memory
865         * src/mcs51/gen.c: added aopLiteralLong prototype,
866           (aopForSym): use getSize for functions,
867           (genCall): generate banked calls over one trampoline __sdcc_banked_call
868           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
869           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
870           the segment,
871           (genPcall): use call for literal function pointers and generate banked
872           calls over the one trampoline so there's only one place for the user to
873           modify according to his/hers hardware,
874           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
875           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
876         * src/mcs51/main.c: added keyword banked,
877           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
878         * support/Util/SDCCerr.c,
879         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
880           needed for passing the bank and address to the trampoline
881         * device/lib/mcs51/crtbank.asm: added for bankswitching
882         * device/lib/mcs51/Makefile: added crtbank
883
884 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
885
886         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
887           for fields at offset 0 of a struct or union as reported
888           on 2005-07-07 in the developer mailing list.
889
890 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
891
892         * src/SDCCmem.c: fixed bug 1238386
893
894 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
895
896         * src/mcs51/peeph.def: added labelrefcounting for peepholes
897           (patch #1144962), added peephole 300, enabled 259.x
898         * doc/sdccman.lyx: removed screenshot and provided link instead
899
900 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
901
902         * doc/sdccman.lyx: added section about debugging with ddd
903         * doc/figures/ddd_example.eps: screenshot of debugging session
904
905 2005-07-04 Raphael Neider <rneider AT web.de>
906
907         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
908           like CODE pointers, fixes #1115683
909         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
910           call, fixes bugs #1232211, #1228110,
911           fixed wrong casts to pCodeFlow from pCodeInstructions
912
913 2005-07-04 Raphael Neider <rneider AT web.de>
914
915         * src/pic/gen.c (popGet): changed assert to allow for
916           bit operands
917         * (popGetAddr): changed signature to provide
918           an additional index, patched all call sites
919         * (genCmpEq): handle literal-like operands correctly
920         * (genAddrOf): added sanity checks on __code/__data pointers
921         * (genAssign): added handling of symbols from __code section
922         * (gencjne): do not generate code for comparisons whose result
923           is neither stored nor used, fixes bug #1171114
924         * (AccLsh, AccRsh): operate on operand instead of WREG
925         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
926           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
927           by known count
928         * rewrote complete shift-by-literal logic, commented unused
929           functions out
930         * (genConstPointerGet): get multiple bytes (if result size > 1),
931           fixed handling of non-immediate addresses
932         * (genPointerGet): handle CODE pointers like CONST pointers
933         * (genpic14Code): insert C-SRC lines as Cource-pCodes
934         * ({aop,op}_isLitLike): NEW, single place to decide whether an
935           operand is to be treated as a literal or not
936         * (mov2w,genPcall,genCmpEq),
937           src/pic/genarith.c: use aop_isLitLike() to decide between
938           literal/register contents
939         * (addSign): added missing offset
940         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
941           only emit comment in debug-mode,
942           use {aop,op}_isLitLike throughout the file
943         * src/pic/glue.c: fix initializers for pointers (work in progress)
944         * src/pic/pcode.c (get_op): honor index on _const symbols
945         * ({reset,dump}pCodeStatistics): NEW, estimate code size
946         * (dumppBlock): added pCode size estimation
947         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
948           check for IS_SYMOP before OP_SYMBOL'ing
949         * fixed indentation, compacted switch-statements
950         * (allocReg): find free register and allocate it instead of
951           allocating new registers all the time
952         * (deassignLRs): prevent POINTER_GET's from being assigned the same
953           registers as its operands (necessary only for multibyte GETs)
954
955 2005-07-01 Raphael Neider <rneider AT web.de>
956
957         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
958           debugging .asm-output macros FENTRY + FEXIT
959         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
960           way... I wonder...
961         * (emitpComment): NEW, printf to pCode
962         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
963           offset handling
964         * (popGetAddr): NEW, variant of popGet to access an immediates
965           high(er) bytes instead of the n'th byte of memory they reference,
966           replaced popGet with popGetAddr where neccessary
967         * (genDataPointerGet): reactivated and fixed implementation
968         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
969           accesses
970         * (genDataPointerSet): fixed multibyte assignments
971         * (genpic14Code): fixed --i-code-in-asm handling
972         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
973         * (genPlus): fixed index-out-of-bounds error
974         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
975         * src/pic/ralloc.c: added debugging output macro FENTRY2
976         * (spillThis): fixed indentation, enbraced for-body for clarity
977         * (rematStr): commented out as now unused
978         * (regTypeNum): commented out special spill case (overwrites
979           arbitrary values)
980         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
981
982 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
983
984         * doc/sdccman.lyx: documented sfr16/sfr32,
985           added example for using storage class with function pointers
986         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
987
988 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
989
990         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
991         * device/lib/_itoa.c,
992         * device/lib/_ltoa.c: optimized codesize
993         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
994           but don't know how to suppress the double warning.
995         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
996         * support/Util/SDCCerr.c,
997         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
998
999 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1000
1001         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1002           fixed old K&R prototypes
1003         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1004         * device/lib/_gptrget.c,
1005         * device/lib/_gptrgetc.c,
1006         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1007           also new versions for small generic pointers and banked generic pointers
1008         * src/port.h: added const_name
1009         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1010         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1011         * src/SDCCcse.c (findPrevIc): check all associative operators
1012         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1013         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1014         * src/SDCCmem.c: updated comments,
1015           set far-space to 0 for pdata, results in optimized code
1016         * src/SDCCmem.h: added macro CONST_NAME
1017         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1018           moving the info into the highest bits, see also gptrget/gptrput
1019         * src/src.dsp: added sdcc.ico to project files
1020         * src/avr/gen.c (genCast): fixed bug 0x%d
1021         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1022         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1023           relation between ptr_type and DCL_TYPE,
1024           (genCast): fixed bug 0x%d
1025         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1026           (CODE)" for const_name
1027         * src/hc08/gen.c (genCast): fixed bug 0x%d
1028         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1029           (hc08_port): added "CONST (CODE)" for const_name
1030         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1031           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1032           between ptr_type and DCL_TYPE,
1033           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1034           operand* and took AOP() inside function so sfr-ness can be checked,
1035           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1036           new prototype,
1037           (genFunction, genEndFunction): optimized stack setup,
1038           (genMinus): optimized for literals with ending zeroes (in bytes),
1039           (genCast): fixed bug 0x%d
1040         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1041           (mcs51_port): added "CONST (CODE)" for const_name
1042         * src/mcs51/peeph.def: made rule 226 more generic
1043         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1044         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1045         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1046         * src/z80/main.c (z80_port): added NULL for const_name,
1047           (gbz80_port): added NULL for const_name
1048         * support/regression/tests/bug663539.c,
1049         * support/regression/tests/sfr16.c: new tests
1050
1051 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1052
1053         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1054
1055 2005-06-24 Raphael Neider <rneider AT web.de>
1056
1057         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1058           corrected typos...
1059         * device/include/pic16/signal.h: added USBIF
1060           and SIG_USB
1061
1062 2005-06-24 Raphael Neider <rneider AT web.de>
1063
1064         * device/lib/pic16/libdev/pic18f2455.c,
1065           device/include/pic16/pic18f2455.h: NEW
1066         * device/include/pic16/pic18fregs.h,
1067           device/lib/pic16/pics.all,
1068           src/pic16/device.c: added 18f2455
1069         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1070           device/include/pic16/{pic18f[68][567].h,usart.h}:
1071           replaced MULTIPLE_USARTS define with more relaible
1072           compatibility sfrs (for USART access)
1073
1074 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1075
1076         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1077           and the output asm file line is printed on two lines.
1078
1079 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1080
1081         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1082           BGT, BLE, BHI, and BLS instructions
1083         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1084           genCmpEq): removed
1085         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1086           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1087           fixes bug #1216342
1088         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1089
1090 2005-06-15 Raphael Neider <rneider AT web.de>
1091
1092         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1093         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1094         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1095           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1096           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1097
1098 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1099
1100         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1101           Marcel Telka in bug #1215704
1102
1103 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1104
1105         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1106           located in shared memory bank.
1107
1108 2005-05-31 Raphael Neider <rneider AT web.de>
1109
1110         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1111           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1112           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1113
1114 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1115
1116         * device/lib/_strncpy.c: fixed the fix
1117
1118 2005-05-26 Raphael Neider <rneider AT web.de>
1119
1120         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1121           initializers with \0, bug #1208187
1122         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1123           intializers with \0, bug #1208187
1124
1125 2005-05-26 Raphael Neider <rneider AT web.de>
1126
1127         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1128           initializers with \0, bug #1208187
1129         * src/pic16/main.c (_process_pragma): added sanity checks
1130           for stack position and size, emit warnings when appropriate
1131
1132 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1133
1134         * device/lib/_strncpy.c: fixed not filling with \0
1135
1136 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1137
1138         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1139           createFunction),
1140         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1141           compound_statement),
1142         * src/SDCCsymt.h,
1143         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1144
1145 2005-05-24 Raphael Neider <rneider AT web.de>
1146
1147         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1148
1149 2005-05-24 Raphael Neider <rneider AT web.de>
1150
1151         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1152           TRISE definitions, closes bug #1162453
1153
1154 2005-05-22 Raphael Neider <rneider AT web.de>
1155
1156         * src/pic16/main.c (_process_pragma): check for missing
1157           arguments to pragmas code and udata
1158         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1159           consistency fixes to match other headers (thanks to Jim Paris)
1160         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1161
1162 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1163
1164         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1165
1166 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1167
1168         * support/regression/tests/bug1198642.c: new test
1169         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1170         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1171         * support/scripts/resource.h,
1172         * support/scripts/resource.rc,
1173         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1174         * support/scripts/sdcc.ico: added 32x32 icon
1175
1176 2005-05-18 Raphael Neider <rneider AT web.de>
1177
1178         * device/lib/pic16/libdev/pic18f*.c,
1179         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1180           keywords to "__sfr" and "__at (X)"
1181         * device/include/pic16/pic18fregs.h: added pic18f4520
1182         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1183           #1203088 (MPLAB compatibility)
1184
1185 2005-05-17 Raphael Neider <rneider AT web.de>
1186
1187         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1188         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1189         * device/lib/pic16/pics.all: added new devices
1190         * src/pic16/device.c: added support for pic18f4520
1191
1192 2005-05-16 Raphael Neider <rneider AT web.de>
1193         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1194         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1195         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1196           convenience function for bit access
1197
1198 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1199
1200         * device/lib/printf_large.c: fixed bug 1193299
1201         * support/regression/tests/bug1057979.c: added test %3.3s
1202
1203 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1204
1205         * device/include/mcs51/8051.h,
1206         * device/include/mcs51/8052.h: made parseable with lint
1207         * device/include/mcs51/lint.h: added include file for (sp)lint
1208         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1209         * doc/cdbfileformat.lyx,
1210         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1211
1212 2005-05-14 Raphael Neider <rneider AT web.de>
1213
1214         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1215         * device/lib/pic16/libc/stdlib/itoa.c (new)
1216         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1217         * device/lib/pic16/libio/Makefile: exclude subdir according to
1218           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1219         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1220         * src/pic16/gen.c (genFunction): prevent annoying warning
1221         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1222           nameclashes on BeOS
1223         * support/cpp2/cppmain.c (cpp_output_string): new
1224         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1225           fixes bug 1116802
1226
1227 2005-05-13 Borut Razem <borut.razem AT siol.net>
1228
1229         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1230
1231 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1232
1233         * .version: changed to version 2.5.1; back to bleeding edge development
1234
1235 2005-05-11 Borut Razem <borut.razem AT siol.net>
1236
1237         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1238           generate PDF version 1.3 documents
1239
1240 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1241
1242         * .version: changed to version 2.5.0
1243
1244 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1245
1246         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1247
1248 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1249
1250         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1251         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1252         well as many smaller updates.
1253         * .version: changed to version 2.5.0-pre1
1254
1255 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1256
1257         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1258
1259 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1260
1261         * support/regression/tests/bug1185672.c: added
1262         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1263           bug 1185672
1264         * src/mcs51/gen.c (genCall): added comments, made it look safer
1265         * src/mcs51/gen.c (genEndFunction): simplified
1266
1267 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1268
1269         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1270
1271 2005-04-14 Borut Razem <borut.razem AT siol.net>
1272
1273         * fixed bug 1045046 - SIGSEGV with really simple code?:
1274           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1275           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1276
1277 2005-04-14 Borut Razem <borut.razem AT siol.net>
1278
1279         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1280           src/pic16/device.h: temporarily disabled experimental #inline pragma
1281           for 2.5.0 release
1282
1283 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1284
1285         * device/include/z80/stdio.h,
1286         * device/include/z80/string.h: removed these highly incomplete files so
1287           SDCC can use the default ones in device/include/
1288
1289 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1290
1291         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1292         gcc warning.
1293         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1294         fix sdcpp warnings.
1295
1296 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1297
1298         * device/include/malloc.h: removed redundant __reentrant prototypes
1299         * device/lib/_mullong.c: added working xstack variant in asm (C version
1300           doesn't pass regression tests)
1301         * device/lib/bpx.c: used __data and made bpx char for mcs51
1302         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1303           (createFunction): fixed bug with xstackPtr
1304         * src/SDCCcse.c: corrected comments
1305         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1306           (killDeadCode, eBBlockFromiCode): removed unused code
1307         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1308           corrected comments
1309         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1310           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1311           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1312           (genModOneByte): fixed warning in MSVC
1313         * src/mcs51/main.c (): added comments
1314         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1315
1316 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1317
1318         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1319
1320 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1321
1322         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1323
1324 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1325
1326         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1327         characters arrays of larger size than the declared one.
1328
1329 2005-04-10 Borut Razem <borut.razem AT siol.net>
1330
1331         * src/pic/gen.c (genInline),
1332           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1333           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1334           (findNextInstruction), (findPrevInstruction),
1335           (findInstructionUsingLabel),
1336           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1337         * src/pic/pcode.c (findLabel): added missing '\n'
1338         * src/src.dsp: added SDCCdwarf2.c to the project
1339
1340 2005-04-09 Borut Razem <borut.razem AT siol.net>
1341
1342         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1343
1344 2005-04-08 Raphael Neider <rneider AT web.de>
1345
1346         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1347           into the chain after a given one) and mergeDefmapSymbols (combine
1348           defmap entries for each symbol per pcode)
1349         * (createDefmap): have defmap entries merged in the end
1350         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1351           a symbol before replacing one access type's symbol, merge symbols in
1352           the end (replacement symbol might already have an entry)
1353         * (assignValnums): keep reference to written WREG intact
1354
1355 2005-04-08 Raphael Neider <rneider AT web.de>
1356
1357         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1358           Alpha)
1359
1360 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1361
1362         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1363         bytes
1364
1365 2005-04-07 Raphael Neider <rneider AT web.de>
1366
1367         * device/include/pic16/usart.h: added compatibility defines for
1368           devices with more than one USART
1369         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1370
1371 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1372
1373         * device/lib/Makefile.in: updated for port specific include
1374
1375 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1376
1377         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1378
1379 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1380
1381         * device/include/8051.h,
1382         * device/include/8052.h,
1383         * device/include/at89S8252.h,
1384         * device/include/at89c55.h,
1385         * device/include/at89x051.h,
1386         * device/include/at89x51.h,
1387         * device/include/at89x52.h,
1388         * device/include/mcs51reg.h,
1389         * device/include/reg51.h,
1390         * device/include/reg764.h,
1391         * device/include/regc515c.h,
1392         * device/include/sab80515.h: (re)moved these 12 files
1393         * device/include/mcs51/8051.h,
1394         * device/include/mcs51/8052.h,
1395         * device/include/mcs51/at89S8252.h,
1396         * device/include/mcs51/at89c55.h,
1397         * device/include/mcs51/at89x051.h,
1398         * device/include/mcs51/at89x51.h,
1399         * device/include/mcs51/at89x52.h,
1400         * device/include/mcs51/mcs51reg.h,
1401         * device/include/mcs51/reg51.h,
1402         * device/include/mcs51/reg764.h,
1403         * device/include/mcs51/regc515c.h,
1404         * device/include/mcs51/sab80515.h: and added them here
1405
1406 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1407
1408         * device/include/stdarg.h: changed SDCC specific keywords to double
1409           underlined form.
1410         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1411           mcs51 and ds390.
1412         * device/include/hc08/mc68hc908gp32.h,
1413         * device/include/hc08/mc68hc908jb8.h,
1414         * device/include/hc08/mc68hc908jkjl.h,
1415         * device/include/hc08/mc68hc908qy.h: fixed comments
1416         * device/include/mcs51/README: updated
1417         * device/include/mcs51/c8051f120.h: added PINRSF
1418         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1419         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1420           amidst code. Also inline is not supported.
1421
1422 2005-04-06 Raphael Neider <rneider AT web.de>
1423
1424         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1425         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1426           callers stack/frame pointers
1427
1428 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1429
1430         * device/include/pic16/usart.h: added, missing in previous commit,
1431         * device/include/pic16/adc.h: fixed typo,
1432         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1433         commit,
1434         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1435         <p18fxxx.inc>
1436         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1437         uninitialized because a bug appears with gplink
1438         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1439         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1440         complains for unrecognised option
1441
1442 2005-04-05 Raphael Neider <rneider AT web.de>
1443
1444         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1445           structs as well (using memcpy)
1446         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1447           on ISRs (GOTO has no label)
1448         * src/pic16/device.h: added OF_OPTIMIZE_DF
1449         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1450           new data flow analysis/optimization
1451         * src/pic16/pcode.c: added (prototypes for and implementation of)
1452           dataflow analysis functions, fixed pCodeInstructions' inCond and
1453           outCond values, made RCALL a branch instruction
1454         * (pic16_unlinkpCode): keep C line if possible
1455         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1456           C line moved if possible
1457         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1458         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1459           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1460         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1461           new flow)
1462         * (pic16_getJumptabpCode): NEW, needed in...
1463         * (LinkFlow): fixed handling of jumptables, calls and conditional
1464           branches
1465         * (pic16_InsertCommentAfter): NEW
1466         * (pic16_pCodeReplace): made verbose and flow preserving
1467         * (AnalyzeFlow): added call to data flow analysis
1468         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1469         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1470         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1471
1472 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1473
1474         * src/SDCCast.c (decorateType): fixed bug #1105626
1475
1476 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1477
1478         * device/include/asm/pic16/features.h,
1479         * pic18f*.h headers,
1480         * device/include/pic16/adc.h,
1481         * device/include/pic16/delay.h,
1482         * device/include/pic16/i2c.h,
1483         * device/include/pic16/malloc.h,
1484         * device/include/pic16/stdio.h,
1485         * device/include/pic16/stdlib.h,
1486         * device/include/pic16/string.h,
1487         * device/lib/pic16/libc/stdio/printf_tiny.c,
1488         * device/lib/pic16/libc/stdio/printf_small.c,
1489         * device/lib/pic16/libc/stdio/strmgpsim.c,
1490         * device/lib/pic16/libc/stdio/strmmssp.c,
1491         * device/lib/pic16/libc/stdio/strmusart.c,
1492         * device/lib/pic16/libc/stdio/vfprintf.c,
1493         * device/lib/pic16/libc/stdlib/ltoa.c,
1494         * device/lib/pic16/libc/stdlib/putchar.c,
1495         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1496         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1497         * device/lib/pic16/libc/stdlib/memchrram.c,
1498         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1499         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1500         * device/lib/pic16/libio/adc/adcbusy.c,
1501         * device/lib/pic16/libio/adc/adcread.c,
1502         * device/lib/pic16/libio/adc/adcsetch.c,
1503         * device/lib/pic16/libio/usart/ubaud.c,
1504         * device/lib/pic16/libio/usart/ubusy.c,
1505         * device/lib/pic16/libio/usart/udrdy.c,
1506         * device/lib/pic16/libio/usart/uopen.c,
1507         * device/lib/pic16/libio/usart/uputc.c,
1508         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1509         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1510         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1511         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1512         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1513         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1514         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1515         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1516         specific keywords to double underlined form,
1517         * device/lib/pic16/libc/Makefile.rules,
1518         * device/lib/pic16/libsdcc/Makefile.rules,
1519         * device/lib/pic16/libm/Makefile,
1520         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1521         to compile with C standard set in Makefile.common
1522         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1523         rand.c and crc.c in compilation process,
1524         * device/lib/pic16/libsdcc/int/divuint.c,
1525         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1526         `c' from signed to unsigned,
1527         * device/lib/pic16/startup/crt0.c,
1528         * device/lib/pic16/startup/crt0i.c,
1529         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1530         keywords to double underlined form, bug fixes in _do_cinit function
1531         which prevented the correct initialization of the .idata segment,
1532         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1533         core to enter a infinite loop
1534         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1535
1536 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1537
1538         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1539
1540 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1541
1542         * device/include/Makefile.in: add support for hc08 subdirectory
1543         * device/include/hc08/: new subdirectory
1544         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1545         Lucas Loizaga, thanks!
1546         * device/include/hc08/mc68hc908qy.h,
1547         * device/include/hc08/mc68hc908gp32.h,
1548         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1549         their own directory. Changed internal macro names to use the compiler
1550         reserved namespace. Changed SDCC specific keywords to double
1551         underlined form.
1552         * device/include/math.h,
1553         * device/include/malloc.h,
1554         * device/include/stdarg.h,
1555         * device/include/stdbool.h
1556         * device/include/string.h,
1557         * device/include/tinibios.h,
1558         * device/include/ds400rom.h,
1559         * device/include/8051.h,
1560         * device/include/8052.h,
1561         * device/include/80c51xa.h,
1562         * device/include/at89c55.h,
1563         * device/include/at89S8252.h,
1564         * device/include/at89x51.h,
1565         * device/include/at89x52.h,
1566         * device/include/ds80c390.h,
1567         * device/include/reg764.h,
1568         * device/include/regc515c.h,
1569         * device/include/sab80515.h,
1570         * device/include/mcs51/c8051f000.h,
1571         * device/include/mcs51/c8051f018.h,
1572         * device/include/mcs51/c8051f020.h,
1573         * device/include/mcs51/c8051f040.h,
1574         * device/include/mcs51/c8051f060.h,
1575         * device/include/mcs51/c8051f120.h,
1576         * device/include/mcs51/c8051f300.h,
1577         * device/include/mcs51/c8051f310.h,
1578         * device/include/mcs51/c8051f320.h,
1579         * device/include/mcs51/c8051f330.h,
1580         * device/include/mcs51/c8051f350.h,
1581         * device/include/z180.h: Changed SDCC specific keywords to double
1582         underlined form.
1583
1584 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1585
1586         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1587         18F4455,
1588         * (pic16_assignConfigWordValue): disable testing of configuration
1589         register value with config mask,
1590         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1591         function with port->fun_prefix,
1592         * (genFunction): when generating a naked interrupt function never
1593         create an absolute segment placed in interrupt vector address, place
1594         the actual interrupt function at IVA instead, when an interrupt
1595         function is generated with unspecified interrupt then do not create
1596         the absolute section,
1597         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1598         code for generating a call to generic pointer get/put function with
1599         a call to function pic16_callGenericPointer(),
1600         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1601         the call to the generic pointer get/put functions with prefixing the
1602         function name with port->fun_prefix,
1603         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1604         * src/pic16/main.c (_process_pragma): prefix function with
1605         port->fun_prefix,
1606         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1607         calling assembler, old 18Fxxxx macro is deprecated,
1608         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1609         PC_ASMDIR in while condition,
1610         * (findInstruction): add PC_ASMDIR in while condition,
1611         * (buildCallTree): prefix main with port->fun_prefix,
1612         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1613         identifier for variable with banked access in instructions BTFSS,
1614         BTFSC, BCF, BSF, BTG
1615         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1616         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1617         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1618         perform optimization when enviroment variable NO_REG_OPT is set,
1619         * (insideLRBlock): NEW, return 1 if register is inside an
1620         INF_LOCALREGS block,
1621         * (RemoveRegFromLRBlock): remove a register that is completely
1622         eliminated by register optimization, but it is still left in local
1623         register store/restore in/from stack block,
1624         * (Remove2pcodes): after removing register, check to see if it
1625         should be removed from local register store/restore in/from stack
1626         block,
1627         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1628         DUMMY_READ_VOLATILE,
1629
1630         * device/include/pic16/adc.h: minor prototype modifications and
1631         update,
1632         * device/include/pic16/malloc.h: added GPL notice various
1633         modifications,
1634         * device/include/pic16/stdint.h: NEW, standard header for ints
1635         * device/include/pic16/delay.h: NEW, header for delay functions,
1636         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1637         delay1mtcy,
1638         * device/include/pic16/signal.h: NEW, header providing helper macros
1639         for implementing signal handlers,
1640         * device/include/pic16/stdio.h: added prototypes for functions,
1641         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1642         prototypes for stdin and stdout, added macro PUTCHAR to
1643         automatically implement putchar function prototype,
1644         * device/include/pic16/usart.h: modified and updated USART library,
1645         * device/lib/pic16/libio/adc/,
1646         * device/lib/pic16/libio/i2c: some modifications to improve library
1647         performance,
1648         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1649         family of functions,
1650         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1651         family of functions and other sources,
1652         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1653         of the PIC18Fxx[28] devices,
1654         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1655         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1656         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1657         _do_cinit function, because the previous failed when local variables
1658         where not placed in the same memory bank,
1659         * device/lib/pic16/libsdcc/char/: various modifications to improve
1660         library performance,
1661         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1662         information on the new functions of the c library and more...
1663
1664 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1665
1666         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1667
1668 2005-03-26 Raphael Neider <rneider AT web.de>
1669
1670         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1671           if condition == CARRY)
1672         * (genCmp): adapted to new genSkipc semantics
1673         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1674           on rIfx (genCmp was broken)
1675
1676 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1677
1678         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1679         * src/z80/main.c (_keywords[]),
1680         * src/SDCCglobal.h (struct options),
1681         * src/SDCC.y,
1682         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1683         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1684         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1685         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1686         always available in leading double underscore form. The C99 support is
1687         mostly missing, but it's a start.
1688         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1689         reserved identifier "__data".
1690
1691 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1692
1693         * src/mcs51/peeph.def: fixed bug 1170013
1694
1695 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1696
1697         * device/include/mcs51reg.h: fixed bug 842007
1698
1699 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1700
1701         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1702         last time.
1703
1704 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1705
1706         * src/port.h (struct PORT),
1707         * src/avr/ralloc.c (avr_assignRegisters),
1708         * src/avr/main.c,
1709         * src/ds390/ralloc.c (ds390_assignRegisters),
1710         * src/ds390/main.c,
1711         * src/hc08/ralloc.c (hc08_assignRegisters),
1712         * src/hc08/main.c,
1713         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1714         * src/mcs51/main.c,
1715         * src/pic/ralloc.c (pic14_assignRegisters),
1716         * src/pic/main.c,
1717         * src/pic16/ralloc.c (pic16_assignRegisters),
1718         * src/pic16/main.c,
1719         * src/xa51/ralloc.c (xa51_assignRegisters),
1720         * src/xa51/main.c,
1721         * src/z80/ralloc.c (z80_assignRegisters),
1722         * src/z80/ralloc.h,
1723         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1724         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1725         * src/SDCCcse.h,
1726         * src/SDCCdflow.c (computeDataFlow),
1727         * src/SDCCdflow.h,
1728         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1729         * src/SDCCloop.h,
1730         * src/SDCCcflow.c (*),
1731         * src/SDCCcflow.h,
1732         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1733         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1734         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1735         immedDom() returning wrong block; probably fixes bug #1160833)
1736
1737 2005-03-20 Borut Razem <borut.razem AT siol.net>
1738
1739         * support/scripts/inc2h.pl: WIN32 port
1740
1741 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1742
1743         * device/lib/makefile.in: added abs.c and labs.c
1744
1745 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1746
1747         * device/include/stdint.h: added
1748         * device/lib/abs.c: added
1749         * device/lib/labs.c: added
1750         * device/include/stdlib.h: added abs() and labs() prototypes
1751         * device/lib/libsdcc.lib: added abs and labs
1752         * device/include/float.h,
1753         * device/lib/_fsmul.c,
1754         * device/lib/printf_fast.c,
1755         * device/lib/printf_tiny.c: updated comments
1756
1757 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1758
1759         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1760         bug #1164313
1761
1762 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1763
1764         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1765         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1766
1767 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1768
1769         * device/lib/printf_large.c: removed inline assembly for portability and
1770           readability. Use printf_fast if speed or size are more important.
1771         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1772         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1773
1774 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1775
1776         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1777         prevent compiler warning
1778
1779 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1780
1781         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1782         moved to level 0 and declared as static. Also they are explicit
1783         placed in access bank. This was necessery because some times they
1784         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1785         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1786         optimizations. Currently only compare to unsigned char is implemented,
1787         * src/pic16/gen.c: added fReturnIdx array,
1788         * (struct resolvedIfx) is moved to gen.h and made public,
1789         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1790         * (aopForSym): added an optimization to directly store in stack of
1791         the operand of a SEND iCode,
1792         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1793         but as registers instead (AOP_REG) using the fReturnIdx array,
1794         * (pic16_freeAsmop): remove the freed register from the
1795         _G.sregsAlloc field,
1796         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1797         a compare of 'WREG',
1798         * (pic16_popGetTempRegCond): changed function prototype, now
1799         function takes also a bitVector argument v which holds the current
1800         set of registers that are allocated for stack access by aopForSym,
1801         registers allocated in aopForSym for accessing stack symbols are not
1802         any more part of the functions usedRegs field,
1803         * (genCall): some times aopOp is called for a stack variable to be
1804         send, aopForSym might perform the push, if this is true make sure
1805         that genCall doesn't push the variable twice by testing _G.resDirect,
1806         * (genFunction): changed testing for unspecified interrupt number
1807         from 256 to INTNO_UNSPEC,
1808         * modified selection scheme of frame pointer generation. Previously
1809         if function did use local registers a frame pointer was generated,
1810         now a frame pointer is generated only if function has arguments
1811         (that need PLUSW2 register access), or has stack arguments, or the
1812         compiler is not instructed to omit the frame pointer,
1813         * (genEndFunction): before restoring local registers that were saved
1814         in the function preamble, also restore the registers that *might*
1815         have been allocated for stack access,
1816         * (genRet): removed some old comments,
1817         * (genCmp, the active (RN's) version): added a call to the
1818         pic16_genCmp_special function to perform the compare with a more
1819         robust and optimized way,
1820         * (genInline): a feature has been added in inline code generation,
1821         which allows a wildcard variable substitution when writing inline
1822         assembly. Code is incomplete and experimental therefore undocumented,
1823         * (genCast): changed order of aopOp for result and right to allow
1824         aopForSym to directly load the result if possible,
1825         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1826         perform an optimized compare on some selected special occasions,
1827         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1828         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1829         generate an IVT any more,
1830         * src/pic16/main.c (pic16_optionsTable): added command line option
1831         --optimize-cmp,
1832         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1833         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1834         macros,
1835         * src/pic16/NOTES: Raphael Neider added in list of active developers
1836         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1837         jumptable_end to prevent bug #,
1838         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1839         inCond and outCond fields,
1840         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1841         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1842         turn off register spilling,
1843         * (packRegsForOneUse): synced with other ports' versions although it
1844         is not used currently,
1845         * (pic16_packRegisters): added an optimization while reading
1846         structure bitfields, some registers may be saved (malloc code is
1847         decreased by 80 bytes)
1848
1849 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1850
1851         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1852         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1853         this can be optimized more?
1854
1855 2005-03-10 Raphael Neider <rneider AT web.de>
1856
1857         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1858           genNearPointerGet): (hopefully) fixed access to bitfields via
1859           pointers (p->bitN = x; and x = p->bitN; failed)
1860
1861 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1862
1863         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1864
1865 2005-03-09 Raphael Neider <rneider AT web.de>
1866
1867         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1868
1869 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1870
1871         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1872         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1873           (regTypeNum): set REG_BIT type if necessary
1874         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1875         * support/regression/tests/critical.c: check bug 1144613
1876
1877 2005-03-02 Raphael Neider <rneider AT web.de>
1878
1879         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1880
1881 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1882
1883         * src/avr/ralloc.c (serialRegAssign),
1884         * src/ds390/ralloc.c (serialRegAssign),
1885         * src/hc08/ralloc.c (serialRegAssign),
1886         * src/mcs51/ralloc.c (serialRegAssign),
1887         * src/pic/ralloc.c (serialRegAssign),
1888         * src/pic16/ralloc.c (serialRegAssign),
1889         * src/xa51/ralloc.c (serialRegAssign),
1890         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1891
1892 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1893
1894         * src/SDCCast.c (decorateType): fixed bug 1124787
1895
1896 2005-02-20 Hubert Sack <sack AT digiplan.de>
1897         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1898
1899         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1900         patch #1121755
1901
1902 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1903
1904         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1905         to keep the correct label reference count when adding/removing references
1906         to labels. A peephole file using this is appended to patch #1144962.
1907
1908 2005-02-14 Raphael Neider <rneider AT web.de>
1909
1910         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1911         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1912         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1913           retrievals of result operand's value on assignment
1914
1915 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1916
1917         * device/include/pic16/string.h: modified prototype for memccpy()
1918         to memccpy(void *, void *, char, size_t)
1919         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1920         check whether to omit frame pointer or not,
1921         * (genInline): convert all occurences of "\n" to LF in inline
1922         assembler blocks, this helps formatting the inline text,
1923         * (pic16_loadFSR0): modified prototype,
1924         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1925         removed some 8051 legacy code,
1926         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1927         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1928         before allocating temporary registers in functions,
1929
1930 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1931
1932         * support/regression/tests/bitvars.c: corrected the "fix"
1933
1934 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1935
1936         * support/regression/tests/bitvars.c,
1937         * support/regression/tests/bitwise.c,
1938         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1939
1940 2005-02-10 Raphael Neider <rneider AT web.de>
1941
1942         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1943           different size for Alpha
1944         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1945
1946 2005-02-09 Raphael Neider <rneider AT web.de>
1947
1948         * src/SDCC.lex(doPragma) : save and restore warning options as well
1949           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1950         * have #pragma less_pedantic set the errorlevel to WARNING
1951           (fixes #1117001)
1952         * (cloneOptimize) : fixed wrong malloc's size
1953         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1954           facilitate correct handling of #pragma (save|restore)
1955
1956 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1957
1958         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1959
1960 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1961
1962         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1963
1964 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1965
1966         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1967
1968 2005-02-02 Raphael Neider <rneider AT web.de>
1969
1970         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1971         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1972         * (pic16_storeForReturn): fixed to allow returning function pointers
1973         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1974         * device/include/pic16/{stddef.h,stdbool.h}: added
1975
1976 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1977
1978         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1979
1980 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1981
1982         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1983         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1984          appeared to be required
1985
1986 2005-01-31 Borut Razem <borut.razem AT siol.net>
1987
1988         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1989           include/mcs51 and include/z80 directories to the package
1990
1991 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1992
1993         * src/hc08/gen.c (genFunction): fixed bug #1112752
1994
1995 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1996
1997         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1998
1999 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2000
2001         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2002
2003 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2004
2005         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2006
2007 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2008
2009         * device/include/c8051fxxx.h: removed these 6 files
2010         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2011
2012 2005-01-26 Raphael Neider <rneider AT web.de>
2013
2014         * src/pic16/gen.c (genAssign): fixed assignment from longs
2015           in codespace (were cut to three bytes)
2016         * (genDummyRead): implemented (except for CODESPACE...),
2017           fixed bug #1108575
2018         * src/pic16/glue.c (emitStatistics): beautified
2019         * device/lib/pic16/libm/Makefile: added include path
2020
2021 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2022
2023         * src/z80/gen.c (aopPut): fixed bug #1103902
2024
2025 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2026
2027         * device/lib/expf.c: fixed bug #1095792
2028
2029 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2030
2031         * device/lib/pic16/libm: added Math library sources
2032
2033 2005-01-24 Raphael Neider <rneider AT web.de>
2034
2035         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2036           to enable upcast to pCodeOpReg2 (there is no type tag to
2037           differenciate the two and pic16_popGet2p cast into PCOR2)
2038         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2039           (sizeof(sectNames) changed to sizeof(sectName))
2040           Both patches fix segfaults under MinGW.
2041
2042 2005-01-23 Raphael Neider <rneider AT web.de>
2043
2044         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2045           Safe_[mc]?alloc()'ed variables
2046         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2047           of (byte sized) temporaries (assign them to WREG for now)
2048         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2049           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2050           this might fix SIGSEGVs on MinGW...
2051         * src/SDCCopt.c (killDeadCode): restored original behaviour
2052           (volatile operands might get thrown away though)
2053
2054 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2055
2056         * src/pic16/gen.c: fixed bug #1106975,
2057         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2058         pointer update, INTCON is saved, global interrupts are disabled and
2059         restored after updateing TOS.
2060         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2061         * added function attribute 'shadowregs' to take advantage of shadow
2062         registers,
2063         * added function attribute 'wparam' as an alternative to the wparam
2064         pragma,
2065         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2066         user declares a non-ISR function as 'shadowregs',
2067         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2068
2069 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2070
2071         * .version: bumped version number to 2.4.8
2072         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2073         pic16 port,
2074         * device/lib/pic16/libio/i2c/: I2C module support library,
2075         * device/include/pic16/i2c.h: I2C support library header,
2076         * device/lib/pic16/libc/stdio/: standard IO support sources,
2077         * (printf_small.c): printf_small() source, supports float print,
2078         * (printf_tiny.c): printf_tiny() source, does not support floats,
2079         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2080         enable global optimizations for entire library source, other
2081         Makefiles in the source tree are also modified to reflect this,
2082         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2083         function,
2084         * doc/sdccman.lyx: updated to reflect new changes,
2085         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2086         sym->onStack if-case,
2087         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2088         sbit, idata, _idata, xdata, _xdata,
2089         * added pragma library, to link an external library, (see doc),
2090         * removed command line options, --pomit-config-words, --pomit-ivt,
2091         --pleave-reset-vector,
2092         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2093         when calling assembler to reflect memory model used, also define
2094         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2095         reflect stack model used,
2096         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2097         on stack return NULL,
2098
2099 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2100
2101         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2102           of the operands is volatile. Fixes #1020220
2103
2104 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2105
2106         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2107         * (OptimizeRegUsage): make sure that there is really no other flow where
2108           the first pCode is used
2109
2110 2005-01-22 Raphael Neider <rneider AT web.de>
2111
2112         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2113           to fix #1106967 (pCode->seq are not set up correctly)
2114
2115 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2116
2117         * src/SDCCglue.c (glue): make sure code area is declared before the
2118         static initialization area.
2119
2120 2005-01-21 Raphael Neider <rneider AT web.de>
2121
2122         * device/lib/Makefile.in: fixed test for pic16 install dir
2123         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2124           optimizations
2125         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2126           added --optimize-goto compiler switch and pragma wparam documentation
2127         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2128         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2129           and PRODH closing bug #1071770 (peephole optimizer)
2130
2131 2005-01-19 Raphael Neider <rneider AT web.de>
2132
2133         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2134           cmdLine buffers (used when calling sdcpp...) are large enough
2135           (MAX_PATH=256 truncates arguments leading to system halts when
2136           used in MinGW...)
2137         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2138         * (genUminus): rewritten to for efficiency
2139         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2140           used uninitialized in some cases)
2141         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2142           copy the third byte from the int -- now assumes 0x80 (data memory)
2143         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2144           operands (genAddLit expects the iCode's operands to swapped as
2145           well), fixed leftover bytes (crashed for short left operands)
2146         * (pic16_genMinusDec): performance improvements, removed false
2147           PIC14 emitSKPNCs
2148         * (pic16_genMinus): fixed to cope with differently sized operands
2149         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2150           for --obanksel > 1
2151         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2152         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2153           new banksel optimization
2154         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2155           analysis for temporary registers (segfaults...)
2156         * src/pic16/peeph.def: added rule
2157
2158 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2159
2160         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2161         which converts a float number to its ASCII representation
2162         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2163         functions to convert the fractional and integer part of a float to ASCII,
2164         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2165         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2166         ram
2167         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2168         _STATMEM macros,
2169         * device/include/pic16/adc.h: added GPL info,
2170         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2171         a pCodeOp as tested operand,
2172         * (genNearPointerGet): optimized bit testing, does not use
2173         intermediate register for bit value, test directly instead with
2174         BTFSS, BTFSC, works only for single bits,
2175         * (genpic16Code): dump the name of the iCode in the asm,
2176         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2177         renamed to pic16_decodeOp,
2178         * (serialRegAssign): do not allocate a temporary register for iCode
2179         sequences that test a single bit for 1/0
2180
2181 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2182
2183         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2184         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2185         access stack and frame pointers. They are initially assigned to
2186         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2187         accessing SFRs. Updated all occurences of modification of stack or
2188         frame pointer in gen.c and pcode.c,
2189         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2190         assigning of a literal value to pointers,
2191         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2192         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2193         selected
2194
2195 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2196
2197         * doc/sdccman.lyx: update documentation about stack pragma, added
2198         some info for stack memory models
2199
2200 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2201
2202         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2203
2204 2005-01-08 Raphael Neider <rneider AT web.de>
2205
2206         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2207           udata sections to fix bug #1097823
2208
2209 2005-01-05 Raphael Neider <rneider AT web.de>
2210
2211         * src/pic16/gen.c (genGenericShift): added handling of differently
2212           sized left operand and result
2213
2214 2005-01-04 Raphael Neider <rneider AT web.de>
2215
2216         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2217         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2218           to hold the condition bit)
2219         * added new version of genCmp (old code available via #define)
2220         * added new version of genShiftLeft/genShiftRight in a generic
2221           way, now supports shifting by negative values
2222         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2223           shiftCount (expected by genGenericShift)
2224         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2225         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2226           dump
2227         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2228           is an invalid literal too...)
2229
2230 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2231
2232         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2233         from Raphael Neider,
2234         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2235         for 8-bit literals. This fixes some literal operands which are sign
2236         extended to 16-bits ints when instruction needs only 8-bits.
2237
2238 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2239
2240         * device/lib/logf.c: added mcs51 assembly version
2241         * device/lib/expf.c: added mcs51 assembly version
2242         * device/lib/_logexpf.c: new shared asm code for expf and logf
2243         * device/include/math.h: add defines for assembly math library
2244         * device/lib/Makefile.in: build new _logexpf.c
2245         * device/lib/libfloat.lib: use new _logexpf.c
2246
2247 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2248
2249         * src/pic/device.c
2250         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2251           device types which have less than 0x7f registers.
2252
2253 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2254
2255         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2256
2257 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2258
2259         * device/lib/printf_fast.c: only build on supported arch.
2260         * device/lib/printf_tiny.c: only build on supported arch.
2261         * device/lib/printf_fast_f.c: only build if asm float lib
2262         * device/lib/_fsget1arg.c: only build if asm float lib
2263         * device/lib/_fsget2args.c: only build if asm float lib
2264         * device/lib/_fsnormalize.c: only build if asm float lib
2265         * device/lib/_fsreturnval.c: only build if asm float lib
2266         * device/lib/_fsrshift.c: only build if asm float lib
2267         * device/lib/_fsswapargs.c: only build if asm float lib
2268         * device/include/stdio.h: don't provide print_fast,
2269           print_fast_f, print_tiny prototypes if --xstack used
2270
2271 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2272
2273         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2274         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2275           to the SOURCES
2276
2277 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2278
2279         * device/lib/printf_fast_f.c: same as printf_fast, but
2280           with floating point enabled
2281         * device/lib/printf_fast.c: minor tweaks
2282         * device/include/stdio.h: add printf_fast_f
2283
2284 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2285
2286         * src/SDCCmain.c: make --float-reent default for mcs51
2287         * device/lib/_fsadd.c: added mcs51 assembly version
2288         * device/lib/_fssub.c: added mcs51 assembly version
2289         * device/lib/_fsmul.c: added mcs51 assembly version
2290         * device/lib/_fsdiv.c: added mcs51 assembly version
2291         * device/lib/_fseq.c: added mcs51 assembly version
2292         * device/lib/_fsneq.c: added mcs51 assembly version
2293         * device/lib/_fsgt.c: added mcs51 assembly version
2294         * device/lib/_fslt.c: added mcs51 assembly version
2295         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2296         * device/lib/Makefile.in: add _fscmp to build
2297         * device/lib/libfloat.lib: add _fscmp to build
2298
2299 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2300
2301         * device/lib/_fs2slong.c: added mcs51 assembly version
2302         * device/lib/_fs2sint.c: added mcs51 assembly version
2303         * device/lib/_fs2schar.c: added mcs51 assembly version
2304         * device/lib/_fs2ulong.c: added mcs51 assembly version
2305         * device/lib/_fs2uint.c: added mcs51 assembly version
2306         * device/lib/_fs2uchar.c: added mcs51 assembly version
2307         * device/lib/_slong2fs.c: added mcs51 assembly version
2308         * device/lib/_sint2fs.c: added mcs51 assembly version
2309         * device/lib/_schar2fs.c: added mcs51 assembly version
2310         * device/lib/_ulong2fs.c: added mcs51 assembly version
2311         * device/lib/_uint2fs.c: added mcs51 assembly version
2312         * device/lib/_uchar2fs.c: added mcs51 assembly version
2313         * device/include/float.h: added #define to select asm vs c
2314
2315 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2316
2317         * device/lib/printf_fast.c: improvements to float output
2318         * device/include/float.h: add defines for assembly float library
2319         * device/lib/_fsget1arg.c: receive 1 float arg
2320         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2321         * device/lib/_fsnormalize.c: normalize a float
2322         * device/lib/_fsreturnval.c: return float, various helper routines
2323         * device/lib/_fsrshift.c: right shift a float's mantissa
2324         * device/lib/_fsswapargs.c: swap 2 floats
2325         * device/lib/Makefile.in: build these 6 new files for mcs51
2326         * device/lib/libfloat.lib: add these 6 files to the library
2327
2328 2004-12-26 Borut Razem <borut.razem AT siol.net>
2329
2330         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2331           built by gcc 3.4.2
2332
2333 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2334
2335         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2336           and fully reentrant and register bank neutral.
2337         * device/lib/printf_fast.c: added float (not enabled by default),
2338           added compact/slower integer (also not enabled by default),
2339           improved size/speed of fast integer code, other minor changes
2340         * device/include/stdio.h, device/lib/Makefile.in,
2341           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2342
2343 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2344
2345         * src/pic16/pcode.c: declaring variables other than at the start of a
2346           block is not supported in C by VC6.
2347
2348 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2349
2350         * applied a previous patch from Raphael Neider that wasn't included
2351         in the previous commits, which fixes infinite loops within jumptable
2352         improvements,
2353         * made some fixes that previous patches introduced
2354
2355 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2356
2357         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2358         that fixes an issue with AOP_PCODE asmop's offset,
2359         * (pic16_popCopyReg): update instance field too,
2360         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2361         function of pic port,
2362         * (genCmp, genAnd, genAssign),
2363         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2364
2365 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2366
2367         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2368         variables initial values to idata section,
2369         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2370         variables in some functions. This utilizes parmBytes field of iCode
2371         structure to hold the offset of the variable in stack. (might be
2372         able to use the stack field too?)
2373         * applied patch from Raphael Neider # ### , # ###
2374         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2375         variable initial values in idata section,
2376         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2377         for static variables with initial value
2378         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2379         applied fix in while loop from Raphael Neider.
2380
2381 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2382
2383         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2384         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2385         * src/ds390/ralloc.c (serialRegAssign): spill bits
2386         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2387         * support/Util/SDCCerr.c,
2388         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2389         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2390         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2391
2392 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2393
2394         * device/include/sdcc-lib.h: inserted LGPL, added includes
2395           asm/ds390/features.h and asm/mcs51/features.h
2396         * device/include/asm/default/features.h,
2397         * device/include/asm/gbz80/features.h,
2398         * device/include/asm/z80/features.h: added empty _AUTOMEM
2399           and _STATMEM
2400         * device/include/asm/ds390/features.h,
2401         * device/include/asm/mcs51/features.h: added files with defines for
2402           _AUTOMEM and _STATMEM indicating automatic and static storage class
2403         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2404         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2405         * src/SDCCicode.c (geniCodeCast),
2406         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2407         * src/SDCCloop.c (loopInduction): removed unused variable lr
2408         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2409           to convertToFcall to include char modulo (RFE 1065037), added check
2410           if left operand is unsigned and use abs of literal value
2411         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2412           as it doesn't work after conversion from peephole.def to peephole.rul
2413         * src/mcs51/gen.c (toBoolean): added check for size,
2414           (genModOneByte): optimized code for signed char modulo a literal
2415           power of 2 (thanks to Hubert Sack),
2416           (genRRC): removed unnecessary "clr c",
2417           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2418         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2419           jump optimization,
2420           swapped rules 256.c and 256.d,
2421           extended 256.d by using new multiple checks (thanks Erik),
2422           added rules 256.e and 256.f,
2423           updated rule 261.a and 261.b to new generated code
2424         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2425
2426 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2427
2428         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2429           induction related bugs, including first part of bug #1074377
2430
2431 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2432
2433         * applied patch from bug-report #1076292,
2434         * applied patches for genAnd and Goto-optimizations for Raphael
2435         Neider,
2436         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2437         dump a less iCode information,
2438         * src/pic16/device.h (pic16_options_t): added field debgen,
2439         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2440         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2441         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2442         puclic,
2443         * (various functions): added macros FENTRY and FENTRY2 to functions,
2444         to emit function prologue,
2445         * (various functions): fixed indentation,
2446         * (genNearPointerGet): fixed loading of FSR0,
2447         * (genPackBits): applied patch from Raphael Neider to fix updating
2448         of FSR0 and touching only the modified bits,
2449         * src/pic16/genarith.c (various functions): added macros FENTRY to
2450         emit function prologue in comments,
2451         * src/pic16/pcode.h: added functions debugf2, debugf3,
2452         * src/pic16/ralloc.c: partial fix for packForPush caused
2453         segmentation fault,
2454
2455 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2456
2457         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2458           <stsp AT users.sourceforge.net> with reversed byte order
2459         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2460
2461 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2462
2463         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2464           bug #1074377
2465         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2466         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2467
2468 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2469
2470         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2471
2472 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2473
2474         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2475           conditions,
2476           (setFromConditionArgs): friendly operand parser for peephole rules,
2477           (operandBaseName, operandsNotRelated): new peephole condition
2478           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2479           architecture specific register naming into account, handles n-way
2480           comparisons, and supports quoted literals
2481         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2482
2483 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2484
2485         * src/mcs51/peeph.def: fixed bug #1076940
2486
2487 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2488
2489         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2490
2491 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2492
2493         Adding support for replacing ljmps with sjmps in jumptables
2494         generated for switch statements. For now you need to set the
2495         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2496         Now 4 algorithms for mcs51 jumptable generation are used:
2497         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2498         addresses loaded pc-relative for up to 112 cases and stack-pushing
2499         target addresses loaded with offset from dptr for up to 256 cases.
2500
2501         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2502         * src/mcs51/main.c: adapted constants for switch table generation
2503         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2504
2505 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2506
2507         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2508         * support/regression/tests/bug1057979.c: added test for bug 1073386
2509
2510 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2511
2512         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2513         compilers
2514
2515 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2516
2517         * src/pic16/device.h,
2518         * src/pic16/genarith.c,
2519         * src/pic16/glue.c,
2520         * src/pic16/main.c,
2521         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2522
2523 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2524
2525         Large cummulative patch for pic16 port.
2526         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2527         to call when a stack overflow occurs,
2528         * (malloc.h): added CVS Id tag,
2529         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2530         variable,
2531         * added libc directory. The current version of LibC contains string
2532         functions, ctype functions and macros and some functions of the
2533         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2534         be extensively tested in the future. Standard disclaimer here.
2535         Library is not automatically build yet. But one can build it by
2536         invoking 'make' inside the libc directory.
2537         * added ADC library under libio. Preliminary version yet.
2538
2539         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2540         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2541         aopForRemat() now and not by pic16_aopOp(),
2542         * (pic16_popGetTempReg): removed warning messgae when allocating
2543         temporary registers, its a buggy feature and will be removed,
2544         * (pic16_popGet): set register instance field in AOP_CRY,
2545         * (pic16_outBitC): fixed for results in size greater than 1,
2546         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2547         * (pic16_storeForReturn): optimized return of 0,
2548         * (genCmp): experimental code for new genCmp which uses PIC18's
2549         special compare&skip instructions. Initial tests fail some times
2550         with variables grater than 1 byte in size, so new code is disabled,
2551         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2552         a single bit,
2553         * (genCast): began a fix to optimize the casting of a bit to another
2554         bit, now assigning a bitfield to another bitfield will fail, sorry,
2555         * src/pic16/main.c: disabled the use of lr-support feature,
2556         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2557         * added some function prototypes, added function _debugf prototype,
2558         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2559         bits with offset (case PO_GPR_BIT),
2560         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2561         command line,
2562         * (isBankInstruction): modified to return 0 for no banking instruction,
2563         and 1 for banking instruction,
2564         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2565         caused stop processing pCodes after a inline assembly block,
2566         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2567         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2568         registers when it shouldn't,
2569         * src/pic16/ralloc.c (allocReg): add preliminary support for
2570         supporting a limited set of temporary registers,
2571
2572 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2573
2574         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2575           genDataPointerSet): ensure assignments always copy in MSB to LSB
2576           order,
2577           (loadRegFromAop): recognize CLRH optimization,
2578           (genFunction): optimize RECEIVE iCodes in reentrant functions
2579
2580 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2581
2582         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2583           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2584           selected.
2585         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2586         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2587           contiguous with data
2588
2589 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2590
2591         * device/lib/_gptrget.c (_gptrget),
2592         * device/lib/_gptrgetc.c (_gptrgetc),
2593         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2594           instead of sjmp to ret
2595         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2596           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2597
2598 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2599
2600         * .version: bumped version to 2.4.7
2601         * device/lib/_gptrget.c (_gptrget): is now _naked
2602         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2603         * device/lib/_gptrput.c (_gptrput): is now _naked
2604         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2605           (createFunction): fixed xstack
2606         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2607         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2608           or bit either,
2609           (geniCodeCritical): store original interrupt state in an iTemp bit
2610           var unless stack-auto
2611         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2612         * src/SDCCmain.c (setIncludePath): added include/target to search path
2613         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2614         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2615           prototype,
2616           (processFuncArgs): put bit vars in bit area
2617         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2618           unsaveRBank): fixed xstack,
2619           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2620           (genFunction, genEndFunction): fixed xstack,
2621           (genAssign): optimization don't walk backwards through mem
2622         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2623         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2624         * support/regression/Makefile: also make library (for stack-auto) when
2625           making "all" and added "test-mcs51-xstack-auto"
2626         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2627         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2628         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2629         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2630         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2631           make-library by MAKE_LIBRARY
2632         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2633           regression tests for xstack
2634         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2635         * support/regression/tests/critical.c: test for critical on mcs51
2636
2637 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2638
2639         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2640           built version of sdcc instead of installed version
2641
2642 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2643
2644         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2645         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2646           vprintf.c now
2647         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2648         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2649           WARNING: remove device/lib/build/z80/printf.o by hand when
2650           updating from previous build!
2651         * device/lib/z80/printf.c: updated comment
2652         * support/regression/tests/bug1057979.c: test all ports now
2653         * support/regression/tests/bug1065458.c: file added
2654
2655 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2656
2657         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2658           *_start and *_end symbols for static functions
2659
2660 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2661
2662         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2663           and search crt0.o in all library paths,
2664           (setIncludePath): proper handling of --nostdinc,
2665           (setLibPath): proper handling of --nostdlib
2666         * support/regression/Makefile,
2667         * support/regression/ports/ds390/spec.mk,
2668         * support/regression/ports/gbz80/spec.mk,
2669         * support/regression/ports/hc08/spec.mk,
2670         * support/regression/ports/mcs51/spec.mk,
2671         * support/regression/ports/mcs51-large/spec.mk,
2672         * support/regression/ports/mcs51-stack-auto/spec.mk,
2673         * support/regression/ports/z80/spec.mk: use include and lib files from
2674           built version of sdcc instead of installed version
2675         * doc/sdccman.lyx: fixed typo in --nostdinc
2676
2677 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2678
2679         * src/pic/pcode.c,
2680         * src/pic/device.c,
2681         * src/pic/ralloc.c,
2682         * src/pic/gen.c : added support to generate code for struct bit fields.
2683
2684 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2685
2686         * as/xa51/xa_version.h,
2687         * device/include/errno.h,
2688         * device/include/regc515c.h,
2689         * device/lib/_itoa.c,
2690         * device/lib/_ltoa.c,
2691         * device/lib/ser_ir_cts_rts.c,
2692         * sim/ucsim/xa.src/glob.cc,
2693         * sim/ucsim/xa.src/inst_gen.cc,
2694         * sim/ucsim/xa.src/xa_bit.cc,
2695         * sim/ucsim/xa.src/xa_sfr.cc,
2696         * sim/ucsim/z80.src/inst_dd.cc,
2697         * sim/ucsim/z80.src/inst_fdcb.cc,
2698         * support/scripts/keil2sdcc.pl,
2699         * src/pic16/pic16.dsp,
2700         * src/pic16/pic16a.dsp: corrected cvs line endings
2701         * device/lib/printf_large.c: fixed bug 1057979
2702         * src/pic16/gen.c: fixed non-C standard code
2703         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2704         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2705         * support/regression/ports/mcs51/support.c: reload T1 asap
2706         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2707           pdata use and clear idata startup behaviour
2708         * support/regression/tests/bug1057979.c: added
2709
2710 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2711
2712         * device/examples/ds390/ow390/ad26.h,
2713         * device/examples/ds390/ow390/cnt1d.h,
2714         * device/examples/ds390/ow390/crcutil.c,
2715         * device/examples/ds390/ow390/ownet.h,
2716         * device/examples/ds390/ow390/owsesu.c,
2717         * device/examples/ds390/ow390/swt12.h,
2718         * device/examples/ds390/ow390/swtoper.c,
2719         * device/examples/ds390/ow390/temp10.h,
2720         * device/examples/ds390/ow390/thermodl.c,
2721         * device/examples/ds390/tinitalk/tinitalk.dsp,
2722         * device/examples/ds390/tinitalk/tinitalk.dsw,
2723         * device/examples/mcs51/clock/hw.h,
2724         * device/examples/mcs51/simple2/go.bat,
2725         * device/examples/serialcomm/windows/serial.h,
2726         * device/examples/xa51/dummy.c,
2727         * device/examples/xa51/hello.c,
2728         * device/include/80c51xa.h,
2729         * device/include/at89x051.h: corrected cvs line endings
2730
2731 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2732
2733         * src/pic16/main.c (options): added command line --gstack, to trace
2734         stack over/under flows,
2735         * added pragma 'wparam' to allow passing first byte of function
2736         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2737         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2738         call to __gstack_test function and sets up the symbol as extern,
2739         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2740         * popaop): added call to pic16_testStackOverflow,
2741         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2742         wparamList list,
2743         * (genCall, genPcall): now all parameters are passed via stack
2744         except in functions that are pass to wparam pragma in which WREG is
2745         used too,
2746         * (genPcall): REENTRANT flag is checked to see if variable prototype
2747         contains reentrant keyword, don't call a non-reentrant function, via
2748         a reentrant function pointer or vice versa, functions are never
2749         passed via WREG,
2750         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2751         D.Winkler,
2752         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2753         SIGSEGV when accessing a NULL register stucture,
2754         * (pic16_printGPointerType): modified to handle UPPER modifier for
2755         function initializers, changed prototype of function to simpler one,
2756         * (pic16_printIvalFuncPtr): check to see if function is already
2757         added in externs list,
2758         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2759         optimized a move from W to SFR with a move to the same register
2760         later after a CALL,
2761         * device/lib/pic16/debug: NEW directory, contains debug features
2762         which are enabled when linking with libdebug.lib, currently command
2763         line option --gstack enables stack pointer tracing for over/under
2764         flow, corresponding sources are in debug/gstack
2765
2766 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2767
2768         * doc/sdccman.lyx: updated SDCC version,
2769         * (PIC16 port): update list of command line options,
2770         * src/pic16/device.h (structure pic16_options_t): added field gstack
2771         to enable stack overflow tracing on push/pops,
2772         * src/pic16/device.c (statistics structure): added statistics
2773         structure,
2774         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2775         pic16_dump_int_registers): increase statistics counters for each
2776         * variable which is encountered
2777         * (pic16_dump_usection): emit each .udata variable to its own udata
2778         section,
2779         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2780         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2781         parameters via stack, otherwise use old scheme,
2782         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2783         assembler output file,
2784         * src/pic16/main.c: added command line options --gstack to enable
2785         push/pop tracing for stack overflow,
2786         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2787         instructions): added size of each instruction,
2788         * (pic16_countInstruction): estimate size of instructions in
2789         the_pFile list, inline assembly blocks are not counted,
2790         * (pic16_FixRegisterBanking): trace previous register usage, when
2791         banksel optimizations is greater than 0, don't emit a redudant
2792         banksel directive,
2793
2794 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2795
2796         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2797         * src/pic16/ralloc.c : applied same fix for pic16.
2798         * src/pic/gen.c : tidied it up a little.
2799
2800 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2801
2802         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2803         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2804
2805 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2806
2807         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2808
2809 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2810
2811         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2812         non-reentrant function __modsint in the interrupt function (thus
2813         corrupting math operations during serial I/O)
2814         * device/lib/ser_ir.c: as above, changed buffersize
2815         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2816         256.c,d for zeroing
2817         * doc/Makefile: added option -t for rsync
2818
2819 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2820
2821         * src/SDCCast.h (struct ast),
2822         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2823
2824 2004-10-20 Borut Razem <borut.razem AT siol.net>
2825
2826         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2827         package
2828
2829 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2830
2831         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2832         makefile targets,
2833         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2834         support functions to replace long sequences of MOVFF's from access
2835         bank registers to stack and vice versa,
2836         * src/pic16/device.h: added new field opt_flags, where optimization
2837         flags can be set to enable certain features,
2838         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2839         * pBlock, (genFunction, genEndFunction): surroung loop for
2840         saving/loading used registers in stack with PC_INFO pCodes,
2841         INF_LREGS. Code in between can then be optimized by pCode optimizer
2842         to support function calls,
2843         * (genDataPointerSet): fixed bug which loaded float fields in
2844         structures with corrupt data,
2845         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2846         in a standard way debug info on stderr. Feature used for developing
2847         and debugging only,
2848         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2849         obsolete chunks of code,
2850         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2851         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2852         * pic16/src/pcode.c (pic16_newpCodeInfo,
2853         * (pic16_newpCodeOpLocalRegs),
2854         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2855         feature,
2856         * (pic16_pCodeConstString): printing of the initial value of a
2857         symbol as a comment is inhibited since parsing was already done by
2858         copyStr and output is corrupt,
2859         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2860
2861 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2862
2863         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2864
2865 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2866
2867         * as/mcs51/lkarea.c: removed old K&R style,
2868           (lnksect): changed check on boundary error,
2869           (lnksect2): changed check on boundary error,
2870           (lnksect2): extend XSTK to end of page if size = 1
2871         * as/mcs51/lkmain.c: removed old K&R style,
2872           (Areas51): create l_IRAM symbol
2873         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2874         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2875           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2876         * device/lib/_mullong.c: added version to be compiled with xstack
2877         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2878         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2879         * device/lib/mcs51/crtxstack.asm: fixed comment
2880         * src/SDCCglue.c: maxInterrupts defaults to 0,
2881           (emitMaps): added pdata,
2882           (createInterruptVect): (re)moved default,
2883           (glue): added pdata,
2884           (glue): moved __start__xstack to XSTK with default size 1
2885         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2886           and options.float_rent when options.stackAuto is set,
2887           (linkEdit): only write XDATA_NAME if provided on command line
2888         * src/SDCCmem.h,
2889         * src/SDCCmem.c: added pdata
2890         * src/port.h: added pdata_name to PORT
2891         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2892           (saveRegisters, unsaveRegisters): removed usage of B,
2893           (genMinus): fixed accumulator clash,
2894           (genJumpTab): added comment, this needs another look
2895         * src/mcs51/gen.c: added check for "B in use" paranoia,
2896           added pushB() and popB()
2897         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2898           chance
2899         * src/avr/main.c,
2900         * src/ds390/main.c,
2901         * src/hc08/main.c,
2902         * src/mcs51/main.c,
2903         * src/pic/main.c,
2904         * src/pic16/main.c,
2905         * src/xa51/main.c,
2906         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2907           added PSEG (PAG,XDATA) or NULL to port specifier
2908         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2909         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2910           (_mcs51_genInitStartup): removed __start__xstack equ,
2911           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2912         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2913         * src/z80/gen.c (_rleAppend): fixed warnings
2914         * support/regression/tests/zeropad.c: added pdata test
2915         * .version: bumped to 2.4.6
2916
2917 2004-10-17 Borut Razem <borut.razem AT siol.net>
2918
2919         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2920         as a part of nightly build
2921
2922 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2923
2924         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2925         WREG holds the first byte function parameters,
2926         * (aopForSym): take special case for symbols which are in FARSPACE
2927         but in CODESPACE too,
2928         * (assignResultValue): modified to take into account _G.useWreg,
2929         * (genCall): don't use wreg for parameter passing when function is
2930         declared as reentrant, too, added optimization INCF to stack
2931         pointer when stack parameter count is 1,
2932         * (genFunction, genEndFunction): refurnished and fixed to not using
2933         wreg for passing parameters when function has varargs or is
2934         reentrant, fixed bug with symbol name compare for generating
2935         functions in absolute address,
2936         * (pic16_storeForReturn): refurnished,
2937         * (genCmp): began writing a new version of the function, not ready
2938         yet, therefore it is disabled,
2939         * (genAssign): do not read code memory when assigning a function to
2940         a pointer function,
2941         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2942         array of characters, not pointer,
2943         * (pic16initialComments): in debug mode emit an .ident directive for
2944         the assembler,
2945         * (_process_pragma): emit a new warning type (internal to pic16)
2946         when setting stack to default length, emit a similar warning when
2947         placing a function at absolute address and address is not word aligned
2948         * (_pic16_parseOptions): added 'return TRUE' statement,
2949         * (_pic16_linkEdit): if compiling a source, then add the source's
2950         file object, first in the list of objects to link,
2951
2952 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2953
2954         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2955         * src/pic/main.c : removed VC warning.
2956         * src/pic/gen.c : changed comment.
2957
2958 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2959
2960         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2961         reference to a deprecated symbol _GPTRREG was causing failure to
2962         link. Thanks G. M. Gallant for the info.
2963
2964 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2965
2966         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2967         comments for Bugs item #954788.
2968
2969 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2970
2971         * src/pic16/device.c (pic16_dump_gsection,
2972         * pic16_groupRegistersInSection): handle symbols declared to be in
2973         access bank differently,
2974         * src/pic16/gen.c (struct _G): added field resDirect,
2975         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2976         send values read from stack directly to result and don't allocate
2977         temporary values,
2978         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2979         same registers,
2980         * (pic16_sameRegsOfs): NEW,
2981         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2982         free because they were not allocated from temporary pool,
2983         * pic16_popRegFromString): workaround to fix a problem with
2984         allocating variables twice or never,
2985         * (genGenPointerGet): using PRODL instead of FSR0H,
2986         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2987         instead of FSR0H,
2988         * (genAssign): take advantage of the _G.resDirect flag,
2989         * (genCast): around line 11844, use mov2f instead of directly
2990         MOVFF'ing between operands to account for literal values,
2991         * src/pic16/genutils.c: some new debug functions for gpsim have been
2992         added,
2993         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2994         float with integer part only,
2995         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2996         place variables in access bank
2997         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2998         updated sources to reflect recent changes in gen.c
2999
3000 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3001
3002         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3003         sources that searched for headers in installation path, now the
3004         device/include/pic16 is used,
3005         * src/pic16/glue.c (pic16glue),
3006         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3007         .line directives if not in debug mode, this suppresses assembler's
3008         warnings for ignored directives
3009
3010 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3011
3012         * src/port.h: made reset_regparms prototype void parameter explicit.
3013         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3014         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3015         * doc/sdccman.lyx: documented warning disabling and how to use
3016           printf_large to make it print floats.
3017         * device/include/stdbool.h: NEW
3018         * device/lib/_atof.c,
3019         * device/lib/_divuint.c,
3020         * device/lib/_divulong.c,
3021         * device/lib/expf.c,
3022         * device/lib/printf_large.c,
3023         * device/lib/sincosf.c,
3024         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3025         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3026           a completely reentrant lib.
3027
3028 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3029
3030         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3031         * device/include/pic16/stdio.h: fixed bug with colon
3032
3033 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3034
3035         * device/include/pic16/stdio.h,
3036         * device/include/pic16/stdlib.h,
3037         * device/include/pic16/math.h: NEW
3038         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3039         declared as _naked to reduce overhead
3040         * device/lib/Makefile.in (target port-specific-objects-pic16):
3041         changed * to *.* so to ignore the CVS directory,
3042         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3043         stacked variables back in stack,
3044         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3045         corruption
3046
3047 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3048
3049         * .version: bumped version number to 2.4.5
3050         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3051         * support/Util/SDCCerr.c (messages structure): added entry for
3052         W_POSSBUG2
3053
3054         Large cumulative patch for pic16 port and libraries.
3055         * device/include/pic16/sdcc-lib.h,
3056         * device/include/pic16/stdarg.h,
3057         * device/include/asm/pic16/features.h,
3058         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3059         * device/include/pic16/float.h: changes reentrant keyword with
3060         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3061         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3062         updated target build-libraries to include objects from gptr,
3063         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3064         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3065         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3066         all function headings,
3067         * src/SDCCmain.c: added global parameter userIncDirsSet,
3068         * (parseCmdLine): when option -I is encountered add directory to
3069         userIncDirsSet too,
3070         * src/version.awk: added space between control and long,
3071         * src/pic16/NOTES: added some notes for the port,
3072         * src/pic16/gen.c: added prototype for mov2fp function,
3073         * (fReturnpic16[]): properly named return value registers,
3074         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3075         * (aopForSym): added code to handle symbols with onStack flag set,
3076         symbols onStack are allocated PTRSIZE bytes,
3077         * (aopFreeAsmop): handles special case where asmops are stack objects,
3078         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3079         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3080         added argument lock to trace flaws in allocating temporary registers
3081         when developing port,
3082         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3083         * (pic16_popRegFromString): reenabled allocating a direct register
3084         from string,
3085         * (assignResultValue): various beautifications,
3086         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3087         referenced function argument,
3088         * (genIpush): reenabled to allow stacked arguments, handles only
3089         ic->parmPush iCodes,
3090         * (genCall, genPcall): major changes to allow for variable argument
3091         functions, fixed a bug with falsely restoring stack pointer after
3092         returning from call,
3093         * (genFunction): pending code for critical function,
3094         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3095         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3096         * (genNearPointerGet): fixed bug with indirect reading, was always
3097         reading from INDF0
3098         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3099         pointers,
3100         * (genAddrOf): rewrote code to take address of a stacked function parameter
3101         * (genCast): fixed casting to generic pointer type,
3102         * src/pic16/gen.h: added AOP_STA,
3103         * (struct asmop): added field stk,
3104         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3105         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3106         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3107         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3108         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3109         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3110         generic pointers,
3111         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3112         and library paths,
3113         * (pic16_port structure): generic pointer size is set to 3,
3114         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3115         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3116         compiler warning,
3117         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3118         operand is an iTemp,
3119
3120 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3121
3122         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3123         * debugger/mcs51/simi.c: addapt new syntax of s51
3124
3125 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3126
3127         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3128         * src/pic16/pcode.c: commented out some calls to free() in order to
3129         fix bug #989576,
3130
3131 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3132
3133         * src/SDCCicode.h,
3134         * src/SDCCicode.c (isiCodeInFunctionCall),
3135         * src/avr/ralloc.c (selectSpil),
3136         * src/pic/ralloc.c (selectSpil),
3137         * src/pic16/ralloc.c (selectSpil),
3138         * src/ds390/ralloc.c (selectSpil),
3139         * src/hc08/ralloc.c (selectSpil),
3140         * src/xa51/ralloc.c (selectSpil),
3141         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3142         stack in the middle of a function call sequence (fixes bug #1020268)
3143         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3144         costs associated with the minimum switch case.
3145
3146 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3147
3148         * src/SDCC.lex: fixed bug #1030549
3149
3150 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3151
3152         * src/SDCCcse.h (struct cseDef),
3153         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3154         over a function call if the CSE is derived from a symbol whose
3155         address has been taken (fixes bug #1029883)
3156         * support/regression/tests/bug-1029883: a new regression test for
3157         this bug
3158
3159 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3160
3161         * src/hc08/gen.c (emitinline): fixed bug #1029778
3162         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3163         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3164         and starts toward RFE #905167)
3165
3166 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3167
3168         * src/pic16/gen.c (mov2f): New function to move an operand to
3169         another without considering if it is a literal or a register,
3170         * (pic16_sameRegs): don't check if they are both AOP_REG,
3171         * (AccRsh): removed andmask=0 lines,
3172         * (genLeftShift): duplicated to be improved in future versions,
3173         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3174         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3175         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3176         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3177         * (insertBankSwitch): fixed inserting banksel directives algorithm
3178         for instructions that follow a skip instruction, this fixes a report
3179         for broken subtraction code generation,
3180         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3181         iCode is a left op, just in case result and right share the same
3182         registers
3183
3184 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3185
3186         * src/hc08/main.c,
3187         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3188         preservation of HX
3189         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3190         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3191         on 2004-09-12; it was buggy
3192
3193 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3194
3195         * src/SDCCsymt.h: removed RESULT_CHECK
3196         * src/SDCCast.c,
3197         * src/SDCCglue.c,
3198         * src/SDCCval.c,
3199         * src/pic/glue.c,
3200         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3201
3202 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3203
3204         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3205         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3206         configuration values no more rejected by compiler, they are assigned
3207         to configuration registers with a warning message instead,
3208         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3209         the for-loop so last conf register is emitted too,
3210         * (_pic16_initPaths): link library libsdcc.lib by default,
3211         * (_hasNativeMulFor): modified test for multiplication according to
3212         Raphael Neider's remarks. Integer multiplication is also done with
3213         support functions,
3214         * device/include/pic16/pic18fregs.h: corrected type error in while
3215         testing and including 18f6720 header file
3216
3217 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3218
3219         * src/pic16/device.h (pic16_options): removed field use_crt,
3220         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3221         until an optimization to handle single bits is added,
3222         * (pic16_loadFSR0): moved before genUnpackBits,
3223         * (genAnd): some white lines removed,
3224         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3225         leave_reset flags in pic16_options when using crt modules,
3226
3227 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3228
3229         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3230           for bugs 898889 & 979599. Also used some safer print instructions.
3231
3232 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3233
3234         * src/pic16/device.h (pic16_options_t): added field use_crt,
3235         crt_name, no_crt,
3236         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3237         catch a probable future bug,
3238         * src/pic16/gen.c: aopIdx function commented out,
3239         * (genAssign): commented out old code which used aopIdx,
3240         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3241         code, added if conditionals to take into account the --use-crt
3242         command line options,
3243         * src/pic16/main.c (pic16_optionsTable): added new command line
3244         options, --use-crt= and --no-crt,
3245         * (_pic16_linkEdit): now the proper crt object is added in the
3246         linker command line except than when --no-crt is specified,
3247         * src/pic16/pcode.c,
3248         * src/pic16/pcode.h: added some structures and functions for a new
3249         optimization scheme to compansate for instruction overhead between
3250         same iCodes, this scheme is currently under development and is not
3251         working in any way,
3252         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3253         to && operator,
3254         * device/lib/pic16/startup/crt0i.c,
3255         * device/lib/pic16/startup/crt0iz.c: added global char variable
3256         __uflags to force the generation of an idata section
3257
3258 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3259
3260         * doc/Makefile,
3261         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3262         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3263
3264 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3265
3266         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3267         Frieder) and clarified the default code optimization mode
3268
3269 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3270
3271         * src/SDCC.lex (doPragma, process_pragma),
3272         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3273         "opt_code_size", and "opt_code_balanced"
3274         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3275         regrouped options by category, added support for category headers
3276         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3277         and "--opt-code-size"
3278         * doc/sdccman.lyx: documented these new options and pragmas
3279         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3280         preference into account
3281
3282 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3283
3284         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3285           geniCodePreDec): Fixed bug 904237 by generating a warning
3286         * src/SDCCerr.h,
3287         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3288
3289 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3290
3291         * src/pic/device.c : When no max ram set validate full memory range.
3292         * src/pic/pcode.c,
3293         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3294
3295 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3296
3297         * device/lib/_gptrget.c,
3298         * device/lib/_gptrput.c: updated comment
3299         * device/lib/calloc.c,
3300         * device/lib/free.c,
3301         * device/lib/malloc.c,
3302         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3303         * src/SDCCcse.c (cseBBlock),
3304         * src/SDCCicode.c (printOperand, geniCodeArray),
3305         * src/SDCCicode.h (struct operand): fixed bug 868103
3306         * support/regression/tests/bug-868103.c: added
3307         * src/SDCCast.c (searchLitOp),
3308         * src/SDCCcse.h (struct cseDef),
3309         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3310         * src/SDCCicode.h (struct operand),
3311         * src/SDCCsymt.h (struct sym_link),
3312         * src/avr/gen.c (hasInc),
3313         * src/ds390/gen.c (hasInc),
3314         * src/hc08/gen.c (genPlusIncr, hasInc),
3315         * src/mcs51/gen.c (hasInc),
3316         * src/pic16/glue.c (pic16_printIvalChar),
3317         * src/pic16/ralloc.c (regWithIdx),
3318         * src/xa51/gen.c (hasInc) : removed warnings
3319         * src/SDCCast.c (createBlock): added comment ???
3320         * src/hc08/ralloc.c: updated comments
3321
3322 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3323
3324         * doc/sdccman.lyx: updated section on switch statements, added
3325         section about semaphore locking
3326         * doc/Makefile: added option -info for latex2html
3327         * device/lib/_gptrget.c,
3328         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3329
3330 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3331
3332         * src/pic/device.h,
3333         * src/pic/device.c,
3334         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3335          maxram is less than 0x100.
3336
3337 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3338
3339         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3340
3341 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3342
3343         * src/port.h,
3344         * src/mcs51/main.c,
3345         * src/ds390/main.c,
3346         * src/z80/main.c,
3347         * src/hc08/main.c,
3348         * src/pic/main.c,
3349         * src/pic16/main.c,
3350         * src/avr/main.c,
3351         * src/xa51/main.c
3352         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3353         a jump table is the best form for a switch statement, including
3354         automatic insertion of missing cases to make the case range
3355         continuous. Developed in collaboration with Frieder Ferlemann.
3356
3357 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3358
3359         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3360         accumulator result if it needs sign extension
3361
3362 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3363
3364         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3365
3366 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3367
3368         * device/lib/gbz80/printf.c,
3369         * device/lib/z80/printf.c: removed define for NULL
3370
3371 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3372
3373         * as/xa51/xa_link.c,
3374         * device/examples/ds390/ow390/ad26.c,
3375         * device/examples/ds390/ow390/cnt1d.c,
3376         * device/examples/ds390/ow390/counter.c,
3377         * device/examples/ds390/ow390/ds2480.h,
3378         * device/examples/ds390/ow390/ds2480ut.c,
3379         * device/examples/ds390/ow390/findtype.c,
3380         * device/examples/ds390/ow390/gethumd.c,
3381         * device/examples/ds390/ow390/owllu.c,
3382         * device/examples/ds390/ow390/ownetu.c,
3383         * device/examples/ds390/ow390/swt12.c,
3384         * device/examples/ds390/ow390/swtloop.c,
3385         * device/examples/ds390/ow390/temp.c,
3386         * device/examples/ds390/ow390/temp10.c,
3387         * device/examples/ds390/ow390/thermo21.c,
3388         * device/examples/ds390/ow390/tinilnk.c,
3389         * device/examples/ds390/ow390/tstfind.c,
3390         * device/examples/serialcomm/windows/serial.cpp,
3391         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3392         * device/include/reg51.h: fixed line endings for cvs
3393
3394 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3395
3396         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3397         packRegsForAccUse, packRegisters): new accumulator register
3398         packing algorithm
3399         * support/regression/ports/hc08/support.c (_putchar): suppress
3400         warning of unused variable
3401         * src/SDCCicode.c: added SWAP entry to codeTable
3402
3403 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3404
3405         * device/lib/sprintf.c: forgot to add this file before previous commit
3406
3407 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3408
3409         * src/pic16/gen.c (genPackBits): added operand right in function
3410         parameters, load result directly if p_type is POINTER (that is
3411         called by genNearPointerSet)
3412         * (genUnPackBits): added operand left in function parameters,
3413         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3414         FSR0 if accessing bitfields,
3415
3416 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3417
3418         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3419           _print_format; updated printf, sprintf, vsprintf
3420         * device/include/asm/default/features.h: corrected comment/define
3421         * device/lib/Makefile.in: added sprintf.c
3422         * device/lib/libsdcc.lib: added sprintf module
3423         * device/lib/printf_large.c,
3424         * device/lib/vprintf.c,
3425         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3426           into these 3 files
3427         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3428         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3429         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3430           hc08 test
3431         * support/regression/tests/zeropad.c: define idata as data for hc08
3432
3433 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3434
3435         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3436         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3437         labels are referenced at least once (even if a reference is not found)
3438         * src/hc08/gen.c (emitcode): set isComment flag for comments
3439         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3440         loads), rules 6a..6b (optimize jumps to return)
3441
3442 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3443
3444         * device/lib/acosf.c (acosf),
3445         * device/lib/asinf.c (asinf),
3446         * device/lib/atanf.c (atanf),
3447         * device/lib/ceilf.c (ceilf),
3448         * device/lib/cosf.c (cosf),
3449         * device/lib/coshf.c (coshf),
3450         * device/lib/cotf.c (cotf),
3451         * device/lib/fabsf.c (fabsf),
3452         * device/lib/floorf.c (floorf),
3453         * device/lib/log10f.c (log10f),
3454         * device/lib/logf.c (logf),
3455         * device/lib/sinf.c (sinf),
3456         * device/lib/sinhf.c (sinhf),
3457         * device/lib/sqrtf.c (sqrtf),
3458         * device/lib/tanf.c (tanf),
3459         * device/lib/tanhf.c (tanhf),
3460         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3461         replaced all instances of "reentrant" in the library functions
3462         defined in math.h with this macro.
3463         * support/regression/tests/float_trans.c: reenabled test for hc08
3464
3465 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3466
3467         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3468         erroneously deleted
3469
3470 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3471
3472         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3473         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3474         multi-byte volatile operands are used
3475         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3476         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3477         initialization to area GSINIT0 so that it would always precede
3478         any static initializers in GSINIT
3479         * support/regression/tests/zeropad.c: fixed idata define for hc08
3480         * support/regression/tests/bug-927659.c,
3481         * support/regression/tests/float_trans.c: disabled tests for hc08
3482         pending missing library routines
3483         * .version: increased version number to 2.4.4 - hc08 port now passes
3484         regression tests
3485
3486
3487 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3488
3489         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3490         * Makefile.common.in,
3491         * as/Makefile,
3492         * as/hc08/Makefile.in,
3493         * as/mcs51/Makefile.in,
3494         * as/z80/Makefile.in,
3495         * debugger/mcs51/Makefile.in,
3496         * device/include/Makefile.in,
3497         * device/lib/Makefile.in,
3498         * doc/Makefile,
3499         * link/Makefile,
3500         * link/z80/Makefile.in,
3501         * packihx/Makefile.in,
3502         * sim/ucsim/main_in.mk,
3503         * sim/ucsim/avr.src/Makefile.in,
3504         * sim/ucsim/doc/Makefile.in,
3505         * sim/ucsim/gui.src/serio.src/Makefile.in,
3506         * sim/ucsim/hc08.src/Makefile.in,
3507         * sim/ucsim/s51.src/Makefile.in,
3508         * sim/ucsim/xa.src/Makefile.in,
3509         * sim/ucsim/z80.src/Makefile.in,
3510         * src/Makefile.in,
3511         * support/cpp2/Makefile.in,
3512         * support/librarian/Makefile,
3513         * support/makebin/Makefile: added DESTDIR to the install path proposed
3514         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3515         * doc/sdccman.lyx: added DESTDIR documentation
3516
3517 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3518
3519         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3520         instruction for interrupt handlers, use fast returns when returning
3521         from high priority interrupts
3522
3523 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3524
3525         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3526         code generation
3527         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3528         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3529         bugs, ported much of Bernhard's code from mcs51
3530         * src/mcs51/gen.c (genSend),
3531         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3532         than one when calling a reentrant function
3533         * device/lib/_mullong.c: defined an alternate struct layout for big
3534         endian ports (hc08)
3535
3536 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3537
3538         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3539         test
3540
3541 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3542
3543         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3544         are sane and complete before asking the port its prefered parameter
3545         passing method (fixes bug #1017633)
3546         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3547         and _ret3
3548
3549 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3550
3551         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3552         problem in bitfields >= 8 bits.
3553
3554 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3555
3556         * src/SDCCsymt.c: undid changes that were not meant to be committed
3557
3558 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3559
3560         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3561
3562 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3563
3564         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3565           copied and wrong bit got inverted
3566
3567 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3568
3569         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3570         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3571         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3572         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3573         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3574         assignments to bitfields at known addresses
3575         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3576         reads from bitfields at known addresses
3577         * src/hc08/ralloc.c (packRegisters),
3578         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3579         genhc08Code): optimize pointer get values used as conditionals
3580         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3581         and branch
3582
3583 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3584
3585         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3586         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3587         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3588         as conditionals
3589
3590 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3591
3592         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3593
3594 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3595
3596         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3597         related problems
3598
3599 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3600
3601         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3602
3603 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3604
3605         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3606         mcs51 port
3607
3608 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3609
3610         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3611
3612 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3613
3614         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3615         cases use more compact code.
3616
3617 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3618
3619         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3620
3621 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3622
3623         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3624
3625 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3626
3627         * src/SDCCsymt.h,
3628         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3629         parameter of changePointer() from symbol* to sym_link*
3630         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3631         * src/SDCCsymt.c (compareType): void* type is castable to other
3632         pointers, but not necesarily an exact match.
3633         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3634         is no longer blindly treated as an exact match.
3635         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3636
3637 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3638
3639         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3640
3641 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3642
3643         * src/pic/gen.c,
3644         * src/pic/pcode.c,
3645         * src/pic/ralloc.h,
3646         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3647
3648 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3649
3650         * src/pic/device.c,
3651         * src/pic/device.h,
3652         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3653
3654 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3655
3656         * src/mcs51/gen.c (emitcode): fixed bug #992819
3657
3658 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3659
3660         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3661           there's no need to make it worse
3662
3663 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3664
3665         * src/mcs51/ralloc.c (deassignLR),
3666         * src/ds390/ralloc.c (deassignLR),
3667         * src/hc08/ralloc.c (deassignLR),
3668         * src/z80/ralloc.c (deassignLR),
3669         * src/pic/ralloc.c (deassignLR),
3670         * src/pic16/ralloc.c (deassignLR),
3671         * src/avr/ralloc.c (deassignLR),
3672         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3673         rlivePoint): fixed another part of bug #971834
3674
3675 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3676
3677         * src/z80/main.c: enabled "critical" keyword
3678         * src/z80/mappings.i,
3679         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3680         functions (fixes bug #979646)
3681         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3682
3683 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3684
3685         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3686           such as c:\mydir.
3687
3688 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3689
3690         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3691           doesn't disable too much optimizations
3692
3693 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3694
3695         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3696
3697 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3698
3699         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3700
3701 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3702
3703         * src/pic/gen.c tidied up tabs
3704         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3705         * src/pic/main.c tidied up tabs
3706         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3707         * src/pic/pcoderegs.c tidied up tabs
3708         * src/pic/ralloc.c tidied up tabs
3709
3710 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3711
3712         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3713         to S_FIXED for pic16 port and when symbol is not in level 0,
3714         allocate for S_REGISTER storage class and pic16 port, too,
3715         * src/pic16/device.h: prototype for checkSym,
3716         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3717         * (pic16_assignConfigWordValue): test the value and the mask to
3718         validate that the value is suitable for the configuration word,
3719         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3720         collect extern declared symbols, don't emit symbol twice, check
3721         first if symbol is in publics set first,
3722         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3723         * added command line '--fstack' which enables an experimental
3724         feature for stack access, too buggy to be used yet...
3725         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3726         * (pic16_allocDirReg): when register has storage class S_REGISTER
3727         allocate in pic16_dynAccessRegs,
3728         * device/include/pic16/pic18f????.h: modified configuration word
3729         naming convention, words started as CONFIG0H but should be CONFIG1H
3730
3731 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3732
3733         * device/include/mcs51reg.h: fixed bug 970993
3734
3735 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3736
3737         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3738         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3739         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3740         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3741         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3742         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3743           error/warning numbers,
3744           added function setWarningDisabled()
3745         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3746         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3747           _memcmp.c _memmove.c calloc.c realloc.c free.c
3748         * support/regression/tests/malloc.c: added tests for new functionality
3749         * support/regression/tests/zeropad.c: added tests for truncated initializers
3750           and initialized char arrays starting with '\x0'
3751         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3752
3753 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3754
3755         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3756
3757 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3758
3759         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3760         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3761         peephole 177.e. Thanks to anonymous
3762
3763 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3764
3765         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3766         function isn't used in the source but referenced as a
3767         variable initializer then declare it as extern in .asm file
3768
3769 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3770
3771         * .version: increased version number to 2.4.3
3772
3773         Adding version extension according to ChangeLog CVS revision
3774         * src/Makefile.in (target all): added dependency 'version.h'
3775         * (rule version.h): added rule to create version.h from ChangeLog,
3776         * (rule dep): added dependency version.h,
3777         * src/version.awk: AWK script to create version.h
3778         * src/SDCCdwarf2.c (dwWriteModule),
3779         * src/SDCCglue.c (initialComments),
3780         * src/SDCCmain.c (printVersionInfo): modified to write after
3781         version string the version extension number,
3782         * src/SDCCutil.c: included "version.h"
3783         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3784         number,
3785         * src/SDCCutil.h: added prototype for getBuildNumber
3786
3787         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3788         includeDirsSet, too,
3789         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3790         const char [] is found in function prototype...
3791
3792         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3793         moving to WREG with source is already in WREG,
3794         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3795         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3796         * (aopForSym): stack'ed symbols are partially supported, added
3797         if-clause to support symbols in FARSPACE,
3798         * (sameRegs): added test for AOP_ACC to see if registers are same,
3799         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3800         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3801         * (pic16_popRegFromString): will not allocate a new register if it
3802         doesn't find one by name, bug may have introduced...
3803         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3804         * (genIpush): revived to use pic16 port's stack,
3805         * (genAddrOf): added incomplete case for stack'ed operand,
3806         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3807         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3808         can handle multibyte operands,
3809         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3810         * (pic16initialComments): added message for MPLAB compatibility
3811         mode enabled,
3812         * src/pic16/main.h: prototype for pic16_mplab_comp,
3813         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3814         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3815         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3816         because of increased complexity of procedure,
3817         * (_process_pragma): stack pragma changed to format 'stack pos len',
3818         emit symbol '_stack_end' to conform with gplink,
3819         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3820         to search for register,
3821         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3822         PO_GPR_REGISTER,
3823         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3824         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3825         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3826         case for PO_GPR_REGISTER,
3827         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3828         dies, the new era is ahead !...
3829         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3830         pic16_dynInternalRegs,
3831         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3832         * (pic16_allocDirReg): minor optimizations and bug fixes,
3833         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3834
3835         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3836         load stack and frame pointer with address of 'stack_end' symbol
3837
3838 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3839
3840         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3841         without source code but only variable initializers
3842
3843 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3844
3845         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3846         external are not declared as extern to reduce overhead while linking
3847
3848 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3849
3850         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3851
3852 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3853
3854         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3855           Yee Keat for the patch
3856         * src/SDCCast.c (decorateType): fixed bug #979599
3857         * src/ds390/gen.h: removed local fReturnSizeDS390
3858         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3859         * src/ds390/gen.c (genAnd, genOr, genXor),
3860         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3861
3862 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3863
3864         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3865         add relFilesSet to $3, manipulate $2 to handle linking of object
3866         files without source files in command line,
3867         * device/include/pic16 (all headers): added ID location macros,
3868         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3869         entries for ID location bytes,
3870         * (pic16_assignIdByteValue): NEW,
3871         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3872         added field dumpcalltree to pic16_options_t,
3873         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3874         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3875         emitting rFalseIfx label after check_carry label,
3876         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3877         pic16_emitDIRegs), NEW
3878         * (pic16glue): dump .calltree file when option --calltree found,
3879         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3880         * (_pic16_genAssemblerPreamble): emit ID locations after
3881         configuration registers,
3882         * (pic16_linkCmd): modifications of the link command,
3883         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3884         * (pic16_pCodeInitRegisters): don't init stack registers,
3885         * (pic16_findPrevInstruction): fixed bug,
3886         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3887         bug with immediate registers,
3888         * (buildCallTree): traces stack push and pop,
3889         * (pct2): dump also stack usage for each function,
3890         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3891         * (pic16_allocDirReg): various modifications,
3892         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3893         fixed to 1,
3894
3895 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3896
3897         * src/pic16/pcode.c: removed buggy double colon
3898
3899 2004-07-01 Borut Razem <borut.razem AT siol.net>
3900
3901         * support/scripts/sdcc.nsi: added include/pic16 to setup
3902
3903 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3904
3905         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3906         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3907         target 'clean',
3908         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3909         specific command line arguments. Also added sample lkr script
3910         for placing a variable at a specific memory bank.
3911         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3912         at a specific memory bank,
3913         * (pic16_dump_isection): fixed bug which caused string literals to
3914         be omitted when dumping idata section,
3915         * (pic16_groupRegistersInSection): added code to handle registers
3916         in specific memory banks,
3917         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3918         public, all references are renamed too,
3919         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3920         AOP_DPTR2,
3921         * (pic16_storeForReturn): added case to handle when dest is WREG,
3922         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3923         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3924         pic16_rel_udata, check to see if that register is marked as being
3925         a member of a specific memory bank,
3926         * (pic16_printIvalCharPtr): added code to add string literals either
3927         to code or the idata sections,
3928         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3929         also accept the 'udata' pragma,
3930         * src/pic16/main.h: new structure types sectName and sectSym
3931         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3932         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3933         * (pic16_findPrevInstruction): fixed, it returned nothing,
3934         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3935         instruction combinations,
3936         * (pic16_FixRegisterBanking): heavily reorganised,
3937         * (pic16_AnalyzeBanking): if generating banksel directives is
3938         disabled, then don't call FixRegisterBanking at all,
3939         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3940         completely removed,
3941         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3942
3943 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3944
3945         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3946         Phuah Yee Keat <yk.phuah AT nestac.com>
3947
3948 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3949
3950         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3951         correctly the IVT even if it is relocated to some other location
3952
3953 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3954
3955         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3956         * device/include/pic16/pic18f2220.h: NEW,
3957         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3958         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3959         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3960         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3961         nodefaultlibs, ivt_loc is the location of the interrupt vector
3962         table, and nodefaultlibs signs that default libraries should not be
3963         linked in link stage,
3964         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3965         according to --ivt-loc argument,
3966         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3967         when pragma stack is found,
3968
3969 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3970
3971         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3972         256 (range check), 257 (do while), 258.a-f (bit banging
3973         f.e. on 3-wire SPI bus)
3974
3975 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3976
3977         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3978         variables used exclusively within a loop
3979
3980 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3981
3982         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3983
3984 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3985
3986         * src/SDCClrange.c (computeClash): fixed bug #971834
3987
3988 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3989
3990         * src/mcs51/gen.c (genCmp): fixed bug #975903
3991         * src/hc08/gen.c (operandsEqu),
3992         * src/ds390/gen.c (operandsEqu),
3993         * src/z80/gen.c (operandsEqu),
3994         * src/pic/gen.c (operandsEqu),
3995         * src/pic16/gen.c (operandsEqu),
3996         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3997         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3998
3999 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4000
4001         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4002
4003 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4004
4005         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4006         default case in switch statement,
4007         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4008         to eliminate problem with initialisation of pointers, but problem
4009         still exists,
4010         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4011         * (emitStaticSegment): removed various lines emitting debug info,
4012         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4013         added processor registers for utilizing EEPROM,
4014         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4015         configurable and set 8
4016
4017 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4018
4019         * .version: increased version number to 2.4.2,
4020
4021         Cumulative patch for pic16 port
4022         * src/pic16/device.c: changed scheme to dump initial values for
4023         variables in idata segment, all print_idata* functions were removed,
4024         now the pic16_printIval* will be called,
4025         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4026         * _pic16_printPointerType, pic16_printPointerType,
4027         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4028         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4029         NEW, similar to the respective functions in SDCCglue.c,
4030         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4031         way, emitting hex bytes,
4032         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4033
4034 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4035
4036         * src/avr/ralloc.c (serialRegAssign),
4037         * src/xa51/ralloc.c (serialRegAssign),
4038         * src/pic/ralloc.c (serialRegAssign),
4039         * src/pic16/ralloc.c (serialRegAssign),
4040         * src/hc08/ralloc.c (serialRegAssign),
4041         * src/z80/ralloc.c (serialRegAssign),
4042         * src/ds390/ralloc.c (serialRegAssign),
4043         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4044
4045 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4046
4047         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4048         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4049
4050 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4051
4052         Cumulative patch for pic16 port:
4053         * src/pic16/device.h (typedef PIC16_device) modified fields for
4054         defining microcontrollers,
4055         * src/pic16/device.c: added new info for all devices in Pics16 array,
4056         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4057         to be optimised out by the pCode optimiser,
4058         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4059         specially, bug reported by G.M. Gallant,
4060         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4061         as force'd so that cannot be optimised out by pCode optimiser,
4062         * src/pic16/pcode.c,
4063         * src/pic16/pcodepeeph.c,
4064         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4065         they are disabled by default, but can be enabled explicit with
4066         command argument --denable-peeps, for testing,
4067         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4068         --pomit-ivt in COMPILE_FLAGS
4069
4070 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4071
4072         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4073           compilation on MSVC
4074
4075 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4076
4077         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4078
4079 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4080
4081         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4082         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4083
4084 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4085
4086         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4087         would only assign 0x300001 register.
4088
4089 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4090
4091         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4092         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4093
4094 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4095
4096         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4097         for ds80c400
4098         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4099         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4100         added peephole 254 (left shift), 255 (jump table)
4101
4102 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4103
4104         * device/lib/Makefile.in: removed comment line with model-pic16,
4105         * (target port-specific-objects-pic16): the libraries and objects
4106         are copied to the build directory form the device/lib/pic16/bin
4107         directory
4108
4109         Cumulative patch concerning pic16 port:
4110         * library directory has been re-organized,
4111         * added support for PIC18F1220,
4112         * added headers and library sources for chips 18f1220,18f6520,
4113         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4114
4115         * configuration registers setting has changed, now each supported
4116         device has a complete description of the registers it uses,
4117         * all initialisations are moved to idata sections, these section
4118         can be absolute or relocatable,
4119         * fixed initialisation of codespace variables,
4120         * fixed warning about PCLATU and gpsim,
4121         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4122         * (genAssign): use table reads when assigning from variables in codespace,
4123         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4124         char/int variables placed in codespace,
4125         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4126         registers set in .asm file, no need for --pomit-config-words anymore,
4127         * (pic16glue): some 8051 legacy segments are commented out
4128         (to be removed completely),
4129         * added support for alternative assembler and linker with --asm=
4130         and --link= command line arguments,
4131         * peepholes are disabled automatically in the port, no need to
4132         specify on command line,
4133         * port supports natively char/int/long multiplication, but converts
4134         all divisions to support functions,
4135         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4136         to the file set in variable $2,
4137         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4138         strings in ASCII format and not in hex,
4139         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4140         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4141         allocate proper register if iCodes aren't temporary,
4142
4143 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4144
4145         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4146
4147 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4148
4149         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4150         is commented out
4151
4152 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4153
4154         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4155         computed address is reused
4156         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4157         multi-byte bitfields
4158
4159 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4160
4161         * src/z80/gen.c: (genArrayInit): must check for pointers too
4162
4163 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4164
4165         * support/regression/tests/zeropad.c: never meant to commit the
4166           nestedstruct test: removed, added check for GCC version
4167
4168 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4169
4170         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4171         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4172         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4173           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4174           bugs 928906 and 954082 half-empty initializers
4175         * src/SDCCsymt.h,
4176         * src/SDCCsymt.c (getAllocSize): added for above fix
4177         * src/z80/gen.c (genArrayInit): fixed bug 741044
4178         * support/regression/tests/zeropad.c: added tests
4179
4180 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4181
4182         * src/pic16/device.c (pic16_dump_section): corrected bug which
4183         caused some symbols of the libraries to be misplaced
4184
4185 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4186
4187         * src/pic16/glue.c,
4188         * src/pic16/ralloc.h,
4189         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4190         to fix conflict with pic port
4191
4192 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4193
4194         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4195         externs configuration variables,
4196         * src/pic16/ralloc.h,
4197         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4198         prototype in header, commented out some debug messages
4199
4200 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4201
4202         * src/pic16/glue.c,
4203         * src/pic16/main.c,
4204         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4205         for gpasm COFF object generation. Thanks to D. Hawkins for
4206         his patch info
4207
4208 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4209
4210         * src/ds390/main.c,
4211         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4212         Brock for spotting this)
4213         * src/ds390/gen.c (genEndFunction),
4214         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4215         interrupt handler and critical. Disable push/pop optimizations when
4216         peephole optimizations disabled.
4217
4218 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4219
4220         Updated pic16 library sources and headers.
4221         * device/lib/pic16/pic18f*/ ,
4222         * device/include/pic16/*.h: modified to handle structured SFR
4223         definitions
4224
4225 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4226
4227         * src/port.h (PORT structure): added hook initPaths, now each
4228         port can declare its own default search paths,
4229         which can been seen with the --print-search-dirs option,
4230         see pic16 port for example,
4231         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4232         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4233         * (doPrintSearchDirs): NEW, replaces in a central manner the
4234         printing of search dirs which was split in set*Paths functions,
4235         * (main): added call to port->initPaths and doPrintSearchDirs,
4236         * src/avr/main.c,
4237         * src/ds390/main.c,
4238         * src/hc08/main.c,
4239         * src/izt/i186.c,
4240         * src/izt/tlcs900h.c,
4241         * src/mcs51/main.c,
4242         * src/pic/main.c,
4243         * src/pic16/main.c: modified port structures to reflect addition of
4244         initPaths hook,
4245
4246         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4247         * (pic16_dump_section): for registers in same address reserve memory once,
4248         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4249         to no_banksel,
4250         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4251         result is greater in size than right or left,
4252         * (pic16_genUMult8X8_8): there are some cases where the result can
4253         be 16 bits size, so handle these,
4254         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4255         * (pic16_outBitC): modified to emit pcodes,
4256         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4257         or not,
4258         * (genDivOneByte): implemented algorithm to divide 8-bits,
4259         * (genCmp): uncommented goto, but issues still exist,
4260         * (genAnd): fixed a bug with variables >8bits,
4261         * (genPackBits): optimization added that uses BCF/BSF to change a
4262         single bit,
4263         * (genAssign): fixed bug when assigning floating point literals,
4264         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4265         __sdcc_gsinit_startup label,
4266         * src/pic16/main.c (_pic16_init): removed search directory
4267         initialisations,
4268         * (_pic16_initPaths): NEW, used to initialise search directories,
4269         * (_hasNativeMulFor): support functions for all except char/int
4270         multiplication, and char division,
4271         * (PIC16_port struct): modified entry for native mul support,
4272         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4273         no_banksel option,
4274         * (buildCallTree): call to register_usage is ifdef'ed out,
4275
4276 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4277
4278         * device/include/string.h: applied Stas Sergeev's patch to make this
4279         header file compatible with the preprocessor -Wundef option
4280         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4281         failure (fixes bug #941458)
4282
4283 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4284
4285         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4286         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4287         that the variable, not the function, should be static
4288         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4289         to be consistent with non-literal case
4290
4291 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4292
4293         * src/SDCCast.c (isConformingBody): fixed bug #949967
4294         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4295         convilong): fixed bug #952086
4296
4297 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4298
4299         * src/SDCCmem.c (allocVariables): fixed bug #955321
4300
4301 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4302
4303         * src/hc08/main.c (_hc08_genAssemblerEnd),
4304         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4305         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4306         completely eliminated the use of a temporary file
4307         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4308         when more than one file linked
4309         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4310
4311 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4314         which fixes bug #543481
4315         * support/regression/tests/bug-751703.c: fixed comments left from a
4316         cut and paste error
4317         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4318         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4319         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4320         scopes
4321         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4322         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4323         are now changed to underscores in moduleName
4324
4325 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4326
4327         * as/mcs51/lkmem.c: better fix for bug #954173
4328
4329 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4330         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4331
4332         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4333         * device/include/c8051f000.h,
4334         * device/include/c8051f120.h,
4335         * device/include/c8051f300.h,
4336         * device/include/c8051f310.h,
4337         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4338         PWM16) and detab'ed
4339
4340 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4341
4342         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4343         and mailing lists, doc'ed --no-peep-comments, removed reference
4344         to knoppix (newest version has no LyX/LaTeX), other minor changes
4345         * src/SDCCglue.c (glue): save 2 bytes stack space with
4346         option --main-return. The ljmp could probably be avoided too
4347
4348 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4349
4350         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4351
4352 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4353
4354         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4355         * src/SDCCopt.c (isLocalWithoutDef),
4356         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4357         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4358         (credit to Maarten Brock for patch #949363, on which this is based)
4359         * support/regression/tests/bug-751703.c: some test cases of extern used
4360         within inner scopes.
4361
4362 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4363
4364         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4365         SPEC_STRUCT
4366         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4367         struct definitions
4368         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4369         dwWriteLabel): fix to create valid debugger symbols even when
4370         the module name has non-alphanumeric symbols in it
4371         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4372         when a variable's allocation has been optimized away
4373
4374
4375 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4376
4377         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4378         * src/hc08/main.c,
4379         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4380         * src/mcs51/main.c,
4381         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4382         * src/ds390/main.c,
4383         * src/z80/gen.c (z80_emitDebuggerSymbol),
4384         * src/z80/main.c,
4385         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4386         * src/pic/main.c,
4387         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4388         * src/pic16/main.c,
4389         * src/avr/gen.c (avr_emitDebuggerSymbol),
4390         * src/avr/main.c,
4391         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4392         * src/xa51/main.c,
4393         * src/SDCCdebug.c (emitDebuggerSymbol),
4394         * src/SDCCdebug.h,
4395         * src/port.h: added a debugger struct to the port struct. Added a
4396         callback for defining debugger symbols
4397
4398         * src/SDCCast.c (createLabel),
4399         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4400         with isitmp = 1
4401         * src/SDCCicode.h,
4402         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4403         iCode back to the ast for the function
4404
4405         * src/hc08/ralloc.c (hc08_assignRegisters),
4406         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4407         unneeded fields from the regs struct.
4408         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4409         pushReg() & pullReg() functions instead of emitcode()
4410
4411         * src/hc08/gen.c (genLabel, genhc08Code),
4412         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4413
4414         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4415         debugger hooks
4416
4417         * src/hc08/gen.c (genEndFunction, genhc08Code),
4418         * src/hc08/gen.h,
4419         * src/mcs51/gen.c (genEndFunction, gen51Code),
4420         * src/mcs51/gen.h,
4421         * src/ds390/gen.c (genEndFunction, gen390Code),
4422         * src/ds390/gen.h,
4423         * src/z80/gen.c (genEndFunction, genZ80Code),
4424         * src/z80/gen.h,
4425         * src/z80/z80.h,
4426         * src/pic/gen.c (genEndFunction, genpic14Code),
4427         * src/pic/gen.h,
4428         * src/pic16/gen.c (genEndFunction, genpic16Code),
4429         * src/pic16/gen.h,
4430         * src/avr/gen.c (genEndFunction, genAVRCode),
4431         * src/avr/gen.h,
4432         * src/xa51/gen.c (genEndFunction, genXA51Code),
4433         * src/xa51/gen.h,
4434         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4435         specific code to cdbFile.c and out of the backend code generators
4436
4437         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4438         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4439         starting address is now 0
4440
4441         * as/hc08/asm.h,
4442         * as/hc08/m08pst.c,
4443         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4444         assembler directive for DWARF support
4445         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4446
4447         * src/src.dsp,
4448         * src/Makefile.in,
4449         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4450
4451 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4452
4453         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4454         and inappropriate peephole optimization in jump tables
4455
4456 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4457
4458         * as/hc08/m08pst.c,
4459         * src/SDCCglue.c: sdccopt works for the hc08 port now
4460
4461 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4462
4463         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4464
4465 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4466
4467         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4468
4469 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4470
4471         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4472         rules
4473         * src/SDCCmain.c,
4474         * src/SDCCglobl.h,
4475         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4476         comments from the peephole optimizer replacement rules
4477         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4478         symbols
4479         * src/SDCCcse.c (updateSpillLocation),
4480         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4481         equivalents
4482         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4483         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4484         objects far pointers
4485
4486 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4487
4488         * src/SDCCsymt.h: a missing part of my last change
4489         * src/pic/ralloc.c (regTypeNum),
4490         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4491
4492 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4493
4494         * src/SDCCicode.h,
4495         * src/SDCCicode.c (aggrToPtrDclType),
4496         * src/SDCCptropt.h,
4497         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4498         ptrPseudoSymConvert),
4499         * src/pic/ralloc.c (regTypeNum),
4500         * src/pic16/ralloc.c (regTypeNum),
4501         * src/hc08/ralloc.c (regTypeNum),
4502         * src/ds390/ralloc.c (regTypeNum),
4503         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4504         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4505
4506 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4507
4508         * link/z80/lkmain.c (afile),
4509         * as/hc08/lkmain.c (afile),
4510         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4511         prevent a pointer problem when a filename has no directory and
4512         no extension specified.
4513
4514 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4515
4516         * link/z80/lkmain.c (afile): allow periods in directory names
4517         * link/z80/lkmain.c (afile),
4518         * as/mcs51/lkmain.c (afile),
4519         * as/hc08/lkmain.c (afile): allow linker script file to have an
4520         extension other than ".lnk"
4521         * link/z80/lklex.c (getfid),
4522         * link/z80/lkmain.c (parse),
4523         * as/mcs51/lklex.c (getfid),
4524         * as/mcs51/lkmain.c (parse),
4525         * as/hc08/lklex.c (getfid),
4526         * as/hc08/lkmain.c (parse): Support comments in the linker script
4527         file on lines by themselves and after filenames
4528
4529 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4530
4531         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4532
4533 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4534
4535         * src/z80/peeph-z80.def: removed some peephole rules that don't
4536         work with multibyte arithmetic (fixed bug #937126)
4537         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4538         to registers and not global variables
4539         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4540         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4541         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4542         checking for assignments not internally generated (fixed bug #931895)
4543         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4544         structure member (fixed bug #930072)
4545
4546 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4547
4548         * src/SDCCmain.c (linkEdit),
4549         * src/hc08/main.c (_hc08_parseOptions),
4550         * as/hc08/Makefile.in,
4551         * as/hc08/aslink.h,
4552         * as/hc08/asm.h,
4553         * as/hc08/m08pst.c,
4554         * as/hc08/lkrloc.c (relr, rele),
4555         * as/hc08/lkarea.c (lnkarea)
4556         * as/hc08/lkmain.c (afile, parse),
4557         * as/hc08/lkelf.c: support for ELF output
4558         * as/hc08/lks19.c (s19),
4559         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4560
4561 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4562
4563         * as/mcs51/lkihx.c: Fixed bug #899105.
4564
4565 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4566
4567         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4568         .dsp files from Unix to DOS.
4569
4570 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4571
4572         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4573         function pointers; we have been compliant for several months now.
4574         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4575         change that was accidently commented out
4576         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4577         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4578         bug #922319
4579
4580 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4581
4582         * src/hc08/gen.c: output of all of the internal debugging information
4583         is now controlled by the D() macro; it is disabled by default
4584
4585 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4586
4587         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4588         harder to keep the same registers during a CAST iCode
4589         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4590         long via int can be done in a single cast, if the signedness is
4591         correct.
4592         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4593         putchar() in tinibios.c in ds390's library
4594
4595 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4596
4597         * src/SDCCast.c (decorateType): fixed bug #898889,
4598         cast result of a literal complement too
4599         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4600         fixed check for bitfields
4601
4602 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4603
4604         * src/SDCCicode.c (geniCodeLogic): made it static,
4605         (geniCodeLogicAndOr): added in order to fix bug #905492,
4606         (ast2iCode): fixed bug #905492
4607         * support/regression/tests/bug-905492.c: added
4608         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4609         (processParms): fixed bug #927659: don't copy parms, this will clear
4610         decorated flag
4611         * support/regression/tests/bug-927659.c: added
4612
4613 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4614
4615         * src/SDCCast.c (addCast): don't cast float to char
4616         * device/lib/libsdcc.lib: added _memmove
4617
4618 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4619
4620         * device/lib/large/Makefile: fixed parallel execution by
4621         replacing `make` by `$(MAKE)`
4622
4623 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4624
4625         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4626         offsets (fixes bug #923936)
4627
4628 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4629
4630         * device/lib/small/Makefile: fixed parallel execution by
4631         replacing `make` by `$(MAKE)`
4632
4633 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4634
4635         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4636
4637 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4638
4639         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4640         * src/regression/Makefile: Regression test was not running.
4641
4642 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4643
4644         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4645         complement if possible
4646         * src/SDCCval.c (valComplement),
4647         * src/SDCCicode.c (operandOperation): fixed complement of literal
4648         * support/regression/tests/onebyte.c (testComplement): added
4649
4650 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4651
4652         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4653         return an optimized tree; actually replace actParm with the new tree
4654         * src/SDCCast.h: added some parantheses to remove side effects
4655         * support/regression/tests/bug-920866.c
4656
4657 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4658         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4659         Bit operands were not being handled properly in the pic14 port.
4660         (now src/regression/add.c passes again).
4661
4662 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4663
4664         * src/SDCC.y (labeled_statement): case and default no longer require
4665         a following statement (RFE #893037)
4666
4667 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4668
4669         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4670         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4671         disabled (fixes bug #916294)
4672         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4673         "mov a,acc"; patch provided by Lenny Story
4674         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4675
4676 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4677
4678         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4679         functions
4680         * src/ds390/gen.c (genFunction, genEndFunction),
4681         * src/ds390/ralloc.c (ds390_assignRegisters),
4682         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4683         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4684         pushed if there are parameters passed on the stack. Also, a cleaner
4685         way to decide if r0/r1 should be pushed/popped. (Together they fix
4686         bug #918693)
4687
4688 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4689
4690         * doc/sdccman.lyx,
4691         * device/lib/mcs51/crtpagesfr.asm,
4692         * device/lib/mcs51/crtxinit.asm,
4693         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4694         to avoid confusion with Si Lab's SFRPAGE register.
4695
4696 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4697
4698         * src/SDCCglue.c (emitMaps): allow public sfr variables
4699         * src/SDCCglue.c (initialComments): include compiler build date
4700         with compiler version and put the timestamp of the generated
4701         assembly file on a serperate line to be less confusing.
4702         * src/port.h: added genInitStartup hook
4703         * src/avr/main.c,
4704         * src/ds390/main.c,
4705         * src/hc08/main.c,
4706         * src/pic/main.c,
4707         * src/pic16/main.c,
4708         * src/xa51/main.c,
4709         * src/z80/main.c: genInitStartup initialize as NULL (default to
4710         historical behaviour)
4711         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4712         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4713         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4714         library instead of hard coding it into the compiler.
4715         * support/regression/ports/mcs51-stack-auto/spec.mk,
4716         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4717         * device/lib/mcs51/Makefile,
4718         * device/lib/small/Makefile,
4719         * device/lib/large/Makefile,
4720         * device/lib/mcs51/crtpagesfr.asm,
4721         * device/lib/mcs51/crtstart.asm,
4722         * device/lib/mcs51/crtxclear.asm,
4723         * device/lib/mcs51/crtxinit.asm,
4724         * device/lib/mcs51/crtclear.asm,
4725         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4726         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4727         and into user configurable files.
4728         * device/lib/clean.mk: clean mcs51 directory too
4729         * support/regression/tests/longlit.c: added static to T1 declaration
4730         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4731         accesses in the initialization code
4732
4733 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4734
4735         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4736         OSCTRIMVAL as noted in bug #916008
4737
4738 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4739
4740         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4741         in loops with multiple exits (reported as incorrect registers
4742         used by Martin Helmling in Sdcc-user list)
4743
4744 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4745
4746         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4747         made ds390 register extensions look less like error messages
4748
4749 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4750
4751         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4752         reported by Adam Wozniak in Sdcc-user list
4753
4754 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4755
4756         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4757         arithmetic optimizations, added debug output
4758
4759 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4760
4761         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4762         * sdcc.spec: updated and split sdcc into 3 rpms
4763         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4764         needed for literals of LEFT_OP and '+'
4765         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4766         introduced RESULT_TYPE_NOPROM
4767         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4768         left shift
4769         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4770         limited promotion to int only for '*'
4771         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4772
4773 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4774
4775         * src/pic16/gen.c (genSkip),
4776         (genc16bit2lit), (gencjneshort): commented out
4777         (is_LitOp): new helper function, checks operand type
4778         (genCmpEq): rewritten
4779
4780 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4781
4782         * support/regression/tests/bug-908454.c: added
4783
4784 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4785
4786         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4787         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4788         (geniCodeCast): cosmetic, don't preserve bit storage class
4789         (geniCodeLeftShift): added promotion
4790         (geniCodeLogic): fixed regression
4791         * src/SDCCsymt.c (computeTypeOr): accept bits too
4792         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4793
4794 2004-03-07  Borut Razem <borut.razem AT siol.net>
4795
4796         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4797
4798 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4799
4800         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4801         version of pic16_genPackRegisters which does not check if ic is a
4802         CAST operator,
4803         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4804         function cause string1.c regression test fails
4805
4806 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4807
4808         * sim/ucsim/configure.in,
4809         * sim/ucsim/configure,
4810         * sim/ucsim/doc/Makefile.in: use docdir
4811         * src/SDCC.y: fixed sbit atrributes
4812         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4813         * src/SDCCast.c (decorateType): |^& need special promotion handling
4814         * src/SDCCast.h,
4815         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4816         * src/SDCCsymt.h (computeType),
4817         * src/SDCCicode.c: computeType() needs op
4818         * src/SDCCsymt.c (checkTypeSanity),
4819         * doc/sddman.lyx: "plain" bitfields are unsigned
4820         * src/SDCCsymt.c (computeTypeOr): added
4821         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4822         |^& ops
4823         * src/SDCCval.c (val*): computeType() needs op
4824         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4825         * support/regression/tests/onebyte.c: added tests for |^&
4826
4827 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4828
4829         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4830         for writing icode into asm output.
4831
4832 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4833
4834         * src/pic16/device.c: added some debug lines enabled
4835         with macro DEBUG_CHECK,
4836         * src/pic16/genarith.c: more debug in genPlus,
4837         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4838         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4839         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4840         * (aopForSym): onStack symbols are re-placed in data memspace,
4841         and onStack flag is cleared,
4842         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4843         copy temporary pcodeop,
4844         * (genPcall): added warning for not updating PCLATU,
4845         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4846         always true for pic16 port,
4847         * (genMultOneWord): NEW, supports integer multiplication,
4848         * (genMult): modified to call genMultOneWord,
4849         * (ifxForOp): added warning when return NULL,
4850         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4851         flag is set before call to operandFromSymbol for implicit
4852         added structures,
4853         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4854         options.intlong_rent are set by default,
4855         * (_hasNativeMulFor): modified to allow port generation of integer
4856         multiplication,
4857         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4858         set regtype to REG_SFR for all registers, restricting seting the
4859         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4860
4861 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4862
4863         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4864         more than 500 times in the regression tests
4865
4866 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4867
4868         * support/Util/SDCCerr.h,
4869         * support/Util/SDCCerr.c,
4870         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4871         enumerator_list),
4872         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4873         for symbol conflicts.
4874         * support/valdiags/tests/enum.c,
4875         * support/valdiags/tests/tentdecl.c,
4876         * support/valdiags/tests/struct.c: expect possible error messages
4877         referring to original symbol definitions.
4878         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4879         * src/SDCCsymt.h,
4880         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4881
4882 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4883
4884         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4885
4886 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4887
4888         * src/pic16/ralloc.c (newReg): fixed bug #908929
4889
4890 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4891
4892         * src/ds390/gen.c: added missing #include "main.h"
4893
4894 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4895
4896         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4897         checking if symbol is already in set,
4898         * src/pic16/device.h: prototype for checkAddSym,
4899         * src/pic16/gen.c: (_G): added entry interruptvector,
4900         * (assignResultValue): removed some commented out lines,
4901         * (genFunction): check for ISR via sym->type, absolute section for
4902         interrupt code is created via a new pBlock, the goto instruction is
4903         placed now correctly at the interrupt vector position, changed all
4904         references from ivec to _G.interruptvector,
4905         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4906         is the interrupt is a high priority one, same for return from ISR,
4907         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4908         externs to calls of checkAddSym,
4909         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4910         pic16_pcode_verbose flag is set,
4911         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4912         * src/pic16/pcoderegs.c: message about how many registers are saved
4913         will only be emitted if pic16_pcode_verbose flag is set,
4914
4915 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4916
4917         * src/ds390/ralloc.h,
4918         * src/ds390/ralloc.c (ds390_regWithIdx),
4919         * src/ds390/gen.c (emitcode),
4920         * src/ds390/main.h,
4921         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4922         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4923         ds390operandCompare, getRegsRead, getRegsWritten,
4924         initializeAsmLineNode): customized instruction size calculation for
4925         ds390, started basis for some register optimizations
4926         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4927         corresponding assembly output
4928         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4929         missing push/pop of r0/r1. Optimized push/pops
4930
4931 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4932
4933         * src/mcs51/main.c (instructionSize): fixed ACALL size
4934         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4935
4936 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4937
4938         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4939         the sorting of rlist with NULL elements
4940         * (print_idataType, print_idata): NEW to create idata sections
4941         * src/pic16/device.h: idataSymSet new variable
4942         * src/pic16/gen.c (genFunction): fixed some bugs in string
4943         comparing, improved the absolute section creation for ISRs,
4944         added FSR0L/FSR0H in registers that are saved in an ISR,
4945         * (genInline): fixed the processing of inline snippets,
4946         now they undergo no process by the peephole optimizer
4947         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4948         are placed in idataSymSet,
4949         * (pic16emitStaticSeg): extern symbols are added in externs,
4950         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4951         switching when aboslute variables are placed in access bank memory
4952         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4953         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4954         commented out with #if,
4955         * (pic16_packRegisters): reintroduce the check for CAST because some
4956         symbols are not correctly handled,
4957         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4958         pCodeInstruction instead of pCode,
4959         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4960         pCodeAsmDir definition,
4961         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4962         directive, then the argument directive is emitted without the leading
4963         tab, hack for inline labels which must be in the first column,
4964         * (compareLabel,pic16_findNextInstruction),
4965         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4966         * (insertBankSwitch): modified for the new pCodeAsmDir,
4967
4968 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4969         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4970
4971         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4972         instance,
4973         * (pushSide): commented out with #if,
4974         * (assignResultValue): fixed some typos in saving
4975         registers,
4976         * (genPcall): FIXED and sync'ed with genCall,
4977         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4978         * (genNearPointerGet): fixed to handle some more cases,
4979         implementation scheme via table reads,
4980         * (genConstPointerGet): modified to access code memory correct,
4981         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4982         and improved to handle some cases
4983         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4984         instead of "RETLW" for init data
4985         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4986         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4987         variables are placed in access bank memory (<0x80 and >=0xf80),
4988         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4989         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4990         TBLWT_POSTDEC,TBLWT_PREINC
4991         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4992         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4993         directives
4994         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4995         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4996         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4997         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4998
4999 2004-02-29  Borut Razem <borut.razem AT siol.net>
5000
5001         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5002         support/Util/findme.h, support/Util/system.h: enhance binary relative
5003         search for lib and include by using findProgramPath()
5004
5005 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5006
5007         * src/SDCCpeeph.h,
5008         * src/SDCCpeeph.c (pcDistance),
5009         * src/port.h,
5010         * src/mcs51/ralloc.h,
5011         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5012         * src/mcs51/main.h,
5013         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5014         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5015         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5016         size calculation port specific, started basis for some register
5017         optimizations
5018         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5019         missing push/pop of r0/r1. Optimized push/pops
5020         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5021         * device/lib/_modsint.c (_modsint),
5022         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5023         and stack version so regression tests pass
5024
5025 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5026
5027         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5028         * src/SDCCast.c (decorateType): catch another small optimization
5029         with '?' operator
5030         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5031         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5032         modified to finally use computeType() all over SDCC,
5033         see Feature Request #877103
5034         * src/SDCCval.h: cosmetic
5035         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5036         valCompare(); regression tested in muldiv.c
5037         * support/regression/tests/muldiv.c (testMod): mod sign follows
5038         dividend only
5039
5040 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5041
5042         * src/SDCCast.c (decorateType): fixed bug #902362
5043         * doc/INSTALL.txt: fixed install instructions for win32
5044
5045 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5046
5047         * device/include/Makefile.in (install): fixed by replacing spaces
5048         by tabs
5049         * doc/README.txt,
5050         * doc/INSTALL.txt: updated for release
5051         * doc/sdccman.lyx: added warning for --xstack being buggy
5052
5053 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5054
5055         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5056         to eliminate build warnings.
5057         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5058
5059 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5060            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5061
5062         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5063         removed -penable-stack, added comment for stack pragma, added
5064         warning for not initializing the stack/frame registers, removed
5065         comment at interrupts section
5066
5067         Stack is made permanent, there is no ability to disable stack usage.
5068         * src/pic16/device.h,
5069         * src/pic16/device.c: removed all references to USE_STACK macro,
5070         * src/pic16/device.c (pic16_dump_section): when no elements in
5071         rlist, free rlist before return,
5072         * (pic16_dump_int_registers): NEW, internal registers are a new set
5073         of general purpose registers reused by each function,
5074         * (checkAddReg): returns 1 if registers is added to set,
5075         * (pic16_groupRegistersInSection): when a registers is of type
5076         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5077         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5078         SRCASECMP macro is moved here from device.c
5079         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5080         PO_PCLATU, PO_PRODL, PO_PRODH,
5081         * (pic16_pCodeOpType, genMinus,
5082         changed compares to "a" register, with AOP_ACC,
5083         * (pic16_genPlus): fixed some bugs and indented properly,
5084         * (pic16_addSign): changed size to size+offset in the MOVWF
5085         instruction,
5086         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5087         multiply 8-bit operand by literal, result is 8-bit,
5088         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5089         multiply 2 8-bit operand, result is 8-bit,
5090         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5091         genUMult8X*_16,
5092         * src/pic16/gen.c: changed accUse to contain WREG only,
5093         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5094         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5095         true, do not use immediate addressing any more unless sym is a
5096         pointer in codespace,
5097         * (aopForRemat): do not use immediate addressing when symbol not in
5098         codespace and when symbol's address is requested,
5099         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5100         accUse size (= 1),
5101         * (aopGet): added case for AOP_ACC and don't return "accumulator
5102         bug" but WREG instead,
5103         * (popGetTempReg): pushes contents of temporary register in stack,
5104         * (popReleaseTempReg): pops contents of temporary register from
5105         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5106         * (pic16_popGet): separated case AOP_ACC to return register WREG
5107         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5108         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5109         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5110         the use of immediate pointers to certain cases only.
5111
5112         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5113         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5114         * (assignResultValue, genCall, genRet): modified to use the new
5115         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5116         genPcall is still broken,
5117         * (genFunction): added code to create 'A' type pBlocks when
5118         interrupt functions are generated, code not extensively tested yet,
5119         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5120         * (genEndFunction): modified so ISRs pop stored registers from stack,
5121         * (genMultOneByte): cleanup,
5122         * (AccRsh): added flag andmask, to and result with appropriate mask,
5123         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5124         * (genDataPointerGet): fixed and reenabled its use,
5125         * (genNearDataPointerGet): bugs fixed,
5126         * (genDataPointerSet): bugs fixed,
5127         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5128         pic16_DumpSymbol, pic16_DumpOp,
5129         * src/pic16/genutils.h: function prototypes for the above functions,
5130         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5131         pointers,
5132         * (pic16emitRegularMap): many many many improvements, but needs a
5133         major cleanup,
5134         * src/pic16/main.c: enable_stack in pic16_options is removed,
5135         * (_pic16_parseOptions): removed command line options -penable-stack,
5136         * (_process_pragma): emit stack symbol only when stack pragma is
5137         processed,
5138         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5139         redirected to FSR0L/FSR0H pair,
5140         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5141         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5142         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5143         for immediates,
5144         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5145         * (dumpPicOptype): NEW,
5146         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5147         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5148         with movff instruction,
5149         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5150         added pic16_int_regs, some packRegsFor* functions are commented out,
5151         because produce errors,
5152         * src/pic16/NOTES: minor modifications
5153
5154 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5155
5156         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5157         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5158         --pack-iram.
5159         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5160         * as/mcs51/lkaomf51.c: fixed bug #895763
5161
5162 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5163
5164         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5165
5166 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5167
5168         * doc/sdccman.lyx: added details about the HC08 storage classes and
5169         interrupts, fixed the register usage info for z80 & gbz80
5170
5171 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5172
5173         * doc/sdccman.lyx: added more pic16 port documentation
5174         * device/include/pic16/: added header pic18fregs.h
5175
5176 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5177
5178         * doc/sdccman.lyx: added Vangelis' contribution
5179
5180 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5181
5182         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5183         extend to the next CALL or PCALL, not just to the next CALL.
5184
5185 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5186
5187         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5188
5189 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5190
5191         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5192         bug #895752 and a better fix for bug #716790
5193
5194 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5195
5196         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5197
5198 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5199
5200         * doc/sdccman.lyx: minor changes, minor changed
5201
5202 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5203
5204         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5205         which can't handle SDCC_NEWONEBYTEOPS,
5206         (geniCodeMultiply): removed conversion from mult to shift for pic14
5207         and pic16
5208
5209 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5210
5211         * src/hc08/gen.h,
5212         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5213         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5214         thus fixing bug #895406
5215
5216 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5217
5218         * device/lib/_modsint.c,
5219         * device/lib/_modslong.c: sign follows divisor only
5220         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5221         signs or signedness can be ignored
5222         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5223         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5224         added optimization for IFX,
5225         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5226         arguments;
5227         reenabled optimization for IFX, which was removed on 2004-01-11
5228         * src/SDCCast.h: added return type IFX
5229         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5230         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5231         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5232         SDCC_OLDONEBYTEOPS selects the old behaviour
5233         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5234         changed again and commented promotion rule
5235         * src/SDCCval.c (valDiv): promotion no longer necessary
5236         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5237         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5238         rewritten
5239         * support/regression/tests/onebyte.c: added
5240
5241 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5242
5243         * gen.c (genInline): reverted to old code for assemnling inline
5244         code because of bug reported James Chadd
5245
5246 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5247
5248         * ralloc.h: missing declarations from previous patch,
5249         seems that patch for ralloc.h was never applied, fixed
5250
5251 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5252            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5253
5254         * pcode.c,
5255         * pcode.h,
5256         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5257         indirect addressing. Marked FSR0 as deprecated
5258         * gen.c (pointerCode): commented out, not needed now
5259         (pic16_popGet2p): new MOVFF helper function
5260         (genGenPointerGet),
5261         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5262         (shiftRLong): removed duplicate debugging info
5263
5264 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5265
5266         * src/ds390/gen.c (genNearPointerGet),
5267         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5268         optimization with bits, but not bitfields.
5269         * src/ds390/ralloc.c (packRegisters),
5270         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5271
5272 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5273
5274         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5275
5276 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5277
5278         * src/SDCCsymt.h,
5279         * src/SDCCicode.c (operandFromSymbol),
5280         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5281         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5282         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5283         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5284         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5285         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5286         bug #892038
5287         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5288         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5289         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5290         * src/SDCCsymt.c (newSymbol),
5291         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5292         enumerator_list),
5293         * src/SDCCval.h,
5294         * src/SDCCval.c (newiList): fixed bug #885705
5295
5296 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5297
5298         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5299         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5300
5301 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5302
5303         * device/include/c8051f120.h,
5304         * device/include/c8051f300.h,
5305         * device/include/c8051f310.h: added/updated header files for Silicon
5306         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5307         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5308         in new section Submitting patches
5309
5310 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5311
5312         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5313         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5314         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5315         genGenPointerSet),
5316         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5317         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5318         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5319         genGenPointerSet),
5320         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5321         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5322         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5323         genGenPointerSet),
5324         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5325         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5326         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5327         genGenPointerSet): fixed bug #892400
5328         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5329         to eliminate build warnings.
5330         * src/SDCCast.c (processParms),
5331         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5332         fixed bug 751859
5333         * support/valdiag/valdiag.py: added GCC to the list of defines active
5334         when compiling with gcc
5335
5336 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5337
5338         * support/Util/SDCCerr.h,
5339         * support/Util/SDCCerr.c,
5340         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5341         with an incomplete type (fixed bug #883734)
5342         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5343
5344 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5345
5346         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5347
5348 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/SDCCast.c (decorateType),
5351         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5352         function pointer implementation
5353         * support/regression/tests/funptrs.c: added tests to verify both forms
5354         of function pointers work correctly. Added tests to verify parameters
5355         are passed in the correct order.
5356
5357 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5358
5359         * device.c (regCompare): registers are sorted by ascending
5360         address and increasing size,
5361         * main.c (_pic16_finaliseOptions): removed the declaration
5362         of compiler macro MCU. Now a macro of the format pic18fxxxx
5363         will be defined from the command line
5364
5365 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5366             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5367
5368         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5369         PCOP_RLCF was overwritten!
5370         * gen.c (genSkip): commented out calls to pic16_emitcode,
5371         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5372         * (genlshTwo),
5373         * (genRRC): added debugging info,
5374         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5375         overwritten while shifting,
5376         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5377         overwritten while shifting,
5378         * (AccLsh),
5379         * (AccRsh),
5380         * (shiftLLeftOrResult),
5381         * (shiftRLeftOrResult),
5382         * (shiftRLong),
5383         * (shiftLLong): Implemented with pic16_emitpcode
5384         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5385         * (genLeftShift): Fixed bug, operand for shift by variable always
5386         was "and"ed with 0x0f,
5387         * (genLeftShiftLiteral),
5388         * (genrshTwo),
5389         * (genRightShiftLiteral): added debugging info,
5390         * (genrshFour): added comment,
5391         * (genRightShift): determined signedness from operand "left"
5392         instead of "result"
5393
5394 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5395
5396         * src/SDCCicode.c (geniCodeParms),
5397         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5398         function pointers, fixed function pointer bugs #861242 and #861896
5399
5400 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5401
5402         * device/include/c8051f000.h,
5403         * device/include/c8051f120.h,
5404         * device/include/c8051f300.h: added header files for Silicon
5405         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5406
5407 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5408
5409         * src/SDCCast.c (processParams): added new type flow and restructured
5410         (gatherAutoInit): added new type flow
5411         (addCast): cosmetic changes
5412         (getLeftResultType): added new type flow for array indices, patch
5413         provided by Stas, see FR #877103
5414         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5415         array index patch by Stas
5416         * src/SDCCast.h: added prototype getResultTypeFromType()
5417         * src/SDCCval.h,
5418         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5419         * src/pic/glue.c (pic14emitStaticSeg),
5420         * src/pic16/glue.c (pic16emitStaticSeg),
5421         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5422         for initialization of symbols
5423         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5424         * support/Util/SDCCerr.h:
5425         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5426         * .version: bumped version number to 2.3.8
5427         * device/include/Makefile.in (install),
5428         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5429         avoid warnings
5430
5431 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5432
5433         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5434         Slade Rich fixed an optimization bug
5435         * src/pic/pcodepeep.c,
5436         * src/pic/pcoderegs.c
5437         * doc/Makefile (install): added test for directory
5438
5439 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5440
5441         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5442         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5443         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5444         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5445         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5446         * as/mcs51/asexpr.c (term),
5447         * as/hc08/asexpr.c (term): fixed bug #887146
5448
5449 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5450
5451         * src/z80/gen.c (genMult): handle single byte result product
5452         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5453         DUMMY_READ_VOLATILE (fixed bug #886367)
5454
5455 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5456
5457         * support/regression/tests/libmullong.c: fixed logic, on little endian
5458         hosts we ended without a mullong_wrapper()
5459
5460 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5461
5462         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5463         virus/worm forged address usage.
5464
5465 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5466
5467         Fixed promotion, it should be done on AST level:
5468         * src/SDCCast.c (addCast): added promotion to int
5469         (decorateType): updated call to upCast()
5470         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5471         usualUnaryConversions()
5472
5473 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5474
5475         * support/regression/tests/literalop.c (mulWrapper): Added a
5476         wrapper to remove integer overflow warnings.
5477
5478         * support/regression/tests/float_trans.c: Made work on host.
5479
5480         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5481         location of sz80.
5482
5483         * support/regression/generate-cases.py (main): Changed from inline
5484         to a main method.
5485
5486         * doc/Makefile (install): Changed to depth first to get rid of
5487         missing directory install warning.
5488
5489         * as/Makefile (install-doc): Made work on Mac.
5490
5491 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5492
5493         * src/SDCCast.c: added an additional type flow in decorateType() of
5494         opposite direction, see feature request #860006; it's enabled at runtime
5495         by setting the environment variable SDCC_NEWTYPEFLOW
5496         * src/SDCCast.h: changed prototype of decorateType()
5497         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5498         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5499         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5500         see feature request #877103
5501         * src/SDCCval.c: updated call of decorateType()
5502         (valBitwise): fixed bug #882876
5503         (valMinus): added promotion
5504         (valLogicAndOr): result is unsigned
5505         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5506         * src/SDCCsymt.c (computeType),
5507         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5508         must not cause an unsigned operation
5509         * src/pic/glue (pic14emitRegularMap),
5510         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5511
5512 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5513
5514         * src/pic/pcode.c (PCodeID): commented out left over debug code
5515
5516 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5517
5518         * support/valdiag/tests/overflow.c: added shift tests
5519         * src/pic/device.c,
5520         * src/pic/gen.c,
5521         * src/pic/gen.h,
5522         * src/pic/glue.c,
5523         * src/pic/main.c,
5524         * src/pic/pcode.c,
5525         * src/pic/pcode.h,
5526         * src/pic/pcodepeep.c,
5527         * src/pic/pcoderegs.c,
5528         * src/pic/ralloc.c,
5529         * src/pic/ralloc.h: applied patch from Slade Rich;
5530         added support for multiple code pages and multiple RAM banks on the
5531         PIC 14 port. The ASM files now no longer simply assume all the
5532         code / RAM are in the same page / bank. This means the linker can
5533         safely allocate code/RAM of separate ASM files to different pages/banks.
5534         * doc/sdccman.lyx: added Slade's tips
5535         * src/mcs51/peeph.def: fixed bug #880768
5536
5537 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5538
5539         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5540         * src/SDCCast.c (decorateType): fixed bug #880197
5541
5542 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5543
5544         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5545         getopt.h.
5546
5547         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5548         strtof is not part of C89 and isn't included with Mac OS X.
5549
5550 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5551
5552         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5553         shiftL2Left2Result): fixed bug #879326
5554         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5555         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5556         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5557         address fetch for clr instruction
5558         * device/lib/hc08/_mulint.c: created optimized assembly version
5559         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5560
5561 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5562
5563         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5564         proposed in FR #877103
5565
5566 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5567
5568         * src/SDCCval.c (cheapestVal): added missing checks
5569         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5570         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5571
5572 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5573
5574         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5575         equal operands
5576
5577 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5578
5579         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5580         loaded with the linker search paths (-L arguments) and the libraries
5581         to be linked with the current source (-l arguments). Changes
5582         currently will affect only the pic16 port.
5583         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5584         include path the port specific paths and port specific libraries,
5585         * gplink command now contains the $3 argument,
5586         * src/pic16/device.h,
5587         * src/pic16/device.c,: structure PIC_device is made public and
5588         renamed to PIC16_device, the same for variable Pics which is renamed
5589         to Pics16. Updated all references to them.
5590         * src/pic16/glue.c (pic16glue): corrected bug with code
5591         initialization which bypassed the variable initializations block.
5592
5593         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5594         COMPILE_FLAGS and added the --nostdinc option
5595
5596 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5597
5598         * device/include/mc68hc908jb8.h: Register defs for another member
5599         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5600
5601 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5602
5603         Documenting changes from previous commits.
5604         * configure.in (version 1.56),
5605         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5606         when generating output files to configure the pic16 library,
5607         but now I've commented it out, since gputils aren't installed in the
5608         SF compile farm, so library won't compile
5609
5610         * device/lib/Makefile.in (version 1.56): initially I've added in
5611         target 'all' the prerequestive 'model-pic16' so it compiled the
5612         pic16 library, but now I've commented it out for the same reasons
5613         above,
5614         * added targets 'model-pic16' and 'objects-pic16' to compile the
5615         library
5616         * added target 'port-specific-objects-pic16' to handle the
5617         generated libraries and copy them into the build/ directory
5618         * added target 'clean-intermediate-pic16' to clean intermediate
5619         files into pic16 directory
5620         * in target 'installdirs' added line to create directory pic16 in
5621         the installation path
5622
5623         * device/include/Makefile.in (version 1.11): in target 'install'
5624         added lines to copy all header files to installation path,
5625         * in target 'installdirs' added line create directory for pic16
5626         headers in the installation path
5627
5628 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5629
5630         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5631          a function call
5632
5633 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5634
5635         * configure,
5636         * device/lib/configure.in,
5637         * device/lib/configure: fixed for autoconf 2.57
5638
5639 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5640
5641         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5642         option so that it actually works. Made it specific to the z80, since
5643         the gbz80 doesn't have these kinds of I/O ports.
5644
5645 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5646
5647         * device/include/z180.h,
5648         * device/lib/_memcpy.c,
5649         * device/lib/_memmove.c,
5650         * device/lib/_mulint.c,
5651         * device/lib/ser_ir.c,
5652         * device/lib/ser_ir_cts_rts.c,
5653         * device/lib/_strcmp.c,
5654         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5655         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5656         portmode; added deprecation warning for bank= and protmode= forms.
5657         Also, guard against buffer overflow.
5658         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5659
5660 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5661
5662         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5663         changed interrupt vector table generation to only emit declared vectors.
5664         * device/include/Makefile.in: added missing backslash
5665         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5666
5667 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5668
5669         Mainly changes to support compilation of the device libraries
5670         * src/pic16/device.c: stack is allocated via symbol and not
5671         via literal number. The symbol is placed in the corresponding
5672         position of the data ram
5673         * (pic16_dump_section): relocatable and absolute uninitialized
5674         data are now emitted in sorted order to reduce section naming,
5675         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5676         weren't marked as being in the access bank,
5677
5678 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5679
5680         Added portion of GNU PIC Library under the directory
5681         device/include/pic16 and device/lib/pic16. These files
5682         contain the declarations of SFRs for the PIC18Fxx2 devices.
5683         The directory is initialized via configure from toplevel.
5684
5685 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5686
5687         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5688         the spilllocations to be compared correctly
5689
5690 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5691
5692         * src/SDCCast.c (decorateType): fixed bug introduced today
5693
5694 2004-01-12  Borut Razem <borut.razem AT siol.net>
5695
5696         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5697         doc/sdccman.lyx: upper case pragmas are deprecated
5698
5699 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5700
5701         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5702         in simpler and even better code
5703
5704 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5705
5706         * src/SDCCicode.c (operandOperation): fixed bug #874819
5707         * src/SDCCast.c (decorateType): fixed
5708         char foo (unsigned long ul) { return ul > 0; }
5709
5710 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5711
5712         * doc/sdccman.lyx: Moved and added some sections, small changes
5713         all over. Telling LaTeX to be less strict with word spacing
5714         to better keep the right margin. Changed some notes about
5715         maintainance of the ports in section 3.2.1 - is it OK like this?
5716
5717 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5718
5719         SDCC source changes:
5720         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5721         convilong): modified to inform the pic16 port that builtin functions
5722         are external
5723
5724         PIC16 PORT specific changes:
5725         * src/pic16/device.c pic16_dump_equates() added,
5726         processor registers declared internally by the port are emitted in
5727         the translation as equates,
5728         * src/pic16/gen.c: inline code is passed unprocessed to the
5729         translation,
5730         * (pic16_popGetLit2): fnuction modified to take second operand as
5731         pCodeOp pointer and not as literal,
5732         * (popRegFromIdx): prefixed with pic16_,
5733         * (pic16_popCombine2): modified to receive already allocated pCode
5734         operands,
5735         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5736         * (genFunction): initializes local stack frame and pushes on stack
5737         all the registers used by this function,
5738         * (genEndFunction): restores all registers from stack and restores
5739         stack frame,
5740         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5741         improvements,
5742         * (pic16glue): changed the program startup sequence,
5743         * added new dbName code 'A' for functions placed in absolute section
5744         * src/pic16/main.c: added function attribute _naked,
5745         * added pragma 'code' to place a fnuction at an absolute address,
5746         * added command line arguments --debug-ralloc and --pcode-verbose,
5747         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5748         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5749         * (pic16_newpCodeOpLit2): modified to take the second operand as
5750         pCodeOp pointer,
5751         * (pic16_printpBlock): modified to emit each function in a separate
5752         section,
5753         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5754         UPPER for immediate operands,
5755         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5756         instruction,
5757         * src/pic16/peeph.def: all peepholes with movff are commented out,
5758         because there is a problem in the pcode peep optimizer,
5759         * src/pic16/ralloc.c: the register allocator can now reuse local
5760         function symbols for another function. This saves register usage.
5761         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5762
5763         Added file src/pic16/NOTES with information about program writing on
5764         the current port version.
5765
5766 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5767
5768         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5769         and peephole 252 (array access)
5770
5771 2004-01-09  Borut Razem <borut.razem AT siol.net>
5772
5773         * src/SDCCmain.c : fixed #872250: -l command line defined library
5774           files are scanned before standard library files
5775
5776 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5777
5778         * src/SDCCast.c (decorateType): fixed bug #874046
5779
5780 2004-01-09  Borut Razem <borut.razem AT siol.net>
5781
5782         * support/scripts/sdcc.nsi: remove previous installation
5783
5784 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5785
5786         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5787         bytes for last interrupt vector (mcs51)
5788         * sdcc.spec: fixed typo
5789
5790 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5791
5792         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5793         gen51Code): more efficient parameter receive for --model-large
5794         ("bug" #845294)
5795
5796 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5797
5798         * src/ds390/main.c,
5799         * src/z80/main.c: added missed needLinkerScript flags (more than
5800         one port structure defined in these file)
5801         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5802         bug #795325
5803
5804 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5805
5806         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5807         * src/port.h: added flag needLinkerScript in port->linker
5808         structure to inform whether to create a .lnk file or not,
5809         * src/avr/main.c,
5810         * src/ds390/main.c,
5811         * src/hc08/main.c,
5812         * src/mcs51/main.c,
5813         * src/pic/main.c,
5814         * src/pic16/main.c,
5815         * src/xa51/main.c,
5816         * src/z80/main.c: changed appropriately to configure
5817         needLinkerScript flag
5818         * src/pic/gen.c,
5819         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5820         * src/pic/glue.c: added variable udata_section_name to
5821         override default uninitialized data segment definition for
5822         devices only with SHAREBANK memory (reported from Erik Epetrich)
5823         * (pic14emitOverlay): modified to emit a commented overlay segment
5824         directive when no overlay data exist
5825         * (picglue): modified to emit uninitialized data segment
5826         according to udata_section_name
5827         * src/pic/main.c (_pic14_parseOptions): added command line
5828         options --udata-section-name=[name] to override default
5829         udata definition name
5830         * modified _linkCmd and _asmCmd to include compiler passed
5831         arguments via -W option
5832         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5833         object file from '.rel' to '.o' in port->linker structure,
5834         changed size of fptr from 2 to 3 in port structure
5835
5836 2004-01-07  Borut Razem <borut.razem AT siol.net>
5837
5838         * support/scripts/sdcc.nsi: update PATH
5839         * support/scripts/sdcc.ico: craeted
5840
5841 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5842
5843         * device/include/Makefile.in: fix install
5844         * doc/Makefile: fix install
5845
5846 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5847
5848         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5849         in bug #860505
5850         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5851         how the function variable allocation summary is displayed; also
5852         include information about variables allocated to the overlay
5853         segment
5854
5855 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5856
5857         * as/mcs51/lkmain.c: Help about -Y option
5858         * as/mcs51/lkarea.c: Fixed gcc warnings
5859
5860 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5861
5862         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5863         fixed warning
5864         * support/valdiag/tests/overflow.c: added
5865         * src/SDCCast.c (decorateType),
5866         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5867         LEFT_OP (left shift)
5868
5869 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5870
5871         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5872         (default behaviour).
5873
5874 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5875
5876         A python script to validate compiler diagnostic messages. It can be
5877         used to verify that sdcc complains about bad c source code and
5878         gives a good location of the error.
5879         * support/valdiag/Makefile,
5880         * support/valdiag/valdiag.py,
5881         * support/valdiag/tests/*
5882
5883 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5884
5885         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5886         * src/SDCCsymt.c (newEnumType),
5887         * src/SDCCsymt.h
5888         * support/Util/SDCCerr.c,
5889         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5890         enum related bugs.
5891         * support/regression/tests/enum.c: added test for enum values that
5892         require at least 2 bytes of storage.
5893
5894 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5895
5896         * src/common.h: added ifndef/define/endif macros
5897         around the header file.
5898         Bug reported from Jesus Calvino-Fraga
5899
5900 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5901
5902         * sdcc.spec: updated
5903         * device/include/Makefile.in: don't install CVS directories
5904         * device/lib/Makefile.in: added removal of CVS directories after install
5905         * doc/Makefile: fixed install, added local_icons
5906         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5907         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5908         * src/ds390/gen.c (genRightShift): fixed bug #870788
5909         * src/SDCCast.c (decorateType): fixed bug #870781
5910
5911 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5912
5913         PIC16 port related changes:
5914         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5915         added variable stackPos,
5916
5917         * gen.c: genCall, assignResultValue: added support for
5918         pushing/retrieving function parameters to/from stack,
5919         genFunction,genEndFunction: setup stack frame for the
5920         generated function,
5921         genAddrOf: will be changed according to bug 863624
5922
5923         * added files genutils.c and genutils.h which contain gen*
5924         debugged and optimised functions extracted from gen.c
5925
5926         * glue.c: added variable 'externs' which holds extern symbols,
5927         pic16emitRegularMap: is modified to properly handle relocatable
5928          symbols under the new scheme,
5929         pic16createInterruptVect: is modified
5930         pic16printPublics: is modified to emit 'global' assembler directives,
5931         added pic16_printExterns to print extern symbols,
5932         pic16glue: initializes stack/frame pointer in the beginning of
5933         the assembly output. Temporary hack, will be corrected later,
5934         because gplink yet does not support stack and SDCC does not
5935         yet support a type of crt0.o object to create the final binary.
5936
5937         * Removed many lines that contain 8051 legacy code.
5938         * The code is finally placed under a 'code' directive.
5939         * Added port specific options.
5940
5941         * _process_pragma: simplified since now we do not need *special*
5942         include file to define SFR registers. But a separate header
5943         will be needed. This will be developed later.
5944         * _pic16_parseOptions: added, parses port specific options:
5945         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5946         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5947         --preplace-udata-with=
5948
5949         * _pic16_setDefaultOptions: modified to initialize section names,
5950         but hack is temporarly out of order since it needs improvement.
5951         * _pic16_genAssemblerPreamble: configuration words are emitted by
5952         their address instead of their name. This part is incomplete and
5953         supports only the 18Fxx2 devices. Other devices will emit an error
5954         during assembly since they do not contain the same set of config
5955         registers
5956         * _pic16_genIVT: is modified,
5957
5958         * pcode.c: added definitions for some hardware registers that are needed
5959         for stack support
5960         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5961         All PCI entries are updated. Now LFSR is supported.
5962         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5963         * added pic16_newpCodeOpLit2 to support instructions with
5964         two literal arguments
5965         * pic16_pCode2str: corrected code that emits assembler instructions
5966         with two literal operands and those that have an access bit modifier
5967         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5968         this fixes a bug which caused some labels to be lost, when an
5969         assembler directive was added, i.e. banksel,
5970         * pic16_FixRegisterBanking: improved logic that causes the insertion
5971         of bank switching,
5972         * InlineFunction: functions that are called once, are not any more
5973         inlined. This can be a port option in the future,
5974
5975         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5976
5977         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5978         hold the corresponding uninitialized symbols,
5979         * pic16_allocProcessorRegister: registers have explicit marked the
5980         accessBank field,
5981         * pic16_allocInternalRegister: registers are explicit marked as
5982         not used,
5983         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5984         processing list, so bit registers were lost,
5985         *
5986
5987         * ralloc.h: added field 'accessBank' and original symbol operand
5988         in register definition,
5989         * removed the field isMapped from register definition,
5990
5991         ** Several functions have been removed from various sources:
5992         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5993         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5994         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5995         pic16_assignRelocatableRegisters
5996
5997         ** others have been introduced:
5998         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5999         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6000
6001 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6002
6003         * support/scripts/inc2h.pl: changed definition of BIT_AT
6004         to emit 'sbit at' instead of 'bit at'. This was a request.
6005
6006         PIC16 port related preliminary changes:
6007         * gen.c: prefixed function popRegFromString with
6008         pic16_ and all references to it corrected
6009         * pcode.c: all pic16_pc_* hardware registers prefixed
6010         with underscore (_),
6011         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6012         * ralloc.c: newReg(): when register is REG_SFR then
6013         set address to rIdx,
6014         pic16_allocProcessorRegister(): marks register wasUsed=0
6015         pic16_writeUsedRegs(): added a call to assign processor
6016         registers via pic16_assignFixedRegisters
6017
6018 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6019
6020         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6021         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6022         variables in unused register banks.  Also the SSEG is placed
6023         wherever there is enough space for it, and IDATA can be anywhere
6024         in internal RAM.  For now compile using -Wl-Y[stack_size].
6025         The mem file is different for this option as well, since it
6026         makes no sense of talking about DSEG lenght.
6027
6028 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6029
6030         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6031         in certain cases, e.g. when ROM assignment, patch provided
6032         from Albert den Haan.
6033
6034 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6035
6036         Many signedness and type propagation fixes:
6037         * src/SDCCicode.c: made geniCodeCast() static
6038         replaced SPEC_ by IS_ (cosmetic)
6039         (operandOperation): fixed div and mod operation
6040         (usualBinaryConversions): added support for promotion of char
6041         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6042         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6043         (geniCodeAdd): an array index will stay unsigned, even if promoted
6044         from char to int
6045         (geniCodeArray): ditto
6046         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6047         * src/SDCCsymt.c (computeType): added more support for char;
6048         promotion of char is selectable by promoteCharToInt, fixed signedness
6049         for all cases
6050         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6051         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6052         * src/SDCCval (val*): replaced signedness calculation by
6053         computeType()
6054         rearranged if-branches (cosmetic)
6055         (valShift): added warning W_SHIFT_CHANGED
6056         (valCompare): fixed problem with different types
6057         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6058         * support/regression/tests/literalop.c: added many cases
6059         * support/regression/tests/ast_constant_folding.c: changed finally to
6060         'unsigned int'
6061         * .version: new year, new version: 2.3.7
6062         * src/SDCCmain.c (main): applied patch #866468
6063         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6064         provided by Scott Bronson
6065         * doc/sdccman.lyx: updated documentation for sdcdb
6066         updated and added chapter tips
6067
6068 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6069
6070         * src/SDCCsymt.h: missing from yesterday's commits
6071
6072 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6073
6074         * src/SDCC.y (struct_or_union_specifier),
6075         * support/Util/SDCCerr.c,
6076         * support/Util/SDCCerr.h: verify that struct & union tags are used
6077         as declared.
6078
6079 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6080
6081         * src/SDCCglobl.h: missing from yesterday's commits
6082
6083 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6084
6085         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6086         sft_attributes, struct_declaration, parameter_declaration,
6087         type_name, start_block, declaration_list),
6088         * src/SDCC.lex (check_type): support redefinition of typedef names
6089
6090 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6091
6092         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6093         aligned xdata arrays. Erik helped me with the if clause.
6094
6095 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6096
6097         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6098         warning
6099
6100 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6101
6102         * src/SDCCast.h,
6103         * src/SDCCast.c (newAst_),
6104         * src/SDCCicode.h,
6105         * src/SDCCicode.c (ast2iCode, newiCode),
6106         * src/SDCCglobl.h,
6107         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6108         expr, statement, expression_statement, selection_statement,
6109         iteration_statement, expr_opt, jump_statement): foundation for tracking
6110         sequence points
6111         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6112         point code too)
6113
6114 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6115
6116         * support/Util/SDCCerr.c,
6117         * src/SDCCast.h,
6118         * src/SDCCast.c (createCase, createDefault, decorateType),
6119         * src/SDCClabel.c (labelUnreach),
6120         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6121         to error messages.
6122         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6123         (with thanks to Stas Sergeev)
6124         * device/include/time.h,
6125         * device/lib/time.c (CheckTime): suppress unreachable code warning
6126
6127 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6128
6129         * src/SDCCast.c (createIvalCharPtr),
6130         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6131         bug #753752)
6132         * support/regression/tests/nullstring.c: tests for these two bugs
6133
6134 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6135
6136         * support/Util/SDCCerr.h,
6137         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6138         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6139         about storage class and 'at' used inside struct or union
6140         * src/SDCCBBlock.c (iCodeFromeBBlock),
6141         * src/SDCCcse.c (ifxOptimize),
6142         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6143         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6144         printIval, emitStaticSeg, emitOverlay),
6145         * src/SDCClabel.c (deleteIfx),
6146         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6147         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6148         gatherAutoInit, processParms),
6149         * support/Util/SDCCerr.h,
6150         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6151         reporting for post-parse errors.
6152
6153 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6154
6155         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6156         implicit casts via union; they don't work on big endian systems
6157         (possible fix for bug #861138)
6158
6159 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6160
6161         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6162         * src/mcs51/main.c: fixed the fix for bug #737001
6163
6164 2003-12-15  Borut Razem <borut.razem AT siol.net>
6165
6166         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6167
6168 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6169
6170         * support/makebin/makebin.c: put output in binary mode
6171
6172 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6173
6174         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6175         xdata and data memory on startup. Set the environment variable
6176         SDCC_NOGENRAMCLEAR to disable this.
6177         * src/mcs51/peephole.def,
6178         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6179         (allows non-interrupt and interrupt code to safely compete for a resource
6180         without the non-interrupt code having to disable interrupts)
6181
6182 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6183
6184         * src/SDCCicode.c (geniCodeAdd),
6185         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6186         with valFromType if type might be a pointer and host is big endian).
6187         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6188         types, not just integer types.
6189         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6190         multiply defined with mismatching "at" address.
6191
6192 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6193
6194         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6195         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6196         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6197         with embedded nulls (fixed bug #753752)
6198
6199 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6200
6201         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6202         Apparently this did not see much testing (endless loop)
6203
6204 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6205
6206         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6207
6208 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6209
6210         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6211         gracefully handle NULL memmap pointers
6212
6213 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6214
6215         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6216         instead of deleting the iCode when an operand is volatile
6217         * src/z80/gen.c (genDummyRead),
6218         * src/mcs51/gen.c (genDummyRead),
6219         * src/ds390/gen.c (genDummyRead),
6220         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6221         not just IC_RIGHT
6222         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6223         * src/SDCC.y: fixed bug #850420
6224
6225 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6226
6227         Applied z80 i/o port patch from Peter Townson and fixed some operators
6228         to better handle operands in A register.
6229         * device/include/z180.h
6230         * src/SDCC.y
6231         * src/SDCCglue.c
6232         * src/z80/gen.c
6233         * src/z80/gen.h
6234         * src/z80/main.c
6235         * src/z80/peeph-z80.def
6236         * src/z80/peeph.def
6237         * src/z80/z80.h
6238
6239 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6240
6241         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6242
6243 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6244
6245         * device/lib/hc08/_mullong.c: Removed extra #endif
6246
6247 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6248
6249         * sim/ucsim/hc08.src/inst.cc,
6250         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6251         carries from x to h
6252         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6253         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6254         * device/include/stdarg.h: fixed varargs for hc08
6255         * device/lib/Makefile.in,
6256         * device/lib/hc08/Makefile,
6257         * device/lib/hc08/_mulint.c,
6258         * device/lib/hc08/_mullong.c: fixed some endian problems
6259
6260 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6261
6262         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6263         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6264         * device/lib/_gptrget.c,
6265         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6266
6267 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6268
6269         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6270         * src/SDCCast.c (astErrors): fixed bug #846007
6271         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6272
6273 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6274
6275         * src/SDCCast.c (decorateType): disabled a transformation I added in
6276         revision 1.188 (access to fields of a structure at an absolute address);
6277         it breaks with bitfields, extern declarations, and gcse analysis.
6278         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6279         could be assigned through a pointer, so don't complain.
6280         * src/SDCCast.c (astErrors),
6281         * src/SDCCast.h,
6282         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6283
6284 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6285
6286         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6287         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6288         output of __config directives, since gpasm now supports them
6289         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6290         pre-processor macro, i.e. -DMCU=p18f452
6291         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6292         and modified to handle 'cast' icode similarly to '=' icode
6293         * src/pic16/device.h (typedef struct PIC_device): added field
6294         'extMIface' to indicate that chip has external memory interface
6295         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6296         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6297         18F8720
6298
6299 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6300
6301         * src/SDCC.y (pointer): fixed bug #846006
6302         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6303         * src/SDCCast.c (decorateType): fixed bug #846009
6304         * src/ds390/peeph.def,
6305         * src/ds390/gen.c (genAnd, genOr),
6306         * src/mcs51/peeph.def,
6307         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6308
6309 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6310
6311         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6312         * src/SDCCdflow.c
6313         * src/SDCCcse.c
6314         * src/SDCCcse.h
6315         * src/SDCCBBlock.h
6316         * src/SDCCBBlock.c
6317
6318 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6319
6320         fixed bug #845089
6321         * src/SDCCbitv.h,
6322         * src/SDCCbitv.c: added function to free a bitvector
6323         * src/SDCClrange.h,
6324         * src/SDCClrange.c: added function to recompute the liveranges
6325         * src/avr/ralloc.c,
6326         * src/ds390/ralloc.c,
6327         * src/hc08/ralloc.c,
6328         * src/mcs51/ralloc.c,
6329         * src/pic/ralloc.c,
6330         * src/pic16/ralloc.c,
6331         * src/xa51/ralloc.c,
6332         * src/z80/ralloc.c: recompute the liveranges after register packing
6333
6334 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6335
6336         * src/SDCCloop.c (newInduction): fixed bug #845630
6337
6338 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6339
6340         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6341         inadvertantly left behind from my 2003-11-12 change
6342
6343 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6344
6345         Updated headers I neglected to commit yesterday.
6346         * src/SDCClrange.h,
6347         * src/SDCCicode.h
6348
6349 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6350
6351         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6352         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6353         * src/SDCCopt.c (eBBlockFromiCode),
6354         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6355         the creation of the key hash table from the sequencing so it can be used
6356         earlier (for some GCSE bug fixes still pending)
6357
6358 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6359
6360         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6361         * support/regression/tests/addsub.c: testing genPlus shortcut
6362
6363 2003-11-15  Borut Razem <borut.razem AT siol.net>
6364
6365         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6366
6367 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6368
6369         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6370         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6371         ordering is immaterial.
6372         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6373
6374 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6375
6376         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6377         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6378         (SIGSEV) of bug #840381
6379         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6380         unlink new file before rename if new and old filenames are the same)
6381
6382 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6383
6384         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6385         uninitialized variables) for the mcs51. Set environment variable
6386         SDCC_GENRAMCLEAR to test.
6387         xdata initialization slightly shorter
6388
6389 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6390
6391         * src/SDCCsymt.h,
6392         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6393         #838241 & 780691 (basicly the same bug)
6394         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6395         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6396
6397 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6398
6399         * src/SDCCmain.c (linkEdit): "fix" #834252
6400
6401 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6402
6403         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6404         * src/SDCCast.h,
6405         * src/SDCC.y: fixed bug #819403
6406
6407 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6408
6409         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6410         the reentrant attribute.
6411         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6412         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6413         simulation
6414         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6415         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6416         erroneously reduced to a literal.
6417         * src/hc08/ralloc.c (packRegisters, rematStr),
6418         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6419         some cases
6420
6421 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6422
6423         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6424         * doc/sdccman.lyx: changed from 'article' to 'book'
6425         * doc/Makefile: readded test_suite_spec and cdbfileformat
6426
6427 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6428
6429         * device/include/stdlib.h: include malloc.h to comply with ANSI
6430         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6431
6432 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6433
6434         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6435         * doc/clean.mk: also remove *.out files
6436         * doc/sdccman.lyx: some additions, larger top/bottom margins
6437
6438 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         * src/SDCC.y: fixed bug #837365
6441         * support/regression/tests/bitopcse.c
6442         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6443         a symbol (might be valop instead)
6444         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6445         * device/lib/clean.mk: added hc08 to the cleaning list
6446
6447 2003-11-04  Borut Razem <borut.razem AT siol.net>
6448
6449         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6450           made 2003-11-04
6451         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6452           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6453           malloc is declared in standard stdlib.h
6454
6455 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6456
6457         * device/lib/hc08/Makefile: need to clean .rel not .o files
6458         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6459
6460 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6461
6462         * src/port.h,
6463         * src/hc08/main.c,
6464         * src/mcs51/main.c,
6465         * src/ds390/main.c,
6466         * src/z80/main.c,
6467         * src/avr/main.c,
6468         * src/pic/main.c,
6469         * src/pic16/main.c,
6470         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6471         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6472         tests (which uses the port's oclsExpense function)
6473         * src/SDCC.y,
6474         * src/SDCCast.c,
6475         * src/SDCCicode.c,
6476         * src/hc08/gen.c,
6477         * src/ds390/gen.c,
6478         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6479
6480 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6481
6482         * src/SDCCcse.c (ifxOptimize),
6483         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6484         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6485         deleting the IFX iCode.
6486         * src/hc08/ralloc.c: reduced unneeded slocs
6487         * src/hc08/gen.c: fixed bug in asmopToBoolean
6488
6489 2003-11-04  Borut Razem <borut.razem AT siol.net>
6490
6491         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6492           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6493           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6494           transferred to configure
6495
6496 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6497
6498         Use headers defined in the C[++] standards:
6499         * sim/ucsim/gui.src/serio.src/fileio.cc
6500         * sim/ucsim/gui.src/serio.src/frontend.cc
6501         * sim/ucsim/gui.src/serio.src/main.cc
6502         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6503         * support/Util/NewAlloc.c
6504         * as/hc08/lklibr.c
6505         * as/mcs51/lklibr.c
6506         * as/z80/aslist.c
6507         * as/z80/assym.c
6508
6509 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6510
6511         * Added MSVC projects for hc08 assembler and linker:
6512         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6513         /as/hc08/link_hc08.dsp
6514
6515 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6516
6517         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6518
6519 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6520
6521         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6522
6523 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6524
6525         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6526
6527 2003-10-31  Borut Razem <borut.razem AT siol.net>
6528
6529         * support/cpp2/cpplib.h,
6530           support/cpp2/cpplib.c,
6531           support/cpp2/cpplex.c,
6532           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6533           to switch _asm block preprocessing on / off. Default is
6534           #pragma preproc_asm +
6535
6536 2003-10-31  Borut Razem <borut.razem AT siol.net>
6537
6538         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6539           when outputting comment blocks (when executed with -C option) and
6540           _asm (SDCPP specific) blocks
6541
6542 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6543
6544         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6545
6546 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6547
6548         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6549
6550 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6551
6552         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6553         * src/SDCCast.c (decorateType): fixed bug #832664
6554
6555 2003-10-31  Borut Razem <borut.razem AT siol.net>
6556
6557         * support\cpp2\cpplex.c: fixed for SDCPP:
6558           comments(when executed with -C option) and _asm blocks
6559           were included even if they where in skipped #if block.
6560           Applied solution from GCC cpp 3.3.2
6561
6562 2003-10-31  Borut Razem <borut.razem AT siol.net>
6563
6564         * src/SDCC.lex: sdcc now understands both formats:
6565           '# <line_number> <file_name>' and
6566           '#line <line_number> <file_name>'
6567         * support/cpp2/cppmain.c: sdcpp now generates the standard
6568           '# <line_number> <file_name>' instead of former
6569           '#line <line_number> <file_name>'
6570
6571 2003-10-30  Borut Razem <borut.razem AT siol.net>
6572
6573         * support/cpp2/cpphash.h,
6574         * support/cpp2/cpplib.h
6575         * support/cpp2/cpplex.c,
6576         * support/cpp2/cppmain.c,
6577         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6578
6579 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6580
6581         Fixed a number of problems revealed by bug #827883.
6582         * src/SDCCloop.c (loopInvariants): Spill location of the
6583         result operand should be recomputed if extracted from
6584         a loop. Also, don't extract assignments of an iTemp
6585         from a literal.
6586         * src/SDCCast.c (isConformingBody): loop reversal should
6587         not occur if the control variable is involved with a
6588         relational operator.
6589
6590 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6591
6592         * .version: bumped to 2.3.6 to reflect the big improvements
6593         made by Erik and Klaus. Thanks!
6594
6595 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6596
6597         Replaced the livrange code.
6598         * src/SDCClrange.c: added new LR code
6599         * src/SDCCloop.c,
6600         * src/SDCCBBlock.h: removed remainig parts from old LR code
6601         * src/ds390/ralloc.c,
6602         * src/ds390/gen.c: minor fixes to make it work with new code
6603
6604 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6605
6606         * as/hc08/asm.h,
6607         * as/hc08/lkrloc.c,
6608         * src/hc08/gen.c,
6609         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6610         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6611         (tweaked fix for bug #818696)
6612
6613 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6614
6615         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6616
6617 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6618
6619         * src/SDCCmain.c,
6620         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6621         * src/mcs51/gen.c (gencjneshort),
6622         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6623         more efficient (per Scott Bronson's suggestion)
6624
6625 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6626
6627         Extended the semantics of the critical keyword to include
6628         individual statements. See RFE #827755 and #799831
6629         * src/SDCC.y
6630         * src/SDCCicode.c
6631         * src/SDCCopt.c
6632         * src/SDCCast.c
6633         * support/Util/SDCCerr.c
6634         * support/Util/SDCCerr.h
6635         * src/mcs51/gen.c
6636         * src/ds390/gen.c
6637         * src/hc08/gen.c
6638
6639 2003-10-19  Borut Razem <borut.razem AT siol.net>
6640
6641         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6642
6643 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6644
6645         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6646         Fixed bug #818696
6647         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6648         and predecrement operand is displayed
6649
6650 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6651
6652         * src/SDCCval.c (valMinus): fixed bug #826041
6653
6654 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6655
6656         Some hc08 related updates that I missed earlier
6657         * sim/ucsim/stypes.h
6658         * support/regression/ports/hc08/spec.mk
6659
6660 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6661
6662         New target "hc08" for the Motorola 68hc08 family of micros
6663
6664         * configure
6665         * configure.in
6666         * Makefile
6667         * src/hc08/*
6668         * src/SDCCmain.c
6669         * src/port.h
6670         * sim/ucsim/hc08.src/*
6671         * sim/ucsim/configure.in
6672         * src/ucsim/configure
6673         * sim/ucsim/packages_in.mk
6674         * as/hc08/*
6675         * as/Makefile
6676         * device/include/mc68hc908qy.h
6677         * device/lib/hc08/*
6678         * device/lib/Makefile.in
6679         * support/regression/ports/hc08/*
6680         * support/regression/Makefile
6681
6682 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6683
6684         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6685         regression test
6686         * src/ds390/gen.c (genCast): fixed bug #821957
6687
6688 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6689
6690         * device/lib/logf.c: "fixed" overlay bug
6691         * support/regression/ports/host/spec.mk: added m library
6692         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6693         * support/regression/tests/float_trans: added (for Eric)
6694
6695 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6696
6697         * src/mcs51/gen.c (genCpl): fixed bug
6698         http://sf.net/mailarchive/message.php?msg_id=6263915
6699
6700 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6701
6702         * src/SDCCast.c (decorateType): added extended constant folding
6703         * src/SDCCsymt.c (computeType): cleanup
6704         * src/SDCCval.c (valShift): minor optimization
6705         * support/regression/tests/ast_constant_folding.c: added
6706
6707 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6708
6709         * src/SDCCmain.c: removed some unintended changes
6710
6711 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6712
6713         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6714         * src/z80/gen.c: fixed part of bug #817589
6715         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6716
6717 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6718
6719         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6720         * src/SDCCcflow.c
6721         * src/SDCCcse.c
6722         * src/SDCCdflow.c
6723         * src/SDCClabel.c
6724         * src/SDCClrange.c
6725         * src/SDCCmem.c
6726         * src/SDCCopt.c
6727         * src/SDCCpeeph.c
6728         * src/SDCCset.c
6729         * src/avr/ralloc.c
6730         * src/ds390/ralloc.c
6731         * src/izt/ralloc.c
6732         * src/mcs51/ralloc.c
6733         * src/pic/ralloc.c
6734         * src/pic16/ralloc.c
6735         * src/xa51/ralloc.c
6736         * src/z80/ralloc.c
6737         * src/z80/gen.c: removed unused label "release:"
6738
6739 2003-10-06  Borut Razem <borut.razem AT siol.net>
6740
6741         * src/SDCC.lex: removed definition of unused variables
6742           save_optimize and save_options
6743
6744 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6745
6746         * clean.mk: removed '=' in "-maxdepth=1"
6747         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6748         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6749
6750 2003-10-06  Borut Razem <borut.razem AT siol.net>
6751
6752         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6753           my_unput() replaced by unput()
6754
6755 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6756
6757         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6758         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6759         type-punned pointer will break strict-aliasing rules"
6760         Old LR behaviour is again default; Klaus' LR can be choosen by
6761         defining the environment variable LRKLAUS
6762         * src/SDCCBBlock.h
6763         * src/SDCCloop.c
6764         * src/SDCClrange.c
6765         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6766         * clean.mk: fixed removal of files in bin/CVS/
6767         * device/lib/clean.mk: fixed removal of directories small and large
6768         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6769         * src/SDCCicode.c,
6770         * src/SDCCval.c: removed superflous test for pedantic
6771
6772 2003-10-05  Borut Razem <borut.razem AT siol.net>
6773
6774         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6775           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6776           message "unmatched #pragma SAVE and #pragma RESTORE"
6777
6778 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6779
6780         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6781           assembly, critical functions, atomic, nojtbound)
6782
6783 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6784
6785         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6786         * src/SDCCBBlock.h
6787         * src/SDCCloop.c
6788         * src/SDCCloop.h
6789         * src/SDCClrange.c
6790
6791 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6792
6793         * src/z80/gen.h,
6794         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6795         * src/mcs51/gen.h
6796         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6797         * src/ds390/gen.h
6798         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6799         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6800         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6801
6802 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6803
6804         * src/z80/gen.c (genRet): fixed bug #524753
6805         * src/z80/gen.c (genCast): fixed internal error on cast from
6806         pointer to long
6807         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6808         fix for bug #477835 to the z80
6809         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6810         for tracking iCodes in the peephole optimizer for z80
6811
6812 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6813
6814         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6815         the other part of bug #814548
6816         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6817
6818 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6819
6820         * src/SDCCcse.c: fixed part of bug #814548
6821
6822 2003-09-28  Borut Razem <borut.razem AT siol.net>
6823
6824         * src/asm.c: rewrite of printILine() to use temporary file instead
6825           a pipe
6826         * src/xa51/main.c: commented out declaration of int rewinds
6827
6828 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6829
6830         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6831
6832 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6835         * src/asm.c (printILine): Fixed bug #811015
6836
6837 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6838
6839         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6840         freeing.
6841
6842 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6843
6844         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6845         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6846         to correctly handle general case of AOP_PAIRPTR
6847         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6848
6849 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6850
6851         * src/mcs51/ralloc.c (fillGaps),
6852         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6853         register positioning bug)
6854
6855 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6856
6857         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6858
6859 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6860
6861         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6862         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6863         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6864         (ralloc doesn't intentionally do this now, but perhaps later)
6865         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6866         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6867         register positioning bugs (Fixed bug #762602 and #795325)
6868         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6869         (Fixed bug #808779)
6870         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6871         lines that --i-code-in-asm generates
6872
6873 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6874
6875         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6876         trying to fclose a FILE* that was already closed.
6877
6878 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6879
6880         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6881         of const struct should be treated as if const themselves)
6882
6883 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6884
6885         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6886
6887 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6888
6889         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6890         Unix (/n) and DOS (/r/n) line terminations.
6891
6892 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6893
6894         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6895         bug #613775
6896
6897 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6898
6899         * src/mcs51/gen.c (genFunction, genEndFunction),
6900         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6901         and restore of EA so that stack offsets to parameters are
6902         correct when using both critical and reentrant/stack-auto.
6903         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6904         size (can be triggered in error if sloc is shared between
6905         different sized objects)
6906         * device/include/float.h: fixed macros to explicitly use
6907         unsigned long where needed
6908
6909 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6910
6911         Feature req. 799831: added code to allow nesting of critical functions
6912         * src/mcs51/gen.c (genFunction, genEndFunction)
6913         * src/ds390/gen.c (genFunction, genEndFunction)
6914
6915 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6916
6917         * src/SDCCsymt.c (sclsFromPtr),
6918         * src/SDCCsymt.h,
6919         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6920         support for standard C idiom of memory mapped variables; for
6921         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6922         to xdata int at 0x1234 tempvar = 1.
6923         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6924         provided by Akiya ISHIDA
6925
6926 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6927
6928         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6929         * src/SDCCval.c (constVal): added reduction from int to char
6930         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6931         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6932         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6933         to ignore the sign
6934         * support/regression/tests/shifts.c: fixed
6935
6936 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6937
6938         * src/z80/gen.c (genXor): Fixed bug #805445
6939
6940 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6941
6942         Fixed bug #621531 (const & volatile confusion in the type chain).
6943         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6944         refer to the const or volatile state of the pointer itself.
6945
6946         * src/SDCCast.c
6947         * src/SDCCglue.c
6948         * src/SDCCicode.c
6949         * src/SDCCsymt.c
6950         * src/SDCCval.c
6951         * src/SDCC.y
6952         * src/SDCCsymt.h
6953         * src/pic/gen.c
6954         * src/pic/ralloc.c
6955         * src/pic16/gen.c
6956         * src/pic16/ralloc.c
6957         * support/regression/tests/const.c
6958
6959 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6960
6961         When checking for duplicated modules, use absolute paths
6962         instead of relative paths.  Files changed:
6963
6964         * as/mcs51/lklib.c
6965         * link/z80/lklib.c
6966
6967 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6968
6969         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6970
6971 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6972
6973         * device/include/string.h: added size_t typedef, changed
6974         prototypes to use size_t, eliminated separate reentrant and
6975         non-reentrant declarations, added _memmove declaration
6976         * device/lib/_memcpy.c: changed to use size_t instead of int,
6977         changed /4 to >>2 to avoid division library call
6978         * device/lib/_memcmp.c,
6979         * device/lib/_memset.c,
6980         * device/lib/_strncat.c,
6981         * device/lib/_strncpy.c,
6982         * device/lib/_strncmp.c: changed to use size_t instead of int
6983         * device/lib/_memmove.c: new file (fixed bug #772294)
6984         * device/lib/Makefile.in: added _memmove.c
6985         * device/lib/z80/asm_strings.s: fixed bug #772290
6986         * support/regression/tests/bitfields.c: attempt to fix host assertion
6987         failure on amd64-unknown-linux2.2
6988
6989 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6990
6991         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6992         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6993         * as/z80/asmain.c (main): fixed bug #801766
6994
6995 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6996
6997         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6998         compilers
6999
7000 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7001
7002         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7003         reported in bug #800609
7004
7005 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7006
7007         * Top header beautifications in src/pic16 directory:
7008           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7009           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7010           pcoderegs.h, ralloc.c, ralloc.h
7011         * main.c: added top header and GPL license notice
7012         * pcode.c: fixed the if-conditional warning
7013
7014 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7015
7016         * device/lib/_mullong.c: replaced int by short for gcc
7017
7018 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7019
7020         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7021         and JUMPTABLE iCodes properly now (worked by accident before)
7022         * src/mcs51/gen.c (leftRightUseAcc),
7023         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7024         iCode properly now. Use getSize instead of nRegs since a & b
7025         aren't part of the nRegs tally.
7026
7027 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7028
7029         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7030         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7031           before instructions that use the _STATUS register
7032
7033 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7034
7035         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7036         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7037         fetching of the pointer
7038         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7039         copied from genNearPointerSet()
7040         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7041         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7042         If they pop r0/r1 they must be called in the opposite order than aopOp().
7043         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7044         (resp. --stack-auto), prepared for --xstack
7045
7046 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7047
7048         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7049
7050 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7051
7052         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7053         these ports have their own __sdcc_external_start()
7054
7055 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7056
7057         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7058         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7059         type for bits was changed. It resulted in bit variables becoming
7060         global, which is not permitted in PIC 14 assembly output.
7061
7062 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7063
7064         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7065
7066 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7067
7068         Z80 and MCS51 linkers complaint if a public symbol is defined
7069         in more than one library module:
7070
7071         * as/mcs51/lklib.c
7072         * link/z80/lklib.c
7073         * as/mcs51/Makefile.in
7074
7075 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7076
7077         A few small changes that speed up the peephole optimizer.
7078
7079         * src/SDCCpeeph.c
7080
7081 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7082
7083         Try to make the peephole optimizer smarter by maintaining
7084         an association between the assembly source code and the
7085         iCodes that originated them. Put this information to use
7086         with a new peephole rule condition "notVolatile" so that
7087         the rules can be aggressive yet still safe.
7088
7089         * src/SDCCpeeph.c
7090         * src/SDCCpeeph.h
7091         * src/mcs51/gen.c
7092         * src/mcs51/peeph.def
7093
7094 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7095
7096         Fixed bug #741761
7097
7098         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7099         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7100         if the left or right operand symbols have the accuse flag set.
7101
7102 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7103
7104         Changed the type of the result of the ! (NOT) operator to char;
7105         previously it returned the same type as the source. This allows
7106         us to eliminate all the genFloatNot functions (all of its target
7107         implementations were very buggy) since !float can use the same
7108         code as !long now.
7109
7110         * src/SDCCicode.c (ast2iCode): ! returns char
7111         * src/mcs51/gen.c (genNot, genNotFloat),
7112         * src/ds390/gen.c (genNot, genNotFloat),
7113         * src/z80/gen.c (genNot, genNotFloat),
7114         * src/pic/gen.c (genNot, genNotFloat),
7115         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7116
7117 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7118
7119         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7120         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7121            during interrupts. Ensure WSAVE is located at a shared bank address.
7122         2. Fixed page selection in some places
7123         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7124            the registers name strings.
7125         4. Fixed "signed / unsigned compare" compiler warnings.
7126         5. The PIC port manages its own allocation of the general purpose
7127            registers, but makes no attempt to reuse them. As a result when
7128            compiling it soon runs out of general purpose registers. Some
7129            additional code was added to the files pcode.c and device.c to walk
7130            through the function call tree and rename the registers so that they
7131            get reused.
7132
7133         * src/pic/device.c
7134         * src/pic/gen.c
7135         * src/pic/glue.c
7136         * src/pic/pcode.c
7137         * src/pic/pcode.h
7138         * src/pic/ralloc.c
7139         * src/pic/ralloc.h
7140         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7141         genPlus() & genMinus() when the result is the same as left or right
7142
7143 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7144
7145         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7146
7147 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7148
7149         Made bitfield a distinct type from bit so that bitfields
7150         convert as per ANSI C and bits retain their traditional
7151         boolean style behaviour. Implemented bitfield support in
7152         the z80 port.
7153
7154         * src/SDCCsymt.h,
7155         * src/SDCCsymt.c,
7156         * src/SDCCast.c,
7157         * src/cdbFile.c,
7158         * src/mcs51/gen.c,
7159         * src/ds390/gen.c: bit v bitfield split
7160         * src/z80/gen.c: New support for bitfields
7161         * support/regression/tests/bitfields.c: reenabled z80,
7162         added more tests
7163
7164 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7165
7166         Rules 246.x, 247.x relate to bitfields, the others speed up
7167         access to xdata mapped I/O devices.
7168
7169         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7170
7171 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7172
7173         Cleaned up genPackBits and genUnpackBits and added two helper
7174         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7175         for literal assignments in genPackBits (thanks to Frieder for
7176         reminding me).
7177
7178         * src/mcs51/gen.c
7179         * src/ds390/gen.c
7180
7181 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7182
7183         Fixed bug #748310 (pointer to function type mishandled when the
7184         function name is omitted). Also fixed a SIGSEGV when a function
7185         attribute (reentrant, etc) is used on a non-function or on a
7186         function but misplaced before the parameter list.
7187
7188         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7189         bug #748310
7190         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7191         * support/Util/SDCCerr.h,
7192         * support/Util/SDCCerr.c: Added func attr misuse error msg
7193
7194 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7195
7196         Fixed bug #787649 by anonymous
7197         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7198         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7199
7200 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7201
7202         Fixed numerous bitfield problems.
7203
7204         * src/SDCC.y: More bitfield related error checking
7205         * src/SDCCsymt.h,
7206         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7207         * support/Util/SDCCerr.h,
7208         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7209         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7210         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7211         * support/regression/tests/bitfields.c: tests added
7212
7213 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7214
7215         Made the constant following the "interrupt" keyword optional. If
7216         omitted, the function will not automatically be given an entry
7217         in the interrupt vector table (similar to #pragma NOIV, but
7218         less syntacticly kludgy). The interrupt number is also now
7219         range checked. Also fixed a bug in the high order bit example
7220         in the manual.
7221
7222         * src/SDCC.y
7223         * src/SDCCmem.c
7224         * src/SDCCglue.c
7225         * src/SDCCsymt.h
7226         * support/Util/SDCCerr.c
7227         * support/Util/SDCCerr.h
7228         * doc/sdccman.lyx
7229
7230 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7231
7232         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7233         * src/SDCCicode.c (operandOperation): rewritten some ops
7234         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7235         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7236         other type
7237         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7238         be re-activated by defining REDUCE_LITERALS)
7239         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7240         unsigned, but are signed by default
7241         * src/SDCCval.c (constVal): rearranged
7242         * src/SDCCval.c (valMod): preliminary fix
7243         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7244         * support/regression/literalop.c: added, work in progress
7245
7246 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7247
7248         Generate warnings for useless declarations like "char data;"
7249         that don't do what new users expect.
7250
7251         * src/SDCC.y
7252         * support/Util/SDCCerr.h
7253         * support/Util/SDCCerr.c
7254
7255 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7256
7257         * src/SDCCval.c (valMult): fix overflow detection of negative int
7258
7259 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7260
7261         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7262
7263         Changes to support big endian targets:
7264
7265         * src/ports.h
7266         * src/SDCCglue.c
7267         * src/avr/main.c
7268         * src/ds390/main.c
7269         * src/izt/i186.c
7270         * src/mcs51/main.c
7271         * src/pic/main.c
7272         * src/pic16/main.c
7273         * src/xa51/main.c
7274         * src/z80/main.c
7275
7276 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7277
7278         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7279         * device/lib/time.c: fixed warning "integer overflow in expression"
7280
7281 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7282
7283         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7284         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7285         constants are unsigned; added recognition of "u" flag for unsigned
7286         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7287         * src/SDCCval.c (valDiv, valMod): fixed signdness
7288         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7289         signedness of modulo, left and right shift
7290         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7291         * support/Util/SDCCerr.h: added warning W_INT_OVL
7292         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7293         * src/SDCCast.c (ast_print): improved output of constants
7294
7295 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7296
7297         Fixed some warnings when building with MSVC:
7298
7299         * as\mcs51\asdata.c
7300         * as\z80\asdata.c
7301         * as\mcs51\asm.h
7302         * as\z80\asm.h
7303         * link\z80\aslink.h
7304         * link\z80\lkdata.c
7305         * link\z80\lkeval.c
7306         * link\z80\lkgb.c
7307         * link\z80\lkihx.c
7308         * link\z80\lks19.c
7309         * link\z80\lksym.c
7310         * support\cpp2\cpplib.c
7311         * src\ds390\gen.c
7312         * src\mcs51\gen.c
7313
7314 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7315
7316         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7317
7318 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7319
7320         * support\librarian\clean.mk: Do not remove Makefile.
7321         * support\librarian\Makefile: added.
7322
7323 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7324
7325         Added librarian to MSVC build:
7326         * all.dsp
7327         * sdcc.dsw
7328         * support\librarian\librarian.dsp
7329
7330         'configure' not needed for librarian, removed:
7331         * support\librarian\configure
7332         * support\librarian\configure.in
7333         * support\librarian\config_in.h
7334         * support\librarian\Makefile.in
7335
7336         Hopefully these ones built the librarian and the rest of sdcc properly:
7337         * Makefile
7338         * Makefile.common.in
7339
7340         Messed up 'configure', so revert to previous version:
7341         * configure
7342         * configure.in
7343
7344 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7345
7346         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7347         there, while the mantissa of a double is "only" 53 bits wide.
7348
7349 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7350
7351         Adding sdcclib to the build.  MSVC project coming soon.
7352         Files added/changed:
7353
7354         * support\librarian\clean.mk
7355         * support\librarian\configure
7356         * support\librarian\configure.in
7357         * support\librarian\config_in.h
7358         * support\librarian\Makefile.bcc
7359         * support\librarian\Makefile.in
7360         * support\librarian\sdcclib.c
7361         * Makefile.bcc
7362         * Makefile
7363         * Makefile.common.in
7364         * configure
7365         * configure.in
7366
7367 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7368
7369         Linker now complaints if linked modules have conflicting options, for
7370         example, one compiled using --model-large and another one compiled with
7371         --model-small.  The following files were modified:
7372
7373         * as\mcs51\asdata.c
7374         * as\mcs51\aslink.h
7375         * as\mcs51\asm.h
7376         * as\mcs51\asmain.c
7377         * as\mcs51\asout.c
7378         * as\mcs51\i51pst.c
7379         * as\mcs51\lkdata.c
7380         * as\mcs51\lklibr.c
7381         * as\mcs51\lkmain.c
7382         * as\z80\asdata.c
7383         * as\z80\asm.h
7384         * as\z80\asmain.c
7385         * as\z80\asout.c
7386         * as\z80\z80pst.c
7387         * link\z80\aslink.h
7388         * link\z80\lkdata.c
7389         * link\z80\lklibr.c
7390         * link\z80\lkmain.c
7391         * src\SDCCglue.c
7392
7393 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7394
7395         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7396         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7397
7398 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7399
7400         * src/z80/mappings.i: fix _mul[us][int,long] entries
7401
7402 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7403
7404         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7405
7406 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7407
7408         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7409         * support/regression/tests/bitopcse.c: added
7410         fixed warning:
7411         * src/avr/gen.c:
7412         * src/pic/gen.c:
7413         * src/pic16/gen.c:
7414         * src/z80/gen.c:
7415         * src/xa51/gen.c:
7416
7417 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7418
7419         added support for new library format to z80, gbz80 linkers:
7420         *link/z80/aslink.h
7421         *link/z80/lklex.c
7422         *link/z80/lklib.c
7423         *link/z80/lklist.c
7424
7425 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7426
7427         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7428         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7429
7430 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7431
7432         added DUMMY_READ_VOLATILE:
7433         * src/SDCC.y:
7434         * src/avr/gen.c:
7435         * src/xa51/gen.c:
7436         * src/z80/gen.c:
7437         * src/pic/gen.c:
7438         * src/pic16/gen.c:
7439         * src/mcs51/gen.c:
7440         * src/ds390/gen.c:
7441         * src/SDCCcse.c (algebraicOpts): many improvements
7442         * src/SDCCcse.h: removed algebraicOpts()
7443         * src/SDCCicode.c (picDummyRead): added
7444
7445 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7446
7447         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7448         "Insufficient space in data memory".
7449
7450 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7451
7452         * src/mcs51/gen.c: fixed bug #771358
7453         * src/z80/gen.c: fixed bug #759087
7454
7455 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7456
7457         * src/pic16/glue.c: minor cleanup by Vangelis
7458
7459 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7460
7461         * device/include/regc515c.h: fixed #758477
7462         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7463         * device/lib/_gptrput.c: saved a few bytes
7464         * my tab spacing is 8, yours too?)
7465         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7466         * device/lib/serial.c: process RX bytes earlier than TX bytes
7467         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7468
7469 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7470
7471         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7472
7473 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7474
7475     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7476
7477 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7478
7479         * device/lib/Makefile.in: bad fix, reverted to 1.43
7480
7481 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7482
7483         * device/lib/Makefile.in: added missing z80 object files
7484
7485 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7486
7487         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7488         pic16 progress by Vangelis:
7489         * src/SDCCglobl.h:
7490         * src/SDCCmain.c:
7491         * src/pic/Makefile:
7492         * src/pic:
7493         * pic/Makefile:
7494         * pic16/device.c:
7495         * pic16/device.h:
7496         * pic16/gen.c:
7497         * pic16/gen.h:
7498         * pic16/genarith.c:
7499         * pic16/glue.c:
7500         * pic16/main.c:
7501         * pic16/pcode.c:
7502         * pic16/pcode.h:
7503         * pic16/pcodepeep.c:
7504         * pic16/peeph.def:
7505
7506 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7507
7508     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7509
7510 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7511
7512     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7513     added gbz80 build to MSVC project.
7514     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7515     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7516     from 8051 stuff and setup so it links using a .lnk file.
7517
7518 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7519
7520     * support/librarian/sdcclib.c: sdcc librarian.
7521     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7522     with sdcclib.
7523
7524 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7525
7526     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7527
7528 2003-07-02  Borut Razem <borut.razem AT siol.net>
7529
7530         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7531         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7532         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7533         src/xa51/main.c, src/z80/main.c:
7534         virtualization of glue() function: each port has it's own glue function,
7535         which is accessed by do_glue function pointer in PORT.general structure
7536
7537 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7538
7539         * DS800C400 fun, improved ROM interface and tinibios.
7540
7541 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7542
7543         * More support for DS80C400. Now includes beginning of interface to ROM.
7544
7545 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7546
7547         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7548
7549 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7550
7551         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7552
7553 2003-06-19  Borut Razem <borut.razem AT siol.net>
7554
7555         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7556
7557 2003-06-19  Borut Razem <borut.razem AT siol.net>
7558
7559         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7560         fixed Z80 port - crt0.o: cannot open.
7561
7562 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7563
7564         * support/Util/MySystem.c (merge_command): revert bad fix
7565
7566 2003-06-18  Borut Razem <borut.razem AT siol.net>
7567
7568         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7569
7570 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7571
7572         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7573         option --use-stdout sends errors to stdout instead of stderr.
7574
7575 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7576
7577         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7578
7579 2003-06-15  Borut Razem <borut.razem AT siol.net>
7580
7581         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7582         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7583         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7584         fixed width array of pointers replaced with sets;
7585         multiple include and lib paths ared transferred to preprocessor and linker
7586         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7587         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7588         fixed width array of pointers
7589         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7590         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7591         fixupPath(), getPathDifference()
7592         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7593         fixed width array of pointers
7594
7595 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7596
7597         * src/pic16/ralloc.c: fix warnings
7598         * src/pic16/pcode.c: fix warning
7599
7600 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7601
7602          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7603         know all the details, but essentially this set of changes enable
7604         the pic16 port to generate movff instructions and generate assembler
7605         directives,
7606         * src/SDCCmain.c:
7607         * src/pic16/gen.c:
7608         * src/pic16/glue.c:
7609         * src/pic16/pcode.c:
7610         * src/pic16/device.c:
7611         * src/pic16/main.c:
7612         * src/pic16/pcode.h:
7613         * src/pic16/pcoderegs.c:
7614         * src/pic16/ralloc.c:
7615         * src/pic16/ralloc.h:
7616
7617 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7618
7619         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7620         added option --vc, so sdcc errors and warnings are compatible with
7621         Microsoft Visual Studio.
7622
7623 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7624
7625         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7626           device/lib/libfloat.lib: added atof function.
7627
7628 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7629
7630         * doc/sdccman.lyx: updated to Lyx 1.3
7631         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7632         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7633         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7634
7635 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7636
7637         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7638
7639 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7640
7641         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7642           additions to the "related tools/documentation" section
7643
7644 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7645
7646         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7647
7648 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7649
7650         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7651         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7652
7653 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7654
7655         * doc/sdccman.lyx: fix double dash and other minor things
7656         * doc/Makefile: fix double dash
7657
7658 2003-05-28  Karl Bongers(patches from Martin Helmling)
7659         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7660           condition and ignore commands.
7661
7662 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7663
7664         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7665           is in parts still quite out of date, I did changes as far as I felt makes sense
7666           for a non-native english speaker.
7667           Please feel free to add to the manual or to correct my changes.
7668         * doc/Makefile: undid touching the date of intermediate tex files.
7669
7670 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7671
7672         * doc/sdccman.lyx: Manual has an index now
7673
7674 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7675
7676         Finalize muluint/mulsint and mululong/mulslong merging:
7677         * device/lib/_mulint.c
7678         * device/lib/_mullong.c
7679         * device/lib/gbz80/mul.s
7680         * device/lib/gbz80/stubs.s
7681         * device/lib/z80/mul.s
7682         * device/lib/z80/stubs.s
7683         * src/SDCCsymt.c (initCSupport)
7684
7685 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7686
7687         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7688         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7689           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7690           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7691           instead of /Zm500.
7692
7693 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7694
7695         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7696           the regression tests I'm not brave enough to enable 245.b, 245.c
7697         * doc/sdccman.lyx: added latex preamble for hyperref package.
7698           Using pdflatex this will give you a hyperlinked pdf file with
7699           bookmarks. (prepend '%' before /usepackage if this breaks something)
7700
7701 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7702
7703          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7704
7705 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7706
7707         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7708
7709 2003-05-21    <johan AT balder>
7710
7711         * src/SDCCglue.c (printIval): fixed bug #739934
7712
7713 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7714
7715         Applied patch from bug 737905 (renamed yylineo to mylineno):
7716         * src/altlex.c
7717         * src/SDCCast.c
7718         * src/SDCglobl.h
7719         * src/SDCC.lex
7720         * src/SDCCsymt.c
7721         * src/SDCCval.c
7722         * src/pic16/pcode.c: Cleaned warnings
7723         * src/pic16/pcodeflow.c: Cleaned warnings
7724         * src/pic16/pcoderegs.c: Cleaned warnings
7725
7726 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7727
7728         * src/pic16/pcode.c: Cleaned warnings
7729         * src/pic16/pcodepeep.c: Cleaned warnings
7730         * src/pic16/ralloc.c: Cleaned warnings
7731
7732 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7733
7734         * doc/sdccman.lyx: fixed bug 739745
7735         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7736
7737 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7738
7739         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7740         it can be defined with CFLAGS when running configure
7741         * src/SDCCmain.c: fixed compiling + linking with object files
7742
7743 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7744
7745         * configure.in: configure for pic16 port,
7746             added --disable-pic16-port
7747         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7748         * src/SDCCmain.c: linkOptions is changed to set *,
7749             added if/endif conditional macros to remove options help
7750             messages from optionsTable when a port is not configured, added
7751             support for the PIc16 port in the ports table, when executing
7752             the compiler with no port specified on command line, a default
7753             port is selected with the new macro DEFAULT_PORT which is
7754             defined in port.h, in setDefaultOptions() linkOptions is removed
7755             from initialization assignment, since now it is a set,
7756             parseCmdLine uses setParseWithComma for linkOptions, in
7757             linkEdit() linkOptions are accessed with new function indexSet()
7758             which returns the i'th item of a set variable. See SDCCset.c, in
7759             linkEdit() when calling buildCmdLine(), added linkOptions as
7760             last argument. Now users can pass arguments to gplink via the
7761             -Wl option, main() uses pic16glue() to glue up pic16 programs
7762         * src/SDCCpeeph.c: various changes to support pic16
7763         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7764             return the i'th item of the set
7765         * src/SDCCset.h: added function prototype for indexSet()
7766         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7767         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7768         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7769             added macro DEFAULT_PORT
7770         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7771         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7772             generated
7773         * src/pic16/glue.c: commented out some error producing lines
7774         * src/pic16/main.c: __config directives are commented out to stop
7775             gpasm complaining and test the linkage with gplink, _linkCmd and
7776             _asmCmd changed to be more gplink and gpasm friendly
7777         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7778             produced an error when parsed, peep rule 12 is added to utilize
7779             movff, but it is commented out since the pCode does not support
7780             yet a command with 2 address arguments
7781
7782 2003-05-18    <johan AT balder>
7783
7784         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7785         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7786 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7787
7788         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7789   Added feature to script commands from file.
7790
7791 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7792
7793         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7794         * src/SDCCutil.c: include ctype.h for win32
7795
7796 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7797
7798         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7799
7800 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7801
7802         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7803   Fixed so you can set breakpoints prior to run, run does not stop
7804   on entry now.  Add tbreak.  Other enhancements and fixes for use
7805   with ddd.
7806
7807 2003-05-12  Borut Razem <borut.razem AT siol.net>
7808
7809         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7810
7811 2003-05-11  Borut Razem <borut.razem AT siol.net>
7812
7813         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7814         the path of bin directory, so that PATH is the only env. variable, which has to be set
7815         in case of standard installation.
7816         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7817         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7818         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7819
7820 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7821
7822         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7823         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7824         temp files are in the port dir; clean the gen/test directory when
7825         generating new test.c
7826         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7827         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7828         * support/regression/tests/zeropad.c: added
7829
7830 2003-05-09    <johan AT balder>
7831
7832         * src/SDCCglue.c: fixed bug #597940
7833
7834 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7835
7836         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7837   cache sfr, optimize next,step, fix off by one sourceline,
7838   support ddd list function.
7839         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7840
7841 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7842
7843         * support/regression/HTMLgen.py: added compare_s2f()
7844         * support/regression/Makefile: redo 1.27
7845         * support/regression/generate-cases.py: redo 1.5
7846
7847 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7848
7849         * support/regression/tests/float.c: workaround 33 bit hex constant
7850         * support/regression/tests/simplefloat.c: fix division for host
7851
7852 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7853
7854         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7855         that tame's the PIC's over-aggressive optimizer.
7856
7857 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7858
7859          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7860          support for MSVC.
7861
7862 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7863
7864         Initial support for DS80C400. "Hello world" runs on TINIm400
7865         (with polled I/O).
7866
7867 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7868
7869          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7870          * Some notes on ddd usage added in debugger/README
7871          Martin Helmling adding more features and fixes for ddd GUI debugger.
7872          Code added for nexti, stepi, up, down, and other adjustments.
7873
7874 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7875
7876         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7877         * src/pic/peeph.def Added two rules to optimize carry manipulation
7878         * src/pic/* removed debug printfs
7879
7880 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7881
7882         * debugger/mcs51/cmd.c: added header newalloc.h
7883
7884 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7885
7886         * as/Makefile: new EXEEXT
7887         * as/z80/Makefile: remove trailing slash of BUILDIR
7888         * as/z80/clean.mk: new EXEEXT
7889         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7890         * support/cpp2/Makefile.in: new EXEEXT
7891         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7892
7893 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7894
7895         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7896         EXEEXT was introduced to fix all related problems with targets
7897         "clean", "install" and "uninstall"; a couple of further flaws
7898         especially with "clean" have been fixed too
7899         * as/mcs51/Makefile.in
7900         * as/mcs51/clean.mk
7901         * as/z80/Makefile
7902         * Makefile
7903         * clean.mk
7904         * debugger/mcs51/Makefile.in
7905         * debugger/mcs51/clean.mk
7906         * link/z80/Makefile
7907         * link/z80/Makefile.in
7908         * link/z80/clean.mk
7909         * link/Makefile
7910         * packihx/Makefile.in
7911         * packihx/clean.mk
7912         * sim/ucsim/Makefile
7913         * sim/ucsim/clean.mk
7914         * sim/ucsim/avr.src/Makefile.in
7915         * sim/ucsim/avr.src/clean.mk
7916         * sim/ucsim/s51.src/Makefile.in
7917         * sim/ucsim/s51.src/clean.mk
7918         * sim/ucsim/xa.src/Makefile.in
7919         * sim/ucsim/xa.src/clean.mk
7920         * sim/ucsim/z80.src/Makefile.in
7921         * sim/ucsim/z80.src/clean.mk
7922         * sim/ucsim/main_in.mk
7923         * sim/ucsim/packages_in.mk
7924         * sim/ucsim/gui.src/Makefile.in
7925         * sim/ucsim/gui.src/serio.src/Makefile.in
7926         * sim/ucsim/gui.src/serio.src/clean.mk
7927         * src/Makefile.in
7928         * src/clean.mk
7929         * support/cpp2/Makefile.in
7930         * support/cpp2/clean.mk
7931         * support/makebin/Makefile
7932         * support/makebin/clean.mk
7933         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7934         * doc/sdccman.lyx: --program-suffix no longer needed
7935
7936 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7937
7938          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7939          Martin Helmling added support for ddd GUI debugger.
7940          Code added to display assembly, set variables, and other commands
7941          to interface to ddd.
7942
7943 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7944
7945         * as/Makefile: fix target clean
7946         * as/clean.mk: fix target clean
7947         * as/z80/clean.mk: fix target clean
7948
7949 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7950
7951         * Makefile.common.in: added  AT EXEEXT AT
7952         * configure.in: removed all mingw32 stuff
7953         * configure: rebuilt from configure.in
7954         * doc/sdccman.lyx: updated section "installation"
7955         * support/scripts/sdcc_mingw32: adapted to configure
7956         * support/scripts/sdcc_cygwin_mingw32: added
7957
7958 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7959
7960         * src/pic Added object file support for the PIC port
7961         * src/pic Applied patch from Craig Franklin (this started the object file support)
7962         * src/regression Updated the PIC regression tests for object files
7963
7964 2003-04-20  Borut Razem <borut.razem AT siol.net>
7965
7966         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7967           lklex.c: In function `getfid':
7968           lklex.c:203: warning: array subscript has type `char'
7969         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7970           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7971         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7972           stack handling macros
7973
7974 2003-04-19  Borut Razem <borut.razem AT siol.net>
7975
7976         * "handling space characters in file path" task:
7977         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7978         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7979         * support/Util/MySystem.h: make it self-sufficient
7980         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7981           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7982           handling space characters in file path
7983         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7984           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7985         * support/Util/MySystem.c: handling space characters in executable's path
7986
7987 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7988
7989         * as/z80/Makefile: fix permanent rebuild of z80
7990         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7991         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7992
7993 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7994
7995         * src/SDCCopt.c: add special case optimization to replace modulo by
7996           a power of two with a bitwise AND.
7997
7998 2003-04-18    <johan AT balder>
7999
8000         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8001
8002 2003-04-17    <johan AT balder>
8003
8004         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8005         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8006
8007 2003-04-13  Borut Razem <borut.razem AT siol.net>
8008
8009         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8010         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8011           fixed mingw problem in adl_NORMALIZE_PATH
8012
8013 2003-04-12  Borut Razem <borut.razem AT siol.net>
8014
8015         * fixed "#pragma SAVE/RESTORE can not be nested":
8016         * src/SDCC.lex: reworked pragma handling functions
8017         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8018         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8019
8020 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8021
8022         * src/SDCCutil.c (pathEquivalent): defined but not used
8023         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8024         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8025         * configure: rebuilt from configure.in
8026         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8027         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8028         * device/include/Makefile.in: replace sdcc_datadir
8029         * device/lib/Makefile.in: replace sdcc_datadir
8030         * Makefile.common.in: add LDFLAGS from configure
8031         * packihx/Makefile.in: use LDFLAGS
8032         * src/Makefile.in: use LDFLAGS
8033         * support/cpp2/Makefile.in: add LDFLAGS from configure
8034         * support/makebin/Makefile: use LDFLAGS
8035         * .version: bumped version number to 2.3.5
8036
8037 2003-04-12  Borut Razem <borut.razem AT siol.net>
8038
8039         * completed "different paths" task:
8040         * src/SDCCmacro.c: fixed bug in handling quotes
8041         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8042         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8043
8044 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8045
8046         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8047
8048 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8049
8050         * ds390/gen.c ds390/peeph.def: fix bug 706781
8051
8052 2003-04-11  Borut Razem <borut.razem AT siol.net>
8053
8054         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8055
8056 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8057
8058         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8059         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8060          set - this bit used to not be set...).
8061         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8062           bad code in PIC Port
8063         * src/regression/and2.c added to test bug 609268
8064         * src/regression/Makefile added and2.c to regression test
8065
8066
8067 2003-04-08    <johan AT CP255758-A>
8068
8069         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8070         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8071         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8072
8073 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8074
8075         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8076         fix bug #487815
8077         * support/cpp2/Makefile.in: fix bug #487815
8078         * configure: rebuilt from configure.in
8079         * Makefile.common.in: docdir changed, new path suffixes
8080         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8081         * sdcc_vc_in.h: reflect changes from sdccconf.h
8082         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8083         * src/SDCCutil.h: remove BINDIR hack
8084         * doc/sdccman.lyx: update new path hierarchy
8085
8086 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8087
8088         * src/SDCCpeeph.c: added okToRemoveSLOC test
8089
8090 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8091
8092         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8093
8094 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8095
8096         * src/SDCCpeeph.c: added labelIsReturnOnly test
8097         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8098
8099 2003-04-05    <johan AT balder>
8100
8101         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8102         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8103         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8104         * src/SDCCast.c: fixed a warning
8105         * src/SDCCast.h: fixed a warning
8106         * src/SDCCicode.c (operandFromAst): fixed a warning
8107
8108 2003-04-04    <johan AT balder>
8109
8110         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8111         * src/SDCCast.c (decorateType): fixed bug #715076
8112         * src/SDCC.y: fixed bug #702907
8113
8114 2003-04-03    <johan AT balder>
8115
8116         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8117         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8118         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8119         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8120         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8121
8122 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8123
8124         * _decdptr.c: fix return values
8125         * _gptrget.c: fix return values
8126         * _gptrgetc.c: fix return values
8127         * _gptrput.c: fix return values
8128         * _mulint.c: fix return values
8129         * as/z80/Makefile: fix 'make -j' problem
8130
8131 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8132
8133         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8134         * configure.in: big cleanup, updated to autoconf 2.5x
8135         * configure: rebuilt from configure.in
8136         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8137         * sdcc_vc_in.h: reflect changes from sdccconf.h
8138         * doc/Makefile: fixed a flaw in "make install"
8139
8140 2003-04-02    <johan AT balder>
8141
8142         * src/ds390/gen.c (genCmp): no comments
8143         * src/mcs51/gen.c (genCmp): no comments
8144         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8145         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8146
8147 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8148
8149         * support/regression/generate-cases.py: place generated file in given sub directory
8150         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8151         * support/regression/Makefile: improvements for 'make -j';
8152         side effect: it's simpler and faster now
8153
8154 2003-03-31  Borut Razem <borut.razem AT siol.net>
8155
8156         * src/z80/main.c: link-{port} and as-{port} defined without path
8157         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8158
8159 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8160
8161         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8162
8163 2003-03-30  Borut Razem <borut.razem AT siol.net>
8164
8165         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8166           changed type of list parameter to set
8167         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8168         * src/port.h: changed type of do_assemble() parameter to set
8169         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8170           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8171           definition of "cppoutfilename" macro with NULL value in preProcess()
8172         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8173         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8174         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8175           replaced with set *binPathSet
8176         * shash_add() deallocates the item, if allready exsists, before adding the new one
8177         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8178
8179 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8180
8181         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8182           a nested for loop bug in the PIC port
8183         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8184           for loops
8185
8186 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8187
8188         * support/Util/dbuf.h: remove C++ stuff to make it portable
8189
8190 2003-03-28  Borut Razem <borut.razem AT siol.net>
8191
8192         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8193           literal strings in stringLiteral()
8194         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8195         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8196           to the project
8197
8198 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8199
8200         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8201
8202 2003-03-26    <johan AT balder>
8203
8204         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8205         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8206         * src/SDCCast.c (decorateType): fixed " -v < 3"
8207
8208 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8209
8210         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8211         Added Lenny Story's debug infrastructure changes:
8212         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8213         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8214         * src/cdbFile.c: added
8215         * src/SDCCdebug.c: added
8216         * src/SDCCdebug.h: added
8217         * src/SDCCast.c (createFunction)
8218         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8219         * src/SDCCmain.c (parseCmdLine, main)
8220         * src/SDCCmem.c (redoStackOffsets)
8221         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8222         * src/SDCCsymt.h
8223         * src/common.h
8224         * src/avr/gen.c (genAVRCode)
8225         * src/ds390/gen.c (gen390Code)
8226         * src/mcs51/gen.c (gen51Code)
8227         * src/pic/gen.c (genpic14Code)
8228         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8229         * src/xa51/gen.c (genXA51Code)
8230         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8231
8232 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8233
8234         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8235         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8236
8237 2003-03-22    <johan AT balder>
8238
8239         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8240
8241 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8242
8243         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8244         * doc/cdbfileformat.lyx: added, written by Lenny Story
8245         * doc/Makefile: added cdbfileformat.lyx
8246         * doc/clean.mk: added cdbfileformat.lyx
8247
8248 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8249
8250         * src/mcs51/peeph.def: fix bug #705773
8251
8252 2003-03-20    <johan AT balder>
8253
8254         An sfr/sbit can have an "at #" AND an initializer
8255         * src/SDCCsymt.c (checkSClass):
8256         * src/SDCCmem.c (allocGlobal):
8257         * src/SDCCmem.c (allocLocal):
8258         * src/SDCCast.c (createBlock):
8259
8260 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8261
8262         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8263
8264 2003-03-16    <johan AT balder>
8265
8266         Undid the hackup of const and volatile, the problem is much bigger
8267         * src/SDCC.y:1.65
8268         * src/SDCCast.c:1.171
8269         * src/SDCCglue.c:1.138
8270         * src/SDCCicode.c:1.146
8271         * src/SDCCsymt.c:1.150
8272         * src/SDCCval.c:1.65
8273
8274 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8275
8276         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8277         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8278
8279 2003-03-13    <johan AT balder>
8280
8281         Hackup const and volatile modifiers in type chains a bit:
8282         * src/SDCC.y:1.63
8283         * src/SDCCast.c:1.169
8284         * src/SDCCglue.c:1.136
8285         * src/SDCCicode.c:1.143
8286         * src/SDCCsymt.c1.146
8287         * src/SDCCsymt.h1.59
8288         * src/SDCCval.c:1.63
8289
8290 2003-03-12    <johan AT balder>
8291
8292         * src/SDCCBBlock.h: more LRH debugging junk
8293         * src/SDCCcflow.h: more LRH debugging junk
8294         * src/SDCCloop.c: more LRH debugging junk
8295         * src/SDCC.y (struct_declaration): fixed bug #697590
8296         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8297         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8298         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8299
8300 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8301         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8302         test function names must now match exactly).
8303         * src/SDCCcse.c: added special case in findCheaperOp to allow
8304         extending a short integer. Makes less awful code for bug 700121 test case.
8305
8306 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8307
8308         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8309         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8310
8311 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8312
8313         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8314         actually called (operandsNotEqual() was called for all
8315         operandsNotEqualX tests).
8316
8317 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8318
8319         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8320         with shorter literals. Fixes bug 700121.
8321
8322 2003-03-11    <johan AT balder>
8323
8324         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8325
8326 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8327
8328         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8329         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8330
8331 2003-03-10  Borut Razem <borut.razem AT siol.net>
8332
8333         * src/SDCCmain.c: pipe preprocessor's output
8334         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8335         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8336         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8337         which closes all pipes in pipeSet set
8338         * src/SDCCset.c: free deleted item in function deleteSetItem()
8339         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8340         moved from z80 to src subproject
8341         * .version: increased version number to 2.3.4
8342
8343 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8344
8345         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8346         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8347         * support/regression/ports/xa51/spec.mk: fix typo
8348
8349 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8350
8351         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8352
8353 2003-03-09  Borut Razem <borut.razem AT siol.net>
8354
8355         * src/SDCCmain.c: pipe preprocessor's output
8356         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8357         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8358         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8359         which closes all pipes in pipeSet set
8360         * src/SDCCset.c: free deleted item in function deleteSetItem()
8361         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8362         moved from z80 to src subproject
8363
8364 2003-03-09  Borut Razem <borut.razem AT siol.net>
8365
8366         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8367         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8368         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8369         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8370         * src/SDCCglobl.h: unification of WIN32 native definitions
8371
8372 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8373
8374         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8375
8376 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8377
8378         * src/configure.in:   check for endianess (even while cross-compiling)
8379         * src/configure:      check for endianess (even while cross-compiling)
8380         * src/configure_in.h: check for endianess (even while cross-compiling)
8381         * src/avr/gen.c:        remove old endianess stuff
8382         * src/mcs51/gen.c:      remove old endianess stuff
8383         * src/ds390/gen.c:      remove old endianess stuff
8384         * src/pic/gen.c:        remove old endianess stuff
8385         * src/pic/genarith.c:   remove old endianess stuff
8386         * src/pic/glue.c:       fix endianess check
8387         * src/pic16/gen.c:      remove old endianess stuff
8388         * src/pic16/genarith.c: remove old endianess stuff
8389         * src/pic16/glue.c:     fix endianess check
8390         * src/xa51/gen.c:       remove old endianess stuff
8391         * src/z80/gen.c:        fix endianess check
8392         * src/SDCCglue.c:       fix endianess check
8393         * src/ds390/peeph.def: fix bug 700036
8394
8395 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8396
8397         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8398         * src/configure: find appropriate data-types on host for SDCC's int and long
8399         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8400         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8401         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8402
8403 2003-03-07    <johan AT balder>
8404
8405         Just a big NOOP:
8406                 some minor cleanups before the big shot
8407                 OP_DEFS and OP_USES now use Kevin's protection
8408                 new option --nolabelopt
8409
8410         * src/SDCCBBlock.c:
8411         * src/SDCCast.c,:
8412         * src/SDCCcflow.c:
8413         * src/SDCCcse.c:
8414         * src/SDCCicode.c:
8415         * src/SDCCicode.h:
8416         * src/SDCClabel.c:
8417         * src/SDCCloop.c:
8418         * src/SDCCmain.c:
8419         * src/ds390/ralloc.c:
8420         * src/mcs51/ralloc.c:
8421         * src/pic/ralloc.c:
8422         * src/xa51/ralloc.c:
8423         * src/z80/ralloc.c:
8424
8425 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8426
8427         * src/pic/pcode.c (get_op): fix 64 bit warnings
8428         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8429         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8430         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8431         * support/regression/tests/malloc.c: fix 64 bit warnings
8432
8433 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8434
8435         * src/mcs51/gen.c (genMinus): fixed bug 696436
8436
8437 2003-03-02  Borut Razem <borut.razem AT siol.net>
8438
8439         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8440
8441 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8442
8443         * configure.in: test for mkstemp
8444         * sdccconf_in.h: add HAVE_MKSTEMP
8445
8446 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8447
8448         * device/include/ctype.h: removed warning while using --stack-auto
8449         * device/include/malloc.h: removed warning while using --stack-auto
8450         * device/include/string.h: removed warning while using --stack-auto
8451
8452 2003-02-23  Borut Razem <borut.razem AT siol.net>
8453
8454         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8455         because NDEBUG is defined (see man assert)
8456         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8457
8458 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8459
8460         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8461         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8462
8463 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8464
8465         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8466         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8467
8468 2003-02-18    <johan AT balder>
8469
8470         * as/mcs51/asmain.c (asmbl): module can start with a digit
8471         * as/z80/asmain.c (asmbl): module can start with a digit
8472
8473 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8474
8475         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8476         * src/asm.c: fix pipe() for Mingw32
8477
8478 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8479
8480         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8481         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8482         make -V work again; --c1mode reads now from stdin
8483         * doc/sdccman.lyx: added --c1mode
8484         * support/Util/SDCCerr.c: new messages for c1 mode
8485         * support/Util/SDCCerr.h: new messages for c1 mode
8486         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8487
8488 2003-02-15    <johan AT balder>
8489
8490         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8491
8492 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8493
8494         * doc/sdccman.lyx: Environment variables, -o and other minor things
8495
8496 2003-02-14    <johan AT balder>
8497
8498         * src/xa51/main.c: before anyone really tries to use it :)
8499
8500         * Install doc's in share/sdcc/doc
8501         * removed some obsolete files
8502         * Do a proper make distclean and uninstall
8503         M Makefile.common.in
8504         R sdccbuild.sh
8505         M as/Makefile
8506         M device/include/Makefile.in
8507         M device/lib/Makefile.in
8508         M doc/sdccman.lyx
8509         M link/Makefile
8510         M sim/ucsim/doc/Makefile.in
8511         M src/clean.mk
8512         R src/avr/peeph.rul
8513         R src/xa51/peeph.rul
8514         M support/cpp2/Makefile.in
8515         M support/makebin/Makefile
8516
8517
8518 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8519
8520         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8521
8522 2003-02-10  Borut Razem <borut.razem AT siol.net>
8523
8524         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8525         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8526         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8527         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8528         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8529         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8530         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8531         src/z80/Makefile.bcc: Borland Makefile cleanup
8532         * as/z80/Makefile.bcc: Added Borland Makefile
8533         * support/cpp2/borland.h: Removed
8534
8535 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8536
8537         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8538         * src/SDCC.lex: new pragma NOIV
8539         * src/SDCCglobl.h: new pragma NOIV
8540         * src/SDCCmem.c: new pragma NOIV
8541
8542 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8543
8544         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8545
8546 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8547
8548         * src/SDCCmain.c: signal handling is switched off by --debug
8549         * doc/Makefile: small fix for install; use clean.mk again
8550         * doc/clean.mk: clean *.pdf and *.html too
8551
8552 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8553
8554         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8555         * device/lib/printfl.c: fix a ds390 bug by making it portable
8556         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8557         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8558         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8559         * debugger/mcs51/cmd.c: converted multi-line string literals
8560         * sim/ucsim/globals.cc: converted multi-line string literals
8561         * src/SDCCmain.c: introduced signal handler to remove temp files
8562         * doc/Makefile: small tweaks, implement clean
8563         * doc: removed generated files
8564
8565 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8566
8567         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8568         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8569         Address Record is not correctly generated for DS390."
8570
8571 2003-02-02  Borut Razem <borut.razem AT siol.net>
8572
8573         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8574         * as/mcs51/asm.h: fixed compilation with Borland C
8575         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8576         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8577         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8578         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8579         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8580         src/z80/Makefile.bcc: delete $(LIB) only if exist
8581         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8582
8583 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8584
8585         * device/include/malloc.h: introduced NULL
8586         * device/include/string.h: introduced NULL
8587         * device/include/stdlib.h: introduced NULL
8588         * device/lib/_memcpy.c: removed NULL
8589         * device/lib/_strcat.c: removed NULL
8590         * device/lib/_strchr.c: removed NULL
8591         * device/lib/_strcmp.c: removed NULL
8592         * device/lib/_strcpy.c: removed NULL
8593         * device/lib/_strcspn.c: removed NULL
8594         * device/lib/_strlen.c: removed NULL
8595         * device/lib/_strncat.c: removed NULL
8596         * device/lib/_strncmp.c: removed NULL
8597         * device/lib/_strncpy.c: removed NULL
8598         * device/lib/_strpbrk.c: removed NULL
8599         * device/lib/_strrchr.c: removed NULL
8600         * device/lib/_strspn.c: removed NULL
8601         * device/lib/_strstr.c: removed NULL
8602         * device/lib/_strtok.c: removed NULL
8603         * device/lib/malloc.c: removed NULL, include own header
8604
8605 2003-02-02    <johan AT balder>
8606
8607         * 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
8608         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8609         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8610         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8611         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8612         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8613
8614 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8615
8616         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8617         area 'DATA'"
8618
8619 2003-02-01    <johan AT balder>
8620
8621         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8622
8623 2003-01-31    <johan AT CP255758-A>
8624
8625         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8626
8627 2003-01-30    <johan AT balder>
8628
8629         * src/SDCCBBlock.c: automatic bug detection
8630         * src/SDCCicode.c: automatic bug detection
8631
8632 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8633
8634         * src/SDCCglobl.h:   now --xram-size 0 works
8635         * src/SDCCmain.c:    now --xram-size 0 works
8636
8637 2003-01-29    <johan AT balder>
8638
8639         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8640
8641 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8642
8643         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8644         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8645         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8646         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8647         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8648         * src/SDCCmain.c:    Added options --xram-size and --code-size
8649
8650 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8651
8652         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8653         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8654
8655 2003-01-27    <johan AT balder>
8656
8657         * src/SDCC.y: fixed bug #613764
8658
8659 2003-01-26    <johan AT balder>
8660
8661         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8662         * src/SDCCsymt.h: fixed bug #673374
8663         * src/SDCCglue.c: fixed bug #661910
8664         * src/SDCCast.c: fixed bug #458099 and 673374
8665
8666 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8667
8668         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8669         * as/mcs51/strcmpi.h: added
8670         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8671         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8672         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8673         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8674         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8675         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8676         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8677         * as/mcs51/Makefile.aslink: new module strcmpi
8678         * as/mcs51/Makefile.asx8051: new module strcmpi
8679         * as/mcs51/Makefil.bcc: new module strcmpi
8680         * as/mcs51/Makefile.in: new module strcmpi
8681         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8682
8683 2003-01-26    <johan AT balder>
8684
8685         * src/SDCCglue.c: reverted back to 1.124
8686         * src/SDCCast.c: reverted back to 1.156
8687         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8688
8689 2003-01-25    <johan AT balder>
8690
8691         * src/SDCCglue.c: A better fix for bug #661910
8692         * src/SDCCast.c: A better fix for bug #661910
8693         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8694
8695 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8696
8697         * src/Makefile.in: remove spawn.o
8698         * src/SDCCmain.c: remove spawn.h
8699         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8700         * src/spawn.c: removed
8701         * src/spawn.h: removed
8702         * support/regression/ports/ds390/spec.mk: link with -r
8703
8704 2003-01-24    <johan AT CP255758-A>
8705
8706         * src/ds390/gen.c (aopOp): fixed bug #667458
8707         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8708         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8709         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8710
8711 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8712
8713         * src/mcs51/peeph.def: better assembler identation by Frieder
8714         * src/mcs51/gen.c: better assembler identation by Frieder
8715
8716 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8717
8718         * as/z80/string.h: removed for gcc 3.2
8719         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8720         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8721
8722 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8723
8724         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8725         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8726         * support/regression/Makefile: separate temp files for ports
8727         * support/regression/generate-cases.py: separate temp files for ports
8728         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8729         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8730
8731 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8732
8733         * moved tinitalk to device/examples/ds390
8734
8735 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8736
8737         * as/mcs51/lkmem.c: rflag is for DS390
8738         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8739         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8740                          (linkEdit): move mem- and map-files the same way as ihx-files
8741         * src/z80/main.c (_setDefaultOptions): removed --generic
8742         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8743         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8744         * src/pic/glue.c (picglue): --c1mode works again
8745         * src/pic16/glue.c (pic16glue): --c1mode works again
8746         * src/asm.c (printCLine): fix #660034
8747
8748 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8749
8750         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8751         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8752         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8753         * as/mcs51/lkmem (summary): better fix for sp problem
8754         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8755         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8756         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8757                                               remove --stack-after-data
8758
8759 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8760
8761         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8762         * src/SDCCutil.c (join): ugly bug: missing '\0'
8763         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8764
8765 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8766
8767         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8768         * src/port.h: typo
8769         * src/pic/main.c (_asmCmd): gpasm supports -o
8770         * src/z80/main.c: more general macros
8771         * device/lib/Makefile.in: remove intermediate files
8772
8773 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8774
8775         * .version: Bumped version number to 2.3.3
8776         * src/SDCCBBlock.c: new option -o
8777         * src/SDCCglobl.h: new option -o
8778         * src/SDCCglue.c: new option -o
8779         * src/SDCCmain.c: new option -o
8780         * src/asm.c: new option -o
8781         * src/ds390/main.c: new option -o
8782         * src/pic/glue.c: new option -o
8783         * src/pic/pcode.c: new option -o
8784         * src/pic/ralloc.c: new option -o
8785         * src/pic16/glue.c: new option -o
8786         * src/pic16/pcode.c: new option -o
8787         * src/pic16/ralloc.c: new option -o
8788         * src/z80/main.c: new option -o
8789         * device/lib/Makefile.in: use -o
8790         * support/regression/ports/ds390/spec.mk: use -o
8791         * support/regression/ports/gbz80/spec.mk: use -o
8792         * support/regression/ports/mcs51/spec.mk: use -o
8793         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8794         * support/regression/ports/z80/spec.mk: use -o
8795         * support/regression/ports/ucz80/spec.mk: use -o
8796         * support/regression/ports/xa51/spec.mk: use -o
8797         * support/regression/fwk/lib/timeout.c: fix usage string
8798
8799 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8800         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8801
8802 2003-01-07    <johan AT balder>
8803
8804         * src/SDCCast.c (decorateType): fixed bug #600035
8805
8806 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8807         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8808         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8809         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8810         * src/pic/pcode.c: outcommented unused variable to remove warnings
8811         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8812
8813 2003-01-06    <karl AT turbobit.com>
8814         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8815    regression tests.
8816
8817 2003-01-06    <johan AT balder>
8818
8819         * src/SDCCicode.c: fixed array add
8820
8821 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8822         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8823         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8824
8825 2003-01-04    <johan AT balder>
8826
8827         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8828
8829 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8830         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8831
8832 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8833         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8834         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8835
8836 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8837         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8838
8839 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8840         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8841
8842 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8843         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8844
8845 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8846
8847     * in \sdcc\as\mcs51\ changed these files in order to create an
8848     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8849     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8850     following files to include the previous two files: aslink.dsp,
8851     Makefile.aslink, Makefile.bcc, and Makefile.in.
8852
8853     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8854     .adb instead of .cdb
8855
8856 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8857
8858         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8859         value from option --iram-size.
8860
8861 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8862
8863         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8864         dram[] array.
8865
8866 2002-09-18    <wiml AT hhhh.org>
8867
8868         * SDCClrange.h: exposed setFromRange() and setToRange()
8869         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8870           packRegsForAccUse() (bug 542397)
8871         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8872           multiple times and emitting the fetch operations more than once
8873           added aopGetUsesAcc() function to allow binary operators to
8874           fetch their operands in the correct order; made genMinus() emit
8875           compact code for X = LITERAL - Y
8876
8877 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8878         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8879         sprintf() in line 1267.
8880
8881 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8882         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8883         like ports.
8884
8885 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8886         Changes to aslink (All the changes are marked with 'JCF'):
8887
8888         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8889         summary().
8890
8891         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8892         area BSEG.  Also moves, if possible, the DATA area down into the internal
8893         ram so more space is available.
8894
8895         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8896         sflag.
8897
8898         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8899         not bytes.  Function summary() which creates a memory usage summary
8900         file with extension .mem.  Reports of overlaping stack and small stack
8901         size.  If the space for the stack is less than 16 bytes aslink trows a
8902         warning.
8903
8904         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8905         the 8051.  Option 'y' for memory summary output file.
8906
8907         Changes to sdcc (All the changes are marked with 'JCF'):
8908
8909         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8910
8911         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8912         overlaying area for it (uses RegBankUsed[4]).
8913
8914         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8915         bank zero as used by default.  By default aslink locates the stack
8916         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8917         the creation of the .mem file.  Delegates the allocation of data area
8918         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8919         the begining of the stack area to aslink.
8920
8921         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8922         glue() in SDCCglue.c creates an area for it.
8923
8924 2002-09-03  Borut Razem <borut.razem AT siol.net>
8925         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8926         sdcc/src/pic/glue.c:
8927         introduced atexit() handler for teporay files removal in case of
8928         errors, assertions, ...
8929
8930 2002-08-29  Borut Razem <borut.razem AT siol.net>
8931         * sdcc/support/cpp2/auto-host_vc_in.h:
8932         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8933         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8934         Maybe there is a similar problem with BORLANDC? It should be checked!
8935
8936         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8937         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8938         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8939         was not executed, and the compiler (cl) launched a warning:
8940         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8941
8942 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8943         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8944
8945 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8946         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8947
8948         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8949           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8950           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8951           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8952           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8953           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8954           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8955         - added Release configuration in VS projects
8956         - review of compiler an linker options
8957         - VC .exe files are generated in bin_vc directory, not to interfere
8958           with binaries generated from other projects (cygwin, mingw, bcc ...)
8959
8960         * sdcc/src/yacc.dsp: added
8961
8962         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8963         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8964         and insert the version number definitions from .version
8965
8966         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8967
8968         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8969         added - genarate auto-host.h using auto-host_vc_in.h as template
8970
8971         * sdcc/sdcc_vc.h,
8972         removed from CVS, generated automatically
8973
8974 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8975         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8976
8977 2002-08-11  Borut Razem <borut.razem AT siol.net>
8978         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8979
8980 2002-08-10  Borut Razem <borut.razem AT siol.net>
8981         * src/SDCCmain.c (main):
8982         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8983         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8984         The consequence was that some temporary files were not removed.
8985
8986         * src/SDCCglue.c:
8987         unification of code in functions tempfilename() and tempfile():
8988         function tempnam() is defined in Visual Studio 6.0 and .NET
8989
8990         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8991
8992         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8993           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8994         - removed compiler command line option /WX: Treats all warnings as errors
8995         - update a list of source files, included into the project
8996
8997         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8998           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8999         changed project type to Generic Project so that can be correcly converted to VS.NET project
9000
9001         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9002
9003         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9004
9005         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9006
9007         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9008         added return 0 statements after assert() to make compiler happy
9009
9010         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9011         added newline in the def file to keep MSC compiler satisfied
9012
9013         * sdcc/src/z80/gen.c:
9014         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9015           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9016         - solved MSC error in function aopDump()
9017
9018         * sdcc_vc.h: define PREFIX as "\\sdcc"
9019
9020 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9021         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9022
9023 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9024         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9025         - Rewrote the register banking algorithm.
9026         - Added pCode live-range analysis to registers (for now, only non-used and
9027         singly-used registers optimized away)
9028
9029         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9030
9031         * 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.
9032
9033 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9034         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9035
9036 2002-04-22  Michael Hope  <michaelh AT vroom>
9037
9038         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9039
9040         * configure.in (DD_COPT): Added include support required for gbdk.
9041
9042         * .version: Bumped version number just to increase it.
9043
9044         * src/SDCCmain.c: Added -nostdinc to the default options.
9045
9046 2002-04-15  Michael Hope  <michaelh AT vroom>
9047
9048         * device/lib/z80/printf.c (sprintf): Added.
9049
9050         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9051
9052         * src/z80/peeph.def: Added transpose redundent load rule.
9053
9054         * src/z80/main.c: Added force callee saves for jaune.
9055
9056         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9057
9058         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9059
9060 2002-03-28  Johan Knol  <johan AT balder>
9061
9062         * src/SDCCval.c: fixed bug #532436
9063
9064 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9065         * /src/port.h:
9066         Added "char *Processor" field to the port structure.
9067
9068         * /src/SDCCmain.c:
9069         Added -p option. Allows port dependent processor to be specified.
9070
9071         * all ports:
9072         Initialized the new field char *Processor field to NULL in all ports
9073
9074         * /src/pic/*:
9075         Compiler generated registers for interrupt context saving
9076         were not getting allocated.
9077
9078 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9079
9080         * /src/SDCCast.c:
9081         Fixed left shift. Will promote the left side of a left shift
9082         if a) left shifting more than size of operand or b) when assigned
9083         to something size > size of left side
9084
9085 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9086         * src/pic/*
9087         tons of changes. Register allocation has been
9088         rewritten. Added customization for the various PICs. Flow
9089         analysis is restructured. ...
9090
9091         * src/pic/device.h:
9092         Added
9093
9094         * src/pic/device.c:
9095         Added. device.c is a PIC port hack to accomodate variations
9096         in PIC devices.
9097
9098 2002-03-13  Michael Hope  <michaelh AT vroom>
9099
9100         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9101
9102 2002-03-04  johanknol  <johanknol AT manik>
9103
9104         * /src/SDCCval.c: fixed
9105
9106         const unsigned char arr[][2] = { { 0, 1 } };
9107         t18.c:1: error: Initializer element is not constant
9108
9109 2002-03-04  bela  <bela AT manik>
9110
9111         * /device/include/mcs51reg.h:
9112         ds89c420 register definition update
9113
9114 2002-03-03    <johan AT FRIJA>
9115
9116         * support/Util/SDCCerr.c: did something, but don't no why anymore
9117
9118         * support/regression/tests/bug-524691.c: made it a little less shy
9119
9120         * src/SDCCast.c (decorateType): fixed bug #524697
9121
9122         * src/SDCCast.c: made some lineno improvements
9123
9124         * src/SDCCval.c (getNelements): changed warning to error
9125
9126         * src/SDCCglue.c (printIvalArray): changed warning to error
9127
9128         * src/SDCCicode.c: fixed a warning for mingw
9129
9130         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9131
9132         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9133
9134 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9135
9136         * src/ds390/peeph.def:
9137         Added some more peephole rules
9138
9139         * src/ds390/gen.c: Various fixes & enhancements
9140
9141         * src/SDCClrange.c, src/SDCClrange.h:
9142         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9143
9144         * src/ds390/ralloc.c:
9145         various fixes & enhancements (ds390) specific
9146
9147         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9148         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9149         from rallocs.
9150
9151         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9152
9153 2002-03-02    <johan AT FRIJA>
9154
9155         * src/SDCCast.c (decorateType): fixed bug #524708
9156
9157         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9158
9159         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9160
9161 2002-03-01  Michael Hope  <michaelh AT vroom>
9162
9163         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9164
9165         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9166
9167 2002-03-01    <johan AT FRIJA>
9168
9169         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9170
9171         * src/SDCCast.c (decorateType): fixed bug #524209
9172
9173         * src/SDCCval.c (valNot): fixed bug #524195
9174
9175 2002-02-26    <johan AT balder>
9176
9177         * src/xa51/gen.c: fixed a warning
9178
9179         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9180
9181         * src/SDCCast.c (decorateType): fixed bug #522534
9182
9183 2002-02-23    <johan AT balder>
9184
9185         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9186
9187 2002-02-22    <johan AT balder>
9188
9189         * src/SDCCast.c: fixed bug #514865
9190
9191         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9192
9193 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9194
9195         * sdcc/src/SDCCloop.c:
9196         Previous fix was not good. basic blocks that have "break" or "return" are
9197         not really partof a loop , but live ranges used in these blocks should
9198         be live thru the entire loop, so set partOfLoop but don't add them to
9199         loop region
9200
9201 2002-02-21    <johan AT FRIJA>
9202
9203         * src/SDCCcse.c: fixed bug #514308
9204
9205 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9206
9207         * src/SDCCloop.c:
9208         Fixed BUG #519583. If a conditional block ended in a return/break
9209         statement inside a loop, it was not being considered part of the loop.
9210
9211         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9212
9213 2002-02-10  Karl Bongers <karl AT turbobit.com>
9214
9215         * debugger/*:
9216         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9217         with lots of comments and notes.
9218
9219         * device/examples/test2.c:
9220         Fix bug, "red" variable not being initialized(compiler complained).
9221
9222         * device/examples/Makefile, examples/test3.c:
9223         Add Makefile in device/examples folder, compiles test3.c
9224         for use as a multiple module SDCDB test case.
9225
9226         * sim/ucsim/cmd.src/cmdset.cc:
9227         Took out debug printfs in ucsim "next" command.
9228
9229         * sim/ucsim/xa.src:
9230         Karl and Johan start ucsim XA support.  Most dissassembly working,
9231         about 75% emulation done(plenty of work remaining).
9232
9233         * sim/ucsim/z80.src:
9234         Add Z80 support to ucsim, add test-ucz80 regression test,
9235         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9236         Notice z80 compiler fails on examples/test3.c/crc code.
9237
9238 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9239
9240         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9241         Added support for --parms-in-bank1
9242
9243         * src/ds390/peeph.def:
9244         added a few more peephole optimzations
9245
9246         * src/ds390/main.c:
9247         1) added __builtin_inp & __builtin_outp used to read in data of given length
9248            from a memory mapped port
9249         2) added __builtin_memcmp
9250         3) added __builtin_swapw swap bytes of a short
9251
9252         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9253         1) handle multiple send & receives from register bank1
9254         2) ralloc can now allocate DPTR1 to some liveRanges
9255
9256         * src/SDCCsymt.c, src/SDCCsymt.h:
9257         changes to handle multiple sends & receives
9258
9259         * src/SDCCptropt.h:
9260         added some pointer arithmetic optimization
9261
9262         * src/SDCCptropt.c:
9263         added some pointer arithmetic optimizations but not stable yet so not
9264         called from anywhere (will get this working shortly)
9265
9266         * src/SDCCopt.c: fixed for multiple sends & receives
9267
9268         * src/SDCCmain.c:
9269         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9270         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9271            set preprocessor defines (depending on options)
9272
9273         * src/SDCCicode.c, src/SDCCicode.h:
9274         changes made to handle multiple sends & receives
9275
9276         * src/SDCCglobl.h:
9277         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9278
9279         * src/SDCCcse.c, src/SDCCcse.h:
9280         added function findbackward def (to be used in upcoming optimization)
9281
9282         * src/SDCCcflow.c, src/SDCCcflow.h:
9283         added function returnAtEnd - to determine if a basic block terminates with
9284         a RETURN iCode
9285
9286         * src/SDCCast.c, src/SDCCast.h:
9287         added option parms-in-bank1
9288
9289         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9290         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9291         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9292         adjusted for --parms-in-bank1 option
9293
9294         * device/include/string.h:
9295         donot redefine "reentrant" keyword
9296
9297         * device/include/ds80c390.h: Added some more SFRs
9298
9299 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9300
9301         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9302
9303 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9304
9305         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9306
9307 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9308
9309         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9310
9311 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9312
9313         * Added --xram-movc option
9314
9315 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9316
9317         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9318
9319 2002-01-11  Johan Knol
9320
9321         * Added math lib of Jesus Calvino-Fraga
9322
9323 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9324
9325         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9326         * support/regression/Makefile: new target test-mcs51-stack-auto
9327         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9328
9329 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9330
9331         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9332
9333 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9334
9335         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9336
9337 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9338
9339         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9340
9341         * src/SDCCglue.h: add definition for printIvalChar()
9342
9343 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9344
9345         * src/SDCCast.c: fix #498138 by Johan
9346
9347         * src/SDCCglue.c: fix #498138 by Johan
9348
9349 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9350
9351         * support/regression/Makefile: fix clean
9352
9353         * support/regression/ports/ds390/support.c: fix transmission of last character
9354
9355 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9356
9357         * /sdcc/src/ds390/gen.c:
9358         a) improved computing address of stack variable
9359         b) took out some #if 0 code
9360         c) improved parmBytes adjustment
9361         d) improved genPlusIncr & genMinusIncr
9362         e) genCmp could generate bad code (when left assigned to DPTR)
9363         f) Fixed bug in hasInc
9364
9365         * /sdcc/src/ds390/ralloc.c:
9366         a) packRegsForSupport could mess up live information (Fixed)
9367         b) packRegsDPTRuse could be incorrect for left & right shift
9368
9369         * /sdcc/src/mcs51/ralloc.c:
9370         packRegsForSupport could mess up the live information (Fixed)
9371
9372         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9373
9374         * /sdcc/src/SDCCast.c:
9375         can reverse a loop even if function call is present as long
9376         as the loop control variable is local & is not passed as parameter
9377
9378 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9379
9380         * /sdcc/ChangeLog: *** empty log message ***
9381
9382         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9383         More builtin function additions for TININative
9384
9385         * /sdcc/src/ds390/ralloc.c:
9386         Had broken the regression testsuite
9387
9388         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9389
9390         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9391         Added funcattr hasStackParms will be set for reentrant functions when there
9392         are paramteres on the stack, this helps in minimizing frame pointer generation
9393         typeFromStr can handle function pointers now
9394
9395         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9396         *** empty log message ***
9397
9398 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9399
9400         * /src/ds390/gen.c, /src/ds390/main.c:
9401         More builtin function additions for TININative
9402
9403         * /src/ds390/ralloc.c:
9404         Had broken the regression testsuite
9405
9406         * /src/SDCCast.c: Fixed a bug in dumptree
9407
9408         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9409         Added funcattr hasStackParms will be set for reentrant functions when there
9410         are paramteres on the stack, this helps in minimizing frame pointer generation
9411         typeFromStr can handle function pointers now
9412
9413         * /doc/builtins.txt, /doc/TININative.txt:
9414         *** empty log message ***
9415
9416
9417 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9418
9419         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9420         ALPHA version for -mTININative
9421
9422         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9423         updated to reflect changes in the port structure
9424
9425         * /src/port.h:
9426         added function do_assemble (similar to do_link) if non-null this function
9427         will be called to do assembly (-mTININative) requires a multi command
9428         assembly
9429         added function genAssemblerEnd will be called to generate assembler Epilogue
9430
9431         * /src/SDCCsymt.c:
9432         added _JavaNative to debug info printing
9433
9434         * /src/SDCCmain.c: added option --tini-libid
9435         added port->do_assemble function (-mTININative) has a multi command assemble
9436
9437         * /src/SDCCglue.c: Disabled "constExpr" check
9438         added port->genAssemblerEnd function
9439
9440         * /src/SDCCglobl.h: Added option --tini-libid value
9441
9442         * /src/SDCCast.h:
9443         tookout optimizeCompare from the header (has no external references)
9444
9445         * /src/SDCCast.c: made one more function "static"
9446
9447 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9448
9449         * src/z80/mappings.i: Added z80asm support.
9450
9451         * src/z80/main.c: Added z80asm support on --asm=z80asm
9452
9453         * src/z80/gen.c: Fixed asm portability issues.
9454
9455         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9456
9457         * src/SDCCglue.c (printExterns): Added global/extern split.
9458
9459 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9460
9461         * support/regression/Makefile: added test for mcs51 model large
9462
9463         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9464
9465         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9466
9467 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9468
9469         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9470
9471 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9472
9473         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9474
9475         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9476
9477 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9478
9479         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9480
9481         * support/regression/tests/simplefloat.c: Port to mcs51.
9482
9483 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9484         * support/regression/tests/bug-485362.c: Added.
9485
9486         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9487
9488         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9489
9490         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9491
9492         * src/z80/gen.c (aopDump): Added a dump function.
9493
9494 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9495         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9496
9497         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9498
9499         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9500
9501         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9502
9503         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9504
9505         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9506
9507         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9508
9509         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9510
9511         * support/regression/ports/ds390/support.c: Use tinibios.
9512
9513         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9514
9515 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9516
9517         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9518         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9519
9520         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9521
9522         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9523
9524 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9525
9526         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9527
9528         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9529         (packRegsForIYUse): Created and optimised.
9530
9531 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9532
9533         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9534 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9535
9536         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9537
9538         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9539
9540         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9541
9542 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9543
9544         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9545
9546         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9547
9548 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9549
9550         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9551
9552         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9553
9554         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9555
9556 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9557
9558         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9559         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9560         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9561
9562         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9563
9564         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9565         (genNotFloat): Added.
9566         (genUminusFloat): Added.
9567
9568         * device/lib/z80/Makefile: Added floating pt stubs.
9569
9570         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9571
9572         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9573
9574         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9575
9576 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9577
9578         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9579
9580         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9581
9582         * sdcc/support/regression/Makefile: Add port ds390.
9583
9584         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9585
9586         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9587
9588         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9589
9590         * sdcc/support/regression/ports/ds390/support.c: Added.
9591
9592         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9593
9594         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9595
9596         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9597
9598 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9599
9600         * device/include/malloc.h: Added z80 and gbz80 support.
9601
9602         * device/lib/gbz80/heap.s: Added.
9603
9604         * device/lib/z80/heap.s: Added.
9605
9606         * device/lib/malloc.c: Added z80 and gbz80 support.
9607
9608         * support/regression/tests/malloc.c (testMalloc): Added.
9609
9610         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9611
9612         * support/regression/tests/bug-478094.c: Added.
9613
9614         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9615
9616 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9617
9618         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9619
9620         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9621
9622         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9623
9624         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9625
9626         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9627
9628 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9629
9630         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9631
9632 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9633
9634         * support/regression/tests/bug-477927.c: Added.
9635
9636         * src/z80/peeph.def: Added minor rules.
9637
9638         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9639
9640         * src/z80/peeph.def: Added jump optimisation modification.
9641
9642 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9643
9644         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9645
9646 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9647
9648         * support/regression/tests/funptrs.c: Added.
9649
9650 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9651
9652         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9653
9654 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9655
9656         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9657
9658         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9659
9660         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9661         (movLeft2ResultLong): Created.
9662
9663         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9664         (joinPushes): Added.  Joins two char pushes into a word push.
9665
9666 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9667
9668         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9669
9670         * support/makebin/Makefile (install): Added creation of dest dir.
9671
9672 2001-10-24 Karl Bongers <karl AT turbobit.com>
9673
9674         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9675
9676 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9677
9678         * src/z80/ralloc.c: Turned off faulty pack for one use.
9679
9680         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9681
9682         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9683
9684 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9685
9686         * support/regression/Makefile: Improved clean
9687
9688         * support/regression/ports/gbz80/spec.mk: Added clean
9689
9690         * support/regression/ports/host/spec.mk: Added clean
9691
9692         * support/regression/ports/z80/spec.mk: Added clean
9693
9694         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9695
9696         * support/regression/ports/mcs51/timeout.c: little improvements
9697
9698 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9699
9700         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9701
9702         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9703
9704         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9705
9706 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9707
9708         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9709
9710         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9711
9712 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9713         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9714
9715         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9716
9717         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9718
9719         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9720
9721         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9722
9723         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9724
9725         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9726
9727         * support/regression/tests/longor.c: Added.
9728
9729 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9730
9731         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9732
9733         * as/mcs51/aslink.h: define PATH_MAX
9734
9735         * as/mcs51/asm.h: define PATH_MAX
9736
9737         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9738
9739         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9740
9741         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9742
9743         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9744
9745         * src/SDCCglobl.h: define PATH_MAX
9746
9747         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9748
9749         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9750
9751 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9752
9753         * src/z80/gen.c (gencjneshort): Fixed
9754
9755         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9756
9757 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9758
9759         * support/regression/tests/bug-469671.c: Added.
9760
9761         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9762
9763 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9764
9765         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9766
9767         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9768
9769 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9770
9771         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9772
9773         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9774
9775         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9776
9777         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9778
9779         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9780
9781         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9782
9783         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9784
9785 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9786
9787         * 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.
9788
9789         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9790
9791         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9792
9793 2001-10-07    <johan AT FRIJA>
9794
9795         * device/lib/gets.c (gets): fixed the return value.
9796
9797 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9798         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9799
9800         * 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.
9801
9802         * 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.
9803
9804         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9805
9806         * src/pic/gen.c: Removed Safe_strdup.
9807
9808         * configure.in: Added option to enable libgc support.
9809
9810         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9811         (bitVectUnion): Optimised.
9812         (bitVectIntersect): Optimised.
9813         (bitVectBitsInCommon): Optimised.
9814         (bitVectCplAnd): Optimised.
9815
9816         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9817
9818 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9819
9820         * src/SDCCmain.c: distinguish between assembler debug and plain options
9821
9822         * src/avr/main.c:   remove standard assembler options
9823
9824         * src/ds390/main.c: remove standard assembler options
9825
9826         * src/mcs51/main.c: remove standard assembler options
9827
9828         * src/port.h: removed "PENDING" comment
9829
9830 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9831
9832         * src/device/lib/_mulint.c  : new, with assember functions
9833
9834         * src/device/lib/_mullong.c : new, with assember functions
9835
9836         * src/device/lib/_divuint.c : with assember functions
9837
9838         * src/device/lib/_divsint.c : with assember functions
9839
9840         * src/device/lib/_divulong.c: with assember functions
9841
9842         * src/device/lib/_divslong.c: with assember functions
9843
9844         * src/device/lib/_moduint.c : with assember functions
9845
9846         * src/device/lib/_modsint.c : with assember functions
9847
9848         * src/device/lib/_modulong.c: with assember functions
9849
9850         * src/device/lib/_modslong.c: with assember functions
9851
9852         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9853
9854         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9855
9856         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9857                                       replaced _mululong.c and _mulslong.c by _mullong.c
9858
9859 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9860
9861         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9862
9863 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9864
9865         * src/SDCCglue.c: test, if win32api is available for MINGW
9866
9867 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9868
9869         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9870         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9871         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9872         * support/regression/ports/host/spec.mk: removed GENERIC
9873         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9874         * support/regression/ports/z80/spec.mk: removed GENERIC
9875
9876 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9877
9878         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9879
9880         * support/regression/tests/bug-467035.c: Created.
9881
9882 2001-10-01    <johan AT FRIJA>
9883
9884         * src/SDCC.y: fixed bug #466586 part 1
9885
9886 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9887
9888         * SDCCicode.c: z80 has no generic pointers
9889         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9890
9891 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9892
9893         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9894
9895 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9896
9897         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9898
9899         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9900
9901 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9902
9903         * configure.in: Fixed up so that ucsim is only configured once.
9904
9905         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9906
9907         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9908         (getPathDifference): As above.
9909
9910         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9911
9912         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9913
9914 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9915         * .version: Updated to 2.3.1
9916
9917         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9918         Added copyright header.
9919
9920         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9921         (assemble): Added support for macro based assembler commands.
9922         (linkEdit): Added support for macro based linker commands.
9923         (preProcess): Changed the pre-processor to use macros.
9924         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9925         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9926
9927         * device/lib/z80/crt0.s: Added module name for debugging.
9928
9929 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9930
9931         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9932
9933         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9934
9935         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9936
9937         * src/Makefile.in: Added SDCCmacro and SDCCutil
9938
9939 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9940
9941         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9942
9943 2001-09-16    <johan AT FRIJA>
9944
9945         * 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.
9946
9947 2001-09-15    <johan AT FRIJA>
9948
9949         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9950         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9951
9952 2001-09-11    <johan AT FRIJA>
9953
9954         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9955
9956 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9957
9958         * support/regression/tests/bug-460444.c: Added test case.
9959
9960         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9961         (genCast): Added justification for all of the asserts.
9962
9963 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9964
9965         * support/regression/support.c: _xdata replaced by xdata
9966
9967         * support/regression/spec.mk: removed _generic
9968
9969 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9970
9971         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9972
9973         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9974         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9975
9976         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9977
9978         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9979
9980         * support/regression/tests/bug-460010.c: Added test case.
9981
9982         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9983
9984 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9985
9986         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9987
9988         * support/regression/testfwk.c: removed workaround for bug #436344
9989
9990         * support/regression/tests/bp.c: use less memory with mcs51
9991
9992         * support/regression/tests/bug-441448.c: use less memory
9993
9994         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9995
9996         * support/regression/collate-results.py: typo
9997
9998 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9999
10000         * support/regression/tests/fetchoverlap.c: Added new test case.
10001
10002         * support/regression/tests/bp.c: Added new test case.
10003
10004         * support/regression/tests/bug-448984.c: Added new test case.
10005
10006         * support/regression/tests/pow2shifts.c: Added new test case.
10007
10008         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10009         (genlshTwo): Fixed right shift for count > 8.
10010
10011         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10012
10013 2001-09-08    <johan AT FRIJA>
10014
10015         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10016
10017 2001-09-07    <johan AT FRIJA>
10018
10019         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10020
10021         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10022
10023 2001-09-06    <johan AT FRIJA>
10024
10025         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10026         * bernhard noted me at this: "() equals to (void)" (1.38)
10027
10028 2001-09-05    <johan AT FRIJA>
10029
10030         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10031
10032 2001-09-04    <johan AT FRIJA>
10033
10034         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10035
10036
10037 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10038
10039         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10040
10041 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10042
10043         * link/z80/aslink.h: Fixed path for PATH_MAX
10044
10045 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10046
10047         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10048
10049         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10050
10051         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10052
10053         * 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.
10054
10055 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10056
10057         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10058         (genCmp): Fixed up genCmp for the GB with longs.
10059
10060         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10061
10062         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10063
10064         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10065
10066         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10067
10068 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10069
10070         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10071
10072 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10073
10074         * 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.
10075
10076         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10077
10078 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10079
10080         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10081
10082         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10083
10084 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10085
10086   * sim/ucsim/configure:    little improvement of Cygwin-detection
10087   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10088   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10089   * support/regression/tests/bug-221100.c: small changes for mcs51
10090   * support/regression/tests/bug-221168.c: small changes for mcs51
10091   * support/regression/tests/bug-227710.c: small changes for mcs51
10092   * support/regression/tests/staticinit.c: small changes for mcs51
10093   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10094   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10095   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10096
10097 $Revision$