642b13dbc8260462981b505994cfb6b87e8640ea
[fw/sdcc] / ChangeLog
1 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
4         specifier unsigned
5
6 2005-10-28 Raphael Neider <rneider AT web.de>
7
8         * device/include/pic/p16f_common.inc: added common declarations
9         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
10
11 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
12
13         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
14           (aopPutUsesAcc): added to predict accumulator use,
15           (assignResultValue): save acc if necessary,
16           (genMinusDec): store result if indirectly addressed,
17           (genDivOneByte):  save acc if necessary,
18           (movLeft2Result): bugfix if left already in acc,
19           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
20             attention to accumulator use (esp. pdata),
21           (genReceive): receive pdata correctly
22         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
23         * src/SDCCicode.h: added isOperandInPagedSpace prototype
24
25 2005-10-27 Raphael Neider <rneider AT web.de>
26
27         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
28
29 2005-10-27 Raphael Neider <rneider AT web.de>
30
31         * .version: changed version to 2.5.4
32         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
33         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
34           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
35             arithmetics support routines
36         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
37         * device/lib/Makefile.in: also create installdir for pic
38
39         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
40           pic14 port as well
41         * src/pic/device.c (dump_sfr): rewritten to delegate register
42           placement to the linker (use `extern sym' rather than sym EQU addr),
43           (validAddress): fixed to check last specified address
44         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
45           (popGetLit): truncate literal value to 8 bit,
46           (popGet): moved assert to more appropriate place
47           (popGetExternal): create pCode operand from and mark the according
48             symbol as being `extern'
49           (popGetAddr): added sanity check on immediate's offset, provide
50             GPOINTER tag on demand
51           (aopPut): fixed for immediates,
52           (mov2w_op): move operand's address or contents to WREG (depending on
53             operand type), safer variant of mov2w,
54           (movwf,call_libraryfunc): NEW, handy abbreviations,
55           (get_argument_pcop,get_return_val_pcop,pass_argument,
56           get_returnvalue): interface for accessing function parameters and
57             return values,
58           (assignResultValuei,genRet): use new parameter/return value interface
59           (pic14_getDataSize): back to old version handling generic pointers,
60           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
61             provided implementation and/or fixed old one,
62           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
63             calls, removed legacy 8051 reference code
64           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
65           (loadSignToC): NEW, move the operands sign bit to CARRY,
66           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
67             genRightShiftSigned, accepts negative shift counts,
68           (setup_fsr): load FSR and adjust IRP (indirect memory access),
69           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
70             generic pointers, __data pointers and __code pointers,
71           (genUnpackBits,genPackBits): rewritten to work with generic pointers
72             and signed bitfields, limit bitfields to 8 bit,
73           (genDataPointerGet): fixed number of bytes read,
74           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
75           (genPointerGet,genPointerSet): fixed handling of __code pointers,
76             pointers to constant data are no longer assumed to point to __code
77             space, removed invalid pointer types,
78           (bitpatternFromVal): retrieve the PICs representation of an integer
79             or float literal,
80           (genDataPointerSet): fixed assigning to po_immediate operands,
81           (genGenPointerSet): implemented as library call,
82           (genIfx): fixed incorrect condition,
83           (genAddrOf): limit generic pointers' addresses to 2 bytes,
84             provide GPOINTER tag according to destination's storage class,
85           (genCast): added code to handle casting to generic pointers, added
86             sign-/zero extension of the result
87           (aop_isLitLike,op_isLitLike): fixed handling of immediates
88         * src/pic/gen.h: added macros to access IRP bit in STATUS register
89         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
90           extend the result
91         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
92           address/register resides in the shared banks
93           (emitSymbolToFile): improved to handle global and `pinned' symbols,
94             put all variables into separate sections (have the linker arrange
95             them)
96           (picglue): put init code and interrupt handlers in separate sections
97         * src/pic/main.c: added port specific options table, modified to PORT
98           structure to make GPOINTERs 3 byte, added pic14_options
99           (_pic14_do_link): private linking routine (update paths to libraries,
100             add libsdcc.lib by default)
101         * src/pic/main.h: declare pic14_options
102         * src/pic/pcode.c: fixed instructions i/o relations,
103           (RegCond): reverted to correct version,
104           (newpCodeOpLit): truncate literals to 8 bit,
105           (genericPrint): added debug output,
106           (getRegFromInstruction): fixed for various operand types, simplified
107           (BuildFlow): fixed broken handling of isntructions with labels
108           (LinkFlow): start at last instruction in flow (skip trailing comments),
109             pass the flow on to the next instruction after CALL
110           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
111           (insertPCodeInstruction): fixed inserting after a skip instruction,
112           (DoBankSelect): fixed for labeled instructions
113           (OptimizepBlock): honor --nopeep switch
114           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
115         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
116         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
117           (pCodeOptime2pCodes): allow disabling this optimization via
118             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
119             but is still buggy), started implementation of a dataflow based
120             pCode optimization (CSE + dead code elimination)
121           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
122         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
123           names are independant of the stack location and therefore portable across
124           devices
125
126 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
127
128         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
129           (selectSpil): fixed bug 1337835 by not spilling bit variables
130         * support/regression/tests/bug1337835.c: added test for this bug
131         * src/mcs51/peeph.def: restart after rule 3.c,
132           addded rules 263.x to optimize loading constants
133
134 2005-10-26 Raphael Neider <rneider AT web.de>
135
136         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
137         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
138           (genAssign): emit warning when casting literals to generic pointer
139             type, also applies when taking the address of a fixed variable,
140           (genCast): improved casting to generic pointers
141         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
142           extern variables, added verbose error message
143         * device/include/pic16/{string.h,errno.h}: added #pragma library c
144
145 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
146
147         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
148         carry must be complemented too
149         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
150         could be emitted by genMinus
151         * src/SDCCval.c (constVal): fixed bug 1305065
152
153 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
154
155         * src/SDCCast.c (addCast): added promotion for bit variables
156         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
157         promotion casts + optimisation
158         (optimizeGetWord): fix warning 'i' might be used uninitialized
159         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
160         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
161
162 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
163
164         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
165         all chars are promoted to int; promotion should be handled in SDCCast.c
166
167 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
168
169         * device/lib/_strcmp.c: Fixed bug 1326457
170
171 2005-10-11 Raphael Neider <rneider AT web.de>
172
173         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
174         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
175
176 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
177
178         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
179         * support/regression/tests/sfr16.c: added test for the sfr32 bug
180
181 2005-10-04 Raphael Neider <rneider AT web.de>
182
183         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
184           device/lib/pic16/pics.all: added pic18f1320
185         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
186
187 2005-09-30 Raphael Neider <rneider AT web.de>
188
189         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
190         * src/pic16/devices.inc: NEW, provides device descriptions
191         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
192
193 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
194
195         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
196           GETHBIT
197
198 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
199
200         * doc/sdccman.lyx: updated Highest Order Bit documentation,
201           documented Any Order Bit, Higher Order Byte and Higher Order Word
202         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
203         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
204           (optimizeGetAbit): new, to get any bit, not only the high bit,
205           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
206           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
207           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
208           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
209             RIGHT_OP: also try GETBYTE, GETWORD optimization,
210             GETABIT, GETBYTE, GETWORD: decorate them,
211           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
212           (ast_print): added GETABIT, GETBYTE, GETWORD
213         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
214         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
215           (geniCodeBinary): new generic binary icode,
216           (ast2iCode): added GETABIT, GETBYTE, GETWORD
217         * src/port.h: updated comment for PORT.hasExtBitOp
218         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
219           (genGetByte): new, to get a single byte,
220           (genGetWord): new, to get a word from a long,
221           (gen51Code): added GETABIT, GETBYTE, GETWORD
222         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
223
224 2005-09-23 Raphael Neider <rneider AT web.de>
225
226         * configure.in, configure: have device/lib/pic configured
227         * device/lib/Makefile.in: added model-pic14
228         * device/lib/clean.mk: added pic/ to clean rule
229         * device/lib/pic: added rudimentary pic14 library providing support
230           functions for multiplication/division/generic pointer access
231         * src/SDCCopt.c (convilong): mark support functions as extern
232           for pic14 port as well
233         * src/pic/gen.c (genMult): added assertions,
234           (genpic14Code): emit warning on unhandled iCodes
235         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
236         * src/pic/pcode.c (pCodeOpCopy),
237         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
238           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
239           SFR_REGISTER}), made safe for future extensions
240         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
241           instructions even if preceeded by SKIP instructions (also remove
242           them); removed unused code
243         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
244           prevents leaving parts of the structure uninitialized after copying
245
246 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
247
248         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
249           ago by me
250         * support/regression/tests/addsub.c: added test for the bug
251
252 2005-09-21 Raphael Neider <rneider AT web.de>
253
254         * device/include/pic16/pic18f1220.h,
255           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
256         * device/lib/pic16/Makefile.rules: added missing opening paren
257         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
258           are provided in genutils.c,
259           (genUminusFloat,genUminus,genCmpEq): added asserts on different
260           operand/result sizes,
261           (genCmp): assert on NULL pointers first, then check deref'ed values
262         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
263           result size
264
265 2005-09-18 Raphael Neider <rneider AT web.de>
266
267         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
268           as these are now unused,
269           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
270         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
271           local, avoids uninitialized pointer dereference on r->name
272         * src/pic16/ralloc.c (newReg): fixed indentation
273
274 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
275
276         * src/SDCCval.c (constVal): fixed bug 730366
277         * support/Util/SDCCerr.c,
278         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
279
280 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
281
282         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
283
284 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
285
286         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
287
288 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
289
290         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
291           (hex2dec): made hex_digit unsigned char, removed ascii dependance
292         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
293           (hex2dec): made hex_digit unsigned char, removed ascii dependance
294         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
295         * packihx/packihx.c (hexDigit): made c unsigned char
296         * as/mcs51/lklibr.c (fndsym),
297         * link/z80/lkgb.c (gb),
298         * link/z80/lklibr.c (fndsym),
299         * link/z80/lkrloc.c (relr),
300         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
301         * src/SDCC.lex (checkCurrFile, process_pragma),
302         * src/SDCCglue.c (spacesToUnderscores),
303         * src/SDCCmain.c (setParseWithComma, processFile),
304         * src/asm.c (tvsprintf, printCLine),
305         * src/avr/gen.c (emitcode, aopPut),
306         * src/ds390/gen.c (emitcode),
307         * src/hc08/gen.c (emitcode, emitinline),
308         * src/mcs51/gen.c (emitcode, genInline),
309         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
310           tokenizeLineNode),
311         * src/pic/ralloc.c (debugLog),
312         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
313           tokenizeLineNode),
314         * src/pic16/ralloc.c (debugLog),
315         * src/z80/main.c (_process_pragma):
316            made all ctype.h function calls safe
317         * src/SDCCopt.c: include math.h for fabs
318         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
319           and used them throughout the code to make ctype.h function calls safe
320         * src/ds390/main.c (asmLineNodeFromLineNode),
321         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
322         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
323            unsigned char*
324         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
325           (newpCodeAsmDir): made ctype.h function calls safe
326         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
327           pic16_emitcode):  made lbp unsigned char*
328         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
329           (pic16_newpCodeAsmDir): made ctype.h function calls safe
330         * src/xa51/gen.c (emitcode),
331         * src/z80/gen.c (_emit2): made lbp unsigned char*
332         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
333            char*
334
335 2005-09-05 Raphael Neider <rneider AT web.de>
336
337         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
338           access bank splitpoint
339
340 2005-09-05 Raphael Neider <rneider AT web.de>
341
342         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
343
344 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
345
346         * .version: changed to version 2.5.3
347         * doc/sdccman.lyx: changed version to 2.5.3,
348           documented --codeseg and --constseg and pragma codeseg and constseg,
349           documented bit parameters (reentrant) and bit returning
350         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
351            currFunc->recvSize, but is this ok for all ports?
352           (ast2iCode): result of ~ on unsigned char must be cast to int for
353            bool to work
354         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
355           function pointers in bit space
356         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
357           (processFuncArgs): call port.reg_parm() with reentrancy info
358         * src/port.h,
359         * src/avr/main.c,
360         * src/ds390/main.c,
361         * src/hc08/main.c,
362         * src/pic/main.c,
363         * src/pic16/main.c,
364         * src/xa51/main.c,
365         * src/z80/main.c: port.reg_parm prototype extended with
366           "bool reentrant" parameter
367         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
368           options.stackAuto for allocating bit register parameters
369         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
370           (genSend): set BitBankUsed if it is,
371           (selectRegBank): factored out of genCall for use in genPcall,
372           (genCall): removed redundant dtype assignmen, use selectRegBank,
373           (genPcall): handle returning in Carry properly, save in F0 if needed,
374           (genReceive): handle bit register parameters
375         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
376           (mcs51_assignRegisters): enable bit registers for all reentrant
377            functions and don't set BitBankUsed unconditionally
378         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
379         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
380         * support/regression/tests/funptrs.c: added tests for BOOL and for return
381
382 2005-08-27 Borut Razem <borut.razem AT siol.net>
383
384         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
385         ppc-osx (Darwin) does not support -u option. It seems that it is
386         supported only on Linux - GNU cp
387
388 2005-08-25 Borut Razem <borut.razem AT siol.net>
389
390         * sim/ucsim/gui.src/serio.src/Makefile.in,
391           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
392           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
393           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
394           install and strip, since the strip at /usr/ccs/bin should be used
395           on solaris
396
397 2005-08-24 Borut Razem <borut.razem AT siol.net>
398
399         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
400
401 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
402
403         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
404         ffffffffu
405
406 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
407
408         * as/mcs51/aslink.h: completed lkrloc.c prototypes
409         * as/mcs51/lkmain.c (link_main): fixed warning
410         * device/include/stdbool.h: ds390 has no advanced bit support yet
411         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
412         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
413         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
414           and updated their macros
415         * src/SDCCval.c (constVal): updated comment for renamed b_long
416
417 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
418
419         * as/mcs51/asdata.c: changed ctype['['] to BINOP
420         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
421           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
422           (oprio): set priority for '['
423         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
424            and adb_24_bit
425         * as/mcs51/asm.h: added defines R_BIT and S_BIT
426         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
427         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
428         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
429           added overlayable BIT_BANK area
430         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
431           (summary2): explain 'T' in legenda
432         * as/mcs51/lkrloc.c: replaced old K&R style,
433           (relr): added R_BIT processing,
434           (errmsg): added "Bit-addressable relocation error",
435           (adb_bit): added for converting from byte- to bit-addressable space,
436           (adb_24_bit): added for converting from byte- to bit-addressable space
437         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
438            used in reentrant functions now even as return value
439         * device/lib/_gptrput.c (_gptrput): removed obsolete code
440         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
441           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
442         * src/SDCCglobl.h: added indicator BitBankUsed
443         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
444            the bit registers b0-b7
445         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
446           (geniCodeCast): fixed bug 1263853,
447           (geniCodeLogicAndOr): put result in bool or char,
448           (geniCodeReceive): added parameter func for accessing the return type,
449           (geniCodeFunctionBody): pass func to geniCodeReceive
450         * src/SDCCmain.c: added indicator BitBankUsed
451         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
452         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
453           (checkSClass): don't put automatic bool/bit on stack,
454           (checkFunction): removed check on function cannot return bit
455         * src/SDCCsymt.h: added newBoolLink prototype
456         * src/mcs51/gen.c (rb1regs): added bit registers,
457           (movc): created for assigning to carry,
458           (pushReg, popReg): created for pushing registers,
459           (sameRegs): check both AOP_REG and AOP_CRY types,
460           (aopOp): handle bit registers,
461           (aopPut): optimization no self-assign,
462           (saveRegisters): push reg->base (bits) only once for bit registers,
463            and use pushReg,
464           (unsaveRegisters): pop reg->base only once and use popReg,
465           (assignResultValue): added parameter func and return in carry for bits,
466           (genIpush): optimization no reload in A if not changed,
467           (genSend): bit parameters in reentrant functions are passed in bit
468            registers by first assigning to bits in B, then save registers and
469            copy B to bits,
470           (genCall): handle returning in Carry properly, save it in F0 if needed,
471           (genPcall): updated assignResultValue call, this is not safe yet for bit
472            returning function !!!
473           (genFunction): don't generate equ's for bit registers and use pushReg,
474           (genEndFunction): take care of bit returning functions and use popReg,
475           (genRet): return bit in Carry,
476           (genIfx): optimize bit registers and other directly addressable bits,
477           (genReceive): updated assignResultValue call
478         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
479           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
480            registers when using stack-auto
481         * src/mcs51/ralloc.c (_G): added allBitregs,
482           (regs8051): added the bit registers,
483           (createStackSpil): use macro IS_BIT,
484           (getRegBit): added to allocate a bit register, else spill,
485           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
486           (updateRegUsage): factored out to ease stepping while debugging,
487           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
488            also allocate bit registers,
489           (fillGaps): handle bit registers,
490           (findAllBitregs): added to create bit vector with all bit registers,
491           (mcs51_allBitregs): returns this bit vector,
492           (mcs51_assignRegisters): when using stack-auto use bit registers for
493            passing parameters and creating local variables
494         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
495
496 2005-08-22 Borut Razem <borut.razem AT siol.net>
497
498         * device/lib/Makefile.in: replaced find option -or with -o
499           to make it run on solaris
500
501 2005-08-22 Raphael Neider <rneider AT web.de>
502
503         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
504           fixes #1265442 (crash on Solaris)
505
506 2005-08-20 Borut Razem <borut.razem AT siol.net>
507
508         * configure, configure.in: added tests for libsocket and libnsl libraries,
509           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
510           from support/regression/Makefile.in
511         * support/regression/Makefile.in: added
512         * device/lib/pic16/Makefile.common.in: force make to use bash shell
513         * sim/ucsim/libtool: regenerated on sparc-solaris
514         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
515           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
516           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
517           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
518           sparc-solaris, which doesn't use GNU ld linker
519         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
520         * as/Makefile: find on sparc-solaris does not support -maxdepth option
521
522 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
523
524         * src/mcs51/peeph.def: updated comments
525
526 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
527
528         * device/lib/_gptrget.c,
529         * device/lib/_gptrput.c: slightly shorter
530         * doc/sdccman.lyx: incremented version
531         * src/mcs51/peeph.def: moved peephole comments to the line of first
532           change to better keep line correlation, reanimated 186.e
533         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
534
535 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
536
537         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
538           David Saxton with quotes around file name.
539
540 2005-08-15 Borut Razem <borut.razem AT siol.net>
541
542         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
543           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
544           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
545           make tests run on x86_64 platform
546
547 2005-08-13 Raphael Neider <rneider AT web.de>
548
549         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
550           as it might be executed DURING a build (parallel make is wonderful)
551
552 2005-08-13 Raphael Neider <rneider AT web.de>
553
554         * device/lib/Makefile.in (port-specific-objects-pic16):
555           revert to cp $(PORT)/bin/*.* $(PORTDIR)
556         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
557           dependency
558         * device/lib/pic16/Makefile.rules: build subdirs before creating
559           the library, removed builddir rule, create $(builddir) early in
560           recurse rule, use empty recurse rule for leaf directories
561         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
562           mkdir errors (race condition), removed duplicate suffix "hex"
563           from clean rules
564         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
565         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
566           prevents mkdir -p from aborting on Alpha
567
568 2005-08-12 Raphael Neider <rneider AT web.de>
569
570         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
571           db-statements in order to allow for arrays of pointers in code
572           sections to be placed without interspersed 0-padding, fixes
573           bug #1256215
574         * (emitStatistics): fixed division by zero for pic18f1220
575         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
576           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
577         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
578         * (pic16_pCodeConstString): keep track of already emitted string
579           literals to prevent "duplicate definitions of symbol _str_NR"
580         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
581           debug message
582         * device/lib/Makefile.in: ignore failing PIC16 library builds
583         * device/lib/pic16/Makefile: do not build if gputils are missing
584         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
585
586 2005-08-10 Raphael Neider <rneider AT web.de>
587
588         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
589           my last commit)
590
591 2005-08-10 Raphael Neider <rneider AT web.de>
592
593         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
594           Rokas' patch to add the new fixed point type "__fixed16x16"
595         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
596           functions for __fixed16x16 arithmetics
597         * device/lib/pic16: reimplemented the build system to support
598           a separate build directory, better handling of libio (create
599           the library in a separate subdir for each architecture) and
600           easier configuration (centralized in Makefile.common)
601
602 2005-08-07 Raphael Neider <rneider AT web.de>
603
604         * src/pic16/gen.c (genrshTwo): fixed sign extension
605         * src/pic16/device.c: added pic18f2320, 4220 and 4320
606         * device/include/pic16/pic18f2220.h: changed some bit definitions,
607           added T0CONbits
608         * device/include/pic16/pic18f4220.h: NEW, header for
609           pic18f4220 and pic18f4320
610         * device/include/pic16/pic18fregs.h: added new devices,
611           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
612         * device/include/pic16/signal.h: resolved name clashes
613           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
614           to also allow testing for interrupt enable bits, added
615           comments on how to use the macros
616         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
617         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
618           register definitions for the devices
619         * device/lib/pic16/pics.all: added new devices
620         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
621           allocated memory
622         * device/lib/pic16/libc/stdlib/memfree: do not count
623           the block header as free memory
624         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
625           simplified and added missing end-of-blocklist-marker
626           (reported by Peter Onion, fixes #1252814)
627         * (_mergeHeapBlock): fixed loop condition
628         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
629           len==0, restructured code
630         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
631           up a bit, reduced bitfield accesses, prevent endless loops
632           in case of heap corruption
633         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
634           "unreferenced arguments/must return a value" warnings
635         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
636           replaced BAUDREG with SPBRG
637         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
638           device/lib/pic16/debug/gstack/gstack.c: replaced
639           _naked, _asm, _endasm with __naked, __asm, __endasm
640
641 2005-08-05 Raphael Neider <rneider AT web.de>
642
643         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
644           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
645
646 2005-08-05 Borut Razem <borut.razem AT siol.net>
647
648         * device/lib/Makefile.in: added missing ';'
649         * configure: removed ^M characters
650
651 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
652
653         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
654           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
655           License
656
657 2005-08-04 Borut Razem <borut.razem AT siol.net>
658
659         * configure.in: pic16 libraries build 2nd try - enable running
660           configure in device/lib/pic16
661         * configure: regenerated from configure.in
662         * device/lib/Makefile.in: create $(PORT)/bin directory
663
664 2005-08-03 Raphael Neider <rneider AT web.de>
665
666         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
667           to get/set values via pointers
668         * (genUnpackBits,genPackBits): changed detection of
669           ptr->bitfield vs. sym.bitfield, fixed access via generic
670           pointers, removed dead (wrong) code for multibyte bitfields
671         * (genNearPointerGet, genGenPointerGet): removed useless code,
672           fixed bitfield detection, fixes #1250594
673         * (genNearPointerSet): removed useless code
674         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
675           and introduced macro pic16_emitpcode that conditionally emits
676           the origin of the following pCode (useful for debugging SDCC)
677         * src/pic16/pcode.c: changed (and disabled) some debug outputs
678         * (createDefmap): fixed handling of LFSR for --optimize-df
679
680 2005-08-02 Borut Razem <borut.razem AT siol.net>
681
682         * device/lib/Makefile.in: pic16 libraries build enabled since
683           gputils-0.13.2 are now localy installed at sourceforge's compile farm
684
685 2005-08-02 Raphael Neider <rneider AT web.de>
686
687         * src/pic16/gen.c (genPackBits): removed deprecated warning
688         * (genGenPointerSet): fixed bitfield detection
689
690 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
691
692         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
693
694 2005-07-31 Raphael Neider <rneider AT web.de>
695
696         * device/lib/pic16/libdev/pic18f458.c,
697           device/include/pic16/pic18f458.h: added missing T0CONbits
698
699 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
700
701         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
702
703 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
704
705         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
706
707 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
708
709         * device/include/mcs51/at89c51ed2.h: added.
710
711 2005-07-23 Raphael Neider <rneider AT web.de>
712
713         * src/pic/gen.h: added emitpcode macro for debugging
714         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
715           and replace by macro adding debug information on demand
716         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
717         * (gencjne): tried to fix; replaced with correct (slower) code
718         * (gen{Unp,P}ackBits): fixed single bit access
719         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
720         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
721           previous instruction
722         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
723           register has to be handled with care (forbidding movement
724           of assignments/uses, removing assignments completely, ...)
725         * (pCodeOptime2pCodes): make use of regIsSpecial
726         * added lots of debugging output (commented out)
727         * src/pic/rallloc.c (deassignLRs): prevent operand registers
728           from being reused as result UNLESS it is known to work
729
730 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
731
732         * support/Util/dbuf.h: include <stddef.h> for size_t
733         * .version: changed to version 2.5.2
734
735 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
736
737         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
738
739 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
740
741         * src/hc08/gen.c (genMinus): fixed bug #1241835,
742           (genModOneByte): removed needless psha/pula
743
744 2005-07-22 Raphael Neider <rneider AT web.de>
745
746         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
747           have PIC14 handled like PIC16, fixes broken pic14 linker calls
748         * src/pic/gen.c (resolveIfx): do not "invent" labels
749         * (genSkipc): changed to positive logic
750         * (genSkipCond): removed as no longer needed
751         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
752           backport from PIC16
753         * (genLeftShift): check operands are in different registers
754         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
755           INCF does not update CARRY...
756         * src/pic/main.c: fixed _linkCmd
757         * src/pic/pcode.c (unlinkpCode): added inactive code
758         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
759           alive (do not assign result and operand overlapping registers)
760
761 2005-07-22 Raphael Neider <rneider AT web.de>
762
763         * src/pic/device.c (dump_sfr): replaced register declaration with
764           call to emitSymbolToFile() to avoid duplicate symbols
765         * (assignRelocatableRegisters): do not declare external symbols
766         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
767           right (take size of type, not etype)
768         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
769         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
770         * (packRegsForAccUse): disabled assignment of WREG as
771           the result reg to prevent occurence of just fixed #1235003,
772           fixes #1242954
773         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
774           symbols (avoids duplicate symbols in .asm file)
775         * (pic14emitRegularMap): use emitSymbolToFile()
776         * src/pic/gen.c (aopOp): fixed spillLocation handling
777         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
778         * (genDataPointerSet): removed unneccessary variables/output
779
780 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
781
782         * as/mcs51/lkarea.c: enlarged codemap for banked memory
783         * device/lib/mcs51/crtbank.asm: added # to 0x0F
784
785 2005-07-21 Raphael Neider <rneider AT web.de>
786
787         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
788           architecture cannot handle them efficiently, fixes bug #1235003
789         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
790           check for empty sets before using them (fixes bug #1232190)
791
792 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
793
794         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
795           (lnksect2): generate warnings for memory overlap
796         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
797           constseg to set the name of these segments so you can instruct the linker
798           to place them in banks
799         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
800         * src/SDCCglobl.h: added MODEL_HUGE to enum,
801           added code_seg and const_seg to options
802         * src/SDCCglue.c (emitMaps): use options.const_seg,
803           (createInterruptVect): put interrupt vectors in segment HOME,
804           (glue): put HOME before static segment and put the main glue in HOME,
805           (glue): use options.code_seg
806         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
807         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
808           these segments so you can instruct the linker to place them in banks
809           (linkEdit): use code_loc for HOME segment which should be the first
810           segment in code memory now
811         * src/SDCCmem.c: fixed more stuff like bug 1238386
812         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
813           (changePointer): don't change function pointers to code pointers for
814           banked functions,
815           (compareType): added exceptional check for banked function pointers
816         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
817         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
818           after static in code memory
819         * src/mcs51/gen.c: added aopLiteralLong prototype,
820           (aopForSym): use getSize for functions,
821           (genCall): generate banked calls over one trampoline __sdcc_banked_call
822           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
823           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
824           the segment,
825           (genPcall): use call for literal function pointers and generate banked
826           calls over the one trampoline so there's only one place for the user to
827           modify according to his/hers hardware,
828           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
829           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
830         * src/mcs51/main.c: added keyword banked,
831           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
832         * support/Util/SDCCerr.c,
833         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
834           needed for passing the bank and address to the trampoline
835         * device/lib/mcs51/crtbank.asm: added for bankswitching
836         * device/lib/mcs51/Makefile: added crtbank
837
838 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
839
840         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
841           for fields at offset 0 of a struct or union as reported
842           on 2005-07-07 in the developer mailing list.
843
844 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
845
846         * src/SDCCmem.c: fixed bug 1238386
847
848 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
849
850         * src/mcs51/peeph.def: added labelrefcounting for peepholes
851           (patch #1144962), added peephole 300, enabled 259.x
852         * doc/sdccman.lyx: removed screenshot and provided link instead
853
854 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
855
856         * doc/sdccman.lyx: added section about debugging with ddd
857         * doc/figures/ddd_example.eps: screenshot of debugging session
858
859 2005-07-04 Raphael Neider <rneider AT web.de>
860
861         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
862           like CODE pointers, fixes #1115683
863         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
864           call, fixes bugs #1232211, #1228110,
865           fixed wrong casts to pCodeFlow from pCodeInstructions
866
867 2005-07-04 Raphael Neider <rneider AT web.de>
868
869         * src/pic/gen.c (popGet): changed assert to allow for
870           bit operands
871         * (popGetAddr): changed signature to provide
872           an additional index, patched all call sites
873         * (genCmpEq): handle literal-like operands correctly
874         * (genAddrOf): added sanity checks on __code/__data pointers
875         * (genAssign): added handling of symbols from __code section
876         * (gencjne): do not generate code for comparisons whose result
877           is neither stored nor used, fixes bug #1171114
878         * (AccLsh, AccRsh): operate on operand instead of WREG
879         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
880           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
881           by known count
882         * rewrote complete shift-by-literal logic, commented unused
883           functions out
884         * (genConstPointerGet): get multiple bytes (if result size > 1),
885           fixed handling of non-immediate addresses
886         * (genPointerGet): handle CODE pointers like CONST pointers
887         * (genpic14Code): insert C-SRC lines as Cource-pCodes
888         * ({aop,op}_isLitLike): NEW, single place to decide whether an
889           operand is to be treated as a literal or not
890         * (mov2w,genPcall,genCmpEq),
891           src/pic/genarith.c: use aop_isLitLike() to decide between
892           literal/register contents
893         * (addSign): added missing offset
894         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
895           only emit comment in debug-mode,
896           use {aop,op}_isLitLike throughout the file
897         * src/pic/glue.c: fix initializers for pointers (work in progress)
898         * src/pic/pcode.c (get_op): honor index on _const symbols
899         * ({reset,dump}pCodeStatistics): NEW, estimate code size
900         * (dumppBlock): added pCode size estimation
901         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
902           check for IS_SYMOP before OP_SYMBOL'ing
903         * fixed indentation, compacted switch-statements
904         * (allocReg): find free register and allocate it instead of
905           allocating new registers all the time
906         * (deassignLRs): prevent POINTER_GET's from being assigned the same
907           registers as its operands (necessary only for multibyte GETs)
908
909 2005-07-01 Raphael Neider <rneider AT web.de>
910
911         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
912           debugging .asm-output macros FENTRY + FEXIT
913         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
914           way... I wonder...
915         * (emitpComment): NEW, printf to pCode
916         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
917           offset handling
918         * (popGetAddr): NEW, variant of popGet to access an immediates
919           high(er) bytes instead of the n'th byte of memory they reference,
920           replaced popGet with popGetAddr where neccessary
921         * (genDataPointerGet): reactivated and fixed implementation
922         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
923           accesses
924         * (genDataPointerSet): fixed multibyte assignments
925         * (genpic14Code): fixed --i-code-in-asm handling
926         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
927         * (genPlus): fixed index-out-of-bounds error
928         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
929         * src/pic/ralloc.c: added debugging output macro FENTRY2
930         * (spillThis): fixed indentation, enbraced for-body for clarity
931         * (rematStr): commented out as now unused
932         * (regTypeNum): commented out special spill case (overwrites
933           arbitrary values)
934         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
935
936 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
937
938         * doc/sdccman.lyx: documented sfr16/sfr32,
939           added example for using storage class with function pointers
940         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
941
942 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
943
944         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
945         * device/lib/_itoa.c,
946         * device/lib/_ltoa.c: optimized codesize
947         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
948           but don't know how to suppress the double warning.
949         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
950         * support/Util/SDCCerr.c,
951         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
952
953 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
954
955         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
956           fixed old K&R prototypes
957         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
958         * device/lib/_gptrget.c,
959         * device/lib/_gptrgetc.c,
960         * device/lib/_gptrput.c: changed versions for new memory indicator values,
961           also new versions for small generic pointers and banked generic pointers
962         * src/port.h: added const_name
963         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
964         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
965         * src/SDCCcse.c (findPrevIc): check all associative operators
966         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
967         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
968         * src/SDCCmem.c: updated comments,
969           set far-space to 0 for pdata, results in optimized code
970         * src/SDCCmem.h: added macro CONST_NAME
971         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
972           moving the info into the highest bits, see also gptrget/gptrput
973         * src/src.dsp: added sdcc.ico to project files
974         * src/avr/gen.c (genCast): fixed bug 0x%d
975         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
976         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
977           relation between ptr_type and DCL_TYPE,
978           (genCast): fixed bug 0x%d
979         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
980           (CODE)" for const_name
981         * src/hc08/gen.c (genCast): fixed bug 0x%d
982         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
983           (hc08_port): added "CONST (CODE)" for const_name
984         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
985           (aopForRemat, adjustArithmeticResult): disconnected direct relation
986           between ptr_type and DCL_TYPE,
987           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
988           operand* and took AOP() inside function so sfr-ness can be checked,
989           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
990           new prototype,
991           (genFunction, genEndFunction): optimized stack setup,
992           (genMinus): optimized for literals with ending zeroes (in bytes),
993           (genCast): fixed bug 0x%d
994         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
995           (mcs51_port): added "CONST (CODE)" for const_name
996         * src/mcs51/peeph.def: made rule 226 more generic
997         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
998         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
999         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1000         * src/z80/main.c (z80_port): added NULL for const_name,
1001           (gbz80_port): added NULL for const_name
1002         * support/regression/tests/bug663539.c,
1003         * support/regression/tests/sfr16.c: new tests
1004
1005 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1006
1007         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1008
1009 2005-06-24 Raphael Neider <rneider AT web.de>
1010
1011         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1012           corrected typos...
1013         * device/include/pic16/signal.h: added USBIF
1014           and SIG_USB
1015
1016 2005-06-24 Raphael Neider <rneider AT web.de>
1017
1018         * device/lib/pic16/libdev/pic18f2455.c,
1019           device/include/pic16/pic18f2455.h: NEW
1020         * device/include/pic16/pic18fregs.h,
1021           device/lib/pic16/pics.all,
1022           src/pic16/device.c: added 18f2455
1023         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1024           device/include/pic16/{pic18f[68][567].h,usart.h}:
1025           replaced MULTIPLE_USARTS define with more relaible
1026           compatibility sfrs (for USART access)
1027
1028 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1029
1030         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1031           and the output asm file line is printed on two lines.
1032
1033 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1034
1035         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1036           BGT, BLE, BHI, and BLS instructions
1037         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1038           genCmpEq): removed
1039         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1040           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1041           fixes bug #1216342
1042         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1043
1044 2005-06-15 Raphael Neider <rneider AT web.de>
1045
1046         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1047         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1048         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1049           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1050           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1051
1052 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1053
1054         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1055           Marcel Telka in bug #1215704
1056
1057 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1058
1059         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1060           located in shared memory bank.
1061
1062 2005-05-31 Raphael Neider <rneider AT web.de>
1063
1064         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1065           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1066           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1067
1068 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1069
1070         * device/lib/_strncpy.c: fixed the fix
1071
1072 2005-05-26 Raphael Neider <rneider AT web.de>
1073
1074         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1075           initializers with \0, bug #1208187
1076         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1077           intializers with \0, bug #1208187
1078
1079 2005-05-26 Raphael Neider <rneider AT web.de>
1080
1081         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1082           initializers with \0, bug #1208187
1083         * src/pic16/main.c (_process_pragma): added sanity checks
1084           for stack position and size, emit warnings when appropriate
1085
1086 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1087
1088         * device/lib/_strncpy.c: fixed not filling with \0
1089
1090 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1091
1092         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1093           createFunction),
1094         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1095           compound_statement),
1096         * src/SDCCsymt.h,
1097         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1098
1099 2005-05-24 Raphael Neider <rneider AT web.de>
1100
1101         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1102
1103 2005-05-24 Raphael Neider <rneider AT web.de>
1104
1105         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1106           TRISE definitions, closes bug #1162453
1107
1108 2005-05-22 Raphael Neider <rneider AT web.de>
1109
1110         * src/pic16/main.c (_process_pragma): check for missing
1111           arguments to pragmas code and udata
1112         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1113           consistency fixes to match other headers (thanks to Jim Paris)
1114         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1115
1116 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1117
1118         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1119
1120 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1121
1122         * support/regression/tests/bug1198642.c: new test
1123         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1124         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1125         * support/scripts/resource.h,
1126         * support/scripts/resource.rc,
1127         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1128         * support/scripts/sdcc.ico: added 32x32 icon
1129
1130 2005-05-18 Raphael Neider <rneider AT web.de>
1131
1132         * device/lib/pic16/libdev/pic18f*.c,
1133         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1134           keywords to "__sfr" and "__at (X)"
1135         * device/include/pic16/pic18fregs.h: added pic18f4520
1136         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1137           #1203088 (MPLAB compatibility)
1138
1139 2005-05-17 Raphael Neider <rneider AT web.de>
1140
1141         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1142         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1143         * device/lib/pic16/pics.all: added new devices
1144         * src/pic16/device.c: added support for pic18f4520
1145
1146 2005-05-16 Raphael Neider <rneider AT web.de>
1147         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1148         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1149         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1150           convenience function for bit access
1151
1152 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1153
1154         * device/lib/printf_large.c: fixed bug 1193299
1155         * support/regression/tests/bug1057979.c: added test %3.3s
1156
1157 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1158
1159         * device/include/mcs51/8051.h,
1160         * device/include/mcs51/8052.h: made parseable with lint
1161         * device/include/mcs51/lint.h: added include file for (sp)lint
1162         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1163         * doc/cdbfileformat.lyx,
1164         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1165
1166 2005-05-14 Raphael Neider <rneider AT web.de>
1167
1168         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1169         * device/lib/pic16/libc/stdlib/itoa.c (new)
1170         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1171         * device/lib/pic16/libio/Makefile: exclude subdir according to
1172           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1173         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1174         * src/pic16/gen.c (genFunction): prevent annoying warning
1175         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1176           nameclashes on BeOS
1177         * support/cpp2/cppmain.c (cpp_output_string): new
1178         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1179           fixes bug 1116802
1180
1181 2005-05-13 Borut Razem <borut.razem AT siol.net>
1182
1183         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1184
1185 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1186
1187         * .version: changed to version 2.5.1; back to bleeding edge development
1188
1189 2005-05-11 Borut Razem <borut.razem AT siol.net>
1190
1191         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1192           generate PDF version 1.3 documents
1193
1194 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1195
1196         * .version: changed to version 2.5.0
1197
1198 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1199
1200         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1201
1202 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1203
1204         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1205         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1206         well as many smaller updates.
1207         * .version: changed to version 2.5.0-pre1
1208
1209 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1210
1211         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1212
1213 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1214
1215         * support/regression/tests/bug1185672.c: added
1216         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1217           bug 1185672
1218         * src/mcs51/gen.c (genCall): added comments, made it look safer
1219         * src/mcs51/gen.c (genEndFunction): simplified
1220
1221 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1222
1223         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1224
1225 2005-04-14 Borut Razem <borut.razem AT siol.net>
1226
1227         * fixed bug 1045046 - SIGSEGV with really simple code?:
1228           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1229           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1230
1231 2005-04-14 Borut Razem <borut.razem AT siol.net>
1232
1233         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1234           src/pic16/device.h: temporarily disabled experimental #inline pragma
1235           for 2.5.0 release
1236
1237 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1238
1239         * device/include/z80/stdio.h,
1240         * device/include/z80/string.h: removed these highly incomplete files so
1241           SDCC can use the default ones in device/include/
1242
1243 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1244
1245         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1246         gcc warning.
1247         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1248         fix sdcpp warnings.
1249
1250 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1251
1252         * device/include/malloc.h: removed redundant __reentrant prototypes
1253         * device/lib/_mullong.c: added working xstack variant in asm (C version
1254           doesn't pass regression tests)
1255         * device/lib/bpx.c: used __data and made bpx char for mcs51
1256         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1257           (createFunction): fixed bug with xstackPtr
1258         * src/SDCCcse.c: corrected comments
1259         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1260           (killDeadCode, eBBlockFromiCode): removed unused code
1261         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1262           corrected comments
1263         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1264           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1265           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1266           (genModOneByte): fixed warning in MSVC
1267         * src/mcs51/main.c (): added comments
1268         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1269
1270 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1271
1272         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1273
1274 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1275
1276         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1277
1278 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1279
1280         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1281         characters arrays of larger size than the declared one.
1282
1283 2005-04-10 Borut Razem <borut.razem AT siol.net>
1284
1285         * src/pic/gen.c (genInline),
1286           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1287           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1288           (findNextInstruction), (findPrevInstruction),
1289           (findInstructionUsingLabel),
1290           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1291         * src/pic/pcode.c (findLabel): added missing '\n'
1292         * src/src.dsp: added SDCCdwarf2.c to the project
1293
1294 2005-04-09 Borut Razem <borut.razem AT siol.net>
1295
1296         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1297
1298 2005-04-08 Raphael Neider <rneider AT web.de>
1299
1300         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1301           into the chain after a given one) and mergeDefmapSymbols (combine
1302           defmap entries for each symbol per pcode)
1303         * (createDefmap): have defmap entries merged in the end
1304         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1305           a symbol before replacing one access type's symbol, merge symbols in
1306           the end (replacement symbol might already have an entry)
1307         * (assignValnums): keep reference to written WREG intact
1308
1309 2005-04-08 Raphael Neider <rneider AT web.de>
1310
1311         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1312           Alpha)
1313
1314 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1315
1316         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1317         bytes
1318
1319 2005-04-07 Raphael Neider <rneider AT web.de>
1320
1321         * device/include/pic16/usart.h: added compatibility defines for
1322           devices with more than one USART
1323         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1324
1325 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1326
1327         * device/lib/Makefile.in: updated for port specific include
1328
1329 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1330
1331         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1332
1333 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1334
1335         * device/include/8051.h,
1336         * device/include/8052.h,
1337         * device/include/at89S8252.h,
1338         * device/include/at89c55.h,
1339         * device/include/at89x051.h,
1340         * device/include/at89x51.h,
1341         * device/include/at89x52.h,
1342         * device/include/mcs51reg.h,
1343         * device/include/reg51.h,
1344         * device/include/reg764.h,
1345         * device/include/regc515c.h,
1346         * device/include/sab80515.h: (re)moved these 12 files
1347         * device/include/mcs51/8051.h,
1348         * device/include/mcs51/8052.h,
1349         * device/include/mcs51/at89S8252.h,
1350         * device/include/mcs51/at89c55.h,
1351         * device/include/mcs51/at89x051.h,
1352         * device/include/mcs51/at89x51.h,
1353         * device/include/mcs51/at89x52.h,
1354         * device/include/mcs51/mcs51reg.h,
1355         * device/include/mcs51/reg51.h,
1356         * device/include/mcs51/reg764.h,
1357         * device/include/mcs51/regc515c.h,
1358         * device/include/mcs51/sab80515.h: and added them here
1359
1360 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1361
1362         * device/include/stdarg.h: changed SDCC specific keywords to double
1363           underlined form.
1364         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1365           mcs51 and ds390.
1366         * device/include/hc08/mc68hc908gp32.h,
1367         * device/include/hc08/mc68hc908jb8.h,
1368         * device/include/hc08/mc68hc908jkjl.h,
1369         * device/include/hc08/mc68hc908qy.h: fixed comments
1370         * device/include/mcs51/README: updated
1371         * device/include/mcs51/c8051f120.h: added PINRSF
1372         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1373         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1374           amidst code. Also inline is not supported.
1375
1376 2005-04-06 Raphael Neider <rneider AT web.de>
1377
1378         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1379         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1380           callers stack/frame pointers
1381
1382 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1383
1384         * device/include/pic16/usart.h: added, missing in previous commit,
1385         * device/include/pic16/adc.h: fixed typo,
1386         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1387         commit,
1388         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1389         <p18fxxx.inc>
1390         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1391         uninitialized because a bug appears with gplink
1392         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1393         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1394         complains for unrecognised option
1395
1396 2005-04-05 Raphael Neider <rneider AT web.de>
1397
1398         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1399           structs as well (using memcpy)
1400         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1401           on ISRs (GOTO has no label)
1402         * src/pic16/device.h: added OF_OPTIMIZE_DF
1403         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1404           new data flow analysis/optimization
1405         * src/pic16/pcode.c: added (prototypes for and implementation of)
1406           dataflow analysis functions, fixed pCodeInstructions' inCond and
1407           outCond values, made RCALL a branch instruction
1408         * (pic16_unlinkpCode): keep C line if possible
1409         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1410           C line moved if possible
1411         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1412         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1413           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1414         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1415           new flow)
1416         * (pic16_getJumptabpCode): NEW, needed in...
1417         * (LinkFlow): fixed handling of jumptables, calls and conditional
1418           branches
1419         * (pic16_InsertCommentAfter): NEW
1420         * (pic16_pCodeReplace): made verbose and flow preserving
1421         * (AnalyzeFlow): added call to data flow analysis
1422         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1423         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1424         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1425
1426 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1427
1428         * src/SDCCast.c (decorateType): fixed bug #1105626
1429
1430 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1431
1432         * device/include/asm/pic16/features.h,
1433         * pic18f*.h headers,
1434         * device/include/pic16/adc.h,
1435         * device/include/pic16/delay.h,
1436         * device/include/pic16/i2c.h,
1437         * device/include/pic16/malloc.h,
1438         * device/include/pic16/stdio.h,
1439         * device/include/pic16/stdlib.h,
1440         * device/include/pic16/string.h,
1441         * device/lib/pic16/libc/stdio/printf_tiny.c,
1442         * device/lib/pic16/libc/stdio/printf_small.c,
1443         * device/lib/pic16/libc/stdio/strmgpsim.c,
1444         * device/lib/pic16/libc/stdio/strmmssp.c,
1445         * device/lib/pic16/libc/stdio/strmusart.c,
1446         * device/lib/pic16/libc/stdio/vfprintf.c,
1447         * device/lib/pic16/libc/stdlib/ltoa.c,
1448         * device/lib/pic16/libc/stdlib/putchar.c,
1449         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1450         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1451         * device/lib/pic16/libc/stdlib/memchrram.c,
1452         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1453         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1454         * device/lib/pic16/libio/adc/adcbusy.c,
1455         * device/lib/pic16/libio/adc/adcread.c,
1456         * device/lib/pic16/libio/adc/adcsetch.c,
1457         * device/lib/pic16/libio/usart/ubaud.c,
1458         * device/lib/pic16/libio/usart/ubusy.c,
1459         * device/lib/pic16/libio/usart/udrdy.c,
1460         * device/lib/pic16/libio/usart/uopen.c,
1461         * device/lib/pic16/libio/usart/uputc.c,
1462         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1463         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1464         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1465         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1466         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1467         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1468         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1469         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1470         specific keywords to double underlined form,
1471         * device/lib/pic16/libc/Makefile.rules,
1472         * device/lib/pic16/libsdcc/Makefile.rules,
1473         * device/lib/pic16/libm/Makefile,
1474         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1475         to compile with C standard set in Makefile.common
1476         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1477         rand.c and crc.c in compilation process,
1478         * device/lib/pic16/libsdcc/int/divuint.c,
1479         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1480         `c' from signed to unsigned,
1481         * device/lib/pic16/startup/crt0.c,
1482         * device/lib/pic16/startup/crt0i.c,
1483         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1484         keywords to double underlined form, bug fixes in _do_cinit function
1485         which prevented the correct initialization of the .idata segment,
1486         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1487         core to enter a infinite loop
1488         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1489
1490 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1491
1492         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1493
1494 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1495
1496         * device/include/Makefile.in: add support for hc08 subdirectory
1497         * device/include/hc08/: new subdirectory
1498         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1499         Lucas Loizaga, thanks!
1500         * device/include/hc08/mc68hc908qy.h,
1501         * device/include/hc08/mc68hc908gp32.h,
1502         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1503         their own directory. Changed internal macro names to use the compiler
1504         reserved namespace. Changed SDCC specific keywords to double
1505         underlined form.
1506         * device/include/math.h,
1507         * device/include/malloc.h,
1508         * device/include/stdarg.h,
1509         * device/include/stdbool.h
1510         * device/include/string.h,
1511         * device/include/tinibios.h,
1512         * device/include/ds400rom.h,
1513         * device/include/8051.h,
1514         * device/include/8052.h,
1515         * device/include/80c51xa.h,
1516         * device/include/at89c55.h,
1517         * device/include/at89S8252.h,
1518         * device/include/at89x51.h,
1519         * device/include/at89x52.h,
1520         * device/include/ds80c390.h,
1521         * device/include/reg764.h,
1522         * device/include/regc515c.h,
1523         * device/include/sab80515.h,
1524         * device/include/mcs51/c8051f000.h,
1525         * device/include/mcs51/c8051f018.h,
1526         * device/include/mcs51/c8051f020.h,
1527         * device/include/mcs51/c8051f040.h,
1528         * device/include/mcs51/c8051f060.h,
1529         * device/include/mcs51/c8051f120.h,
1530         * device/include/mcs51/c8051f300.h,
1531         * device/include/mcs51/c8051f310.h,
1532         * device/include/mcs51/c8051f320.h,
1533         * device/include/mcs51/c8051f330.h,
1534         * device/include/mcs51/c8051f350.h,
1535         * device/include/z180.h: Changed SDCC specific keywords to double
1536         underlined form.
1537
1538 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1539
1540         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1541         18F4455,
1542         * (pic16_assignConfigWordValue): disable testing of configuration
1543         register value with config mask,
1544         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1545         function with port->fun_prefix,
1546         * (genFunction): when generating a naked interrupt function never
1547         create an absolute segment placed in interrupt vector address, place
1548         the actual interrupt function at IVA instead, when an interrupt
1549         function is generated with unspecified interrupt then do not create
1550         the absolute section,
1551         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1552         code for generating a call to generic pointer get/put function with
1553         a call to function pic16_callGenericPointer(),
1554         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1555         the call to the generic pointer get/put functions with prefixing the
1556         function name with port->fun_prefix,
1557         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1558         * src/pic16/main.c (_process_pragma): prefix function with
1559         port->fun_prefix,
1560         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1561         calling assembler, old 18Fxxxx macro is deprecated,
1562         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1563         PC_ASMDIR in while condition,
1564         * (findInstruction): add PC_ASMDIR in while condition,
1565         * (buildCallTree): prefix main with port->fun_prefix,
1566         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1567         identifier for variable with banked access in instructions BTFSS,
1568         BTFSC, BCF, BSF, BTG
1569         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1570         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1571         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1572         perform optimization when enviroment variable NO_REG_OPT is set,
1573         * (insideLRBlock): NEW, return 1 if register is inside an
1574         INF_LOCALREGS block,
1575         * (RemoveRegFromLRBlock): remove a register that is completely
1576         eliminated by register optimization, but it is still left in local
1577         register store/restore in/from stack block,
1578         * (Remove2pcodes): after removing register, check to see if it
1579         should be removed from local register store/restore in/from stack
1580         block,
1581         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1582         DUMMY_READ_VOLATILE,
1583
1584         * device/include/pic16/adc.h: minor prototype modifications and
1585         update,
1586         * device/include/pic16/malloc.h: added GPL notice various
1587         modifications,
1588         * device/include/pic16/stdint.h: NEW, standard header for ints
1589         * device/include/pic16/delay.h: NEW, header for delay functions,
1590         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1591         delay1mtcy,
1592         * device/include/pic16/signal.h: NEW, header providing helper macros
1593         for implementing signal handlers,
1594         * device/include/pic16/stdio.h: added prototypes for functions,
1595         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1596         prototypes for stdin and stdout, added macro PUTCHAR to
1597         automatically implement putchar function prototype,
1598         * device/include/pic16/usart.h: modified and updated USART library,
1599         * device/lib/pic16/libio/adc/,
1600         * device/lib/pic16/libio/i2c: some modifications to improve library
1601         performance,
1602         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1603         family of functions,
1604         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1605         family of functions and other sources,
1606         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1607         of the PIC18Fxx[28] devices,
1608         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1609         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1610         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1611         _do_cinit function, because the previous failed when local variables
1612         where not placed in the same memory bank,
1613         * device/lib/pic16/libsdcc/char/: various modifications to improve
1614         library performance,
1615         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1616         information on the new functions of the c library and more...
1617
1618 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1619
1620         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1621
1622 2005-03-26 Raphael Neider <rneider AT web.de>
1623
1624         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1625           if condition == CARRY)
1626         * (genCmp): adapted to new genSkipc semantics
1627         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1628           on rIfx (genCmp was broken)
1629
1630 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1631
1632         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1633         * src/z80/main.c (_keywords[]),
1634         * src/SDCCglobal.h (struct options),
1635         * src/SDCC.y,
1636         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1637         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1638         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1639         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1640         always available in leading double underscore form. The C99 support is
1641         mostly missing, but it's a start.
1642         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1643         reserved identifier "__data".
1644
1645 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1646
1647         * src/mcs51/peeph.def: fixed bug 1170013
1648
1649 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1650
1651         * device/include/mcs51reg.h: fixed bug 842007
1652
1653 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1654
1655         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1656         last time.
1657
1658 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1659
1660         * src/port.h (struct PORT),
1661         * src/avr/ralloc.c (avr_assignRegisters),
1662         * src/avr/main.c,
1663         * src/ds390/ralloc.c (ds390_assignRegisters),
1664         * src/ds390/main.c,
1665         * src/hc08/ralloc.c (hc08_assignRegisters),
1666         * src/hc08/main.c,
1667         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1668         * src/mcs51/main.c,
1669         * src/pic/ralloc.c (pic14_assignRegisters),
1670         * src/pic/main.c,
1671         * src/pic16/ralloc.c (pic16_assignRegisters),
1672         * src/pic16/main.c,
1673         * src/xa51/ralloc.c (xa51_assignRegisters),
1674         * src/xa51/main.c,
1675         * src/z80/ralloc.c (z80_assignRegisters),
1676         * src/z80/ralloc.h,
1677         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1678         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1679         * src/SDCCcse.h,
1680         * src/SDCCdflow.c (computeDataFlow),
1681         * src/SDCCdflow.h,
1682         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1683         * src/SDCCloop.h,
1684         * src/SDCCcflow.c (*),
1685         * src/SDCCcflow.h,
1686         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1687         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1688         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1689         immedDom() returning wrong block; probably fixes bug #1160833)
1690
1691 2005-03-20 Borut Razem <borut.razem AT siol.net>
1692
1693         * support/scripts/inc2h.pl: WIN32 port
1694
1695 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1696
1697         * device/lib/makefile.in: added abs.c and labs.c
1698
1699 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1700
1701         * device/include/stdint.h: added
1702         * device/lib/abs.c: added
1703         * device/lib/labs.c: added
1704         * device/include/stdlib.h: added abs() and labs() prototypes
1705         * device/lib/libsdcc.lib: added abs and labs
1706         * device/include/float.h,
1707         * device/lib/_fsmul.c,
1708         * device/lib/printf_fast.c,
1709         * device/lib/printf_tiny.c: updated comments
1710
1711 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1712
1713         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1714         bug #1164313
1715
1716 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1717
1718         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1719         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1720
1721 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1722
1723         * device/lib/printf_large.c: removed inline assembly for portability and
1724           readability. Use printf_fast if speed or size are more important.
1725         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1726         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1727
1728 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1729
1730         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1731         prevent compiler warning
1732
1733 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1734
1735         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1736         moved to level 0 and declared as static. Also they are explicit
1737         placed in access bank. This was necessery because some times they
1738         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1739         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1740         optimizations. Currently only compare to unsigned char is implemented,
1741         * src/pic16/gen.c: added fReturnIdx array,
1742         * (struct resolvedIfx) is moved to gen.h and made public,
1743         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1744         * (aopForSym): added an optimization to directly store in stack of
1745         the operand of a SEND iCode,
1746         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1747         but as registers instead (AOP_REG) using the fReturnIdx array,
1748         * (pic16_freeAsmop): remove the freed register from the
1749         _G.sregsAlloc field,
1750         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1751         a compare of 'WREG',
1752         * (pic16_popGetTempRegCond): changed function prototype, now
1753         function takes also a bitVector argument v which holds the current
1754         set of registers that are allocated for stack access by aopForSym,
1755         registers allocated in aopForSym for accessing stack symbols are not
1756         any more part of the functions usedRegs field,
1757         * (genCall): some times aopOp is called for a stack variable to be
1758         send, aopForSym might perform the push, if this is true make sure
1759         that genCall doesn't push the variable twice by testing _G.resDirect,
1760         * (genFunction): changed testing for unspecified interrupt number
1761         from 256 to INTNO_UNSPEC,
1762         * modified selection scheme of frame pointer generation. Previously
1763         if function did use local registers a frame pointer was generated,
1764         now a frame pointer is generated only if function has arguments
1765         (that need PLUSW2 register access), or has stack arguments, or the
1766         compiler is not instructed to omit the frame pointer,
1767         * (genEndFunction): before restoring local registers that were saved
1768         in the function preamble, also restore the registers that *might*
1769         have been allocated for stack access,
1770         * (genRet): removed some old comments,
1771         * (genCmp, the active (RN's) version): added a call to the
1772         pic16_genCmp_special function to perform the compare with a more
1773         robust and optimized way,
1774         * (genInline): a feature has been added in inline code generation,
1775         which allows a wildcard variable substitution when writing inline
1776         assembly. Code is incomplete and experimental therefore undocumented,
1777         * (genCast): changed order of aopOp for result and right to allow
1778         aopForSym to directly load the result if possible,
1779         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1780         perform an optimized compare on some selected special occasions,
1781         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1782         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1783         generate an IVT any more,
1784         * src/pic16/main.c (pic16_optionsTable): added command line option
1785         --optimize-cmp,
1786         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1787         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1788         macros,
1789         * src/pic16/NOTES: Raphael Neider added in list of active developers
1790         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1791         jumptable_end to prevent bug #,
1792         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1793         inCond and outCond fields,
1794         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1795         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1796         turn off register spilling,
1797         * (packRegsForOneUse): synced with other ports' versions although it
1798         is not used currently,
1799         * (pic16_packRegisters): added an optimization while reading
1800         structure bitfields, some registers may be saved (malloc code is
1801         decreased by 80 bytes)
1802
1803 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1804
1805         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1806         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1807         this can be optimized more?
1808
1809 2005-03-10 Raphael Neider <rneider AT web.de>
1810
1811         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1812           genNearPointerGet): (hopefully) fixed access to bitfields via
1813           pointers (p->bitN = x; and x = p->bitN; failed)
1814
1815 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1816
1817         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1818
1819 2005-03-09 Raphael Neider <rneider AT web.de>
1820
1821         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1822
1823 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1824
1825         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1826         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1827           (regTypeNum): set REG_BIT type if necessary
1828         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1829         * support/regression/tests/critical.c: check bug 1144613
1830
1831 2005-03-02 Raphael Neider <rneider AT web.de>
1832
1833         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1834
1835 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1836
1837         * src/avr/ralloc.c (serialRegAssign),
1838         * src/ds390/ralloc.c (serialRegAssign),
1839         * src/hc08/ralloc.c (serialRegAssign),
1840         * src/mcs51/ralloc.c (serialRegAssign),
1841         * src/pic/ralloc.c (serialRegAssign),
1842         * src/pic16/ralloc.c (serialRegAssign),
1843         * src/xa51/ralloc.c (serialRegAssign),
1844         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1845
1846 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1847
1848         * src/SDCCast.c (decorateType): fixed bug 1124787
1849
1850 2005-02-20 Hubert Sack <sack AT digiplan.de>
1851         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1852
1853         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1854         patch #1121755
1855
1856 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1857
1858         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1859         to keep the correct label reference count when adding/removing references
1860         to labels. A peephole file using this is appended to patch #1144962.
1861
1862 2005-02-14 Raphael Neider <rneider AT web.de>
1863
1864         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1865         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1866         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1867           retrievals of result operand's value on assignment
1868
1869 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1870
1871         * device/include/pic16/string.h: modified prototype for memccpy()
1872         to memccpy(void *, void *, char, size_t)
1873         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1874         check whether to omit frame pointer or not,
1875         * (genInline): convert all occurences of "\n" to LF in inline
1876         assembler blocks, this helps formatting the inline text,
1877         * (pic16_loadFSR0): modified prototype,
1878         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1879         removed some 8051 legacy code,
1880         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1881         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1882         before allocating temporary registers in functions,
1883
1884 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1885
1886         * support/regression/tests/bitvars.c: corrected the "fix"
1887
1888 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1889
1890         * support/regression/tests/bitvars.c,
1891         * support/regression/tests/bitwise.c,
1892         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1893
1894 2005-02-10 Raphael Neider <rneider AT web.de>
1895
1896         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1897           different size for Alpha
1898         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1899
1900 2005-02-09 Raphael Neider <rneider AT web.de>
1901
1902         * src/SDCC.lex(doPragma) : save and restore warning options as well
1903           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1904         * have #pragma less_pedantic set the errorlevel to WARNING
1905           (fixes #1117001)
1906         * (cloneOptimize) : fixed wrong malloc's size
1907         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1908           facilitate correct handling of #pragma (save|restore)
1909
1910 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1911
1912         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1913
1914 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1915
1916         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1917
1918 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1919
1920         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1921
1922 2005-02-02 Raphael Neider <rneider AT web.de>
1923
1924         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1925         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1926         * (pic16_storeForReturn): fixed to allow returning function pointers
1927         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1928         * device/include/pic16/{stddef.h,stdbool.h}: added
1929
1930 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1931
1932         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1933
1934 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1935
1936         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1937         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1938          appeared to be required
1939
1940 2005-01-31 Borut Razem <borut.razem AT siol.net>
1941
1942         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1943           include/mcs51 and include/z80 directories to the package
1944
1945 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1946
1947         * src/hc08/gen.c (genFunction): fixed bug #1112752
1948
1949 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1950
1951         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1952
1953 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1954
1955         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1956
1957 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1958
1959         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1960
1961 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1962
1963         * device/include/c8051fxxx.h: removed these 6 files
1964         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1965
1966 2005-01-26 Raphael Neider <rneider AT web.de>
1967
1968         * src/pic16/gen.c (genAssign): fixed assignment from longs
1969           in codespace (were cut to three bytes)
1970         * (genDummyRead): implemented (except for CODESPACE...),
1971           fixed bug #1108575
1972         * src/pic16/glue.c (emitStatistics): beautified
1973         * device/lib/pic16/libm/Makefile: added include path
1974
1975 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1976
1977         * src/z80/gen.c (aopPut): fixed bug #1103902
1978
1979 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1980
1981         * device/lib/expf.c: fixed bug #1095792
1982
1983 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1984
1985         * device/lib/pic16/libm: added Math library sources
1986
1987 2005-01-24 Raphael Neider <rneider AT web.de>
1988
1989         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1990           to enable upcast to pCodeOpReg2 (there is no type tag to
1991           differenciate the two and pic16_popGet2p cast into PCOR2)
1992         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1993           (sizeof(sectNames) changed to sizeof(sectName))
1994           Both patches fix segfaults under MinGW.
1995
1996 2005-01-23 Raphael Neider <rneider AT web.de>
1997
1998         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1999           Safe_[mc]?alloc()'ed variables
2000         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2001           of (byte sized) temporaries (assign them to WREG for now)
2002         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2003           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2004           this might fix SIGSEGVs on MinGW...
2005         * src/SDCCopt.c (killDeadCode): restored original behaviour
2006           (volatile operands might get thrown away though)
2007
2008 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2009
2010         * src/pic16/gen.c: fixed bug #1106975,
2011         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2012         pointer update, INTCON is saved, global interrupts are disabled and
2013         restored after updateing TOS.
2014         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2015         * added function attribute 'shadowregs' to take advantage of shadow
2016         registers,
2017         * added function attribute 'wparam' as an alternative to the wparam
2018         pragma,
2019         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2020         user declares a non-ISR function as 'shadowregs',
2021         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2022
2023 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2024
2025         * .version: bumped version number to 2.4.8
2026         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2027         pic16 port,
2028         * device/lib/pic16/libio/i2c/: I2C module support library,
2029         * device/include/pic16/i2c.h: I2C support library header,
2030         * device/lib/pic16/libc/stdio/: standard IO support sources,
2031         * (printf_small.c): printf_small() source, supports float print,
2032         * (printf_tiny.c): printf_tiny() source, does not support floats,
2033         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2034         enable global optimizations for entire library source, other
2035         Makefiles in the source tree are also modified to reflect this,
2036         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2037         function,
2038         * doc/sdccman.lyx: updated to reflect new changes,
2039         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2040         sym->onStack if-case,
2041         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2042         sbit, idata, _idata, xdata, _xdata,
2043         * added pragma library, to link an external library, (see doc),
2044         * removed command line options, --pomit-config-words, --pomit-ivt,
2045         --pleave-reset-vector,
2046         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2047         when calling assembler to reflect memory model used, also define
2048         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2049         reflect stack model used,
2050         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2051         on stack return NULL,
2052
2053 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2054
2055         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2056           of the operands is volatile. Fixes #1020220
2057
2058 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2059
2060         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2061         * (OptimizeRegUsage): make sure that there is really no other flow where
2062           the first pCode is used
2063
2064 2005-01-22 Raphael Neider <rneider AT web.de>
2065
2066         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2067           to fix #1106967 (pCode->seq are not set up correctly)
2068
2069 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2070
2071         * src/SDCCglue.c (glue): make sure code area is declared before the
2072         static initialization area.
2073
2074 2005-01-21 Raphael Neider <rneider AT web.de>
2075
2076         * device/lib/Makefile.in: fixed test for pic16 install dir
2077         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2078           optimizations
2079         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2080           added --optimize-goto compiler switch and pragma wparam documentation
2081         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2082         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2083           and PRODH closing bug #1071770 (peephole optimizer)
2084
2085 2005-01-19 Raphael Neider <rneider AT web.de>
2086
2087         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2088           cmdLine buffers (used when calling sdcpp...) are large enough
2089           (MAX_PATH=256 truncates arguments leading to system halts when
2090           used in MinGW...)
2091         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2092         * (genUminus): rewritten to for efficiency
2093         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2094           used uninitialized in some cases)
2095         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2096           copy the third byte from the int -- now assumes 0x80 (data memory)
2097         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2098           operands (genAddLit expects the iCode's operands to swapped as
2099           well), fixed leftover bytes (crashed for short left operands)
2100         * (pic16_genMinusDec): performance improvements, removed false
2101           PIC14 emitSKPNCs
2102         * (pic16_genMinus): fixed to cope with differently sized operands
2103         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2104           for --obanksel > 1
2105         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2106         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2107           new banksel optimization
2108         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2109           analysis for temporary registers (segfaults...)
2110         * src/pic16/peeph.def: added rule
2111
2112 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2113
2114         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2115         which converts a float number to its ASCII representation
2116         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2117         functions to convert the fractional and integer part of a float to ASCII,
2118         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2119         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2120         ram
2121         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2122         _STATMEM macros,
2123         * device/include/pic16/adc.h: added GPL info,
2124         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2125         a pCodeOp as tested operand,
2126         * (genNearPointerGet): optimized bit testing, does not use
2127         intermediate register for bit value, test directly instead with
2128         BTFSS, BTFSC, works only for single bits,
2129         * (genpic16Code): dump the name of the iCode in the asm,
2130         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2131         renamed to pic16_decodeOp,
2132         * (serialRegAssign): do not allocate a temporary register for iCode
2133         sequences that test a single bit for 1/0
2134
2135 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2136
2137         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2138         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2139         access stack and frame pointers. They are initially assigned to
2140         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2141         accessing SFRs. Updated all occurences of modification of stack or
2142         frame pointer in gen.c and pcode.c,
2143         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2144         assigning of a literal value to pointers,
2145         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2146         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2147         selected
2148
2149 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2150
2151         * doc/sdccman.lyx: update documentation about stack pragma, added
2152         some info for stack memory models
2153
2154 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2155
2156         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2157
2158 2005-01-08 Raphael Neider <rneider AT web.de>
2159
2160         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2161           udata sections to fix bug #1097823
2162
2163 2005-01-05 Raphael Neider <rneider AT web.de>
2164
2165         * src/pic16/gen.c (genGenericShift): added handling of differently
2166           sized left operand and result
2167
2168 2005-01-04 Raphael Neider <rneider AT web.de>
2169
2170         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2171         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2172           to hold the condition bit)
2173         * added new version of genCmp (old code available via #define)
2174         * added new version of genShiftLeft/genShiftRight in a generic
2175           way, now supports shifting by negative values
2176         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2177           shiftCount (expected by genGenericShift)
2178         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2179         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2180           dump
2181         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2182           is an invalid literal too...)
2183
2184 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2185
2186         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2187         from Raphael Neider,
2188         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2189         for 8-bit literals. This fixes some literal operands which are sign
2190         extended to 16-bits ints when instruction needs only 8-bits.
2191
2192 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2193
2194         * device/lib/logf.c: added mcs51 assembly version
2195         * device/lib/expf.c: added mcs51 assembly version
2196         * device/lib/_logexpf.c: new shared asm code for expf and logf
2197         * device/include/math.h: add defines for assembly math library
2198         * device/lib/Makefile.in: build new _logexpf.c
2199         * device/lib/libfloat.lib: use new _logexpf.c
2200
2201 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2202
2203         * src/pic/device.c
2204         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2205           device types which have less than 0x7f registers.
2206
2207 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2208
2209         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2210
2211 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2212
2213         * device/lib/printf_fast.c: only build on supported arch.
2214         * device/lib/printf_tiny.c: only build on supported arch.
2215         * device/lib/printf_fast_f.c: only build if asm float lib
2216         * device/lib/_fsget1arg.c: only build if asm float lib
2217         * device/lib/_fsget2args.c: only build if asm float lib
2218         * device/lib/_fsnormalize.c: only build if asm float lib
2219         * device/lib/_fsreturnval.c: only build if asm float lib
2220         * device/lib/_fsrshift.c: only build if asm float lib
2221         * device/lib/_fsswapargs.c: only build if asm float lib
2222         * device/include/stdio.h: don't provide print_fast,
2223           print_fast_f, print_tiny prototypes if --xstack used
2224
2225 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2226
2227         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2228         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2229           to the SOURCES
2230
2231 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2232
2233         * device/lib/printf_fast_f.c: same as printf_fast, but
2234           with floating point enabled
2235         * device/lib/printf_fast.c: minor tweaks
2236         * device/include/stdio.h: add printf_fast_f
2237
2238 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2239
2240         * src/SDCCmain.c: make --float-reent default for mcs51
2241         * device/lib/_fsadd.c: added mcs51 assembly version
2242         * device/lib/_fssub.c: added mcs51 assembly version
2243         * device/lib/_fsmul.c: added mcs51 assembly version
2244         * device/lib/_fsdiv.c: added mcs51 assembly version
2245         * device/lib/_fseq.c: added mcs51 assembly version
2246         * device/lib/_fsneq.c: added mcs51 assembly version
2247         * device/lib/_fsgt.c: added mcs51 assembly version
2248         * device/lib/_fslt.c: added mcs51 assembly version
2249         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2250         * device/lib/Makefile.in: add _fscmp to build
2251         * device/lib/libfloat.lib: add _fscmp to build
2252
2253 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2254
2255         * device/lib/_fs2slong.c: added mcs51 assembly version
2256         * device/lib/_fs2sint.c: added mcs51 assembly version
2257         * device/lib/_fs2schar.c: added mcs51 assembly version
2258         * device/lib/_fs2ulong.c: added mcs51 assembly version
2259         * device/lib/_fs2uint.c: added mcs51 assembly version
2260         * device/lib/_fs2uchar.c: added mcs51 assembly version
2261         * device/lib/_slong2fs.c: added mcs51 assembly version
2262         * device/lib/_sint2fs.c: added mcs51 assembly version
2263         * device/lib/_schar2fs.c: added mcs51 assembly version
2264         * device/lib/_ulong2fs.c: added mcs51 assembly version
2265         * device/lib/_uint2fs.c: added mcs51 assembly version
2266         * device/lib/_uchar2fs.c: added mcs51 assembly version
2267         * device/include/float.h: added #define to select asm vs c
2268
2269 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2270
2271         * device/lib/printf_fast.c: improvements to float output
2272         * device/include/float.h: add defines for assembly float library
2273         * device/lib/_fsget1arg.c: receive 1 float arg
2274         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2275         * device/lib/_fsnormalize.c: normalize a float
2276         * device/lib/_fsreturnval.c: return float, various helper routines
2277         * device/lib/_fsrshift.c: right shift a float's mantissa
2278         * device/lib/_fsswapargs.c: swap 2 floats
2279         * device/lib/Makefile.in: build these 6 new files for mcs51
2280         * device/lib/libfloat.lib: add these 6 files to the library
2281
2282 2004-12-26 Borut Razem <borut.razem AT siol.net>
2283
2284         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2285           built by gcc 3.4.2
2286
2287 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2288
2289         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2290           and fully reentrant and register bank neutral.
2291         * device/lib/printf_fast.c: added float (not enabled by default),
2292           added compact/slower integer (also not enabled by default),
2293           improved size/speed of fast integer code, other minor changes
2294         * device/include/stdio.h, device/lib/Makefile.in,
2295           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2296
2297 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2298
2299         * src/pic16/pcode.c: declaring variables other than at the start of a
2300           block is not supported in C by VC6.
2301
2302 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2303
2304         * applied a previous patch from Raphael Neider that wasn't included
2305         in the previous commits, which fixes infinite loops within jumptable
2306         improvements,
2307         * made some fixes that previous patches introduced
2308
2309 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2310
2311         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2312         that fixes an issue with AOP_PCODE asmop's offset,
2313         * (pic16_popCopyReg): update instance field too,
2314         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2315         function of pic port,
2316         * (genCmp, genAnd, genAssign),
2317         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2318
2319 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2320
2321         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2322         variables initial values to idata section,
2323         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2324         variables in some functions. This utilizes parmBytes field of iCode
2325         structure to hold the offset of the variable in stack. (might be
2326         able to use the stack field too?)
2327         * applied patch from Raphael Neider # ### , # ###
2328         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2329         variable initial values in idata section,
2330         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2331         for static variables with initial value
2332         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2333         applied fix in while loop from Raphael Neider.
2334
2335 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2338         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2339         * src/ds390/ralloc.c (serialRegAssign): spill bits
2340         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2341         * support/Util/SDCCerr.c,
2342         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2343         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2344         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2345
2346 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2347
2348         * device/include/sdcc-lib.h: inserted LGPL, added includes
2349           asm/ds390/features.h and asm/mcs51/features.h
2350         * device/include/asm/default/features.h,
2351         * device/include/asm/gbz80/features.h,
2352         * device/include/asm/z80/features.h: added empty _AUTOMEM
2353           and _STATMEM
2354         * device/include/asm/ds390/features.h,
2355         * device/include/asm/mcs51/features.h: added files with defines for
2356           _AUTOMEM and _STATMEM indicating automatic and static storage class
2357         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2358         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2359         * src/SDCCicode.c (geniCodeCast),
2360         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2361         * src/SDCCloop.c (loopInduction): removed unused variable lr
2362         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2363           to convertToFcall to include char modulo (RFE 1065037), added check
2364           if left operand is unsigned and use abs of literal value
2365         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2366           as it doesn't work after conversion from peephole.def to peephole.rul
2367         * src/mcs51/gen.c (toBoolean): added check for size,
2368           (genModOneByte): optimized code for signed char modulo a literal
2369           power of 2 (thanks to Hubert Sack),
2370           (genRRC): removed unnecessary "clr c",
2371           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2372         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2373           jump optimization,
2374           swapped rules 256.c and 256.d,
2375           extended 256.d by using new multiple checks (thanks Erik),
2376           added rules 256.e and 256.f,
2377           updated rule 261.a and 261.b to new generated code
2378         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2379
2380 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2381
2382         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2383           induction related bugs, including first part of bug #1074377
2384
2385 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2386
2387         * applied patch from bug-report #1076292,
2388         * applied patches for genAnd and Goto-optimizations for Raphael
2389         Neider,
2390         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2391         dump a less iCode information,
2392         * src/pic16/device.h (pic16_options_t): added field debgen,
2393         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2394         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2395         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2396         puclic,
2397         * (various functions): added macros FENTRY and FENTRY2 to functions,
2398         to emit function prologue,
2399         * (various functions): fixed indentation,
2400         * (genNearPointerGet): fixed loading of FSR0,
2401         * (genPackBits): applied patch from Raphael Neider to fix updating
2402         of FSR0 and touching only the modified bits,
2403         * src/pic16/genarith.c (various functions): added macros FENTRY to
2404         emit function prologue in comments,
2405         * src/pic16/pcode.h: added functions debugf2, debugf3,
2406         * src/pic16/ralloc.c: partial fix for packForPush caused
2407         segmentation fault,
2408
2409 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2410
2411         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2412           <stsp AT users.sourceforge.net> with reversed byte order
2413         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2414
2415 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2416
2417         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2418           bug #1074377
2419         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2420         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2421
2422 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2423
2424         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2425
2426 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2427
2428         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2429           conditions,
2430           (setFromConditionArgs): friendly operand parser for peephole rules,
2431           (operandBaseName, operandsNotRelated): new peephole condition
2432           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2433           architecture specific register naming into account, handles n-way
2434           comparisons, and supports quoted literals
2435         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2436
2437 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2438
2439         * src/mcs51/peeph.def: fixed bug #1076940
2440
2441 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2442
2443         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2444
2445 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2446
2447         Adding support for replacing ljmps with sjmps in jumptables
2448         generated for switch statements. For now you need to set the
2449         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2450         Now 4 algorithms for mcs51 jumptable generation are used:
2451         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2452         addresses loaded pc-relative for up to 112 cases and stack-pushing
2453         target addresses loaded with offset from dptr for up to 256 cases.
2454
2455         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2456         * src/mcs51/main.c: adapted constants for switch table generation
2457         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2458
2459 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2460
2461         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2462         * support/regression/tests/bug1057979.c: added test for bug 1073386
2463
2464 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2465
2466         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2467         compilers
2468
2469 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2470
2471         * src/pic16/device.h,
2472         * src/pic16/genarith.c,
2473         * src/pic16/glue.c,
2474         * src/pic16/main.c,
2475         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2476
2477 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2478
2479         Large cummulative patch for pic16 port.
2480         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2481         to call when a stack overflow occurs,
2482         * (malloc.h): added CVS Id tag,
2483         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2484         variable,
2485         * added libc directory. The current version of LibC contains string
2486         functions, ctype functions and macros and some functions of the
2487         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2488         be extensively tested in the future. Standard disclaimer here.
2489         Library is not automatically build yet. But one can build it by
2490         invoking 'make' inside the libc directory.
2491         * added ADC library under libio. Preliminary version yet.
2492
2493         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2494         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2495         aopForRemat() now and not by pic16_aopOp(),
2496         * (pic16_popGetTempReg): removed warning messgae when allocating
2497         temporary registers, its a buggy feature and will be removed,
2498         * (pic16_popGet): set register instance field in AOP_CRY,
2499         * (pic16_outBitC): fixed for results in size greater than 1,
2500         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2501         * (pic16_storeForReturn): optimized return of 0,
2502         * (genCmp): experimental code for new genCmp which uses PIC18's
2503         special compare&skip instructions. Initial tests fail some times
2504         with variables grater than 1 byte in size, so new code is disabled,
2505         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2506         a single bit,
2507         * (genCast): began a fix to optimize the casting of a bit to another
2508         bit, now assigning a bitfield to another bitfield will fail, sorry,
2509         * src/pic16/main.c: disabled the use of lr-support feature,
2510         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2511         * added some function prototypes, added function _debugf prototype,
2512         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2513         bits with offset (case PO_GPR_BIT),
2514         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2515         command line,
2516         * (isBankInstruction): modified to return 0 for no banking instruction,
2517         and 1 for banking instruction,
2518         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2519         caused stop processing pCodes after a inline assembly block,
2520         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2521         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2522         registers when it shouldn't,
2523         * src/pic16/ralloc.c (allocReg): add preliminary support for
2524         supporting a limited set of temporary registers,
2525
2526 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2527
2528         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2529           genDataPointerSet): ensure assignments always copy in MSB to LSB
2530           order,
2531           (loadRegFromAop): recognize CLRH optimization,
2532           (genFunction): optimize RECEIVE iCodes in reentrant functions
2533
2534 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2535
2536         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2537           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2538           selected.
2539         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2540         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2541           contiguous with data
2542
2543 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2544
2545         * device/lib/_gptrget.c (_gptrget),
2546         * device/lib/_gptrgetc.c (_gptrgetc),
2547         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2548           instead of sjmp to ret
2549         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2550           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2551
2552 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2553
2554         * .version: bumped version to 2.4.7
2555         * device/lib/_gptrget.c (_gptrget): is now _naked
2556         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2557         * device/lib/_gptrput.c (_gptrput): is now _naked
2558         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2559           (createFunction): fixed xstack
2560         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2561         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2562           or bit either,
2563           (geniCodeCritical): store original interrupt state in an iTemp bit
2564           var unless stack-auto
2565         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2566         * src/SDCCmain.c (setIncludePath): added include/target to search path
2567         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2568         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2569           prototype,
2570           (processFuncArgs): put bit vars in bit area
2571         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2572           unsaveRBank): fixed xstack,
2573           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2574           (genFunction, genEndFunction): fixed xstack,
2575           (genAssign): optimization don't walk backwards through mem
2576         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2577         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2578         * support/regression/Makefile: also make library (for stack-auto) when
2579           making "all" and added "test-mcs51-xstack-auto"
2580         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2581         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2582         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2583         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2584         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2585           make-library by MAKE_LIBRARY
2586         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2587           regression tests for xstack
2588         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2589         * support/regression/tests/critical.c: test for critical on mcs51
2590
2591 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2592
2593         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2594           built version of sdcc instead of installed version
2595
2596 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2597
2598         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2599         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2600           vprintf.c now
2601         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2602         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2603           WARNING: remove device/lib/build/z80/printf.o by hand when
2604           updating from previous build!
2605         * device/lib/z80/printf.c: updated comment
2606         * support/regression/tests/bug1057979.c: test all ports now
2607         * support/regression/tests/bug1065458.c: file added
2608
2609 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2610
2611         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2612           *_start and *_end symbols for static functions
2613
2614 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2615
2616         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2617           and search crt0.o in all library paths,
2618           (setIncludePath): proper handling of --nostdinc,
2619           (setLibPath): proper handling of --nostdlib
2620         * support/regression/Makefile,
2621         * support/regression/ports/ds390/spec.mk,
2622         * support/regression/ports/gbz80/spec.mk,
2623         * support/regression/ports/hc08/spec.mk,
2624         * support/regression/ports/mcs51/spec.mk,
2625         * support/regression/ports/mcs51-large/spec.mk,
2626         * support/regression/ports/mcs51-stack-auto/spec.mk,
2627         * support/regression/ports/z80/spec.mk: use include and lib files from
2628           built version of sdcc instead of installed version
2629         * doc/sdccman.lyx: fixed typo in --nostdinc
2630
2631 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2632
2633         * src/pic/pcode.c,
2634         * src/pic/device.c,
2635         * src/pic/ralloc.c,
2636         * src/pic/gen.c : added support to generate code for struct bit fields.
2637
2638 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2639
2640         * as/xa51/xa_version.h,
2641         * device/include/errno.h,
2642         * device/include/regc515c.h,
2643         * device/lib/_itoa.c,
2644         * device/lib/_ltoa.c,
2645         * device/lib/ser_ir_cts_rts.c,
2646         * sim/ucsim/xa.src/glob.cc,
2647         * sim/ucsim/xa.src/inst_gen.cc,
2648         * sim/ucsim/xa.src/xa_bit.cc,
2649         * sim/ucsim/xa.src/xa_sfr.cc,
2650         * sim/ucsim/z80.src/inst_dd.cc,
2651         * sim/ucsim/z80.src/inst_fdcb.cc,
2652         * support/scripts/keil2sdcc.pl,
2653         * src/pic16/pic16.dsp,
2654         * src/pic16/pic16a.dsp: corrected cvs line endings
2655         * device/lib/printf_large.c: fixed bug 1057979
2656         * src/pic16/gen.c: fixed non-C standard code
2657         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2658         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2659         * support/regression/ports/mcs51/support.c: reload T1 asap
2660         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2661           pdata use and clear idata startup behaviour
2662         * support/regression/tests/bug1057979.c: added
2663
2664 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2665
2666         * device/examples/ds390/ow390/ad26.h,
2667         * device/examples/ds390/ow390/cnt1d.h,
2668         * device/examples/ds390/ow390/crcutil.c,
2669         * device/examples/ds390/ow390/ownet.h,
2670         * device/examples/ds390/ow390/owsesu.c,
2671         * device/examples/ds390/ow390/swt12.h,
2672         * device/examples/ds390/ow390/swtoper.c,
2673         * device/examples/ds390/ow390/temp10.h,
2674         * device/examples/ds390/ow390/thermodl.c,
2675         * device/examples/ds390/tinitalk/tinitalk.dsp,
2676         * device/examples/ds390/tinitalk/tinitalk.dsw,
2677         * device/examples/mcs51/clock/hw.h,
2678         * device/examples/mcs51/simple2/go.bat,
2679         * device/examples/serialcomm/windows/serial.h,
2680         * device/examples/xa51/dummy.c,
2681         * device/examples/xa51/hello.c,
2682         * device/include/80c51xa.h,
2683         * device/include/at89x051.h: corrected cvs line endings
2684
2685 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2686
2687         * src/pic16/main.c (options): added command line --gstack, to trace
2688         stack over/under flows,
2689         * added pragma 'wparam' to allow passing first byte of function
2690         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2691         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2692         call to __gstack_test function and sets up the symbol as extern,
2693         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2694         * popaop): added call to pic16_testStackOverflow,
2695         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2696         wparamList list,
2697         * (genCall, genPcall): now all parameters are passed via stack
2698         except in functions that are pass to wparam pragma in which WREG is
2699         used too,
2700         * (genPcall): REENTRANT flag is checked to see if variable prototype
2701         contains reentrant keyword, don't call a non-reentrant function, via
2702         a reentrant function pointer or vice versa, functions are never
2703         passed via WREG,
2704         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2705         D.Winkler,
2706         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2707         SIGSEGV when accessing a NULL register stucture,
2708         * (pic16_printGPointerType): modified to handle UPPER modifier for
2709         function initializers, changed prototype of function to simpler one,
2710         * (pic16_printIvalFuncPtr): check to see if function is already
2711         added in externs list,
2712         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2713         optimized a move from W to SFR with a move to the same register
2714         later after a CALL,
2715         * device/lib/pic16/debug: NEW directory, contains debug features
2716         which are enabled when linking with libdebug.lib, currently command
2717         line option --gstack enables stack pointer tracing for over/under
2718         flow, corresponding sources are in debug/gstack
2719
2720 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2721
2722         * doc/sdccman.lyx: updated SDCC version,
2723         * (PIC16 port): update list of command line options,
2724         * src/pic16/device.h (structure pic16_options_t): added field gstack
2725         to enable stack overflow tracing on push/pops,
2726         * src/pic16/device.c (statistics structure): added statistics
2727         structure,
2728         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2729         pic16_dump_int_registers): increase statistics counters for each
2730         * variable which is encountered
2731         * (pic16_dump_usection): emit each .udata variable to its own udata
2732         section,
2733         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2734         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2735         parameters via stack, otherwise use old scheme,
2736         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2737         assembler output file,
2738         * src/pic16/main.c: added command line options --gstack to enable
2739         push/pop tracing for stack overflow,
2740         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2741         instructions): added size of each instruction,
2742         * (pic16_countInstruction): estimate size of instructions in
2743         the_pFile list, inline assembly blocks are not counted,
2744         * (pic16_FixRegisterBanking): trace previous register usage, when
2745         banksel optimizations is greater than 0, don't emit a redudant
2746         banksel directive,
2747
2748 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2749
2750         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2751         * src/pic16/ralloc.c : applied same fix for pic16.
2752         * src/pic/gen.c : tidied it up a little.
2753
2754 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2755
2756         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2757         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2758
2759 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2760
2761         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2762
2763 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2764
2765         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2766         non-reentrant function __modsint in the interrupt function (thus
2767         corrupting math operations during serial I/O)
2768         * device/lib/ser_ir.c: as above, changed buffersize
2769         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2770         256.c,d for zeroing
2771         * doc/Makefile: added option -t for rsync
2772
2773 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2774
2775         * src/SDCCast.h (struct ast),
2776         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2777
2778 2004-10-20 Borut Razem <borut.razem AT siol.net>
2779
2780         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2781         package
2782
2783 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2784
2785         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2786         makefile targets,
2787         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2788         support functions to replace long sequences of MOVFF's from access
2789         bank registers to stack and vice versa,
2790         * src/pic16/device.h: added new field opt_flags, where optimization
2791         flags can be set to enable certain features,
2792         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2793         * pBlock, (genFunction, genEndFunction): surroung loop for
2794         saving/loading used registers in stack with PC_INFO pCodes,
2795         INF_LREGS. Code in between can then be optimized by pCode optimizer
2796         to support function calls,
2797         * (genDataPointerSet): fixed bug which loaded float fields in
2798         structures with corrupt data,
2799         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2800         in a standard way debug info on stderr. Feature used for developing
2801         and debugging only,
2802         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2803         obsolete chunks of code,
2804         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2805         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2806         * pic16/src/pcode.c (pic16_newpCodeInfo,
2807         * (pic16_newpCodeOpLocalRegs),
2808         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2809         feature,
2810         * (pic16_pCodeConstString): printing of the initial value of a
2811         symbol as a comment is inhibited since parsing was already done by
2812         copyStr and output is corrupt,
2813         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2814
2815 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2816
2817         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2818
2819 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2820
2821         * as/mcs51/lkarea.c: removed old K&R style,
2822           (lnksect): changed check on boundary error,
2823           (lnksect2): changed check on boundary error,
2824           (lnksect2): extend XSTK to end of page if size = 1
2825         * as/mcs51/lkmain.c: removed old K&R style,
2826           (Areas51): create l_IRAM symbol
2827         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2828         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2829           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2830         * device/lib/_mullong.c: added version to be compiled with xstack
2831         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2832         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2833         * device/lib/mcs51/crtxstack.asm: fixed comment
2834         * src/SDCCglue.c: maxInterrupts defaults to 0,
2835           (emitMaps): added pdata,
2836           (createInterruptVect): (re)moved default,
2837           (glue): added pdata,
2838           (glue): moved __start__xstack to XSTK with default size 1
2839         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2840           and options.float_rent when options.stackAuto is set,
2841           (linkEdit): only write XDATA_NAME if provided on command line
2842         * src/SDCCmem.h,
2843         * src/SDCCmem.c: added pdata
2844         * src/port.h: added pdata_name to PORT
2845         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2846           (saveRegisters, unsaveRegisters): removed usage of B,
2847           (genMinus): fixed accumulator clash,
2848           (genJumpTab): added comment, this needs another look
2849         * src/mcs51/gen.c: added check for "B in use" paranoia,
2850           added pushB() and popB()
2851         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2852           chance
2853         * src/avr/main.c,
2854         * src/ds390/main.c,
2855         * src/hc08/main.c,
2856         * src/mcs51/main.c,
2857         * src/pic/main.c,
2858         * src/pic16/main.c,
2859         * src/xa51/main.c,
2860         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2861           added PSEG (PAG,XDATA) or NULL to port specifier
2862         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2863         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2864           (_mcs51_genInitStartup): removed __start__xstack equ,
2865           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2866         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2867         * src/z80/gen.c (_rleAppend): fixed warnings
2868         * support/regression/tests/zeropad.c: added pdata test
2869         * .version: bumped to 2.4.6
2870
2871 2004-10-17 Borut Razem <borut.razem AT siol.net>
2872
2873         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2874         as a part of nightly build
2875
2876 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2877
2878         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2879         WREG holds the first byte function parameters,
2880         * (aopForSym): take special case for symbols which are in FARSPACE
2881         but in CODESPACE too,
2882         * (assignResultValue): modified to take into account _G.useWreg,
2883         * (genCall): don't use wreg for parameter passing when function is
2884         declared as reentrant, too, added optimization INCF to stack
2885         pointer when stack parameter count is 1,
2886         * (genFunction, genEndFunction): refurnished and fixed to not using
2887         wreg for passing parameters when function has varargs or is
2888         reentrant, fixed bug with symbol name compare for generating
2889         functions in absolute address,
2890         * (pic16_storeForReturn): refurnished,
2891         * (genCmp): began writing a new version of the function, not ready
2892         yet, therefore it is disabled,
2893         * (genAssign): do not read code memory when assigning a function to
2894         a pointer function,
2895         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2896         array of characters, not pointer,
2897         * (pic16initialComments): in debug mode emit an .ident directive for
2898         the assembler,
2899         * (_process_pragma): emit a new warning type (internal to pic16)
2900         when setting stack to default length, emit a similar warning when
2901         placing a function at absolute address and address is not word aligned
2902         * (_pic16_parseOptions): added 'return TRUE' statement,
2903         * (_pic16_linkEdit): if compiling a source, then add the source's
2904         file object, first in the list of objects to link,
2905
2906 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2907
2908         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2909         * src/pic/main.c : removed VC warning.
2910         * src/pic/gen.c : changed comment.
2911
2912 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2913
2914         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2915         reference to a deprecated symbol _GPTRREG was causing failure to
2916         link. Thanks G. M. Gallant for the info.
2917
2918 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2919
2920         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2921         comments for Bugs item #954788.
2922
2923 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2924
2925         * src/pic16/device.c (pic16_dump_gsection,
2926         * pic16_groupRegistersInSection): handle symbols declared to be in
2927         access bank differently,
2928         * src/pic16/gen.c (struct _G): added field resDirect,
2929         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2930         send values read from stack directly to result and don't allocate
2931         temporary values,
2932         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2933         same registers,
2934         * (pic16_sameRegsOfs): NEW,
2935         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2936         free because they were not allocated from temporary pool,
2937         * pic16_popRegFromString): workaround to fix a problem with
2938         allocating variables twice or never,
2939         * (genGenPointerGet): using PRODL instead of FSR0H,
2940         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2941         instead of FSR0H,
2942         * (genAssign): take advantage of the _G.resDirect flag,
2943         * (genCast): around line 11844, use mov2f instead of directly
2944         MOVFF'ing between operands to account for literal values,
2945         * src/pic16/genutils.c: some new debug functions for gpsim have been
2946         added,
2947         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2948         float with integer part only,
2949         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2950         place variables in access bank
2951         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2952         updated sources to reflect recent changes in gen.c
2953
2954 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2955
2956         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2957         sources that searched for headers in installation path, now the
2958         device/include/pic16 is used,
2959         * src/pic16/glue.c (pic16glue),
2960         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2961         .line directives if not in debug mode, this suppresses assembler's
2962         warnings for ignored directives
2963
2964 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2965
2966         * src/port.h: made reset_regparms prototype void parameter explicit.
2967         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2968         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2969         * doc/sdccman.lyx: documented warning disabling and how to use
2970           printf_large to make it print floats.
2971         * device/include/stdbool.h: NEW
2972         * device/lib/_atof.c,
2973         * device/lib/_divuint.c,
2974         * device/lib/_divulong.c,
2975         * device/lib/expf.c,
2976         * device/lib/printf_large.c,
2977         * device/lib/sincosf.c,
2978         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2979         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2980           a completely reentrant lib.
2981
2982 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2983
2984         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2985         * device/include/pic16/stdio.h: fixed bug with colon
2986
2987 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2988
2989         * device/include/pic16/stdio.h,
2990         * device/include/pic16/stdlib.h,
2991         * device/include/pic16/math.h: NEW
2992         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2993         declared as _naked to reduce overhead
2994         * device/lib/Makefile.in (target port-specific-objects-pic16):
2995         changed * to *.* so to ignore the CVS directory,
2996         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2997         stacked variables back in stack,
2998         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2999         corruption
3000
3001 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3002
3003         * .version: bumped version number to 2.4.5
3004         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3005         * support/Util/SDCCerr.c (messages structure): added entry for
3006         W_POSSBUG2
3007
3008         Large cumulative patch for pic16 port and libraries.
3009         * device/include/pic16/sdcc-lib.h,
3010         * device/include/pic16/stdarg.h,
3011         * device/include/asm/pic16/features.h,
3012         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3013         * device/include/pic16/float.h: changes reentrant keyword with
3014         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3015         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3016         updated target build-libraries to include objects from gptr,
3017         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3018         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3019         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3020         all function headings,
3021         * src/SDCCmain.c: added global parameter userIncDirsSet,
3022         * (parseCmdLine): when option -I is encountered add directory to
3023         userIncDirsSet too,
3024         * src/version.awk: added space between control and long,
3025         * src/pic16/NOTES: added some notes for the port,
3026         * src/pic16/gen.c: added prototype for mov2fp function,
3027         * (fReturnpic16[]): properly named return value registers,
3028         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3029         * (aopForSym): added code to handle symbols with onStack flag set,
3030         symbols onStack are allocated PTRSIZE bytes,
3031         * (aopFreeAsmop): handles special case where asmops are stack objects,
3032         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3033         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3034         added argument lock to trace flaws in allocating temporary registers
3035         when developing port,
3036         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3037         * (pic16_popRegFromString): reenabled allocating a direct register
3038         from string,
3039         * (assignResultValue): various beautifications,
3040         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3041         referenced function argument,
3042         * (genIpush): reenabled to allow stacked arguments, handles only
3043         ic->parmPush iCodes,
3044         * (genCall, genPcall): major changes to allow for variable argument
3045         functions, fixed a bug with falsely restoring stack pointer after
3046         returning from call,
3047         * (genFunction): pending code for critical function,
3048         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3049         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3050         * (genNearPointerGet): fixed bug with indirect reading, was always
3051         reading from INDF0
3052         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3053         pointers,
3054         * (genAddrOf): rewrote code to take address of a stacked function parameter
3055         * (genCast): fixed casting to generic pointer type,
3056         * src/pic16/gen.h: added AOP_STA,
3057         * (struct asmop): added field stk,
3058         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3059         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3060         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3061         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3062         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3063         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3064         generic pointers,
3065         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3066         and library paths,
3067         * (pic16_port structure): generic pointer size is set to 3,
3068         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3069         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3070         compiler warning,
3071         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3072         operand is an iTemp,
3073
3074 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3075
3076         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3077         * debugger/mcs51/simi.c: addapt new syntax of s51
3078
3079 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3080
3081         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3082         * src/pic16/pcode.c: commented out some calls to free() in order to
3083         fix bug #989576,
3084
3085 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3086
3087         * src/SDCCicode.h,
3088         * src/SDCCicode.c (isiCodeInFunctionCall),
3089         * src/avr/ralloc.c (selectSpil),
3090         * src/pic/ralloc.c (selectSpil),
3091         * src/pic16/ralloc.c (selectSpil),
3092         * src/ds390/ralloc.c (selectSpil),
3093         * src/hc08/ralloc.c (selectSpil),
3094         * src/xa51/ralloc.c (selectSpil),
3095         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3096         stack in the middle of a function call sequence (fixes bug #1020268)
3097         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3098         costs associated with the minimum switch case.
3099
3100 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3101
3102         * src/SDCC.lex: fixed bug #1030549
3103
3104 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3105
3106         * src/SDCCcse.h (struct cseDef),
3107         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3108         over a function call if the CSE is derived from a symbol whose
3109         address has been taken (fixes bug #1029883)
3110         * support/regression/tests/bug-1029883: a new regression test for
3111         this bug
3112
3113 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3114
3115         * src/hc08/gen.c (emitinline): fixed bug #1029778
3116         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3117         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3118         and starts toward RFE #905167)
3119
3120 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3121
3122         * src/pic16/gen.c (mov2f): New function to move an operand to
3123         another without considering if it is a literal or a register,
3124         * (pic16_sameRegs): don't check if they are both AOP_REG,
3125         * (AccRsh): removed andmask=0 lines,
3126         * (genLeftShift): duplicated to be improved in future versions,
3127         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3128         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3129         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3130         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3131         * (insertBankSwitch): fixed inserting banksel directives algorithm
3132         for instructions that follow a skip instruction, this fixes a report
3133         for broken subtraction code generation,
3134         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3135         iCode is a left op, just in case result and right share the same
3136         registers
3137
3138 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3139
3140         * src/hc08/main.c,
3141         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3142         preservation of HX
3143         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3144         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3145         on 2004-09-12; it was buggy
3146
3147 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3148
3149         * src/SDCCsymt.h: removed RESULT_CHECK
3150         * src/SDCCast.c,
3151         * src/SDCCglue.c,
3152         * src/SDCCval.c,
3153         * src/pic/glue.c,
3154         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3155
3156 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3157
3158         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3159         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3160         configuration values no more rejected by compiler, they are assigned
3161         to configuration registers with a warning message instead,
3162         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3163         the for-loop so last conf register is emitted too,
3164         * (_pic16_initPaths): link library libsdcc.lib by default,
3165         * (_hasNativeMulFor): modified test for multiplication according to
3166         Raphael Neider's remarks. Integer multiplication is also done with
3167         support functions,
3168         * device/include/pic16/pic18fregs.h: corrected type error in while
3169         testing and including 18f6720 header file
3170
3171 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3172
3173         * src/pic16/device.h (pic16_options): removed field use_crt,
3174         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3175         until an optimization to handle single bits is added,
3176         * (pic16_loadFSR0): moved before genUnpackBits,
3177         * (genAnd): some white lines removed,
3178         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3179         leave_reset flags in pic16_options when using crt modules,
3180
3181 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3182
3183         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3184           for bugs 898889 & 979599. Also used some safer print instructions.
3185
3186 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3187
3188         * src/pic16/device.h (pic16_options_t): added field use_crt,
3189         crt_name, no_crt,
3190         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3191         catch a probable future bug,
3192         * src/pic16/gen.c: aopIdx function commented out,
3193         * (genAssign): commented out old code which used aopIdx,
3194         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3195         code, added if conditionals to take into account the --use-crt
3196         command line options,
3197         * src/pic16/main.c (pic16_optionsTable): added new command line
3198         options, --use-crt= and --no-crt,
3199         * (_pic16_linkEdit): now the proper crt object is added in the
3200         linker command line except than when --no-crt is specified,
3201         * src/pic16/pcode.c,
3202         * src/pic16/pcode.h: added some structures and functions for a new
3203         optimization scheme to compansate for instruction overhead between
3204         same iCodes, this scheme is currently under development and is not
3205         working in any way,
3206         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3207         to && operator,
3208         * device/lib/pic16/startup/crt0i.c,
3209         * device/lib/pic16/startup/crt0iz.c: added global char variable
3210         __uflags to force the generation of an idata section
3211
3212 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3213
3214         * doc/Makefile,
3215         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3216         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3217
3218 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3219
3220         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3221         Frieder) and clarified the default code optimization mode
3222
3223 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3224
3225         * src/SDCC.lex (doPragma, process_pragma),
3226         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3227         "opt_code_size", and "opt_code_balanced"
3228         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3229         regrouped options by category, added support for category headers
3230         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3231         and "--opt-code-size"
3232         * doc/sdccman.lyx: documented these new options and pragmas
3233         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3234         preference into account
3235
3236 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3237
3238         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3239           geniCodePreDec): Fixed bug 904237 by generating a warning
3240         * src/SDCCerr.h,
3241         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3242
3243 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3244
3245         * src/pic/device.c : When no max ram set validate full memory range.
3246         * src/pic/pcode.c,
3247         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3248
3249 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3250
3251         * device/lib/_gptrget.c,
3252         * device/lib/_gptrput.c: updated comment
3253         * device/lib/calloc.c,
3254         * device/lib/free.c,
3255         * device/lib/malloc.c,
3256         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3257         * src/SDCCcse.c (cseBBlock),
3258         * src/SDCCicode.c (printOperand, geniCodeArray),
3259         * src/SDCCicode.h (struct operand): fixed bug 868103
3260         * support/regression/tests/bug-868103.c: added
3261         * src/SDCCast.c (searchLitOp),
3262         * src/SDCCcse.h (struct cseDef),
3263         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3264         * src/SDCCicode.h (struct operand),
3265         * src/SDCCsymt.h (struct sym_link),
3266         * src/avr/gen.c (hasInc),
3267         * src/ds390/gen.c (hasInc),
3268         * src/hc08/gen.c (genPlusIncr, hasInc),
3269         * src/mcs51/gen.c (hasInc),
3270         * src/pic16/glue.c (pic16_printIvalChar),
3271         * src/pic16/ralloc.c (regWithIdx),
3272         * src/xa51/gen.c (hasInc) : removed warnings
3273         * src/SDCCast.c (createBlock): added comment ???
3274         * src/hc08/ralloc.c: updated comments
3275
3276 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3277
3278         * doc/sdccman.lyx: updated section on switch statements, added
3279         section about semaphore locking
3280         * doc/Makefile: added option -info for latex2html
3281         * device/lib/_gptrget.c,
3282         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3283
3284 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3285
3286         * src/pic/device.h,
3287         * src/pic/device.c,
3288         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3289          maxram is less than 0x100.
3290
3291 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3292
3293         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3294
3295 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3296
3297         * src/port.h,
3298         * src/mcs51/main.c,
3299         * src/ds390/main.c,
3300         * src/z80/main.c,
3301         * src/hc08/main.c,
3302         * src/pic/main.c,
3303         * src/pic16/main.c,
3304         * src/avr/main.c,
3305         * src/xa51/main.c
3306         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3307         a jump table is the best form for a switch statement, including
3308         automatic insertion of missing cases to make the case range
3309         continuous. Developed in collaboration with Frieder Ferlemann.
3310
3311 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3312
3313         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3314         accumulator result if it needs sign extension
3315
3316 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3317
3318         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3319
3320 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3321
3322         * device/lib/gbz80/printf.c,
3323         * device/lib/z80/printf.c: removed define for NULL
3324
3325 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3326
3327         * as/xa51/xa_link.c,
3328         * device/examples/ds390/ow390/ad26.c,
3329         * device/examples/ds390/ow390/cnt1d.c,
3330         * device/examples/ds390/ow390/counter.c,
3331         * device/examples/ds390/ow390/ds2480.h,
3332         * device/examples/ds390/ow390/ds2480ut.c,
3333         * device/examples/ds390/ow390/findtype.c,
3334         * device/examples/ds390/ow390/gethumd.c,
3335         * device/examples/ds390/ow390/owllu.c,
3336         * device/examples/ds390/ow390/ownetu.c,
3337         * device/examples/ds390/ow390/swt12.c,
3338         * device/examples/ds390/ow390/swtloop.c,
3339         * device/examples/ds390/ow390/temp.c,
3340         * device/examples/ds390/ow390/temp10.c,
3341         * device/examples/ds390/ow390/thermo21.c,
3342         * device/examples/ds390/ow390/tinilnk.c,
3343         * device/examples/ds390/ow390/tstfind.c,
3344         * device/examples/serialcomm/windows/serial.cpp,
3345         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3346         * device/include/reg51.h: fixed line endings for cvs
3347
3348 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3349
3350         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3351         packRegsForAccUse, packRegisters): new accumulator register
3352         packing algorithm
3353         * support/regression/ports/hc08/support.c (_putchar): suppress
3354         warning of unused variable
3355         * src/SDCCicode.c: added SWAP entry to codeTable
3356
3357 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3358
3359         * device/lib/sprintf.c: forgot to add this file before previous commit
3360
3361 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3362
3363         * src/pic16/gen.c (genPackBits): added operand right in function
3364         parameters, load result directly if p_type is POINTER (that is
3365         called by genNearPointerSet)
3366         * (genUnPackBits): added operand left in function parameters,
3367         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3368         FSR0 if accessing bitfields,
3369
3370 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3371
3372         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3373           _print_format; updated printf, sprintf, vsprintf
3374         * device/include/asm/default/features.h: corrected comment/define
3375         * device/lib/Makefile.in: added sprintf.c
3376         * device/lib/libsdcc.lib: added sprintf module
3377         * device/lib/printf_large.c,
3378         * device/lib/vprintf.c,
3379         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3380           into these 3 files
3381         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3382         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3383         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3384           hc08 test
3385         * support/regression/tests/zeropad.c: define idata as data for hc08
3386
3387 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3388
3389         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3390         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3391         labels are referenced at least once (even if a reference is not found)
3392         * src/hc08/gen.c (emitcode): set isComment flag for comments
3393         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3394         loads), rules 6a..6b (optimize jumps to return)
3395
3396 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3397
3398         * device/lib/acosf.c (acosf),
3399         * device/lib/asinf.c (asinf),
3400         * device/lib/atanf.c (atanf),
3401         * device/lib/ceilf.c (ceilf),
3402         * device/lib/cosf.c (cosf),
3403         * device/lib/coshf.c (coshf),
3404         * device/lib/cotf.c (cotf),
3405         * device/lib/fabsf.c (fabsf),
3406         * device/lib/floorf.c (floorf),
3407         * device/lib/log10f.c (log10f),
3408         * device/lib/logf.c (logf),
3409         * device/lib/sinf.c (sinf),
3410         * device/lib/sinhf.c (sinhf),
3411         * device/lib/sqrtf.c (sqrtf),
3412         * device/lib/tanf.c (tanf),
3413         * device/lib/tanhf.c (tanhf),
3414         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3415         replaced all instances of "reentrant" in the library functions
3416         defined in math.h with this macro.
3417         * support/regression/tests/float_trans.c: reenabled test for hc08
3418
3419 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3420
3421         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3422         erroneously deleted
3423
3424 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3425
3426         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3427         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3428         multi-byte volatile operands are used
3429         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3430         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3431         initialization to area GSINIT0 so that it would always precede
3432         any static initializers in GSINIT
3433         * support/regression/tests/zeropad.c: fixed idata define for hc08
3434         * support/regression/tests/bug-927659.c,
3435         * support/regression/tests/float_trans.c: disabled tests for hc08
3436         pending missing library routines
3437         * .version: increased version number to 2.4.4 - hc08 port now passes
3438         regression tests
3439
3440
3441 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3442
3443         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3444         * Makefile.common.in,
3445         * as/Makefile,
3446         * as/hc08/Makefile.in,
3447         * as/mcs51/Makefile.in,
3448         * as/z80/Makefile.in,
3449         * debugger/mcs51/Makefile.in,
3450         * device/include/Makefile.in,
3451         * device/lib/Makefile.in,
3452         * doc/Makefile,
3453         * link/Makefile,
3454         * link/z80/Makefile.in,
3455         * packihx/Makefile.in,
3456         * sim/ucsim/main_in.mk,
3457         * sim/ucsim/avr.src/Makefile.in,
3458         * sim/ucsim/doc/Makefile.in,
3459         * sim/ucsim/gui.src/serio.src/Makefile.in,
3460         * sim/ucsim/hc08.src/Makefile.in,
3461         * sim/ucsim/s51.src/Makefile.in,
3462         * sim/ucsim/xa.src/Makefile.in,
3463         * sim/ucsim/z80.src/Makefile.in,
3464         * src/Makefile.in,
3465         * support/cpp2/Makefile.in,
3466         * support/librarian/Makefile,
3467         * support/makebin/Makefile: added DESTDIR to the install path proposed
3468         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3469         * doc/sdccman.lyx: added DESTDIR documentation
3470
3471 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3472
3473         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3474         instruction for interrupt handlers, use fast returns when returning
3475         from high priority interrupts
3476
3477 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3478
3479         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3480         code generation
3481         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3482         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3483         bugs, ported much of Bernhard's code from mcs51
3484         * src/mcs51/gen.c (genSend),
3485         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3486         than one when calling a reentrant function
3487         * device/lib/_mullong.c: defined an alternate struct layout for big
3488         endian ports (hc08)
3489
3490 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3491
3492         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3493         test
3494
3495 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3496
3497         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3498         are sane and complete before asking the port its prefered parameter
3499         passing method (fixes bug #1017633)
3500         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3501         and _ret3
3502
3503 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3504
3505         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3506         problem in bitfields >= 8 bits.
3507
3508 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3509
3510         * src/SDCCsymt.c: undid changes that were not meant to be committed
3511
3512 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3513
3514         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3515
3516 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3517
3518         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3519           copied and wrong bit got inverted
3520
3521 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3522
3523         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3524         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3525         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3526         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3527         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3528         assignments to bitfields at known addresses
3529         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3530         reads from bitfields at known addresses
3531         * src/hc08/ralloc.c (packRegisters),
3532         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3533         genhc08Code): optimize pointer get values used as conditionals
3534         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3535         and branch
3536
3537 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3538
3539         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3540         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3541         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3542         as conditionals
3543
3544 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3545
3546         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3547
3548 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3549
3550         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3551         related problems
3552
3553 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3554
3555         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3556
3557 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3558
3559         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3560         mcs51 port
3561
3562 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3563
3564         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3565
3566 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3567
3568         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3569         cases use more compact code.
3570
3571 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3572
3573         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3574
3575 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3576
3577         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3578
3579 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3580
3581         * src/SDCCsymt.h,
3582         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3583         parameter of changePointer() from symbol* to sym_link*
3584         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3585         * src/SDCCsymt.c (compareType): void* type is castable to other
3586         pointers, but not necesarily an exact match.
3587         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3588         is no longer blindly treated as an exact match.
3589         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3590
3591 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3592
3593         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3594
3595 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3596
3597         * src/pic/gen.c,
3598         * src/pic/pcode.c,
3599         * src/pic/ralloc.h,
3600         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3601
3602 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3603
3604         * src/pic/device.c,
3605         * src/pic/device.h,
3606         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3607
3608 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3609
3610         * src/mcs51/gen.c (emitcode): fixed bug #992819
3611
3612 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3613
3614         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3615           there's no need to make it worse
3616
3617 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3618
3619         * src/mcs51/ralloc.c (deassignLR),
3620         * src/ds390/ralloc.c (deassignLR),
3621         * src/hc08/ralloc.c (deassignLR),
3622         * src/z80/ralloc.c (deassignLR),
3623         * src/pic/ralloc.c (deassignLR),
3624         * src/pic16/ralloc.c (deassignLR),
3625         * src/avr/ralloc.c (deassignLR),
3626         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3627         rlivePoint): fixed another part of bug #971834
3628
3629 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3630
3631         * src/z80/main.c: enabled "critical" keyword
3632         * src/z80/mappings.i,
3633         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3634         functions (fixes bug #979646)
3635         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3636
3637 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3638
3639         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3640           such as c:\mydir.
3641
3642 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3643
3644         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3645           doesn't disable too much optimizations
3646
3647 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3648
3649         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3650
3651 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3652
3653         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3654
3655 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3656
3657         * src/pic/gen.c tidied up tabs
3658         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3659         * src/pic/main.c tidied up tabs
3660         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3661         * src/pic/pcoderegs.c tidied up tabs
3662         * src/pic/ralloc.c tidied up tabs
3663
3664 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3665
3666         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3667         to S_FIXED for pic16 port and when symbol is not in level 0,
3668         allocate for S_REGISTER storage class and pic16 port, too,
3669         * src/pic16/device.h: prototype for checkSym,
3670         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3671         * (pic16_assignConfigWordValue): test the value and the mask to
3672         validate that the value is suitable for the configuration word,
3673         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3674         collect extern declared symbols, don't emit symbol twice, check
3675         first if symbol is in publics set first,
3676         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3677         * added command line '--fstack' which enables an experimental
3678         feature for stack access, too buggy to be used yet...
3679         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3680         * (pic16_allocDirReg): when register has storage class S_REGISTER
3681         allocate in pic16_dynAccessRegs,
3682         * device/include/pic16/pic18f????.h: modified configuration word
3683         naming convention, words started as CONFIG0H but should be CONFIG1H
3684
3685 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3686
3687         * device/include/mcs51reg.h: fixed bug 970993
3688
3689 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3690
3691         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3692         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3693         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3694         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3695         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3696         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3697           error/warning numbers,
3698           added function setWarningDisabled()
3699         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3700         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3701           _memcmp.c _memmove.c calloc.c realloc.c free.c
3702         * support/regression/tests/malloc.c: added tests for new functionality
3703         * support/regression/tests/zeropad.c: added tests for truncated initializers
3704           and initialized char arrays starting with '\x0'
3705         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3706
3707 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3708
3709         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3710
3711 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3712
3713         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3714         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3715         peephole 177.e. Thanks to anonymous
3716
3717 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3718
3719         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3720         function isn't used in the source but referenced as a
3721         variable initializer then declare it as extern in .asm file
3722
3723 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3724
3725         * .version: increased version number to 2.4.3
3726
3727         Adding version extension according to ChangeLog CVS revision
3728         * src/Makefile.in (target all): added dependency 'version.h'
3729         * (rule version.h): added rule to create version.h from ChangeLog,
3730         * (rule dep): added dependency version.h,
3731         * src/version.awk: AWK script to create version.h
3732         * src/SDCCdwarf2.c (dwWriteModule),
3733         * src/SDCCglue.c (initialComments),
3734         * src/SDCCmain.c (printVersionInfo): modified to write after
3735         version string the version extension number,
3736         * src/SDCCutil.c: included "version.h"
3737         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3738         number,
3739         * src/SDCCutil.h: added prototype for getBuildNumber
3740
3741         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3742         includeDirsSet, too,
3743         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3744         const char [] is found in function prototype...
3745
3746         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3747         moving to WREG with source is already in WREG,
3748         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3749         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3750         * (aopForSym): stack'ed symbols are partially supported, added
3751         if-clause to support symbols in FARSPACE,
3752         * (sameRegs): added test for AOP_ACC to see if registers are same,
3753         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3754         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3755         * (pic16_popRegFromString): will not allocate a new register if it
3756         doesn't find one by name, bug may have introduced...
3757         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3758         * (genIpush): revived to use pic16 port's stack,
3759         * (genAddrOf): added incomplete case for stack'ed operand,
3760         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3761         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3762         can handle multibyte operands,
3763         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3764         * (pic16initialComments): added message for MPLAB compatibility
3765         mode enabled,
3766         * src/pic16/main.h: prototype for pic16_mplab_comp,
3767         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3768         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3769         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3770         because of increased complexity of procedure,
3771         * (_process_pragma): stack pragma changed to format 'stack pos len',
3772         emit symbol '_stack_end' to conform with gplink,
3773         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3774         to search for register,
3775         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3776         PO_GPR_REGISTER,
3777         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3778         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3779         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3780         case for PO_GPR_REGISTER,
3781         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3782         dies, the new era is ahead !...
3783         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3784         pic16_dynInternalRegs,
3785         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3786         * (pic16_allocDirReg): minor optimizations and bug fixes,
3787         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3788
3789         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3790         load stack and frame pointer with address of 'stack_end' symbol
3791
3792 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3793
3794         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3795         without source code but only variable initializers
3796
3797 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3798
3799         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3800         external are not declared as extern to reduce overhead while linking
3801
3802 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3803
3804         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3805
3806 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3807
3808         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3809           Yee Keat for the patch
3810         * src/SDCCast.c (decorateType): fixed bug #979599
3811         * src/ds390/gen.h: removed local fReturnSizeDS390
3812         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3813         * src/ds390/gen.c (genAnd, genOr, genXor),
3814         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3815
3816 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3817
3818         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3819         add relFilesSet to $3, manipulate $2 to handle linking of object
3820         files without source files in command line,
3821         * device/include/pic16 (all headers): added ID location macros,
3822         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3823         entries for ID location bytes,
3824         * (pic16_assignIdByteValue): NEW,
3825         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3826         added field dumpcalltree to pic16_options_t,
3827         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3828         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3829         emitting rFalseIfx label after check_carry label,
3830         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3831         pic16_emitDIRegs), NEW
3832         * (pic16glue): dump .calltree file when option --calltree found,
3833         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3834         * (_pic16_genAssemblerPreamble): emit ID locations after
3835         configuration registers,
3836         * (pic16_linkCmd): modifications of the link command,
3837         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3838         * (pic16_pCodeInitRegisters): don't init stack registers,
3839         * (pic16_findPrevInstruction): fixed bug,
3840         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3841         bug with immediate registers,
3842         * (buildCallTree): traces stack push and pop,
3843         * (pct2): dump also stack usage for each function,
3844         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3845         * (pic16_allocDirReg): various modifications,
3846         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3847         fixed to 1,
3848
3849 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3850
3851         * src/pic16/pcode.c: removed buggy double colon
3852
3853 2004-07-01 Borut Razem <borut.razem AT siol.net>
3854
3855         * support/scripts/sdcc.nsi: added include/pic16 to setup
3856
3857 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3858
3859         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3860         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3861         target 'clean',
3862         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3863         specific command line arguments. Also added sample lkr script
3864         for placing a variable at a specific memory bank.
3865         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3866         at a specific memory bank,
3867         * (pic16_dump_isection): fixed bug which caused string literals to
3868         be omitted when dumping idata section,
3869         * (pic16_groupRegistersInSection): added code to handle registers
3870         in specific memory banks,
3871         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3872         public, all references are renamed too,
3873         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3874         AOP_DPTR2,
3875         * (pic16_storeForReturn): added case to handle when dest is WREG,
3876         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3877         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3878         pic16_rel_udata, check to see if that register is marked as being
3879         a member of a specific memory bank,
3880         * (pic16_printIvalCharPtr): added code to add string literals either
3881         to code or the idata sections,
3882         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3883         also accept the 'udata' pragma,
3884         * src/pic16/main.h: new structure types sectName and sectSym
3885         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3886         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3887         * (pic16_findPrevInstruction): fixed, it returned nothing,
3888         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3889         instruction combinations,
3890         * (pic16_FixRegisterBanking): heavily reorganised,
3891         * (pic16_AnalyzeBanking): if generating banksel directives is
3892         disabled, then don't call FixRegisterBanking at all,
3893         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3894         completely removed,
3895         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3896
3897 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3898
3899         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3900         Phuah Yee Keat <yk.phuah AT nestac.com>
3901
3902 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3903
3904         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3905         correctly the IVT even if it is relocated to some other location
3906
3907 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3908
3909         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3910         * device/include/pic16/pic18f2220.h: NEW,
3911         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3912         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3913         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3914         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3915         nodefaultlibs, ivt_loc is the location of the interrupt vector
3916         table, and nodefaultlibs signs that default libraries should not be
3917         linked in link stage,
3918         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3919         according to --ivt-loc argument,
3920         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3921         when pragma stack is found,
3922
3923 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3924
3925         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3926         256 (range check), 257 (do while), 258.a-f (bit banging
3927         f.e. on 3-wire SPI bus)
3928
3929 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3930
3931         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3932         variables used exclusively within a loop
3933
3934 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3935
3936         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3937
3938 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3939
3940         * src/SDCClrange.c (computeClash): fixed bug #971834
3941
3942 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3943
3944         * src/mcs51/gen.c (genCmp): fixed bug #975903
3945         * src/hc08/gen.c (operandsEqu),
3946         * src/ds390/gen.c (operandsEqu),
3947         * src/z80/gen.c (operandsEqu),
3948         * src/pic/gen.c (operandsEqu),
3949         * src/pic16/gen.c (operandsEqu),
3950         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3951         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3952
3953 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3956
3957 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3958
3959         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3960         default case in switch statement,
3961         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3962         to eliminate problem with initialisation of pointers, but problem
3963         still exists,
3964         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3965         * (emitStaticSegment): removed various lines emitting debug info,
3966         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3967         added processor registers for utilizing EEPROM,
3968         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3969         configurable and set 8
3970
3971 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3972
3973         * .version: increased version number to 2.4.2,
3974
3975         Cumulative patch for pic16 port
3976         * src/pic16/device.c: changed scheme to dump initial values for
3977         variables in idata segment, all print_idata* functions were removed,
3978         now the pic16_printIval* will be called,
3979         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3980         * _pic16_printPointerType, pic16_printPointerType,
3981         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3982         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3983         NEW, similar to the respective functions in SDCCglue.c,
3984         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3985         way, emitting hex bytes,
3986         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3987
3988 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3989
3990         * src/avr/ralloc.c (serialRegAssign),
3991         * src/xa51/ralloc.c (serialRegAssign),
3992         * src/pic/ralloc.c (serialRegAssign),
3993         * src/pic16/ralloc.c (serialRegAssign),
3994         * src/hc08/ralloc.c (serialRegAssign),
3995         * src/z80/ralloc.c (serialRegAssign),
3996         * src/ds390/ralloc.c (serialRegAssign),
3997         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3998
3999 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4000
4001         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4002         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4003
4004 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4005
4006         Cumulative patch for pic16 port:
4007         * src/pic16/device.h (typedef PIC16_device) modified fields for
4008         defining microcontrollers,
4009         * src/pic16/device.c: added new info for all devices in Pics16 array,
4010         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4011         to be optimised out by the pCode optimiser,
4012         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4013         specially, bug reported by G.M. Gallant,
4014         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4015         as force'd so that cannot be optimised out by pCode optimiser,
4016         * src/pic16/pcode.c,
4017         * src/pic16/pcodepeeph.c,
4018         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4019         they are disabled by default, but can be enabled explicit with
4020         command argument --denable-peeps, for testing,
4021         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4022         --pomit-ivt in COMPILE_FLAGS
4023
4024 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4025
4026         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4027           compilation on MSVC
4028
4029 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4030
4031         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4032
4033 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4034
4035         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4036         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4037
4038 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4039
4040         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4041         would only assign 0x300001 register.
4042
4043 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4044
4045         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4046         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4047
4048 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4049
4050         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4051         for ds80c400
4052         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4053         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4054         added peephole 254 (left shift), 255 (jump table)
4055
4056 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4057
4058         * device/lib/Makefile.in: removed comment line with model-pic16,
4059         * (target port-specific-objects-pic16): the libraries and objects
4060         are copied to the build directory form the device/lib/pic16/bin
4061         directory
4062
4063         Cumulative patch concerning pic16 port:
4064         * library directory has been re-organized,
4065         * added support for PIC18F1220,
4066         * added headers and library sources for chips 18f1220,18f6520,
4067         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4068
4069         * configuration registers setting has changed, now each supported
4070         device has a complete description of the registers it uses,
4071         * all initialisations are moved to idata sections, these section
4072         can be absolute or relocatable,
4073         * fixed initialisation of codespace variables,
4074         * fixed warning about PCLATU and gpsim,
4075         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4076         * (genAssign): use table reads when assigning from variables in codespace,
4077         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4078         char/int variables placed in codespace,
4079         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4080         registers set in .asm file, no need for --pomit-config-words anymore,
4081         * (pic16glue): some 8051 legacy segments are commented out
4082         (to be removed completely),
4083         * added support for alternative assembler and linker with --asm=
4084         and --link= command line arguments,
4085         * peepholes are disabled automatically in the port, no need to
4086         specify on command line,
4087         * port supports natively char/int/long multiplication, but converts
4088         all divisions to support functions,
4089         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4090         to the file set in variable $2,
4091         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4092         strings in ASCII format and not in hex,
4093         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4094         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4095         allocate proper register if iCodes aren't temporary,
4096
4097 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4098
4099         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4100
4101 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4102
4103         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4104         is commented out
4105
4106 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4107
4108         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4109         computed address is reused
4110         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4111         multi-byte bitfields
4112
4113 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4114
4115         * src/z80/gen.c: (genArrayInit): must check for pointers too
4116
4117 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4118
4119         * support/regression/tests/zeropad.c: never meant to commit the
4120           nestedstruct test: removed, added check for GCC version
4121
4122 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4123
4124         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4125         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4126         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4127           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4128           bugs 928906 and 954082 half-empty initializers
4129         * src/SDCCsymt.h,
4130         * src/SDCCsymt.c (getAllocSize): added for above fix
4131         * src/z80/gen.c (genArrayInit): fixed bug 741044
4132         * support/regression/tests/zeropad.c: added tests
4133
4134 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4135
4136         * src/pic16/device.c (pic16_dump_section): corrected bug which
4137         caused some symbols of the libraries to be misplaced
4138
4139 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4140
4141         * src/pic16/glue.c,
4142         * src/pic16/ralloc.h,
4143         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4144         to fix conflict with pic port
4145
4146 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4147
4148         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4149         externs configuration variables,
4150         * src/pic16/ralloc.h,
4151         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4152         prototype in header, commented out some debug messages
4153
4154 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4155
4156         * src/pic16/glue.c,
4157         * src/pic16/main.c,
4158         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4159         for gpasm COFF object generation. Thanks to D. Hawkins for
4160         his patch info
4161
4162 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4163
4164         * src/ds390/main.c,
4165         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4166         Brock for spotting this)
4167         * src/ds390/gen.c (genEndFunction),
4168         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4169         interrupt handler and critical. Disable push/pop optimizations when
4170         peephole optimizations disabled.
4171
4172 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4173
4174         Updated pic16 library sources and headers.
4175         * device/lib/pic16/pic18f*/ ,
4176         * device/include/pic16/*.h: modified to handle structured SFR
4177         definitions
4178
4179 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4180
4181         * src/port.h (PORT structure): added hook initPaths, now each
4182         port can declare its own default search paths,
4183         which can been seen with the --print-search-dirs option,
4184         see pic16 port for example,
4185         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4186         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4187         * (doPrintSearchDirs): NEW, replaces in a central manner the
4188         printing of search dirs which was split in set*Paths functions,
4189         * (main): added call to port->initPaths and doPrintSearchDirs,
4190         * src/avr/main.c,
4191         * src/ds390/main.c,
4192         * src/hc08/main.c,
4193         * src/izt/i186.c,
4194         * src/izt/tlcs900h.c,
4195         * src/mcs51/main.c,
4196         * src/pic/main.c,
4197         * src/pic16/main.c: modified port structures to reflect addition of
4198         initPaths hook,
4199
4200         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4201         * (pic16_dump_section): for registers in same address reserve memory once,
4202         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4203         to no_banksel,
4204         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4205         result is greater in size than right or left,
4206         * (pic16_genUMult8X8_8): there are some cases where the result can
4207         be 16 bits size, so handle these,
4208         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4209         * (pic16_outBitC): modified to emit pcodes,
4210         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4211         or not,
4212         * (genDivOneByte): implemented algorithm to divide 8-bits,
4213         * (genCmp): uncommented goto, but issues still exist,
4214         * (genAnd): fixed a bug with variables >8bits,
4215         * (genPackBits): optimization added that uses BCF/BSF to change a
4216         single bit,
4217         * (genAssign): fixed bug when assigning floating point literals,
4218         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4219         __sdcc_gsinit_startup label,
4220         * src/pic16/main.c (_pic16_init): removed search directory
4221         initialisations,
4222         * (_pic16_initPaths): NEW, used to initialise search directories,
4223         * (_hasNativeMulFor): support functions for all except char/int
4224         multiplication, and char division,
4225         * (PIC16_port struct): modified entry for native mul support,
4226         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4227         no_banksel option,
4228         * (buildCallTree): call to register_usage is ifdef'ed out,
4229
4230 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4231
4232         * device/include/string.h: applied Stas Sergeev's patch to make this
4233         header file compatible with the preprocessor -Wundef option
4234         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4235         failure (fixes bug #941458)
4236
4237 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4238
4239         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4240         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4241         that the variable, not the function, should be static
4242         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4243         to be consistent with non-literal case
4244
4245 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4246
4247         * src/SDCCast.c (isConformingBody): fixed bug #949967
4248         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4249         convilong): fixed bug #952086
4250
4251 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4252
4253         * src/SDCCmem.c (allocVariables): fixed bug #955321
4254
4255 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4256
4257         * src/hc08/main.c (_hc08_genAssemblerEnd),
4258         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4259         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4260         completely eliminated the use of a temporary file
4261         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4262         when more than one file linked
4263         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4264
4265 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4266
4267         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4268         which fixes bug #543481
4269         * support/regression/tests/bug-751703.c: fixed comments left from a
4270         cut and paste error
4271         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4272         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4273         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4274         scopes
4275         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4276         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4277         are now changed to underscores in moduleName
4278
4279 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4280
4281         * as/mcs51/lkmem.c: better fix for bug #954173
4282
4283 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4284         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4285
4286         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4287         * device/include/c8051f000.h,
4288         * device/include/c8051f120.h,
4289         * device/include/c8051f300.h,
4290         * device/include/c8051f310.h,
4291         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4292         PWM16) and detab'ed
4293
4294 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4295
4296         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4297         and mailing lists, doc'ed --no-peep-comments, removed reference
4298         to knoppix (newest version has no LyX/LaTeX), other minor changes
4299         * src/SDCCglue.c (glue): save 2 bytes stack space with
4300         option --main-return. The ljmp could probably be avoided too
4301
4302 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4303
4304         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4305
4306 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4307
4308         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4309         * src/SDCCopt.c (isLocalWithoutDef),
4310         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4311         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4312         (credit to Maarten Brock for patch #949363, on which this is based)
4313         * support/regression/tests/bug-751703.c: some test cases of extern used
4314         within inner scopes.
4315
4316 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4317
4318         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4319         SPEC_STRUCT
4320         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4321         struct definitions
4322         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4323         dwWriteLabel): fix to create valid debugger symbols even when
4324         the module name has non-alphanumeric symbols in it
4325         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4326         when a variable's allocation has been optimized away
4327
4328
4329 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4330
4331         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4332         * src/hc08/main.c,
4333         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4334         * src/mcs51/main.c,
4335         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4336         * src/ds390/main.c,
4337         * src/z80/gen.c (z80_emitDebuggerSymbol),
4338         * src/z80/main.c,
4339         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4340         * src/pic/main.c,
4341         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4342         * src/pic16/main.c,
4343         * src/avr/gen.c (avr_emitDebuggerSymbol),
4344         * src/avr/main.c,
4345         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4346         * src/xa51/main.c,
4347         * src/SDCCdebug.c (emitDebuggerSymbol),
4348         * src/SDCCdebug.h,
4349         * src/port.h: added a debugger struct to the port struct. Added a
4350         callback for defining debugger symbols
4351
4352         * src/SDCCast.c (createLabel),
4353         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4354         with isitmp = 1
4355         * src/SDCCicode.h,
4356         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4357         iCode back to the ast for the function
4358
4359         * src/hc08/ralloc.c (hc08_assignRegisters),
4360         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4361         unneeded fields from the regs struct.
4362         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4363         pushReg() & pullReg() functions instead of emitcode()
4364
4365         * src/hc08/gen.c (genLabel, genhc08Code),
4366         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4367
4368         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4369         debugger hooks
4370
4371         * src/hc08/gen.c (genEndFunction, genhc08Code),
4372         * src/hc08/gen.h,
4373         * src/mcs51/gen.c (genEndFunction, gen51Code),
4374         * src/mcs51/gen.h,
4375         * src/ds390/gen.c (genEndFunction, gen390Code),
4376         * src/ds390/gen.h,
4377         * src/z80/gen.c (genEndFunction, genZ80Code),
4378         * src/z80/gen.h,
4379         * src/z80/z80.h,
4380         * src/pic/gen.c (genEndFunction, genpic14Code),
4381         * src/pic/gen.h,
4382         * src/pic16/gen.c (genEndFunction, genpic16Code),
4383         * src/pic16/gen.h,
4384         * src/avr/gen.c (genEndFunction, genAVRCode),
4385         * src/avr/gen.h,
4386         * src/xa51/gen.c (genEndFunction, genXA51Code),
4387         * src/xa51/gen.h,
4388         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4389         specific code to cdbFile.c and out of the backend code generators
4390
4391         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4392         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4393         starting address is now 0
4394
4395         * as/hc08/asm.h,
4396         * as/hc08/m08pst.c,
4397         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4398         assembler directive for DWARF support
4399         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4400
4401         * src/src.dsp,
4402         * src/Makefile.in,
4403         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4404
4405 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4406
4407         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4408         and inappropriate peephole optimization in jump tables
4409
4410 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4411
4412         * as/hc08/m08pst.c,
4413         * src/SDCCglue.c: sdccopt works for the hc08 port now
4414
4415 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4416
4417         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4418
4419 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4420
4421         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4422
4423 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4424
4425         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4426         rules
4427         * src/SDCCmain.c,
4428         * src/SDCCglobl.h,
4429         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4430         comments from the peephole optimizer replacement rules
4431         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4432         symbols
4433         * src/SDCCcse.c (updateSpillLocation),
4434         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4435         equivalents
4436         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4437         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4438         objects far pointers
4439
4440 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4441
4442         * src/SDCCsymt.h: a missing part of my last change
4443         * src/pic/ralloc.c (regTypeNum),
4444         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4445
4446 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4447
4448         * src/SDCCicode.h,
4449         * src/SDCCicode.c (aggrToPtrDclType),
4450         * src/SDCCptropt.h,
4451         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4452         ptrPseudoSymConvert),
4453         * src/pic/ralloc.c (regTypeNum),
4454         * src/pic16/ralloc.c (regTypeNum),
4455         * src/hc08/ralloc.c (regTypeNum),
4456         * src/ds390/ralloc.c (regTypeNum),
4457         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4458         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4459
4460 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4461
4462         * link/z80/lkmain.c (afile),
4463         * as/hc08/lkmain.c (afile),
4464         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4465         prevent a pointer problem when a filename has no directory and
4466         no extension specified.
4467
4468 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4469
4470         * link/z80/lkmain.c (afile): allow periods in directory names
4471         * link/z80/lkmain.c (afile),
4472         * as/mcs51/lkmain.c (afile),
4473         * as/hc08/lkmain.c (afile): allow linker script file to have an
4474         extension other than ".lnk"
4475         * link/z80/lklex.c (getfid),
4476         * link/z80/lkmain.c (parse),
4477         * as/mcs51/lklex.c (getfid),
4478         * as/mcs51/lkmain.c (parse),
4479         * as/hc08/lklex.c (getfid),
4480         * as/hc08/lkmain.c (parse): Support comments in the linker script
4481         file on lines by themselves and after filenames
4482
4483 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4484
4485         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4486
4487 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4488
4489         * src/z80/peeph-z80.def: removed some peephole rules that don't
4490         work with multibyte arithmetic (fixed bug #937126)
4491         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4492         to registers and not global variables
4493         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4494         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4495         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4496         checking for assignments not internally generated (fixed bug #931895)
4497         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4498         structure member (fixed bug #930072)
4499
4500 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4501
4502         * src/SDCCmain.c (linkEdit),
4503         * src/hc08/main.c (_hc08_parseOptions),
4504         * as/hc08/Makefile.in,
4505         * as/hc08/aslink.h,
4506         * as/hc08/asm.h,
4507         * as/hc08/m08pst.c,
4508         * as/hc08/lkrloc.c (relr, rele),
4509         * as/hc08/lkarea.c (lnkarea)
4510         * as/hc08/lkmain.c (afile, parse),
4511         * as/hc08/lkelf.c: support for ELF output
4512         * as/hc08/lks19.c (s19),
4513         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4514
4515 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4516
4517         * as/mcs51/lkihx.c: Fixed bug #899105.
4518
4519 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4520
4521         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4522         .dsp files from Unix to DOS.
4523
4524 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4525
4526         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4527         function pointers; we have been compliant for several months now.
4528         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4529         change that was accidently commented out
4530         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4531         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4532         bug #922319
4533
4534 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4535
4536         * src/hc08/gen.c: output of all of the internal debugging information
4537         is now controlled by the D() macro; it is disabled by default
4538
4539 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4540
4541         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4542         harder to keep the same registers during a CAST iCode
4543         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4544         long via int can be done in a single cast, if the signedness is
4545         correct.
4546         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4547         putchar() in tinibios.c in ds390's library
4548
4549 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4550
4551         * src/SDCCast.c (decorateType): fixed bug #898889,
4552         cast result of a literal complement too
4553         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4554         fixed check for bitfields
4555
4556 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4557
4558         * src/SDCCicode.c (geniCodeLogic): made it static,
4559         (geniCodeLogicAndOr): added in order to fix bug #905492,
4560         (ast2iCode): fixed bug #905492
4561         * support/regression/tests/bug-905492.c: added
4562         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4563         (processParms): fixed bug #927659: don't copy parms, this will clear
4564         decorated flag
4565         * support/regression/tests/bug-927659.c: added
4566
4567 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4568
4569         * src/SDCCast.c (addCast): don't cast float to char
4570         * device/lib/libsdcc.lib: added _memmove
4571
4572 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4573
4574         * device/lib/large/Makefile: fixed parallel execution by
4575         replacing `make` by `$(MAKE)`
4576
4577 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4578
4579         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4580         offsets (fixes bug #923936)
4581
4582 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4583
4584         * device/lib/small/Makefile: fixed parallel execution by
4585         replacing `make` by `$(MAKE)`
4586
4587 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4588
4589         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4590
4591 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4592
4593         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4594         * src/regression/Makefile: Regression test was not running.
4595
4596 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4597
4598         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4599         complement if possible
4600         * src/SDCCval.c (valComplement),
4601         * src/SDCCicode.c (operandOperation): fixed complement of literal
4602         * support/regression/tests/onebyte.c (testComplement): added
4603
4604 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4605
4606         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4607         return an optimized tree; actually replace actParm with the new tree
4608         * src/SDCCast.h: added some parantheses to remove side effects
4609         * support/regression/tests/bug-920866.c
4610
4611 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4612         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4613         Bit operands were not being handled properly in the pic14 port.
4614         (now src/regression/add.c passes again).
4615
4616 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4617
4618         * src/SDCC.y (labeled_statement): case and default no longer require
4619         a following statement (RFE #893037)
4620
4621 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4622
4623         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4624         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4625         disabled (fixes bug #916294)
4626         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4627         "mov a,acc"; patch provided by Lenny Story
4628         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4629
4630 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4631
4632         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4633         functions
4634         * src/ds390/gen.c (genFunction, genEndFunction),
4635         * src/ds390/ralloc.c (ds390_assignRegisters),
4636         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4637         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4638         pushed if there are parameters passed on the stack. Also, a cleaner
4639         way to decide if r0/r1 should be pushed/popped. (Together they fix
4640         bug #918693)
4641
4642 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4643
4644         * doc/sdccman.lyx,
4645         * device/lib/mcs51/crtpagesfr.asm,
4646         * device/lib/mcs51/crtxinit.asm,
4647         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4648         to avoid confusion with Si Lab's SFRPAGE register.
4649
4650 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4651
4652         * src/SDCCglue.c (emitMaps): allow public sfr variables
4653         * src/SDCCglue.c (initialComments): include compiler build date
4654         with compiler version and put the timestamp of the generated
4655         assembly file on a serperate line to be less confusing.
4656         * src/port.h: added genInitStartup hook
4657         * src/avr/main.c,
4658         * src/ds390/main.c,
4659         * src/hc08/main.c,
4660         * src/pic/main.c,
4661         * src/pic16/main.c,
4662         * src/xa51/main.c,
4663         * src/z80/main.c: genInitStartup initialize as NULL (default to
4664         historical behaviour)
4665         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4666         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4667         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4668         library instead of hard coding it into the compiler.
4669         * support/regression/ports/mcs51-stack-auto/spec.mk,
4670         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4671         * device/lib/mcs51/Makefile,
4672         * device/lib/small/Makefile,
4673         * device/lib/large/Makefile,
4674         * device/lib/mcs51/crtpagesfr.asm,
4675         * device/lib/mcs51/crtstart.asm,
4676         * device/lib/mcs51/crtxclear.asm,
4677         * device/lib/mcs51/crtxinit.asm,
4678         * device/lib/mcs51/crtclear.asm,
4679         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4680         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4681         and into user configurable files.
4682         * device/lib/clean.mk: clean mcs51 directory too
4683         * support/regression/tests/longlit.c: added static to T1 declaration
4684         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4685         accesses in the initialization code
4686
4687 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4688
4689         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4690         OSCTRIMVAL as noted in bug #916008
4691
4692 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4693
4694         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4695         in loops with multiple exits (reported as incorrect registers
4696         used by Martin Helmling in Sdcc-user list)
4697
4698 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4699
4700         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4701         made ds390 register extensions look less like error messages
4702
4703 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4704
4705         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4706         reported by Adam Wozniak in Sdcc-user list
4707
4708 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4709
4710         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4711         arithmetic optimizations, added debug output
4712
4713 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4714
4715         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4716         * sdcc.spec: updated and split sdcc into 3 rpms
4717         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4718         needed for literals of LEFT_OP and '+'
4719         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4720         introduced RESULT_TYPE_NOPROM
4721         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4722         left shift
4723         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4724         limited promotion to int only for '*'
4725         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4726
4727 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4728
4729         * src/pic16/gen.c (genSkip),
4730         (genc16bit2lit), (gencjneshort): commented out
4731         (is_LitOp): new helper function, checks operand type
4732         (genCmpEq): rewritten
4733
4734 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4735
4736         * support/regression/tests/bug-908454.c: added
4737
4738 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4739
4740         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4741         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4742         (geniCodeCast): cosmetic, don't preserve bit storage class
4743         (geniCodeLeftShift): added promotion
4744         (geniCodeLogic): fixed regression
4745         * src/SDCCsymt.c (computeTypeOr): accept bits too
4746         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4747
4748 2004-03-07  Borut Razem <borut.razem AT siol.net>
4749
4750         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4751
4752 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4753
4754         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4755         version of pic16_genPackRegisters which does not check if ic is a
4756         CAST operator,
4757         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4758         function cause string1.c regression test fails
4759
4760 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4761
4762         * sim/ucsim/configure.in,
4763         * sim/ucsim/configure,
4764         * sim/ucsim/doc/Makefile.in: use docdir
4765         * src/SDCC.y: fixed sbit atrributes
4766         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4767         * src/SDCCast.c (decorateType): |^& need special promotion handling
4768         * src/SDCCast.h,
4769         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4770         * src/SDCCsymt.h (computeType),
4771         * src/SDCCicode.c: computeType() needs op
4772         * src/SDCCsymt.c (checkTypeSanity),
4773         * doc/sddman.lyx: "plain" bitfields are unsigned
4774         * src/SDCCsymt.c (computeTypeOr): added
4775         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4776         |^& ops
4777         * src/SDCCval.c (val*): computeType() needs op
4778         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4779         * support/regression/tests/onebyte.c: added tests for |^&
4780
4781 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4782
4783         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4784         for writing icode into asm output.
4785
4786 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4787
4788         * src/pic16/device.c: added some debug lines enabled
4789         with macro DEBUG_CHECK,
4790         * src/pic16/genarith.c: more debug in genPlus,
4791         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4792         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4793         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4794         * (aopForSym): onStack symbols are re-placed in data memspace,
4795         and onStack flag is cleared,
4796         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4797         copy temporary pcodeop,
4798         * (genPcall): added warning for not updating PCLATU,
4799         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4800         always true for pic16 port,
4801         * (genMultOneWord): NEW, supports integer multiplication,
4802         * (genMult): modified to call genMultOneWord,
4803         * (ifxForOp): added warning when return NULL,
4804         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4805         flag is set before call to operandFromSymbol for implicit
4806         added structures,
4807         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4808         options.intlong_rent are set by default,
4809         * (_hasNativeMulFor): modified to allow port generation of integer
4810         multiplication,
4811         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4812         set regtype to REG_SFR for all registers, restricting seting the
4813         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4814
4815 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4816
4817         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4818         more than 500 times in the regression tests
4819
4820 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4821
4822         * support/Util/SDCCerr.h,
4823         * support/Util/SDCCerr.c,
4824         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4825         enumerator_list),
4826         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4827         for symbol conflicts.
4828         * support/valdiags/tests/enum.c,
4829         * support/valdiags/tests/tentdecl.c,
4830         * support/valdiags/tests/struct.c: expect possible error messages
4831         referring to original symbol definitions.
4832         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4833         * src/SDCCsymt.h,
4834         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4835
4836 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4837
4838         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4839
4840 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4841
4842         * src/pic16/ralloc.c (newReg): fixed bug #908929
4843
4844 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4845
4846         * src/ds390/gen.c: added missing #include "main.h"
4847
4848 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4849
4850         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4851         checking if symbol is already in set,
4852         * src/pic16/device.h: prototype for checkAddSym,
4853         * src/pic16/gen.c: (_G): added entry interruptvector,
4854         * (assignResultValue): removed some commented out lines,
4855         * (genFunction): check for ISR via sym->type, absolute section for
4856         interrupt code is created via a new pBlock, the goto instruction is
4857         placed now correctly at the interrupt vector position, changed all
4858         references from ivec to _G.interruptvector,
4859         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4860         is the interrupt is a high priority one, same for return from ISR,
4861         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4862         externs to calls of checkAddSym,
4863         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4864         pic16_pcode_verbose flag is set,
4865         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4866         * src/pic16/pcoderegs.c: message about how many registers are saved
4867         will only be emitted if pic16_pcode_verbose flag is set,
4868
4869 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4870
4871         * src/ds390/ralloc.h,
4872         * src/ds390/ralloc.c (ds390_regWithIdx),
4873         * src/ds390/gen.c (emitcode),
4874         * src/ds390/main.h,
4875         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4876         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4877         ds390operandCompare, getRegsRead, getRegsWritten,
4878         initializeAsmLineNode): customized instruction size calculation for
4879         ds390, started basis for some register optimizations
4880         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4881         corresponding assembly output
4882         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4883         missing push/pop of r0/r1. Optimized push/pops
4884
4885 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4886
4887         * src/mcs51/main.c (instructionSize): fixed ACALL size
4888         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4889
4890 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4891
4892         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4893         the sorting of rlist with NULL elements
4894         * (print_idataType, print_idata): NEW to create idata sections
4895         * src/pic16/device.h: idataSymSet new variable
4896         * src/pic16/gen.c (genFunction): fixed some bugs in string
4897         comparing, improved the absolute section creation for ISRs,
4898         added FSR0L/FSR0H in registers that are saved in an ISR,
4899         * (genInline): fixed the processing of inline snippets,
4900         now they undergo no process by the peephole optimizer
4901         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4902         are placed in idataSymSet,
4903         * (pic16emitStaticSeg): extern symbols are added in externs,
4904         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4905         switching when aboslute variables are placed in access bank memory
4906         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4907         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4908         commented out with #if,
4909         * (pic16_packRegisters): reintroduce the check for CAST because some
4910         symbols are not correctly handled,
4911         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4912         pCodeInstruction instead of pCode,
4913         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4914         pCodeAsmDir definition,
4915         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4916         directive, then the argument directive is emitted without the leading
4917         tab, hack for inline labels which must be in the first column,
4918         * (compareLabel,pic16_findNextInstruction),
4919         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4920         * (insertBankSwitch): modified for the new pCodeAsmDir,
4921
4922 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4923         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4924
4925         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4926         instance,
4927         * (pushSide): commented out with #if,
4928         * (assignResultValue): fixed some typos in saving
4929         registers,
4930         * (genPcall): FIXED and sync'ed with genCall,
4931         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4932         * (genNearPointerGet): fixed to handle some more cases,
4933         implementation scheme via table reads,
4934         * (genConstPointerGet): modified to access code memory correct,
4935         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4936         and improved to handle some cases
4937         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4938         instead of "RETLW" for init data
4939         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4940         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4941         variables are placed in access bank memory (<0x80 and >=0xf80),
4942         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4943         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4944         TBLWT_POSTDEC,TBLWT_PREINC
4945         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4946         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4947         directives
4948         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4949         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4950         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4951         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4952
4953 2004-02-29  Borut Razem <borut.razem AT siol.net>
4954
4955         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4956         support/Util/findme.h, support/Util/system.h: enhance binary relative
4957         search for lib and include by using findProgramPath()
4958
4959 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4960
4961         * src/SDCCpeeph.h,
4962         * src/SDCCpeeph.c (pcDistance),
4963         * src/port.h,
4964         * src/mcs51/ralloc.h,
4965         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4966         * src/mcs51/main.h,
4967         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4968         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4969         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4970         size calculation port specific, started basis for some register
4971         optimizations
4972         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4973         missing push/pop of r0/r1. Optimized push/pops
4974         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4975         * device/lib/_modsint.c (_modsint),
4976         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4977         and stack version so regression tests pass
4978
4979 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4980
4981         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4982         * src/SDCCast.c (decorateType): catch another small optimization
4983         with '?' operator
4984         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4985         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4986         modified to finally use computeType() all over SDCC,
4987         see Feature Request #877103
4988         * src/SDCCval.h: cosmetic
4989         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4990         valCompare(); regression tested in muldiv.c
4991         * support/regression/tests/muldiv.c (testMod): mod sign follows
4992         dividend only
4993
4994 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4995
4996         * src/SDCCast.c (decorateType): fixed bug #902362
4997         * doc/INSTALL.txt: fixed install instructions for win32
4998
4999 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5000
5001         * device/include/Makefile.in (install): fixed by replacing spaces
5002         by tabs
5003         * doc/README.txt,
5004         * doc/INSTALL.txt: updated for release
5005         * doc/sdccman.lyx: added warning for --xstack being buggy
5006
5007 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5008
5009         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5010         to eliminate build warnings.
5011         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5012
5013 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5014            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5015
5016         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5017         removed -penable-stack, added comment for stack pragma, added
5018         warning for not initializing the stack/frame registers, removed
5019         comment at interrupts section
5020
5021         Stack is made permanent, there is no ability to disable stack usage.
5022         * src/pic16/device.h,
5023         * src/pic16/device.c: removed all references to USE_STACK macro,
5024         * src/pic16/device.c (pic16_dump_section): when no elements in
5025         rlist, free rlist before return,
5026         * (pic16_dump_int_registers): NEW, internal registers are a new set
5027         of general purpose registers reused by each function,
5028         * (checkAddReg): returns 1 if registers is added to set,
5029         * (pic16_groupRegistersInSection): when a registers is of type
5030         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5031         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5032         SRCASECMP macro is moved here from device.c
5033         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5034         PO_PCLATU, PO_PRODL, PO_PRODH,
5035         * (pic16_pCodeOpType, genMinus,
5036         changed compares to "a" register, with AOP_ACC,
5037         * (pic16_genPlus): fixed some bugs and indented properly,
5038         * (pic16_addSign): changed size to size+offset in the MOVWF
5039         instruction,
5040         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5041         multiply 8-bit operand by literal, result is 8-bit,
5042         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5043         multiply 2 8-bit operand, result is 8-bit,
5044         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5045         genUMult8X*_16,
5046         * src/pic16/gen.c: changed accUse to contain WREG only,
5047         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5048         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5049         true, do not use immediate addressing any more unless sym is a
5050         pointer in codespace,
5051         * (aopForRemat): do not use immediate addressing when symbol not in
5052         codespace and when symbol's address is requested,
5053         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5054         accUse size (= 1),
5055         * (aopGet): added case for AOP_ACC and don't return "accumulator
5056         bug" but WREG instead,
5057         * (popGetTempReg): pushes contents of temporary register in stack,
5058         * (popReleaseTempReg): pops contents of temporary register from
5059         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5060         * (pic16_popGet): separated case AOP_ACC to return register WREG
5061         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5062         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5063         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5064         the use of immediate pointers to certain cases only.
5065
5066         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5067         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5068         * (assignResultValue, genCall, genRet): modified to use the new
5069         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5070         genPcall is still broken,
5071         * (genFunction): added code to create 'A' type pBlocks when
5072         interrupt functions are generated, code not extensively tested yet,
5073         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5074         * (genEndFunction): modified so ISRs pop stored registers from stack,
5075         * (genMultOneByte): cleanup,
5076         * (AccRsh): added flag andmask, to and result with appropriate mask,
5077         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5078         * (genDataPointerGet): fixed and reenabled its use,
5079         * (genNearDataPointerGet): bugs fixed,
5080         * (genDataPointerSet): bugs fixed,
5081         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5082         pic16_DumpSymbol, pic16_DumpOp,
5083         * src/pic16/genutils.h: function prototypes for the above functions,
5084         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5085         pointers,
5086         * (pic16emitRegularMap): many many many improvements, but needs a
5087         major cleanup,
5088         * src/pic16/main.c: enable_stack in pic16_options is removed,
5089         * (_pic16_parseOptions): removed command line options -penable-stack,
5090         * (_process_pragma): emit stack symbol only when stack pragma is
5091         processed,
5092         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5093         redirected to FSR0L/FSR0H pair,
5094         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5095         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5096         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5097         for immediates,
5098         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5099         * (dumpPicOptype): NEW,
5100         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5101         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5102         with movff instruction,
5103         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5104         added pic16_int_regs, some packRegsFor* functions are commented out,
5105         because produce errors,
5106         * src/pic16/NOTES: minor modifications
5107
5108 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5109
5110         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5111         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5112         --pack-iram.
5113         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5114         * as/mcs51/lkaomf51.c: fixed bug #895763
5115
5116 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5117
5118         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5119
5120 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5121
5122         * doc/sdccman.lyx: added details about the HC08 storage classes and
5123         interrupts, fixed the register usage info for z80 & gbz80
5124
5125 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5126
5127         * doc/sdccman.lyx: added more pic16 port documentation
5128         * device/include/pic16/: added header pic18fregs.h
5129
5130 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5131
5132         * doc/sdccman.lyx: added Vangelis' contribution
5133
5134 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5135
5136         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5137         extend to the next CALL or PCALL, not just to the next CALL.
5138
5139 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5140
5141         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5142
5143 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5144
5145         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5146         bug #895752 and a better fix for bug #716790
5147
5148 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5149
5150         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5151
5152 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5153
5154         * doc/sdccman.lyx: minor changes, minor changed
5155
5156 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5157
5158         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5159         which can't handle SDCC_NEWONEBYTEOPS,
5160         (geniCodeMultiply): removed conversion from mult to shift for pic14
5161         and pic16
5162
5163 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5164
5165         * src/hc08/gen.h,
5166         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5167         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5168         thus fixing bug #895406
5169
5170 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5171
5172         * device/lib/_modsint.c,
5173         * device/lib/_modslong.c: sign follows divisor only
5174         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5175         signs or signedness can be ignored
5176         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5177         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5178         added optimization for IFX,
5179         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5180         arguments;
5181         reenabled optimization for IFX, which was removed on 2004-01-11
5182         * src/SDCCast.h: added return type IFX
5183         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5184         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5185         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5186         SDCC_OLDONEBYTEOPS selects the old behaviour
5187         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5188         changed again and commented promotion rule
5189         * src/SDCCval.c (valDiv): promotion no longer necessary
5190         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5191         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5192         rewritten
5193         * support/regression/tests/onebyte.c: added
5194
5195 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5196
5197         * gen.c (genInline): reverted to old code for assemnling inline
5198         code because of bug reported James Chadd
5199
5200 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5201
5202         * ralloc.h: missing declarations from previous patch,
5203         seems that patch for ralloc.h was never applied, fixed
5204
5205 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5206            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5207
5208         * pcode.c,
5209         * pcode.h,
5210         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5211         indirect addressing. Marked FSR0 as deprecated
5212         * gen.c (pointerCode): commented out, not needed now
5213         (pic16_popGet2p): new MOVFF helper function
5214         (genGenPointerGet),
5215         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5216         (shiftRLong): removed duplicate debugging info
5217
5218 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5219
5220         * src/ds390/gen.c (genNearPointerGet),
5221         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5222         optimization with bits, but not bitfields.
5223         * src/ds390/ralloc.c (packRegisters),
5224         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5225
5226 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5227
5228         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5229
5230 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5231
5232         * src/SDCCsymt.h,
5233         * src/SDCCicode.c (operandFromSymbol),
5234         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5235         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5236         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5237         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5238         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5239         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5240         bug #892038
5241         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5242         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5243         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5244         * src/SDCCsymt.c (newSymbol),
5245         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5246         enumerator_list),
5247         * src/SDCCval.h,
5248         * src/SDCCval.c (newiList): fixed bug #885705
5249
5250 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5251
5252         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5253         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5254
5255 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5256
5257         * device/include/c8051f120.h,
5258         * device/include/c8051f300.h,
5259         * device/include/c8051f310.h: added/updated header files for Silicon
5260         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5261         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5262         in new section Submitting patches
5263
5264 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5265
5266         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5267         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5268         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5269         genGenPointerSet),
5270         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5271         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5272         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5273         genGenPointerSet),
5274         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5275         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5276         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5277         genGenPointerSet),
5278         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5279         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5280         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5281         genGenPointerSet): fixed bug #892400
5282         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5283         to eliminate build warnings.
5284         * src/SDCCast.c (processParms),
5285         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5286         fixed bug 751859
5287         * support/valdiag/valdiag.py: added GCC to the list of defines active
5288         when compiling with gcc
5289
5290 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5291
5292         * support/Util/SDCCerr.h,
5293         * support/Util/SDCCerr.c,
5294         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5295         with an incomplete type (fixed bug #883734)
5296         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5297
5298 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5299
5300         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5301
5302 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5303
5304         * src/SDCCast.c (decorateType),
5305         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5306         function pointer implementation
5307         * support/regression/tests/funptrs.c: added tests to verify both forms
5308         of function pointers work correctly. Added tests to verify parameters
5309         are passed in the correct order.
5310
5311 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5312
5313         * device.c (regCompare): registers are sorted by ascending
5314         address and increasing size,
5315         * main.c (_pic16_finaliseOptions): removed the declaration
5316         of compiler macro MCU. Now a macro of the format pic18fxxxx
5317         will be defined from the command line
5318
5319 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5320             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5321
5322         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5323         PCOP_RLCF was overwritten!
5324         * gen.c (genSkip): commented out calls to pic16_emitcode,
5325         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5326         * (genlshTwo),
5327         * (genRRC): added debugging info,
5328         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5329         overwritten while shifting,
5330         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5331         overwritten while shifting,
5332         * (AccLsh),
5333         * (AccRsh),
5334         * (shiftLLeftOrResult),
5335         * (shiftRLeftOrResult),
5336         * (shiftRLong),
5337         * (shiftLLong): Implemented with pic16_emitpcode
5338         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5339         * (genLeftShift): Fixed bug, operand for shift by variable always
5340         was "and"ed with 0x0f,
5341         * (genLeftShiftLiteral),
5342         * (genrshTwo),
5343         * (genRightShiftLiteral): added debugging info,
5344         * (genrshFour): added comment,
5345         * (genRightShift): determined signedness from operand "left"
5346         instead of "result"
5347
5348 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/SDCCicode.c (geniCodeParms),
5351         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5352         function pointers, fixed function pointer bugs #861242 and #861896
5353
5354 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5355
5356         * device/include/c8051f000.h,
5357         * device/include/c8051f120.h,
5358         * device/include/c8051f300.h: added header files for Silicon
5359         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5360
5361 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5362
5363         * src/SDCCast.c (processParams): added new type flow and restructured
5364         (gatherAutoInit): added new type flow
5365         (addCast): cosmetic changes
5366         (getLeftResultType): added new type flow for array indices, patch
5367         provided by Stas, see FR #877103
5368         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5369         array index patch by Stas
5370         * src/SDCCast.h: added prototype getResultTypeFromType()
5371         * src/SDCCval.h,
5372         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5373         * src/pic/glue.c (pic14emitStaticSeg),
5374         * src/pic16/glue.c (pic16emitStaticSeg),
5375         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5376         for initialization of symbols
5377         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5378         * support/Util/SDCCerr.h:
5379         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5380         * .version: bumped version number to 2.3.8
5381         * device/include/Makefile.in (install),
5382         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5383         avoid warnings
5384
5385 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5386
5387         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5388         Slade Rich fixed an optimization bug
5389         * src/pic/pcodepeep.c,
5390         * src/pic/pcoderegs.c
5391         * doc/Makefile (install): added test for directory
5392
5393 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5394
5395         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5396         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5397         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5398         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5399         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5400         * as/mcs51/asexpr.c (term),
5401         * as/hc08/asexpr.c (term): fixed bug #887146
5402
5403 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5404
5405         * src/z80/gen.c (genMult): handle single byte result product
5406         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5407         DUMMY_READ_VOLATILE (fixed bug #886367)
5408
5409 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5410
5411         * support/regression/tests/libmullong.c: fixed logic, on little endian
5412         hosts we ended without a mullong_wrapper()
5413
5414 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5415
5416         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5417         virus/worm forged address usage.
5418
5419 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5420
5421         Fixed promotion, it should be done on AST level:
5422         * src/SDCCast.c (addCast): added promotion to int
5423         (decorateType): updated call to upCast()
5424         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5425         usualUnaryConversions()
5426
5427 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5428
5429         * support/regression/tests/literalop.c (mulWrapper): Added a
5430         wrapper to remove integer overflow warnings.
5431
5432         * support/regression/tests/float_trans.c: Made work on host.
5433
5434         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5435         location of sz80.
5436
5437         * support/regression/generate-cases.py (main): Changed from inline
5438         to a main method.
5439
5440         * doc/Makefile (install): Changed to depth first to get rid of
5441         missing directory install warning.
5442
5443         * as/Makefile (install-doc): Made work on Mac.
5444
5445 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5446
5447         * src/SDCCast.c: added an additional type flow in decorateType() of
5448         opposite direction, see feature request #860006; it's enabled at runtime
5449         by setting the environment variable SDCC_NEWTYPEFLOW
5450         * src/SDCCast.h: changed prototype of decorateType()
5451         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5452         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5453         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5454         see feature request #877103
5455         * src/SDCCval.c: updated call of decorateType()
5456         (valBitwise): fixed bug #882876
5457         (valMinus): added promotion
5458         (valLogicAndOr): result is unsigned
5459         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5460         * src/SDCCsymt.c (computeType),
5461         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5462         must not cause an unsigned operation
5463         * src/pic/glue (pic14emitRegularMap),
5464         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5465
5466 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5467
5468         * src/pic/pcode.c (PCodeID): commented out left over debug code
5469
5470 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5471
5472         * support/valdiag/tests/overflow.c: added shift tests
5473         * src/pic/device.c,
5474         * src/pic/gen.c,
5475         * src/pic/gen.h,
5476         * src/pic/glue.c,
5477         * src/pic/main.c,
5478         * src/pic/pcode.c,
5479         * src/pic/pcode.h,
5480         * src/pic/pcodepeep.c,
5481         * src/pic/pcoderegs.c,
5482         * src/pic/ralloc.c,
5483         * src/pic/ralloc.h: applied patch from Slade Rich;
5484         added support for multiple code pages and multiple RAM banks on the
5485         PIC 14 port. The ASM files now no longer simply assume all the
5486         code / RAM are in the same page / bank. This means the linker can
5487         safely allocate code/RAM of separate ASM files to different pages/banks.
5488         * doc/sdccman.lyx: added Slade's tips
5489         * src/mcs51/peeph.def: fixed bug #880768
5490
5491 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5492
5493         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5494         * src/SDCCast.c (decorateType): fixed bug #880197
5495
5496 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5497
5498         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5499         getopt.h.
5500
5501         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5502         strtof is not part of C89 and isn't included with Mac OS X.
5503
5504 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5505
5506         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5507         shiftL2Left2Result): fixed bug #879326
5508         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5509         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5510         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5511         address fetch for clr instruction
5512         * device/lib/hc08/_mulint.c: created optimized assembly version
5513         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5514
5515 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5516
5517         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5518         proposed in FR #877103
5519
5520 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5521
5522         * src/SDCCval.c (cheapestVal): added missing checks
5523         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5524         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5525
5526 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5527
5528         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5529         equal operands
5530
5531 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5532
5533         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5534         loaded with the linker search paths (-L arguments) and the libraries
5535         to be linked with the current source (-l arguments). Changes
5536         currently will affect only the pic16 port.
5537         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5538         include path the port specific paths and port specific libraries,
5539         * gplink command now contains the $3 argument,
5540         * src/pic16/device.h,
5541         * src/pic16/device.c,: structure PIC_device is made public and
5542         renamed to PIC16_device, the same for variable Pics which is renamed
5543         to Pics16. Updated all references to them.
5544         * src/pic16/glue.c (pic16glue): corrected bug with code
5545         initialization which bypassed the variable initializations block.
5546
5547         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5548         COMPILE_FLAGS and added the --nostdinc option
5549
5550 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5551
5552         * device/include/mc68hc908jb8.h: Register defs for another member
5553         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5554
5555 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5556
5557         Documenting changes from previous commits.
5558         * configure.in (version 1.56),
5559         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5560         when generating output files to configure the pic16 library,
5561         but now I've commented it out, since gputils aren't installed in the
5562         SF compile farm, so library won't compile
5563
5564         * device/lib/Makefile.in (version 1.56): initially I've added in
5565         target 'all' the prerequestive 'model-pic16' so it compiled the
5566         pic16 library, but now I've commented it out for the same reasons
5567         above,
5568         * added targets 'model-pic16' and 'objects-pic16' to compile the
5569         library
5570         * added target 'port-specific-objects-pic16' to handle the
5571         generated libraries and copy them into the build/ directory
5572         * added target 'clean-intermediate-pic16' to clean intermediate
5573         files into pic16 directory
5574         * in target 'installdirs' added line to create directory pic16 in
5575         the installation path
5576
5577         * device/include/Makefile.in (version 1.11): in target 'install'
5578         added lines to copy all header files to installation path,
5579         * in target 'installdirs' added line create directory for pic16
5580         headers in the installation path
5581
5582 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5583
5584         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5585          a function call
5586
5587 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5588
5589         * configure,
5590         * device/lib/configure.in,
5591         * device/lib/configure: fixed for autoconf 2.57
5592
5593 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5594
5595         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5596         option so that it actually works. Made it specific to the z80, since
5597         the gbz80 doesn't have these kinds of I/O ports.
5598
5599 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5600
5601         * device/include/z180.h,
5602         * device/lib/_memcpy.c,
5603         * device/lib/_memmove.c,
5604         * device/lib/_mulint.c,
5605         * device/lib/ser_ir.c,
5606         * device/lib/ser_ir_cts_rts.c,
5607         * device/lib/_strcmp.c,
5608         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5609         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5610         portmode; added deprecation warning for bank= and protmode= forms.
5611         Also, guard against buffer overflow.
5612         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5613
5614 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5615
5616         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5617         changed interrupt vector table generation to only emit declared vectors.
5618         * device/include/Makefile.in: added missing backslash
5619         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5620
5621 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5622
5623         Mainly changes to support compilation of the device libraries
5624         * src/pic16/device.c: stack is allocated via symbol and not
5625         via literal number. The symbol is placed in the corresponding
5626         position of the data ram
5627         * (pic16_dump_section): relocatable and absolute uninitialized
5628         data are now emitted in sorted order to reduce section naming,
5629         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5630         weren't marked as being in the access bank,
5631
5632 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5633
5634         Added portion of GNU PIC Library under the directory
5635         device/include/pic16 and device/lib/pic16. These files
5636         contain the declarations of SFRs for the PIC18Fxx2 devices.
5637         The directory is initialized via configure from toplevel.
5638
5639 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5640
5641         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5642         the spilllocations to be compared correctly
5643
5644 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5645
5646         * src/SDCCast.c (decorateType): fixed bug introduced today
5647
5648 2004-01-12  Borut Razem <borut.razem AT siol.net>
5649
5650         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5651         doc/sdccman.lyx: upper case pragmas are deprecated
5652
5653 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5654
5655         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5656         in simpler and even better code
5657
5658 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5659
5660         * src/SDCCicode.c (operandOperation): fixed bug #874819
5661         * src/SDCCast.c (decorateType): fixed
5662         char foo (unsigned long ul) { return ul > 0; }
5663
5664 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5665
5666         * doc/sdccman.lyx: Moved and added some sections, small changes
5667         all over. Telling LaTeX to be less strict with word spacing
5668         to better keep the right margin. Changed some notes about
5669         maintainance of the ports in section 3.2.1 - is it OK like this?
5670
5671 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5672
5673         SDCC source changes:
5674         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5675         convilong): modified to inform the pic16 port that builtin functions
5676         are external
5677
5678         PIC16 PORT specific changes:
5679         * src/pic16/device.c pic16_dump_equates() added,
5680         processor registers declared internally by the port are emitted in
5681         the translation as equates,
5682         * src/pic16/gen.c: inline code is passed unprocessed to the
5683         translation,
5684         * (pic16_popGetLit2): fnuction modified to take second operand as
5685         pCodeOp pointer and not as literal,
5686         * (popRegFromIdx): prefixed with pic16_,
5687         * (pic16_popCombine2): modified to receive already allocated pCode
5688         operands,
5689         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5690         * (genFunction): initializes local stack frame and pushes on stack
5691         all the registers used by this function,
5692         * (genEndFunction): restores all registers from stack and restores
5693         stack frame,
5694         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5695         improvements,
5696         * (pic16glue): changed the program startup sequence,
5697         * added new dbName code 'A' for functions placed in absolute section
5698         * src/pic16/main.c: added function attribute _naked,
5699         * added pragma 'code' to place a fnuction at an absolute address,
5700         * added command line arguments --debug-ralloc and --pcode-verbose,
5701         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5702         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5703         * (pic16_newpCodeOpLit2): modified to take the second operand as
5704         pCodeOp pointer,
5705         * (pic16_printpBlock): modified to emit each function in a separate
5706         section,
5707         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5708         UPPER for immediate operands,
5709         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5710         instruction,
5711         * src/pic16/peeph.def: all peepholes with movff are commented out,
5712         because there is a problem in the pcode peep optimizer,
5713         * src/pic16/ralloc.c: the register allocator can now reuse local
5714         function symbols for another function. This saves register usage.
5715         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5716
5717         Added file src/pic16/NOTES with information about program writing on
5718         the current port version.
5719
5720 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5721
5722         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5723         and peephole 252 (array access)
5724
5725 2004-01-09  Borut Razem <borut.razem AT siol.net>
5726
5727         * src/SDCCmain.c : fixed #872250: -l command line defined library
5728           files are scanned before standard library files
5729
5730 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5731
5732         * src/SDCCast.c (decorateType): fixed bug #874046
5733
5734 2004-01-09  Borut Razem <borut.razem AT siol.net>
5735
5736         * support/scripts/sdcc.nsi: remove previous installation
5737
5738 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5739
5740         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5741         bytes for last interrupt vector (mcs51)
5742         * sdcc.spec: fixed typo
5743
5744 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5745
5746         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5747         gen51Code): more efficient parameter receive for --model-large
5748         ("bug" #845294)
5749
5750 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5751
5752         * src/ds390/main.c,
5753         * src/z80/main.c: added missed needLinkerScript flags (more than
5754         one port structure defined in these file)
5755         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5756         bug #795325
5757
5758 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5759
5760         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5761         * src/port.h: added flag needLinkerScript in port->linker
5762         structure to inform whether to create a .lnk file or not,
5763         * src/avr/main.c,
5764         * src/ds390/main.c,
5765         * src/hc08/main.c,
5766         * src/mcs51/main.c,
5767         * src/pic/main.c,
5768         * src/pic16/main.c,
5769         * src/xa51/main.c,
5770         * src/z80/main.c: changed appropriately to configure
5771         needLinkerScript flag
5772         * src/pic/gen.c,
5773         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5774         * src/pic/glue.c: added variable udata_section_name to
5775         override default uninitialized data segment definition for
5776         devices only with SHAREBANK memory (reported from Erik Epetrich)
5777         * (pic14emitOverlay): modified to emit a commented overlay segment
5778         directive when no overlay data exist
5779         * (picglue): modified to emit uninitialized data segment
5780         according to udata_section_name
5781         * src/pic/main.c (_pic14_parseOptions): added command line
5782         options --udata-section-name=[name] to override default
5783         udata definition name
5784         * modified _linkCmd and _asmCmd to include compiler passed
5785         arguments via -W option
5786         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5787         object file from '.rel' to '.o' in port->linker structure,
5788         changed size of fptr from 2 to 3 in port structure
5789
5790 2004-01-07  Borut Razem <borut.razem AT siol.net>
5791
5792         * support/scripts/sdcc.nsi: update PATH
5793         * support/scripts/sdcc.ico: craeted
5794
5795 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5796
5797         * device/include/Makefile.in: fix install
5798         * doc/Makefile: fix install
5799
5800 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5801
5802         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5803         in bug #860505
5804         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5805         how the function variable allocation summary is displayed; also
5806         include information about variables allocated to the overlay
5807         segment
5808
5809 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5810
5811         * as/mcs51/lkmain.c: Help about -Y option
5812         * as/mcs51/lkarea.c: Fixed gcc warnings
5813
5814 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5815
5816         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5817         fixed warning
5818         * support/valdiag/tests/overflow.c: added
5819         * src/SDCCast.c (decorateType),
5820         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5821         LEFT_OP (left shift)
5822
5823 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5824
5825         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5826         (default behaviour).
5827
5828 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5829
5830         A python script to validate compiler diagnostic messages. It can be
5831         used to verify that sdcc complains about bad c source code and
5832         gives a good location of the error.
5833         * support/valdiag/Makefile,
5834         * support/valdiag/valdiag.py,
5835         * support/valdiag/tests/*
5836
5837 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5838
5839         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5840         * src/SDCCsymt.c (newEnumType),
5841         * src/SDCCsymt.h
5842         * support/Util/SDCCerr.c,
5843         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5844         enum related bugs.
5845         * support/regression/tests/enum.c: added test for enum values that
5846         require at least 2 bytes of storage.
5847
5848 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5849
5850         * src/common.h: added ifndef/define/endif macros
5851         around the header file.
5852         Bug reported from Jesus Calvino-Fraga
5853
5854 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5855
5856         * sdcc.spec: updated
5857         * device/include/Makefile.in: don't install CVS directories
5858         * device/lib/Makefile.in: added removal of CVS directories after install
5859         * doc/Makefile: fixed install, added local_icons
5860         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5861         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5862         * src/ds390/gen.c (genRightShift): fixed bug #870788
5863         * src/SDCCast.c (decorateType): fixed bug #870781
5864
5865 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5866
5867         PIC16 port related changes:
5868         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5869         added variable stackPos,
5870
5871         * gen.c: genCall, assignResultValue: added support for
5872         pushing/retrieving function parameters to/from stack,
5873         genFunction,genEndFunction: setup stack frame for the
5874         generated function,
5875         genAddrOf: will be changed according to bug 863624
5876
5877         * added files genutils.c and genutils.h which contain gen*
5878         debugged and optimised functions extracted from gen.c
5879
5880         * glue.c: added variable 'externs' which holds extern symbols,
5881         pic16emitRegularMap: is modified to properly handle relocatable
5882          symbols under the new scheme,
5883         pic16createInterruptVect: is modified
5884         pic16printPublics: is modified to emit 'global' assembler directives,
5885         added pic16_printExterns to print extern symbols,
5886         pic16glue: initializes stack/frame pointer in the beginning of
5887         the assembly output. Temporary hack, will be corrected later,
5888         because gplink yet does not support stack and SDCC does not
5889         yet support a type of crt0.o object to create the final binary.
5890
5891         * Removed many lines that contain 8051 legacy code.
5892         * The code is finally placed under a 'code' directive.
5893         * Added port specific options.
5894
5895         * _process_pragma: simplified since now we do not need *special*
5896         include file to define SFR registers. But a separate header
5897         will be needed. This will be developed later.
5898         * _pic16_parseOptions: added, parses port specific options:
5899         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5900         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5901         --preplace-udata-with=
5902
5903         * _pic16_setDefaultOptions: modified to initialize section names,
5904         but hack is temporarly out of order since it needs improvement.
5905         * _pic16_genAssemblerPreamble: configuration words are emitted by
5906         their address instead of their name. This part is incomplete and
5907         supports only the 18Fxx2 devices. Other devices will emit an error
5908         during assembly since they do not contain the same set of config
5909         registers
5910         * _pic16_genIVT: is modified,
5911
5912         * pcode.c: added definitions for some hardware registers that are needed
5913         for stack support
5914         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5915         All PCI entries are updated. Now LFSR is supported.
5916         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5917         * added pic16_newpCodeOpLit2 to support instructions with
5918         two literal arguments
5919         * pic16_pCode2str: corrected code that emits assembler instructions
5920         with two literal operands and those that have an access bit modifier
5921         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5922         this fixes a bug which caused some labels to be lost, when an
5923         assembler directive was added, i.e. banksel,
5924         * pic16_FixRegisterBanking: improved logic that causes the insertion
5925         of bank switching,
5926         * InlineFunction: functions that are called once, are not any more
5927         inlined. This can be a port option in the future,
5928
5929         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5930
5931         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5932         hold the corresponding uninitialized symbols,
5933         * pic16_allocProcessorRegister: registers have explicit marked the
5934         accessBank field,
5935         * pic16_allocInternalRegister: registers are explicit marked as
5936         not used,
5937         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5938         processing list, so bit registers were lost,
5939         *
5940
5941         * ralloc.h: added field 'accessBank' and original symbol operand
5942         in register definition,
5943         * removed the field isMapped from register definition,
5944
5945         ** Several functions have been removed from various sources:
5946         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5947         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5948         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5949         pic16_assignRelocatableRegisters
5950
5951         ** others have been introduced:
5952         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5953         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5954
5955 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5956
5957         * support/scripts/inc2h.pl: changed definition of BIT_AT
5958         to emit 'sbit at' instead of 'bit at'. This was a request.
5959
5960         PIC16 port related preliminary changes:
5961         * gen.c: prefixed function popRegFromString with
5962         pic16_ and all references to it corrected
5963         * pcode.c: all pic16_pc_* hardware registers prefixed
5964         with underscore (_),
5965         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5966         * ralloc.c: newReg(): when register is REG_SFR then
5967         set address to rIdx,
5968         pic16_allocProcessorRegister(): marks register wasUsed=0
5969         pic16_writeUsedRegs(): added a call to assign processor
5970         registers via pic16_assignFixedRegisters
5971
5972 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5973
5974         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5975         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5976         variables in unused register banks.  Also the SSEG is placed
5977         wherever there is enough space for it, and IDATA can be anywhere
5978         in internal RAM.  For now compile using -Wl-Y[stack_size].
5979         The mem file is different for this option as well, since it
5980         makes no sense of talking about DSEG lenght.
5981
5982 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5983
5984         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5985         in certain cases, e.g. when ROM assignment, patch provided
5986         from Albert den Haan.
5987
5988 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5989
5990         Many signedness and type propagation fixes:
5991         * src/SDCCicode.c: made geniCodeCast() static
5992         replaced SPEC_ by IS_ (cosmetic)
5993         (operandOperation): fixed div and mod operation
5994         (usualBinaryConversions): added support for promotion of char
5995         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5996         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5997         (geniCodeAdd): an array index will stay unsigned, even if promoted
5998         from char to int
5999         (geniCodeArray): ditto
6000         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6001         * src/SDCCsymt.c (computeType): added more support for char;
6002         promotion of char is selectable by promoteCharToInt, fixed signedness
6003         for all cases
6004         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6005         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6006         * src/SDCCval (val*): replaced signedness calculation by
6007         computeType()
6008         rearranged if-branches (cosmetic)
6009         (valShift): added warning W_SHIFT_CHANGED
6010         (valCompare): fixed problem with different types
6011         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6012         * support/regression/tests/literalop.c: added many cases
6013         * support/regression/tests/ast_constant_folding.c: changed finally to
6014         'unsigned int'
6015         * .version: new year, new version: 2.3.7
6016         * src/SDCCmain.c (main): applied patch #866468
6017         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6018         provided by Scott Bronson
6019         * doc/sdccman.lyx: updated documentation for sdcdb
6020         updated and added chapter tips
6021
6022 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6023
6024         * src/SDCCsymt.h: missing from yesterday's commits
6025
6026 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6027
6028         * src/SDCC.y (struct_or_union_specifier),
6029         * support/Util/SDCCerr.c,
6030         * support/Util/SDCCerr.h: verify that struct & union tags are used
6031         as declared.
6032
6033 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/SDCCglobl.h: missing from yesterday's commits
6036
6037 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6038
6039         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6040         sft_attributes, struct_declaration, parameter_declaration,
6041         type_name, start_block, declaration_list),
6042         * src/SDCC.lex (check_type): support redefinition of typedef names
6043
6044 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6045
6046         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6047         aligned xdata arrays. Erik helped me with the if clause.
6048
6049 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6050
6051         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6052         warning
6053
6054 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6055
6056         * src/SDCCast.h,
6057         * src/SDCCast.c (newAst_),
6058         * src/SDCCicode.h,
6059         * src/SDCCicode.c (ast2iCode, newiCode),
6060         * src/SDCCglobl.h,
6061         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6062         expr, statement, expression_statement, selection_statement,
6063         iteration_statement, expr_opt, jump_statement): foundation for tracking
6064         sequence points
6065         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6066         point code too)
6067
6068 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6069
6070         * support/Util/SDCCerr.c,
6071         * src/SDCCast.h,
6072         * src/SDCCast.c (createCase, createDefault, decorateType),
6073         * src/SDCClabel.c (labelUnreach),
6074         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6075         to error messages.
6076         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6077         (with thanks to Stas Sergeev)
6078         * device/include/time.h,
6079         * device/lib/time.c (CheckTime): suppress unreachable code warning
6080
6081 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6082
6083         * src/SDCCast.c (createIvalCharPtr),
6084         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6085         bug #753752)
6086         * support/regression/tests/nullstring.c: tests for these two bugs
6087
6088 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6089
6090         * support/Util/SDCCerr.h,
6091         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6092         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6093         about storage class and 'at' used inside struct or union
6094         * src/SDCCBBlock.c (iCodeFromeBBlock),
6095         * src/SDCCcse.c (ifxOptimize),
6096         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6097         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6098         printIval, emitStaticSeg, emitOverlay),
6099         * src/SDCClabel.c (deleteIfx),
6100         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6101         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6102         gatherAutoInit, processParms),
6103         * support/Util/SDCCerr.h,
6104         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6105         reporting for post-parse errors.
6106
6107 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6108
6109         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6110         implicit casts via union; they don't work on big endian systems
6111         (possible fix for bug #861138)
6112
6113 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6114
6115         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6116         * src/mcs51/main.c: fixed the fix for bug #737001
6117
6118 2003-12-15  Borut Razem <borut.razem AT siol.net>
6119
6120         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6121
6122 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6123
6124         * support/makebin/makebin.c: put output in binary mode
6125
6126 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6127
6128         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6129         xdata and data memory on startup. Set the environment variable
6130         SDCC_NOGENRAMCLEAR to disable this.
6131         * src/mcs51/peephole.def,
6132         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6133         (allows non-interrupt and interrupt code to safely compete for a resource
6134         without the non-interrupt code having to disable interrupts)
6135
6136 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6137
6138         * src/SDCCicode.c (geniCodeAdd),
6139         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6140         with valFromType if type might be a pointer and host is big endian).
6141         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6142         types, not just integer types.
6143         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6144         multiply defined with mismatching "at" address.
6145
6146 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6147
6148         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6149         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6150         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6151         with embedded nulls (fixed bug #753752)
6152
6153 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6154
6155         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6156         Apparently this did not see much testing (endless loop)
6157
6158 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6159
6160         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6161
6162 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6163
6164         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6165         gracefully handle NULL memmap pointers
6166
6167 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6168
6169         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6170         instead of deleting the iCode when an operand is volatile
6171         * src/z80/gen.c (genDummyRead),
6172         * src/mcs51/gen.c (genDummyRead),
6173         * src/ds390/gen.c (genDummyRead),
6174         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6175         not just IC_RIGHT
6176         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6177         * src/SDCC.y: fixed bug #850420
6178
6179 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6180
6181         Applied z80 i/o port patch from Peter Townson and fixed some operators
6182         to better handle operands in A register.
6183         * device/include/z180.h
6184         * src/SDCC.y
6185         * src/SDCCglue.c
6186         * src/z80/gen.c
6187         * src/z80/gen.h
6188         * src/z80/main.c
6189         * src/z80/peeph-z80.def
6190         * src/z80/peeph.def
6191         * src/z80/z80.h
6192
6193 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6194
6195         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6196
6197 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6198
6199         * device/lib/hc08/_mullong.c: Removed extra #endif
6200
6201 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6202
6203         * sim/ucsim/hc08.src/inst.cc,
6204         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6205         carries from x to h
6206         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6207         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6208         * device/include/stdarg.h: fixed varargs for hc08
6209         * device/lib/Makefile.in,
6210         * device/lib/hc08/Makefile,
6211         * device/lib/hc08/_mulint.c,
6212         * device/lib/hc08/_mullong.c: fixed some endian problems
6213
6214 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6215
6216         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6217         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6218         * device/lib/_gptrget.c,
6219         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6220
6221 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6222
6223         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6224         * src/SDCCast.c (astErrors): fixed bug #846007
6225         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6226
6227 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6228
6229         * src/SDCCast.c (decorateType): disabled a transformation I added in
6230         revision 1.188 (access to fields of a structure at an absolute address);
6231         it breaks with bitfields, extern declarations, and gcse analysis.
6232         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6233         could be assigned through a pointer, so don't complain.
6234         * src/SDCCast.c (astErrors),
6235         * src/SDCCast.h,
6236         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6237
6238 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6239
6240         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6241         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6242         output of __config directives, since gpasm now supports them
6243         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6244         pre-processor macro, i.e. -DMCU=p18f452
6245         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6246         and modified to handle 'cast' icode similarly to '=' icode
6247         * src/pic16/device.h (typedef struct PIC_device): added field
6248         'extMIface' to indicate that chip has external memory interface
6249         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6250         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6251         18F8720
6252
6253 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6254
6255         * src/SDCC.y (pointer): fixed bug #846006
6256         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6257         * src/SDCCast.c (decorateType): fixed bug #846009
6258         * src/ds390/peeph.def,
6259         * src/ds390/gen.c (genAnd, genOr),
6260         * src/mcs51/peeph.def,
6261         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6262
6263 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6264
6265         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6266         * src/SDCCdflow.c
6267         * src/SDCCcse.c
6268         * src/SDCCcse.h
6269         * src/SDCCBBlock.h
6270         * src/SDCCBBlock.c
6271
6272 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6273
6274         fixed bug #845089
6275         * src/SDCCbitv.h,
6276         * src/SDCCbitv.c: added function to free a bitvector
6277         * src/SDCClrange.h,
6278         * src/SDCClrange.c: added function to recompute the liveranges
6279         * src/avr/ralloc.c,
6280         * src/ds390/ralloc.c,
6281         * src/hc08/ralloc.c,
6282         * src/mcs51/ralloc.c,
6283         * src/pic/ralloc.c,
6284         * src/pic16/ralloc.c,
6285         * src/xa51/ralloc.c,
6286         * src/z80/ralloc.c: recompute the liveranges after register packing
6287
6288 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6289
6290         * src/SDCCloop.c (newInduction): fixed bug #845630
6291
6292 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6293
6294         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6295         inadvertantly left behind from my 2003-11-12 change
6296
6297 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6298
6299         Updated headers I neglected to commit yesterday.
6300         * src/SDCClrange.h,
6301         * src/SDCCicode.h
6302
6303 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6304
6305         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6306         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6307         * src/SDCCopt.c (eBBlockFromiCode),
6308         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6309         the creation of the key hash table from the sequencing so it can be used
6310         earlier (for some GCSE bug fixes still pending)
6311
6312 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6313
6314         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6315         * support/regression/tests/addsub.c: testing genPlus shortcut
6316
6317 2003-11-15  Borut Razem <borut.razem AT siol.net>
6318
6319         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6320
6321 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6322
6323         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6324         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6325         ordering is immaterial.
6326         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6327
6328 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6329
6330         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6331         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6332         (SIGSEV) of bug #840381
6333         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6334         unlink new file before rename if new and old filenames are the same)
6335
6336 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6337
6338         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6339         uninitialized variables) for the mcs51. Set environment variable
6340         SDCC_GENRAMCLEAR to test.
6341         xdata initialization slightly shorter
6342
6343 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6344
6345         * src/SDCCsymt.h,
6346         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6347         #838241 & 780691 (basicly the same bug)
6348         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6349         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6350
6351 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6352
6353         * src/SDCCmain.c (linkEdit): "fix" #834252
6354
6355 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6356
6357         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6358         * src/SDCCast.h,
6359         * src/SDCC.y: fixed bug #819403
6360
6361 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6362
6363         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6364         the reentrant attribute.
6365         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6366         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6367         simulation
6368         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6369         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6370         erroneously reduced to a literal.
6371         * src/hc08/ralloc.c (packRegisters, rematStr),
6372         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6373         some cases
6374
6375 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6376
6377         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6378         * doc/sdccman.lyx: changed from 'article' to 'book'
6379         * doc/Makefile: readded test_suite_spec and cdbfileformat
6380
6381 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6382
6383         * device/include/stdlib.h: include malloc.h to comply with ANSI
6384         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6385
6386 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6387
6388         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6389         * doc/clean.mk: also remove *.out files
6390         * doc/sdccman.lyx: some additions, larger top/bottom margins
6391
6392 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6393
6394         * src/SDCC.y: fixed bug #837365
6395         * support/regression/tests/bitopcse.c
6396         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6397         a symbol (might be valop instead)
6398         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6399         * device/lib/clean.mk: added hc08 to the cleaning list
6400
6401 2003-11-04  Borut Razem <borut.razem AT siol.net>
6402
6403         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6404           made 2003-11-04
6405         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6406           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6407           malloc is declared in standard stdlib.h
6408
6409 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6410
6411         * device/lib/hc08/Makefile: need to clean .rel not .o files
6412         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6413
6414 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6415
6416         * src/port.h,
6417         * src/hc08/main.c,
6418         * src/mcs51/main.c,
6419         * src/ds390/main.c,
6420         * src/z80/main.c,
6421         * src/avr/main.c,
6422         * src/pic/main.c,
6423         * src/pic16/main.c,
6424         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6425         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6426         tests (which uses the port's oclsExpense function)
6427         * src/SDCC.y,
6428         * src/SDCCast.c,
6429         * src/SDCCicode.c,
6430         * src/hc08/gen.c,
6431         * src/ds390/gen.c,
6432         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6433
6434 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6435
6436         * src/SDCCcse.c (ifxOptimize),
6437         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6438         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6439         deleting the IFX iCode.
6440         * src/hc08/ralloc.c: reduced unneeded slocs
6441         * src/hc08/gen.c: fixed bug in asmopToBoolean
6442
6443 2003-11-04  Borut Razem <borut.razem AT siol.net>
6444
6445         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6446           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6447           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6448           transferred to configure
6449
6450 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6451
6452         Use headers defined in the C[++] standards:
6453         * sim/ucsim/gui.src/serio.src/fileio.cc
6454         * sim/ucsim/gui.src/serio.src/frontend.cc
6455         * sim/ucsim/gui.src/serio.src/main.cc
6456         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6457         * support/Util/NewAlloc.c
6458         * as/hc08/lklibr.c
6459         * as/mcs51/lklibr.c
6460         * as/z80/aslist.c
6461         * as/z80/assym.c
6462
6463 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6464
6465         * Added MSVC projects for hc08 assembler and linker:
6466         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6467         /as/hc08/link_hc08.dsp
6468
6469 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6470
6471         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6472
6473 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6474
6475         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6476
6477 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6478
6479         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6480
6481 2003-10-31  Borut Razem <borut.razem AT siol.net>
6482
6483         * support/cpp2/cpplib.h,
6484           support/cpp2/cpplib.c,
6485           support/cpp2/cpplex.c,
6486           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6487           to switch _asm block preprocessing on / off. Default is
6488           #pragma preproc_asm +
6489
6490 2003-10-31  Borut Razem <borut.razem AT siol.net>
6491
6492         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6493           when outputting comment blocks (when executed with -C option) and
6494           _asm (SDCPP specific) blocks
6495
6496 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6497
6498         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6499
6500 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6501
6502         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6503
6504 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6505
6506         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6507         * src/SDCCast.c (decorateType): fixed bug #832664
6508
6509 2003-10-31  Borut Razem <borut.razem AT siol.net>
6510
6511         * support\cpp2\cpplex.c: fixed for SDCPP:
6512           comments(when executed with -C option) and _asm blocks
6513           were included even if they where in skipped #if block.
6514           Applied solution from GCC cpp 3.3.2
6515
6516 2003-10-31  Borut Razem <borut.razem AT siol.net>
6517
6518         * src/SDCC.lex: sdcc now understands both formats:
6519           '# <line_number> <file_name>' and
6520           '#line <line_number> <file_name>'
6521         * support/cpp2/cppmain.c: sdcpp now generates the standard
6522           '# <line_number> <file_name>' instead of former
6523           '#line <line_number> <file_name>'
6524
6525 2003-10-30  Borut Razem <borut.razem AT siol.net>
6526
6527         * support/cpp2/cpphash.h,
6528         * support/cpp2/cpplib.h
6529         * support/cpp2/cpplex.c,
6530         * support/cpp2/cppmain.c,
6531         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6532
6533 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6534
6535         Fixed a number of problems revealed by bug #827883.
6536         * src/SDCCloop.c (loopInvariants): Spill location of the
6537         result operand should be recomputed if extracted from
6538         a loop. Also, don't extract assignments of an iTemp
6539         from a literal.
6540         * src/SDCCast.c (isConformingBody): loop reversal should
6541         not occur if the control variable is involved with a
6542         relational operator.
6543
6544 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6545
6546         * .version: bumped to 2.3.6 to reflect the big improvements
6547         made by Erik and Klaus. Thanks!
6548
6549 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6550
6551         Replaced the livrange code.
6552         * src/SDCClrange.c: added new LR code
6553         * src/SDCCloop.c,
6554         * src/SDCCBBlock.h: removed remainig parts from old LR code
6555         * src/ds390/ralloc.c,
6556         * src/ds390/gen.c: minor fixes to make it work with new code
6557
6558 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6559
6560         * as/hc08/asm.h,
6561         * as/hc08/lkrloc.c,
6562         * src/hc08/gen.c,
6563         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6564         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6565         (tweaked fix for bug #818696)
6566
6567 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6568
6569         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6570
6571 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6572
6573         * src/SDCCmain.c,
6574         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6575         * src/mcs51/gen.c (gencjneshort),
6576         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6577         more efficient (per Scott Bronson's suggestion)
6578
6579 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6580
6581         Extended the semantics of the critical keyword to include
6582         individual statements. See RFE #827755 and #799831
6583         * src/SDCC.y
6584         * src/SDCCicode.c
6585         * src/SDCCopt.c
6586         * src/SDCCast.c
6587         * support/Util/SDCCerr.c
6588         * support/Util/SDCCerr.h
6589         * src/mcs51/gen.c
6590         * src/ds390/gen.c
6591         * src/hc08/gen.c
6592
6593 2003-10-19  Borut Razem <borut.razem AT siol.net>
6594
6595         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6596
6597 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6598
6599         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6600         Fixed bug #818696
6601         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6602         and predecrement operand is displayed
6603
6604 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6605
6606         * src/SDCCval.c (valMinus): fixed bug #826041
6607
6608 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6609
6610         Some hc08 related updates that I missed earlier
6611         * sim/ucsim/stypes.h
6612         * support/regression/ports/hc08/spec.mk
6613
6614 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6615
6616         New target "hc08" for the Motorola 68hc08 family of micros
6617
6618         * configure
6619         * configure.in
6620         * Makefile
6621         * src/hc08/*
6622         * src/SDCCmain.c
6623         * src/port.h
6624         * sim/ucsim/hc08.src/*
6625         * sim/ucsim/configure.in
6626         * src/ucsim/configure
6627         * sim/ucsim/packages_in.mk
6628         * as/hc08/*
6629         * as/Makefile
6630         * device/include/mc68hc908qy.h
6631         * device/lib/hc08/*
6632         * device/lib/Makefile.in
6633         * support/regression/ports/hc08/*
6634         * support/regression/Makefile
6635
6636 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6637
6638         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6639         regression test
6640         * src/ds390/gen.c (genCast): fixed bug #821957
6641
6642 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6643
6644         * device/lib/logf.c: "fixed" overlay bug
6645         * support/regression/ports/host/spec.mk: added m library
6646         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6647         * support/regression/tests/float_trans: added (for Eric)
6648
6649 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6650
6651         * src/mcs51/gen.c (genCpl): fixed bug
6652         http://sf.net/mailarchive/message.php?msg_id=6263915
6653
6654 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6655
6656         * src/SDCCast.c (decorateType): added extended constant folding
6657         * src/SDCCsymt.c (computeType): cleanup
6658         * src/SDCCval.c (valShift): minor optimization
6659         * support/regression/tests/ast_constant_folding.c: added
6660
6661 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6662
6663         * src/SDCCmain.c: removed some unintended changes
6664
6665 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6666
6667         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6668         * src/z80/gen.c: fixed part of bug #817589
6669         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6670
6671 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6672
6673         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6674         * src/SDCCcflow.c
6675         * src/SDCCcse.c
6676         * src/SDCCdflow.c
6677         * src/SDCClabel.c
6678         * src/SDCClrange.c
6679         * src/SDCCmem.c
6680         * src/SDCCopt.c
6681         * src/SDCCpeeph.c
6682         * src/SDCCset.c
6683         * src/avr/ralloc.c
6684         * src/ds390/ralloc.c
6685         * src/izt/ralloc.c
6686         * src/mcs51/ralloc.c
6687         * src/pic/ralloc.c
6688         * src/pic16/ralloc.c
6689         * src/xa51/ralloc.c
6690         * src/z80/ralloc.c
6691         * src/z80/gen.c: removed unused label "release:"
6692
6693 2003-10-06  Borut Razem <borut.razem AT siol.net>
6694
6695         * src/SDCC.lex: removed definition of unused variables
6696           save_optimize and save_options
6697
6698 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6699
6700         * clean.mk: removed '=' in "-maxdepth=1"
6701         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6702         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6703
6704 2003-10-06  Borut Razem <borut.razem AT siol.net>
6705
6706         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6707           my_unput() replaced by unput()
6708
6709 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6710
6711         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6712         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6713         type-punned pointer will break strict-aliasing rules"
6714         Old LR behaviour is again default; Klaus' LR can be choosen by
6715         defining the environment variable LRKLAUS
6716         * src/SDCCBBlock.h
6717         * src/SDCCloop.c
6718         * src/SDCClrange.c
6719         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6720         * clean.mk: fixed removal of files in bin/CVS/
6721         * device/lib/clean.mk: fixed removal of directories small and large
6722         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6723         * src/SDCCicode.c,
6724         * src/SDCCval.c: removed superflous test for pedantic
6725
6726 2003-10-05  Borut Razem <borut.razem AT siol.net>
6727
6728         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6729           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6730           message "unmatched #pragma SAVE and #pragma RESTORE"
6731
6732 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6733
6734         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6735           assembly, critical functions, atomic, nojtbound)
6736
6737 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6738
6739         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6740         * src/SDCCBBlock.h
6741         * src/SDCCloop.c
6742         * src/SDCCloop.h
6743         * src/SDCClrange.c
6744
6745 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6746
6747         * src/z80/gen.h,
6748         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6749         * src/mcs51/gen.h
6750         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6751         * src/ds390/gen.h
6752         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6753         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6754         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6755
6756 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6757
6758         * src/z80/gen.c (genRet): fixed bug #524753
6759         * src/z80/gen.c (genCast): fixed internal error on cast from
6760         pointer to long
6761         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6762         fix for bug #477835 to the z80
6763         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6764         for tracking iCodes in the peephole optimizer for z80
6765
6766 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6769         the other part of bug #814548
6770         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6771
6772 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6773
6774         * src/SDCCcse.c: fixed part of bug #814548
6775
6776 2003-09-28  Borut Razem <borut.razem AT siol.net>
6777
6778         * src/asm.c: rewrite of printILine() to use temporary file instead
6779           a pipe
6780         * src/xa51/main.c: commented out declaration of int rewinds
6781
6782 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6783
6784         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6785
6786 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6787
6788         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6789         * src/asm.c (printILine): Fixed bug #811015
6790
6791 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6792
6793         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6794         freeing.
6795
6796 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6797
6798         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6799         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6800         to correctly handle general case of AOP_PAIRPTR
6801         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6802
6803 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6804
6805         * src/mcs51/ralloc.c (fillGaps),
6806         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6807         register positioning bug)
6808
6809 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6810
6811         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6812
6813 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6814
6815         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6816         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6817         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6818         (ralloc doesn't intentionally do this now, but perhaps later)
6819         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6820         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6821         register positioning bugs (Fixed bug #762602 and #795325)
6822         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6823         (Fixed bug #808779)
6824         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6825         lines that --i-code-in-asm generates
6826
6827 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6828
6829         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6830         trying to fclose a FILE* that was already closed.
6831
6832 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6835         of const struct should be treated as if const themselves)
6836
6837 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6838
6839         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6840
6841 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6842
6843         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6844         Unix (/n) and DOS (/r/n) line terminations.
6845
6846 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6847
6848         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6849         bug #613775
6850
6851 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6852
6853         * src/mcs51/gen.c (genFunction, genEndFunction),
6854         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6855         and restore of EA so that stack offsets to parameters are
6856         correct when using both critical and reentrant/stack-auto.
6857         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6858         size (can be triggered in error if sloc is shared between
6859         different sized objects)
6860         * device/include/float.h: fixed macros to explicitly use
6861         unsigned long where needed
6862
6863 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6864
6865         Feature req. 799831: added code to allow nesting of critical functions
6866         * src/mcs51/gen.c (genFunction, genEndFunction)
6867         * src/ds390/gen.c (genFunction, genEndFunction)
6868
6869 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6870
6871         * src/SDCCsymt.c (sclsFromPtr),
6872         * src/SDCCsymt.h,
6873         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6874         support for standard C idiom of memory mapped variables; for
6875         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6876         to xdata int at 0x1234 tempvar = 1.
6877         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6878         provided by Akiya ISHIDA
6879
6880 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6881
6882         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6883         * src/SDCCval.c (constVal): added reduction from int to char
6884         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6885         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6886         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6887         to ignore the sign
6888         * support/regression/tests/shifts.c: fixed
6889
6890 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6891
6892         * src/z80/gen.c (genXor): Fixed bug #805445
6893
6894 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6895
6896         Fixed bug #621531 (const & volatile confusion in the type chain).
6897         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6898         refer to the const or volatile state of the pointer itself.
6899
6900         * src/SDCCast.c
6901         * src/SDCCglue.c
6902         * src/SDCCicode.c
6903         * src/SDCCsymt.c
6904         * src/SDCCval.c
6905         * src/SDCC.y
6906         * src/SDCCsymt.h
6907         * src/pic/gen.c
6908         * src/pic/ralloc.c
6909         * src/pic16/gen.c
6910         * src/pic16/ralloc.c
6911         * support/regression/tests/const.c
6912
6913 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6914
6915         When checking for duplicated modules, use absolute paths
6916         instead of relative paths.  Files changed:
6917
6918         * as/mcs51/lklib.c
6919         * link/z80/lklib.c
6920
6921 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6922
6923         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6924
6925 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6926
6927         * device/include/string.h: added size_t typedef, changed
6928         prototypes to use size_t, eliminated separate reentrant and
6929         non-reentrant declarations, added _memmove declaration
6930         * device/lib/_memcpy.c: changed to use size_t instead of int,
6931         changed /4 to >>2 to avoid division library call
6932         * device/lib/_memcmp.c,
6933         * device/lib/_memset.c,
6934         * device/lib/_strncat.c,
6935         * device/lib/_strncpy.c,
6936         * device/lib/_strncmp.c: changed to use size_t instead of int
6937         * device/lib/_memmove.c: new file (fixed bug #772294)
6938         * device/lib/Makefile.in: added _memmove.c
6939         * device/lib/z80/asm_strings.s: fixed bug #772290
6940         * support/regression/tests/bitfields.c: attempt to fix host assertion
6941         failure on amd64-unknown-linux2.2
6942
6943 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6944
6945         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6946         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6947         * as/z80/asmain.c (main): fixed bug #801766
6948
6949 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6950
6951         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6952         compilers
6953
6954 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6955
6956         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6957         reported in bug #800609
6958
6959 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6960
6961         * Top header beautifications in src/pic16 directory:
6962           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6963           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6964           pcoderegs.h, ralloc.c, ralloc.h
6965         * main.c: added top header and GPL license notice
6966         * pcode.c: fixed the if-conditional warning
6967
6968 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6969
6970         * device/lib/_mullong.c: replaced int by short for gcc
6971
6972 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6973
6974         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6975         and JUMPTABLE iCodes properly now (worked by accident before)
6976         * src/mcs51/gen.c (leftRightUseAcc),
6977         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6978         iCode properly now. Use getSize instead of nRegs since a & b
6979         aren't part of the nRegs tally.
6980
6981 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6982
6983         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6984         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6985           before instructions that use the _STATUS register
6986
6987 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6988
6989         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6990         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6991         fetching of the pointer
6992         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6993         copied from genNearPointerSet()
6994         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6995         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6996         If they pop r0/r1 they must be called in the opposite order than aopOp().
6997         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6998         (resp. --stack-auto), prepared for --xstack
6999
7000 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7001
7002         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7003
7004 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7005
7006         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7007         these ports have their own __sdcc_external_start()
7008
7009 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7010
7011         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7012         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7013         type for bits was changed. It resulted in bit variables becoming
7014         global, which is not permitted in PIC 14 assembly output.
7015
7016 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7017
7018         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7019
7020 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7021
7022         Z80 and MCS51 linkers complaint if a public symbol is defined
7023         in more than one library module:
7024
7025         * as/mcs51/lklib.c
7026         * link/z80/lklib.c
7027         * as/mcs51/Makefile.in
7028
7029 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7030
7031         A few small changes that speed up the peephole optimizer.
7032
7033         * src/SDCCpeeph.c
7034
7035 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7036
7037         Try to make the peephole optimizer smarter by maintaining
7038         an association between the assembly source code and the
7039         iCodes that originated them. Put this information to use
7040         with a new peephole rule condition "notVolatile" so that
7041         the rules can be aggressive yet still safe.
7042
7043         * src/SDCCpeeph.c
7044         * src/SDCCpeeph.h
7045         * src/mcs51/gen.c
7046         * src/mcs51/peeph.def
7047
7048 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7049
7050         Fixed bug #741761
7051
7052         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7053         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7054         if the left or right operand symbols have the accuse flag set.
7055
7056 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7057
7058         Changed the type of the result of the ! (NOT) operator to char;
7059         previously it returned the same type as the source. This allows
7060         us to eliminate all the genFloatNot functions (all of its target
7061         implementations were very buggy) since !float can use the same
7062         code as !long now.
7063
7064         * src/SDCCicode.c (ast2iCode): ! returns char
7065         * src/mcs51/gen.c (genNot, genNotFloat),
7066         * src/ds390/gen.c (genNot, genNotFloat),
7067         * src/z80/gen.c (genNot, genNotFloat),
7068         * src/pic/gen.c (genNot, genNotFloat),
7069         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7070
7071 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7072
7073         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7074         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7075            during interrupts. Ensure WSAVE is located at a shared bank address.
7076         2. Fixed page selection in some places
7077         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7078            the registers name strings.
7079         4. Fixed "signed / unsigned compare" compiler warnings.
7080         5. The PIC port manages its own allocation of the general purpose
7081            registers, but makes no attempt to reuse them. As a result when
7082            compiling it soon runs out of general purpose registers. Some
7083            additional code was added to the files pcode.c and device.c to walk
7084            through the function call tree and rename the registers so that they
7085            get reused.
7086
7087         * src/pic/device.c
7088         * src/pic/gen.c
7089         * src/pic/glue.c
7090         * src/pic/pcode.c
7091         * src/pic/pcode.h
7092         * src/pic/ralloc.c
7093         * src/pic/ralloc.h
7094         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7095         genPlus() & genMinus() when the result is the same as left or right
7096
7097 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7098
7099         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7100
7101 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7102
7103         Made bitfield a distinct type from bit so that bitfields
7104         convert as per ANSI C and bits retain their traditional
7105         boolean style behaviour. Implemented bitfield support in
7106         the z80 port.
7107
7108         * src/SDCCsymt.h,
7109         * src/SDCCsymt.c,
7110         * src/SDCCast.c,
7111         * src/cdbFile.c,
7112         * src/mcs51/gen.c,
7113         * src/ds390/gen.c: bit v bitfield split
7114         * src/z80/gen.c: New support for bitfields
7115         * support/regression/tests/bitfields.c: reenabled z80,
7116         added more tests
7117
7118 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7119
7120         Rules 246.x, 247.x relate to bitfields, the others speed up
7121         access to xdata mapped I/O devices.
7122
7123         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7124
7125 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7126
7127         Cleaned up genPackBits and genUnpackBits and added two helper
7128         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7129         for literal assignments in genPackBits (thanks to Frieder for
7130         reminding me).
7131
7132         * src/mcs51/gen.c
7133         * src/ds390/gen.c
7134
7135 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7136
7137         Fixed bug #748310 (pointer to function type mishandled when the
7138         function name is omitted). Also fixed a SIGSEGV when a function
7139         attribute (reentrant, etc) is used on a non-function or on a
7140         function but misplaced before the parameter list.
7141
7142         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7143         bug #748310
7144         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7145         * support/Util/SDCCerr.h,
7146         * support/Util/SDCCerr.c: Added func attr misuse error msg
7147
7148 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7149
7150         Fixed bug #787649 by anonymous
7151         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7152         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7153
7154 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7155
7156         Fixed numerous bitfield problems.
7157
7158         * src/SDCC.y: More bitfield related error checking
7159         * src/SDCCsymt.h,
7160         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7161         * support/Util/SDCCerr.h,
7162         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7163         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7164         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7165         * support/regression/tests/bitfields.c: tests added
7166
7167 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7168
7169         Made the constant following the "interrupt" keyword optional. If
7170         omitted, the function will not automatically be given an entry
7171         in the interrupt vector table (similar to #pragma NOIV, but
7172         less syntacticly kludgy). The interrupt number is also now
7173         range checked. Also fixed a bug in the high order bit example
7174         in the manual.
7175
7176         * src/SDCC.y
7177         * src/SDCCmem.c
7178         * src/SDCCglue.c
7179         * src/SDCCsymt.h
7180         * support/Util/SDCCerr.c
7181         * support/Util/SDCCerr.h
7182         * doc/sdccman.lyx
7183
7184 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7185
7186         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7187         * src/SDCCicode.c (operandOperation): rewritten some ops
7188         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7189         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7190         other type
7191         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7192         be re-activated by defining REDUCE_LITERALS)
7193         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7194         unsigned, but are signed by default
7195         * src/SDCCval.c (constVal): rearranged
7196         * src/SDCCval.c (valMod): preliminary fix
7197         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7198         * support/regression/literalop.c: added, work in progress
7199
7200 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7201
7202         Generate warnings for useless declarations like "char data;"
7203         that don't do what new users expect.
7204
7205         * src/SDCC.y
7206         * support/Util/SDCCerr.h
7207         * support/Util/SDCCerr.c
7208
7209 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7210
7211         * src/SDCCval.c (valMult): fix overflow detection of negative int
7212
7213 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7214
7215         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7216
7217         Changes to support big endian targets:
7218
7219         * src/ports.h
7220         * src/SDCCglue.c
7221         * src/avr/main.c
7222         * src/ds390/main.c
7223         * src/izt/i186.c
7224         * src/mcs51/main.c
7225         * src/pic/main.c
7226         * src/pic16/main.c
7227         * src/xa51/main.c
7228         * src/z80/main.c
7229
7230 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7231
7232         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7233         * device/lib/time.c: fixed warning "integer overflow in expression"
7234
7235 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7236
7237         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7238         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7239         constants are unsigned; added recognition of "u" flag for unsigned
7240         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7241         * src/SDCCval.c (valDiv, valMod): fixed signdness
7242         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7243         signedness of modulo, left and right shift
7244         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7245         * support/Util/SDCCerr.h: added warning W_INT_OVL
7246         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7247         * src/SDCCast.c (ast_print): improved output of constants
7248
7249 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7250
7251         Fixed some warnings when building with MSVC:
7252
7253         * as\mcs51\asdata.c
7254         * as\z80\asdata.c
7255         * as\mcs51\asm.h
7256         * as\z80\asm.h
7257         * link\z80\aslink.h
7258         * link\z80\lkdata.c
7259         * link\z80\lkeval.c
7260         * link\z80\lkgb.c
7261         * link\z80\lkihx.c
7262         * link\z80\lks19.c
7263         * link\z80\lksym.c
7264         * support\cpp2\cpplib.c
7265         * src\ds390\gen.c
7266         * src\mcs51\gen.c
7267
7268 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7269
7270         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7271
7272 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7273
7274         * support\librarian\clean.mk: Do not remove Makefile.
7275         * support\librarian\Makefile: added.
7276
7277 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7278
7279         Added librarian to MSVC build:
7280         * all.dsp
7281         * sdcc.dsw
7282         * support\librarian\librarian.dsp
7283
7284         'configure' not needed for librarian, removed:
7285         * support\librarian\configure
7286         * support\librarian\configure.in
7287         * support\librarian\config_in.h
7288         * support\librarian\Makefile.in
7289
7290         Hopefully these ones built the librarian and the rest of sdcc properly:
7291         * Makefile
7292         * Makefile.common.in
7293
7294         Messed up 'configure', so revert to previous version:
7295         * configure
7296         * configure.in
7297
7298 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7299
7300         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7301         there, while the mantissa of a double is "only" 53 bits wide.
7302
7303 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7304
7305         Adding sdcclib to the build.  MSVC project coming soon.
7306         Files added/changed:
7307
7308         * support\librarian\clean.mk
7309         * support\librarian\configure
7310         * support\librarian\configure.in
7311         * support\librarian\config_in.h
7312         * support\librarian\Makefile.bcc
7313         * support\librarian\Makefile.in
7314         * support\librarian\sdcclib.c
7315         * Makefile.bcc
7316         * Makefile
7317         * Makefile.common.in
7318         * configure
7319         * configure.in
7320
7321 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7322
7323         Linker now complaints if linked modules have conflicting options, for
7324         example, one compiled using --model-large and another one compiled with
7325         --model-small.  The following files were modified:
7326
7327         * as\mcs51\asdata.c
7328         * as\mcs51\aslink.h
7329         * as\mcs51\asm.h
7330         * as\mcs51\asmain.c
7331         * as\mcs51\asout.c
7332         * as\mcs51\i51pst.c
7333         * as\mcs51\lkdata.c
7334         * as\mcs51\lklibr.c
7335         * as\mcs51\lkmain.c
7336         * as\z80\asdata.c
7337         * as\z80\asm.h
7338         * as\z80\asmain.c
7339         * as\z80\asout.c
7340         * as\z80\z80pst.c
7341         * link\z80\aslink.h
7342         * link\z80\lkdata.c
7343         * link\z80\lklibr.c
7344         * link\z80\lkmain.c
7345         * src\SDCCglue.c
7346
7347 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7348
7349         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7350         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7351
7352 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7353
7354         * src/z80/mappings.i: fix _mul[us][int,long] entries
7355
7356 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7357
7358         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7359
7360 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7361
7362         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7363         * support/regression/tests/bitopcse.c: added
7364         fixed warning:
7365         * src/avr/gen.c:
7366         * src/pic/gen.c:
7367         * src/pic16/gen.c:
7368         * src/z80/gen.c:
7369         * src/xa51/gen.c:
7370
7371 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7372
7373         added support for new library format to z80, gbz80 linkers:
7374         *link/z80/aslink.h
7375         *link/z80/lklex.c
7376         *link/z80/lklib.c
7377         *link/z80/lklist.c
7378
7379 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7380
7381         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7382         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7383
7384 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7385
7386         added DUMMY_READ_VOLATILE:
7387         * src/SDCC.y:
7388         * src/avr/gen.c:
7389         * src/xa51/gen.c:
7390         * src/z80/gen.c:
7391         * src/pic/gen.c:
7392         * src/pic16/gen.c:
7393         * src/mcs51/gen.c:
7394         * src/ds390/gen.c:
7395         * src/SDCCcse.c (algebraicOpts): many improvements
7396         * src/SDCCcse.h: removed algebraicOpts()
7397         * src/SDCCicode.c (picDummyRead): added
7398
7399 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7400
7401         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7402         "Insufficient space in data memory".
7403
7404 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7405
7406         * src/mcs51/gen.c: fixed bug #771358
7407         * src/z80/gen.c: fixed bug #759087
7408
7409 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7410
7411         * src/pic16/glue.c: minor cleanup by Vangelis
7412
7413 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7414
7415         * device/include/regc515c.h: fixed #758477
7416         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7417         * device/lib/_gptrput.c: saved a few bytes
7418         * my tab spacing is 8, yours too?)
7419         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7420         * device/lib/serial.c: process RX bytes earlier than TX bytes
7421         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7422
7423 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7424
7425         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7426
7427 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7428
7429     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7430
7431 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7432
7433         * device/lib/Makefile.in: bad fix, reverted to 1.43
7434
7435 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7436
7437         * device/lib/Makefile.in: added missing z80 object files
7438
7439 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7440
7441         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7442         pic16 progress by Vangelis:
7443         * src/SDCCglobl.h:
7444         * src/SDCCmain.c:
7445         * src/pic/Makefile:
7446         * src/pic:
7447         * pic/Makefile:
7448         * pic16/device.c:
7449         * pic16/device.h:
7450         * pic16/gen.c:
7451         * pic16/gen.h:
7452         * pic16/genarith.c:
7453         * pic16/glue.c:
7454         * pic16/main.c:
7455         * pic16/pcode.c:
7456         * pic16/pcode.h:
7457         * pic16/pcodepeep.c:
7458         * pic16/peeph.def:
7459
7460 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7461
7462     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7463
7464 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7465
7466     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7467     added gbz80 build to MSVC project.
7468     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7469     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7470     from 8051 stuff and setup so it links using a .lnk file.
7471
7472 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7473
7474     * support/librarian/sdcclib.c: sdcc librarian.
7475     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7476     with sdcclib.
7477
7478 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7479
7480     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7481
7482 2003-07-02  Borut Razem <borut.razem AT siol.net>
7483
7484         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7485         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7486         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7487         src/xa51/main.c, src/z80/main.c:
7488         virtualization of glue() function: each port has it's own glue function,
7489         which is accessed by do_glue function pointer in PORT.general structure
7490
7491 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7492
7493         * DS800C400 fun, improved ROM interface and tinibios.
7494
7495 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7496
7497         * More support for DS80C400. Now includes beginning of interface to ROM.
7498
7499 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7500
7501         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7502
7503 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7504
7505         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7506
7507 2003-06-19  Borut Razem <borut.razem AT siol.net>
7508
7509         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7510
7511 2003-06-19  Borut Razem <borut.razem AT siol.net>
7512
7513         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7514         fixed Z80 port - crt0.o: cannot open.
7515
7516 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7517
7518         * support/Util/MySystem.c (merge_command): revert bad fix
7519
7520 2003-06-18  Borut Razem <borut.razem AT siol.net>
7521
7522         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7523
7524 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7525
7526         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7527         option --use-stdout sends errors to stdout instead of stderr.
7528
7529 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7530
7531         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7532
7533 2003-06-15  Borut Razem <borut.razem AT siol.net>
7534
7535         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7536         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7537         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7538         fixed width array of pointers replaced with sets;
7539         multiple include and lib paths ared transferred to preprocessor and linker
7540         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7541         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7542         fixed width array of pointers
7543         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7544         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7545         fixupPath(), getPathDifference()
7546         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7547         fixed width array of pointers
7548
7549 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7550
7551         * src/pic16/ralloc.c: fix warnings
7552         * src/pic16/pcode.c: fix warning
7553
7554 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7555
7556          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7557         know all the details, but essentially this set of changes enable
7558         the pic16 port to generate movff instructions and generate assembler
7559         directives,
7560         * src/SDCCmain.c:
7561         * src/pic16/gen.c:
7562         * src/pic16/glue.c:
7563         * src/pic16/pcode.c:
7564         * src/pic16/device.c:
7565         * src/pic16/main.c:
7566         * src/pic16/pcode.h:
7567         * src/pic16/pcoderegs.c:
7568         * src/pic16/ralloc.c:
7569         * src/pic16/ralloc.h:
7570
7571 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7572
7573         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7574         added option --vc, so sdcc errors and warnings are compatible with
7575         Microsoft Visual Studio.
7576
7577 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7578
7579         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7580           device/lib/libfloat.lib: added atof function.
7581
7582 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7583
7584         * doc/sdccman.lyx: updated to Lyx 1.3
7585         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7586         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7587         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7588
7589 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7590
7591         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7592
7593 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7594
7595         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7596           additions to the "related tools/documentation" section
7597
7598 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7599
7600         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7601
7602 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7603
7604         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7605         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7606
7607 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7608
7609         * doc/sdccman.lyx: fix double dash and other minor things
7610         * doc/Makefile: fix double dash
7611
7612 2003-05-28  Karl Bongers(patches from Martin Helmling)
7613         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7614           condition and ignore commands.
7615
7616 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7617
7618         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7619           is in parts still quite out of date, I did changes as far as I felt makes sense
7620           for a non-native english speaker.
7621           Please feel free to add to the manual or to correct my changes.
7622         * doc/Makefile: undid touching the date of intermediate tex files.
7623
7624 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7625
7626         * doc/sdccman.lyx: Manual has an index now
7627
7628 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7629
7630         Finalize muluint/mulsint and mululong/mulslong merging:
7631         * device/lib/_mulint.c
7632         * device/lib/_mullong.c
7633         * device/lib/gbz80/mul.s
7634         * device/lib/gbz80/stubs.s
7635         * device/lib/z80/mul.s
7636         * device/lib/z80/stubs.s
7637         * src/SDCCsymt.c (initCSupport)
7638
7639 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7640
7641         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7642         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7643           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7644           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7645           instead of /Zm500.
7646
7647 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7648
7649         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7650           the regression tests I'm not brave enough to enable 245.b, 245.c
7651         * doc/sdccman.lyx: added latex preamble for hyperref package.
7652           Using pdflatex this will give you a hyperlinked pdf file with
7653           bookmarks. (prepend '%' before /usepackage if this breaks something)
7654
7655 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7656
7657          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7658
7659 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7660
7661         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7662
7663 2003-05-21    <johan AT balder>
7664
7665         * src/SDCCglue.c (printIval): fixed bug #739934
7666
7667 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7668
7669         Applied patch from bug 737905 (renamed yylineo to mylineno):
7670         * src/altlex.c
7671         * src/SDCCast.c
7672         * src/SDCglobl.h
7673         * src/SDCC.lex
7674         * src/SDCCsymt.c
7675         * src/SDCCval.c
7676         * src/pic16/pcode.c: Cleaned warnings
7677         * src/pic16/pcodeflow.c: Cleaned warnings
7678         * src/pic16/pcoderegs.c: Cleaned warnings
7679
7680 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7681
7682         * src/pic16/pcode.c: Cleaned warnings
7683         * src/pic16/pcodepeep.c: Cleaned warnings
7684         * src/pic16/ralloc.c: Cleaned warnings
7685
7686 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7687
7688         * doc/sdccman.lyx: fixed bug 739745
7689         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7690
7691 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7692
7693         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7694         it can be defined with CFLAGS when running configure
7695         * src/SDCCmain.c: fixed compiling + linking with object files
7696
7697 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7698
7699         * configure.in: configure for pic16 port,
7700             added --disable-pic16-port
7701         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7702         * src/SDCCmain.c: linkOptions is changed to set *,
7703             added if/endif conditional macros to remove options help
7704             messages from optionsTable when a port is not configured, added
7705             support for the PIc16 port in the ports table, when executing
7706             the compiler with no port specified on command line, a default
7707             port is selected with the new macro DEFAULT_PORT which is
7708             defined in port.h, in setDefaultOptions() linkOptions is removed
7709             from initialization assignment, since now it is a set,
7710             parseCmdLine uses setParseWithComma for linkOptions, in
7711             linkEdit() linkOptions are accessed with new function indexSet()
7712             which returns the i'th item of a set variable. See SDCCset.c, in
7713             linkEdit() when calling buildCmdLine(), added linkOptions as
7714             last argument. Now users can pass arguments to gplink via the
7715             -Wl option, main() uses pic16glue() to glue up pic16 programs
7716         * src/SDCCpeeph.c: various changes to support pic16
7717         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7718             return the i'th item of the set
7719         * src/SDCCset.h: added function prototype for indexSet()
7720         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7721         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7722         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7723             added macro DEFAULT_PORT
7724         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7725         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7726             generated
7727         * src/pic16/glue.c: commented out some error producing lines
7728         * src/pic16/main.c: __config directives are commented out to stop
7729             gpasm complaining and test the linkage with gplink, _linkCmd and
7730             _asmCmd changed to be more gplink and gpasm friendly
7731         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7732             produced an error when parsed, peep rule 12 is added to utilize
7733             movff, but it is commented out since the pCode does not support
7734             yet a command with 2 address arguments
7735
7736 2003-05-18    <johan AT balder>
7737
7738         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7739         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7740 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7741
7742         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7743   Added feature to script commands from file.
7744
7745 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7746
7747         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7748         * src/SDCCutil.c: include ctype.h for win32
7749
7750 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7751
7752         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7753
7754 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7755
7756         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7757   Fixed so you can set breakpoints prior to run, run does not stop
7758   on entry now.  Add tbreak.  Other enhancements and fixes for use
7759   with ddd.
7760
7761 2003-05-12  Borut Razem <borut.razem AT siol.net>
7762
7763         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7764
7765 2003-05-11  Borut Razem <borut.razem AT siol.net>
7766
7767         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7768         the path of bin directory, so that PATH is the only env. variable, which has to be set
7769         in case of standard installation.
7770         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7771         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7772         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7773
7774 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7775
7776         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7777         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7778         temp files are in the port dir; clean the gen/test directory when
7779         generating new test.c
7780         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7781         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7782         * support/regression/tests/zeropad.c: added
7783
7784 2003-05-09    <johan AT balder>
7785
7786         * src/SDCCglue.c: fixed bug #597940
7787
7788 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7789
7790         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7791   cache sfr, optimize next,step, fix off by one sourceline,
7792   support ddd list function.
7793         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7794
7795 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7796
7797         * support/regression/HTMLgen.py: added compare_s2f()
7798         * support/regression/Makefile: redo 1.27
7799         * support/regression/generate-cases.py: redo 1.5
7800
7801 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7802
7803         * support/regression/tests/float.c: workaround 33 bit hex constant
7804         * support/regression/tests/simplefloat.c: fix division for host
7805
7806 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7807
7808         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7809         that tame's the PIC's over-aggressive optimizer.
7810
7811 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7812
7813          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7814          support for MSVC.
7815
7816 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7817
7818         Initial support for DS80C400. "Hello world" runs on TINIm400
7819         (with polled I/O).
7820
7821 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7822
7823          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7824          * Some notes on ddd usage added in debugger/README
7825          Martin Helmling adding more features and fixes for ddd GUI debugger.
7826          Code added for nexti, stepi, up, down, and other adjustments.
7827
7828 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7829
7830         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7831         * src/pic/peeph.def Added two rules to optimize carry manipulation
7832         * src/pic/* removed debug printfs
7833
7834 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7835
7836         * debugger/mcs51/cmd.c: added header newalloc.h
7837
7838 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7839
7840         * as/Makefile: new EXEEXT
7841         * as/z80/Makefile: remove trailing slash of BUILDIR
7842         * as/z80/clean.mk: new EXEEXT
7843         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7844         * support/cpp2/Makefile.in: new EXEEXT
7845         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7846
7847 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7848
7849         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7850         EXEEXT was introduced to fix all related problems with targets
7851         "clean", "install" and "uninstall"; a couple of further flaws
7852         especially with "clean" have been fixed too
7853         * as/mcs51/Makefile.in
7854         * as/mcs51/clean.mk
7855         * as/z80/Makefile
7856         * Makefile
7857         * clean.mk
7858         * debugger/mcs51/Makefile.in
7859         * debugger/mcs51/clean.mk
7860         * link/z80/Makefile
7861         * link/z80/Makefile.in
7862         * link/z80/clean.mk
7863         * link/Makefile
7864         * packihx/Makefile.in
7865         * packihx/clean.mk
7866         * sim/ucsim/Makefile
7867         * sim/ucsim/clean.mk
7868         * sim/ucsim/avr.src/Makefile.in
7869         * sim/ucsim/avr.src/clean.mk
7870         * sim/ucsim/s51.src/Makefile.in
7871         * sim/ucsim/s51.src/clean.mk
7872         * sim/ucsim/xa.src/Makefile.in
7873         * sim/ucsim/xa.src/clean.mk
7874         * sim/ucsim/z80.src/Makefile.in
7875         * sim/ucsim/z80.src/clean.mk
7876         * sim/ucsim/main_in.mk
7877         * sim/ucsim/packages_in.mk
7878         * sim/ucsim/gui.src/Makefile.in
7879         * sim/ucsim/gui.src/serio.src/Makefile.in
7880         * sim/ucsim/gui.src/serio.src/clean.mk
7881         * src/Makefile.in
7882         * src/clean.mk
7883         * support/cpp2/Makefile.in
7884         * support/cpp2/clean.mk
7885         * support/makebin/Makefile
7886         * support/makebin/clean.mk
7887         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7888         * doc/sdccman.lyx: --program-suffix no longer needed
7889
7890 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7891
7892          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7893          Martin Helmling added support for ddd GUI debugger.
7894          Code added to display assembly, set variables, and other commands
7895          to interface to ddd.
7896
7897 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7898
7899         * as/Makefile: fix target clean
7900         * as/clean.mk: fix target clean
7901         * as/z80/clean.mk: fix target clean
7902
7903 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7904
7905         * Makefile.common.in: added  AT EXEEXT AT
7906         * configure.in: removed all mingw32 stuff
7907         * configure: rebuilt from configure.in
7908         * doc/sdccman.lyx: updated section "installation"
7909         * support/scripts/sdcc_mingw32: adapted to configure
7910         * support/scripts/sdcc_cygwin_mingw32: added
7911
7912 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7913
7914         * src/pic Added object file support for the PIC port
7915         * src/pic Applied patch from Craig Franklin (this started the object file support)
7916         * src/regression Updated the PIC regression tests for object files
7917
7918 2003-04-20  Borut Razem <borut.razem AT siol.net>
7919
7920         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7921           lklex.c: In function `getfid':
7922           lklex.c:203: warning: array subscript has type `char'
7923         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7924           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7925         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7926           stack handling macros
7927
7928 2003-04-19  Borut Razem <borut.razem AT siol.net>
7929
7930         * "handling space characters in file path" task:
7931         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7932         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7933         * support/Util/MySystem.h: make it self-sufficient
7934         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7935           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7936           handling space characters in file path
7937         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7938           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7939         * support/Util/MySystem.c: handling space characters in executable's path
7940
7941 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7942
7943         * as/z80/Makefile: fix permanent rebuild of z80
7944         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7945         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7946
7947 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7948
7949         * src/SDCCopt.c: add special case optimization to replace modulo by
7950           a power of two with a bitwise AND.
7951
7952 2003-04-18    <johan AT balder>
7953
7954         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7955
7956 2003-04-17    <johan AT balder>
7957
7958         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7959         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7960
7961 2003-04-13  Borut Razem <borut.razem AT siol.net>
7962
7963         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7964         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7965           fixed mingw problem in adl_NORMALIZE_PATH
7966
7967 2003-04-12  Borut Razem <borut.razem AT siol.net>
7968
7969         * fixed "#pragma SAVE/RESTORE can not be nested":
7970         * src/SDCC.lex: reworked pragma handling functions
7971         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7972         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7973
7974 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7975
7976         * src/SDCCutil.c (pathEquivalent): defined but not used
7977         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7978         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7979         * configure: rebuilt from configure.in
7980         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7981         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7982         * device/include/Makefile.in: replace sdcc_datadir
7983         * device/lib/Makefile.in: replace sdcc_datadir
7984         * Makefile.common.in: add LDFLAGS from configure
7985         * packihx/Makefile.in: use LDFLAGS
7986         * src/Makefile.in: use LDFLAGS
7987         * support/cpp2/Makefile.in: add LDFLAGS from configure
7988         * support/makebin/Makefile: use LDFLAGS
7989         * .version: bumped version number to 2.3.5
7990
7991 2003-04-12  Borut Razem <borut.razem AT siol.net>
7992
7993         * completed "different paths" task:
7994         * src/SDCCmacro.c: fixed bug in handling quotes
7995         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7996         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7997
7998 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7999
8000         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8001
8002 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8003
8004         * ds390/gen.c ds390/peeph.def: fix bug 706781
8005
8006 2003-04-11  Borut Razem <borut.razem AT siol.net>
8007
8008         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8009
8010 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8011
8012         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8013         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8014          set - this bit used to not be set...).
8015         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8016           bad code in PIC Port
8017         * src/regression/and2.c added to test bug 609268
8018         * src/regression/Makefile added and2.c to regression test
8019
8020
8021 2003-04-08    <johan AT CP255758-A>
8022
8023         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8024         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8025         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8026
8027 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8028
8029         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8030         fix bug #487815
8031         * support/cpp2/Makefile.in: fix bug #487815
8032         * configure: rebuilt from configure.in
8033         * Makefile.common.in: docdir changed, new path suffixes
8034         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8035         * sdcc_vc_in.h: reflect changes from sdccconf.h
8036         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8037         * src/SDCCutil.h: remove BINDIR hack
8038         * doc/sdccman.lyx: update new path hierarchy
8039
8040 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8041
8042         * src/SDCCpeeph.c: added okToRemoveSLOC test
8043
8044 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8045
8046         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8047
8048 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8049
8050         * src/SDCCpeeph.c: added labelIsReturnOnly test
8051         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8052
8053 2003-04-05    <johan AT balder>
8054
8055         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8056         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8057         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8058         * src/SDCCast.c: fixed a warning
8059         * src/SDCCast.h: fixed a warning
8060         * src/SDCCicode.c (operandFromAst): fixed a warning
8061
8062 2003-04-04    <johan AT balder>
8063
8064         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8065         * src/SDCCast.c (decorateType): fixed bug #715076
8066         * src/SDCC.y: fixed bug #702907
8067
8068 2003-04-03    <johan AT balder>
8069
8070         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8071         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8072         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8073         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8074         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8075
8076 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8077
8078         * _decdptr.c: fix return values
8079         * _gptrget.c: fix return values
8080         * _gptrgetc.c: fix return values
8081         * _gptrput.c: fix return values
8082         * _mulint.c: fix return values
8083         * as/z80/Makefile: fix 'make -j' problem
8084
8085 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8086
8087         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8088         * configure.in: big cleanup, updated to autoconf 2.5x
8089         * configure: rebuilt from configure.in
8090         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8091         * sdcc_vc_in.h: reflect changes from sdccconf.h
8092         * doc/Makefile: fixed a flaw in "make install"
8093
8094 2003-04-02    <johan AT balder>
8095
8096         * src/ds390/gen.c (genCmp): no comments
8097         * src/mcs51/gen.c (genCmp): no comments
8098         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8099         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8100
8101 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8102
8103         * support/regression/generate-cases.py: place generated file in given sub directory
8104         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8105         * support/regression/Makefile: improvements for 'make -j';
8106         side effect: it's simpler and faster now
8107
8108 2003-03-31  Borut Razem <borut.razem AT siol.net>
8109
8110         * src/z80/main.c: link-{port} and as-{port} defined without path
8111         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8112
8113 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8114
8115         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8116
8117 2003-03-30  Borut Razem <borut.razem AT siol.net>
8118
8119         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8120           changed type of list parameter to set
8121         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8122         * src/port.h: changed type of do_assemble() parameter to set
8123         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8124           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8125           definition of "cppoutfilename" macro with NULL value in preProcess()
8126         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8127         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8128         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8129           replaced with set *binPathSet
8130         * shash_add() deallocates the item, if allready exsists, before adding the new one
8131         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8132
8133 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8134
8135         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8136           a nested for loop bug in the PIC port
8137         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8138           for loops
8139
8140 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8141
8142         * support/Util/dbuf.h: remove C++ stuff to make it portable
8143
8144 2003-03-28  Borut Razem <borut.razem AT siol.net>
8145
8146         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8147           literal strings in stringLiteral()
8148         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8149         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8150           to the project
8151
8152 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8153
8154         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8155
8156 2003-03-26    <johan AT balder>
8157
8158         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8159         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8160         * src/SDCCast.c (decorateType): fixed " -v < 3"
8161
8162 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8163
8164         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8165         Added Lenny Story's debug infrastructure changes:
8166         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8167         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8168         * src/cdbFile.c: added
8169         * src/SDCCdebug.c: added
8170         * src/SDCCdebug.h: added
8171         * src/SDCCast.c (createFunction)
8172         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8173         * src/SDCCmain.c (parseCmdLine, main)
8174         * src/SDCCmem.c (redoStackOffsets)
8175         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8176         * src/SDCCsymt.h
8177         * src/common.h
8178         * src/avr/gen.c (genAVRCode)
8179         * src/ds390/gen.c (gen390Code)
8180         * src/mcs51/gen.c (gen51Code)
8181         * src/pic/gen.c (genpic14Code)
8182         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8183         * src/xa51/gen.c (genXA51Code)
8184         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8185
8186 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8187
8188         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8189         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8190
8191 2003-03-22    <johan AT balder>
8192
8193         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8194
8195 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8196
8197         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8198         * doc/cdbfileformat.lyx: added, written by Lenny Story
8199         * doc/Makefile: added cdbfileformat.lyx
8200         * doc/clean.mk: added cdbfileformat.lyx
8201
8202 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8203
8204         * src/mcs51/peeph.def: fix bug #705773
8205
8206 2003-03-20    <johan AT balder>
8207
8208         An sfr/sbit can have an "at #" AND an initializer
8209         * src/SDCCsymt.c (checkSClass):
8210         * src/SDCCmem.c (allocGlobal):
8211         * src/SDCCmem.c (allocLocal):
8212         * src/SDCCast.c (createBlock):
8213
8214 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8215
8216         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8217
8218 2003-03-16    <johan AT balder>
8219
8220         Undid the hackup of const and volatile, the problem is much bigger
8221         * src/SDCC.y:1.65
8222         * src/SDCCast.c:1.171
8223         * src/SDCCglue.c:1.138
8224         * src/SDCCicode.c:1.146
8225         * src/SDCCsymt.c:1.150
8226         * src/SDCCval.c:1.65
8227
8228 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8229
8230         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8231         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8232
8233 2003-03-13    <johan AT balder>
8234
8235         Hackup const and volatile modifiers in type chains a bit:
8236         * src/SDCC.y:1.63
8237         * src/SDCCast.c:1.169
8238         * src/SDCCglue.c:1.136
8239         * src/SDCCicode.c:1.143
8240         * src/SDCCsymt.c1.146
8241         * src/SDCCsymt.h1.59
8242         * src/SDCCval.c:1.63
8243
8244 2003-03-12    <johan AT balder>
8245
8246         * src/SDCCBBlock.h: more LRH debugging junk
8247         * src/SDCCcflow.h: more LRH debugging junk
8248         * src/SDCCloop.c: more LRH debugging junk
8249         * src/SDCC.y (struct_declaration): fixed bug #697590
8250         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8251         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8252         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8253
8254 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8255         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8256         test function names must now match exactly).
8257         * src/SDCCcse.c: added special case in findCheaperOp to allow
8258         extending a short integer. Makes less awful code for bug 700121 test case.
8259
8260 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8261
8262         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8263         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8264
8265 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8266
8267         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8268         actually called (operandsNotEqual() was called for all
8269         operandsNotEqualX tests).
8270
8271 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8272
8273         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8274         with shorter literals. Fixes bug 700121.
8275
8276 2003-03-11    <johan AT balder>
8277
8278         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8279
8280 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8281
8282         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8283         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8284
8285 2003-03-10  Borut Razem <borut.razem AT siol.net>
8286
8287         * src/SDCCmain.c: pipe preprocessor's output
8288         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8289         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8290         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8291         which closes all pipes in pipeSet set
8292         * src/SDCCset.c: free deleted item in function deleteSetItem()
8293         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8294         moved from z80 to src subproject
8295         * .version: increased version number to 2.3.4
8296
8297 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8298
8299         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8300         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8301         * support/regression/ports/xa51/spec.mk: fix typo
8302
8303 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8304
8305         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8306
8307 2003-03-09  Borut Razem <borut.razem AT siol.net>
8308
8309         * src/SDCCmain.c: pipe preprocessor's output
8310         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8311         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8312         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8313         which closes all pipes in pipeSet set
8314         * src/SDCCset.c: free deleted item in function deleteSetItem()
8315         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8316         moved from z80 to src subproject
8317
8318 2003-03-09  Borut Razem <borut.razem AT siol.net>
8319
8320         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8321         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8322         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8323         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8324         * src/SDCCglobl.h: unification of WIN32 native definitions
8325
8326 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8327
8328         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8329
8330 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8331
8332         * src/configure.in:   check for endianess (even while cross-compiling)
8333         * src/configure:      check for endianess (even while cross-compiling)
8334         * src/configure_in.h: check for endianess (even while cross-compiling)
8335         * src/avr/gen.c:        remove old endianess stuff
8336         * src/mcs51/gen.c:      remove old endianess stuff
8337         * src/ds390/gen.c:      remove old endianess stuff
8338         * src/pic/gen.c:        remove old endianess stuff
8339         * src/pic/genarith.c:   remove old endianess stuff
8340         * src/pic/glue.c:       fix endianess check
8341         * src/pic16/gen.c:      remove old endianess stuff
8342         * src/pic16/genarith.c: remove old endianess stuff
8343         * src/pic16/glue.c:     fix endianess check
8344         * src/xa51/gen.c:       remove old endianess stuff
8345         * src/z80/gen.c:        fix endianess check
8346         * src/SDCCglue.c:       fix endianess check
8347         * src/ds390/peeph.def: fix bug 700036
8348
8349 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8350
8351         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8352         * src/configure: find appropriate data-types on host for SDCC's int and long
8353         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8354         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8355         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8356
8357 2003-03-07    <johan AT balder>
8358
8359         Just a big NOOP:
8360                 some minor cleanups before the big shot
8361                 OP_DEFS and OP_USES now use Kevin's protection
8362                 new option --nolabelopt
8363
8364         * src/SDCCBBlock.c:
8365         * src/SDCCast.c,:
8366         * src/SDCCcflow.c:
8367         * src/SDCCcse.c:
8368         * src/SDCCicode.c:
8369         * src/SDCCicode.h:
8370         * src/SDCClabel.c:
8371         * src/SDCCloop.c:
8372         * src/SDCCmain.c:
8373         * src/ds390/ralloc.c:
8374         * src/mcs51/ralloc.c:
8375         * src/pic/ralloc.c:
8376         * src/xa51/ralloc.c:
8377         * src/z80/ralloc.c:
8378
8379 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8380
8381         * src/pic/pcode.c (get_op): fix 64 bit warnings
8382         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8383         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8384         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8385         * support/regression/tests/malloc.c: fix 64 bit warnings
8386
8387 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8388
8389         * src/mcs51/gen.c (genMinus): fixed bug 696436
8390
8391 2003-03-02  Borut Razem <borut.razem AT siol.net>
8392
8393         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8394
8395 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8396
8397         * configure.in: test for mkstemp
8398         * sdccconf_in.h: add HAVE_MKSTEMP
8399
8400 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8401
8402         * device/include/ctype.h: removed warning while using --stack-auto
8403         * device/include/malloc.h: removed warning while using --stack-auto
8404         * device/include/string.h: removed warning while using --stack-auto
8405
8406 2003-02-23  Borut Razem <borut.razem AT siol.net>
8407
8408         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8409         because NDEBUG is defined (see man assert)
8410         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8411
8412 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8413
8414         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8415         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8416
8417 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8418
8419         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8420         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8421
8422 2003-02-18    <johan AT balder>
8423
8424         * as/mcs51/asmain.c (asmbl): module can start with a digit
8425         * as/z80/asmain.c (asmbl): module can start with a digit
8426
8427 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8428
8429         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8430         * src/asm.c: fix pipe() for Mingw32
8431
8432 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8433
8434         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8435         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8436         make -V work again; --c1mode reads now from stdin
8437         * doc/sdccman.lyx: added --c1mode
8438         * support/Util/SDCCerr.c: new messages for c1 mode
8439         * support/Util/SDCCerr.h: new messages for c1 mode
8440         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8441
8442 2003-02-15    <johan AT balder>
8443
8444         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8445
8446 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8447
8448         * doc/sdccman.lyx: Environment variables, -o and other minor things
8449
8450 2003-02-14    <johan AT balder>
8451
8452         * src/xa51/main.c: before anyone really tries to use it :)
8453
8454         * Install doc's in share/sdcc/doc
8455         * removed some obsolete files
8456         * Do a proper make distclean and uninstall
8457         M Makefile.common.in
8458         R sdccbuild.sh
8459         M as/Makefile
8460         M device/include/Makefile.in
8461         M device/lib/Makefile.in
8462         M doc/sdccman.lyx
8463         M link/Makefile
8464         M sim/ucsim/doc/Makefile.in
8465         M src/clean.mk
8466         R src/avr/peeph.rul
8467         R src/xa51/peeph.rul
8468         M support/cpp2/Makefile.in
8469         M support/makebin/Makefile
8470
8471
8472 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8473
8474         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8475
8476 2003-02-10  Borut Razem <borut.razem AT siol.net>
8477
8478         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8479         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8480         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8481         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8482         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8483         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8484         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8485         src/z80/Makefile.bcc: Borland Makefile cleanup
8486         * as/z80/Makefile.bcc: Added Borland Makefile
8487         * support/cpp2/borland.h: Removed
8488
8489 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8490
8491         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8492         * src/SDCC.lex: new pragma NOIV
8493         * src/SDCCglobl.h: new pragma NOIV
8494         * src/SDCCmem.c: new pragma NOIV
8495
8496 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8497
8498         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8499
8500 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8501
8502         * src/SDCCmain.c: signal handling is switched off by --debug
8503         * doc/Makefile: small fix for install; use clean.mk again
8504         * doc/clean.mk: clean *.pdf and *.html too
8505
8506 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8507
8508         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8509         * device/lib/printfl.c: fix a ds390 bug by making it portable
8510         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8511         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8512         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8513         * debugger/mcs51/cmd.c: converted multi-line string literals
8514         * sim/ucsim/globals.cc: converted multi-line string literals
8515         * src/SDCCmain.c: introduced signal handler to remove temp files
8516         * doc/Makefile: small tweaks, implement clean
8517         * doc: removed generated files
8518
8519 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8520
8521         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8522         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8523         Address Record is not correctly generated for DS390."
8524
8525 2003-02-02  Borut Razem <borut.razem AT siol.net>
8526
8527         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8528         * as/mcs51/asm.h: fixed compilation with Borland C
8529         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8530         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8531         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8532         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8533         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8534         src/z80/Makefile.bcc: delete $(LIB) only if exist
8535         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8536
8537 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8538
8539         * device/include/malloc.h: introduced NULL
8540         * device/include/string.h: introduced NULL
8541         * device/include/stdlib.h: introduced NULL
8542         * device/lib/_memcpy.c: removed NULL
8543         * device/lib/_strcat.c: removed NULL
8544         * device/lib/_strchr.c: removed NULL
8545         * device/lib/_strcmp.c: removed NULL
8546         * device/lib/_strcpy.c: removed NULL
8547         * device/lib/_strcspn.c: removed NULL
8548         * device/lib/_strlen.c: removed NULL
8549         * device/lib/_strncat.c: removed NULL
8550         * device/lib/_strncmp.c: removed NULL
8551         * device/lib/_strncpy.c: removed NULL
8552         * device/lib/_strpbrk.c: removed NULL
8553         * device/lib/_strrchr.c: removed NULL
8554         * device/lib/_strspn.c: removed NULL
8555         * device/lib/_strstr.c: removed NULL
8556         * device/lib/_strtok.c: removed NULL
8557         * device/lib/malloc.c: removed NULL, include own header
8558
8559 2003-02-02    <johan AT balder>
8560
8561         * 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
8562         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8563         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8564         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8565         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8566         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8567
8568 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8569
8570         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8571         area 'DATA'"
8572
8573 2003-02-01    <johan AT balder>
8574
8575         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8576
8577 2003-01-31    <johan AT CP255758-A>
8578
8579         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8580
8581 2003-01-30    <johan AT balder>
8582
8583         * src/SDCCBBlock.c: automatic bug detection
8584         * src/SDCCicode.c: automatic bug detection
8585
8586 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8587
8588         * src/SDCCglobl.h:   now --xram-size 0 works
8589         * src/SDCCmain.c:    now --xram-size 0 works
8590
8591 2003-01-29    <johan AT balder>
8592
8593         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8594
8595 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8596
8597         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8598         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8599         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8600         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8601         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8602         * src/SDCCmain.c:    Added options --xram-size and --code-size
8603
8604 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8605
8606         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8607         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8608
8609 2003-01-27    <johan AT balder>
8610
8611         * src/SDCC.y: fixed bug #613764
8612
8613 2003-01-26    <johan AT balder>
8614
8615         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8616         * src/SDCCsymt.h: fixed bug #673374
8617         * src/SDCCglue.c: fixed bug #661910
8618         * src/SDCCast.c: fixed bug #458099 and 673374
8619
8620 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8621
8622         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8623         * as/mcs51/strcmpi.h: added
8624         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8625         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8626         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8627         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8628         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8629         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8630         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8631         * as/mcs51/Makefile.aslink: new module strcmpi
8632         * as/mcs51/Makefile.asx8051: new module strcmpi
8633         * as/mcs51/Makefil.bcc: new module strcmpi
8634         * as/mcs51/Makefile.in: new module strcmpi
8635         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8636
8637 2003-01-26    <johan AT balder>
8638
8639         * src/SDCCglue.c: reverted back to 1.124
8640         * src/SDCCast.c: reverted back to 1.156
8641         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8642
8643 2003-01-25    <johan AT balder>
8644
8645         * src/SDCCglue.c: A better fix for bug #661910
8646         * src/SDCCast.c: A better fix for bug #661910
8647         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8648
8649 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8650
8651         * src/Makefile.in: remove spawn.o
8652         * src/SDCCmain.c: remove spawn.h
8653         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8654         * src/spawn.c: removed
8655         * src/spawn.h: removed
8656         * support/regression/ports/ds390/spec.mk: link with -r
8657
8658 2003-01-24    <johan AT CP255758-A>
8659
8660         * src/ds390/gen.c (aopOp): fixed bug #667458
8661         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8662         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8663         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8664
8665 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8666
8667         * src/mcs51/peeph.def: better assembler identation by Frieder
8668         * src/mcs51/gen.c: better assembler identation by Frieder
8669
8670 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8671
8672         * as/z80/string.h: removed for gcc 3.2
8673         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8674         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8675
8676 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8677
8678         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8679         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8680         * support/regression/Makefile: separate temp files for ports
8681         * support/regression/generate-cases.py: separate temp files for ports
8682         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8683         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8684
8685 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8686
8687         * moved tinitalk to device/examples/ds390
8688
8689 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8690
8691         * as/mcs51/lkmem.c: rflag is for DS390
8692         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8693         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8694                          (linkEdit): move mem- and map-files the same way as ihx-files
8695         * src/z80/main.c (_setDefaultOptions): removed --generic
8696         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8697         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8698         * src/pic/glue.c (picglue): --c1mode works again
8699         * src/pic16/glue.c (pic16glue): --c1mode works again
8700         * src/asm.c (printCLine): fix #660034
8701
8702 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8703
8704         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8705         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8706         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8707         * as/mcs51/lkmem (summary): better fix for sp problem
8708         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8709         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8710         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8711                                               remove --stack-after-data
8712
8713 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8714
8715         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8716         * src/SDCCutil.c (join): ugly bug: missing '\0'
8717         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8718
8719 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8720
8721         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8722         * src/port.h: typo
8723         * src/pic/main.c (_asmCmd): gpasm supports -o
8724         * src/z80/main.c: more general macros
8725         * device/lib/Makefile.in: remove intermediate files
8726
8727 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8728
8729         * .version: Bumped version number to 2.3.3
8730         * src/SDCCBBlock.c: new option -o
8731         * src/SDCCglobl.h: new option -o
8732         * src/SDCCglue.c: new option -o
8733         * src/SDCCmain.c: new option -o
8734         * src/asm.c: new option -o
8735         * src/ds390/main.c: new option -o
8736         * src/pic/glue.c: new option -o
8737         * src/pic/pcode.c: new option -o
8738         * src/pic/ralloc.c: new option -o
8739         * src/pic16/glue.c: new option -o
8740         * src/pic16/pcode.c: new option -o
8741         * src/pic16/ralloc.c: new option -o
8742         * src/z80/main.c: new option -o
8743         * device/lib/Makefile.in: use -o
8744         * support/regression/ports/ds390/spec.mk: use -o
8745         * support/regression/ports/gbz80/spec.mk: use -o
8746         * support/regression/ports/mcs51/spec.mk: use -o
8747         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8748         * support/regression/ports/z80/spec.mk: use -o
8749         * support/regression/ports/ucz80/spec.mk: use -o
8750         * support/regression/ports/xa51/spec.mk: use -o
8751         * support/regression/fwk/lib/timeout.c: fix usage string
8752
8753 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8754         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8755
8756 2003-01-07    <johan AT balder>
8757
8758         * src/SDCCast.c (decorateType): fixed bug #600035
8759
8760 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8761         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8762         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8763         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8764         * src/pic/pcode.c: outcommented unused variable to remove warnings
8765         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8766
8767 2003-01-06    <karl AT turbobit.com>
8768         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8769    regression tests.
8770
8771 2003-01-06    <johan AT balder>
8772
8773         * src/SDCCicode.c: fixed array add
8774
8775 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8776         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8777         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8778
8779 2003-01-04    <johan AT balder>
8780
8781         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8782
8783 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8784         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8785
8786 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8787         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8788         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8789
8790 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8791         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8792
8793 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8794         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8795
8796 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8797         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8798
8799 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8800
8801     * in \sdcc\as\mcs51\ changed these files in order to create an
8802     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8803     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8804     following files to include the previous two files: aslink.dsp,
8805     Makefile.aslink, Makefile.bcc, and Makefile.in.
8806
8807     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8808     .adb instead of .cdb
8809
8810 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8811
8812         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8813         value from option --iram-size.
8814
8815 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8816
8817         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8818         dram[] array.
8819
8820 2002-09-18    <wiml AT hhhh.org>
8821
8822         * SDCClrange.h: exposed setFromRange() and setToRange()
8823         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8824           packRegsForAccUse() (bug 542397)
8825         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8826           multiple times and emitting the fetch operations more than once
8827           added aopGetUsesAcc() function to allow binary operators to
8828           fetch their operands in the correct order; made genMinus() emit
8829           compact code for X = LITERAL - Y
8830
8831 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8832         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8833         sprintf() in line 1267.
8834
8835 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8836         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8837         like ports.
8838
8839 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8840         Changes to aslink (All the changes are marked with 'JCF'):
8841
8842         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8843         summary().
8844
8845         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8846         area BSEG.  Also moves, if possible, the DATA area down into the internal
8847         ram so more space is available.
8848
8849         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8850         sflag.
8851
8852         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8853         not bytes.  Function summary() which creates a memory usage summary
8854         file with extension .mem.  Reports of overlaping stack and small stack
8855         size.  If the space for the stack is less than 16 bytes aslink trows a
8856         warning.
8857
8858         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8859         the 8051.  Option 'y' for memory summary output file.
8860
8861         Changes to sdcc (All the changes are marked with 'JCF'):
8862
8863         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8864
8865         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8866         overlaying area for it (uses RegBankUsed[4]).
8867
8868         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8869         bank zero as used by default.  By default aslink locates the stack
8870         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8871         the creation of the .mem file.  Delegates the allocation of data area
8872         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8873         the begining of the stack area to aslink.
8874
8875         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8876         glue() in SDCCglue.c creates an area for it.
8877
8878 2002-09-03  Borut Razem <borut.razem AT siol.net>
8879         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8880         sdcc/src/pic/glue.c:
8881         introduced atexit() handler for teporay files removal in case of
8882         errors, assertions, ...
8883
8884 2002-08-29  Borut Razem <borut.razem AT siol.net>
8885         * sdcc/support/cpp2/auto-host_vc_in.h:
8886         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8887         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8888         Maybe there is a similar problem with BORLANDC? It should be checked!
8889
8890         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8891         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8892         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8893         was not executed, and the compiler (cl) launched a warning:
8894         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8895
8896 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8897         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8898
8899 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8900         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8901
8902         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8903           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8904           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8905           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8906           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8907           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8908           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8909         - added Release configuration in VS projects
8910         - review of compiler an linker options
8911         - VC .exe files are generated in bin_vc directory, not to interfere
8912           with binaries generated from other projects (cygwin, mingw, bcc ...)
8913
8914         * sdcc/src/yacc.dsp: added
8915
8916         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8917         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8918         and insert the version number definitions from .version
8919
8920         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8921
8922         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8923         added - genarate auto-host.h using auto-host_vc_in.h as template
8924
8925         * sdcc/sdcc_vc.h,
8926         removed from CVS, generated automatically
8927
8928 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8929         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8930
8931 2002-08-11  Borut Razem <borut.razem AT siol.net>
8932         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8933
8934 2002-08-10  Borut Razem <borut.razem AT siol.net>
8935         * src/SDCCmain.c (main):
8936         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8937         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8938         The consequence was that some temporary files were not removed.
8939
8940         * src/SDCCglue.c:
8941         unification of code in functions tempfilename() and tempfile():
8942         function tempnam() is defined in Visual Studio 6.0 and .NET
8943
8944         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8945
8946         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8947           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8948         - removed compiler command line option /WX: Treats all warnings as errors
8949         - update a list of source files, included into the project
8950
8951         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8952           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8953         changed project type to Generic Project so that can be correcly converted to VS.NET project
8954
8955         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8956
8957         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8958
8959         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8960
8961         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8962         added return 0 statements after assert() to make compiler happy
8963
8964         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8965         added newline in the def file to keep MSC compiler satisfied
8966
8967         * sdcc/src/z80/gen.c:
8968         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8969           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8970         - solved MSC error in function aopDump()
8971
8972         * sdcc_vc.h: define PREFIX as "\\sdcc"
8973
8974 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8975         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8976
8977 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8978         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8979         - Rewrote the register banking algorithm.
8980         - Added pCode live-range analysis to registers (for now, only non-used and
8981         singly-used registers optimized away)
8982
8983         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8984
8985         * 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.
8986
8987 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8988         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8989
8990 2002-04-22  Michael Hope  <michaelh AT vroom>
8991
8992         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8993
8994         * configure.in (DD_COPT): Added include support required for gbdk.
8995
8996         * .version: Bumped version number just to increase it.
8997
8998         * src/SDCCmain.c: Added -nostdinc to the default options.
8999
9000 2002-04-15  Michael Hope  <michaelh AT vroom>
9001
9002         * device/lib/z80/printf.c (sprintf): Added.
9003
9004         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9005
9006         * src/z80/peeph.def: Added transpose redundent load rule.
9007
9008         * src/z80/main.c: Added force callee saves for jaune.
9009
9010         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9011
9012         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9013
9014 2002-03-28  Johan Knol  <johan AT balder>
9015
9016         * src/SDCCval.c: fixed bug #532436
9017
9018 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9019         * /src/port.h:
9020         Added "char *Processor" field to the port structure.
9021
9022         * /src/SDCCmain.c:
9023         Added -p option. Allows port dependent processor to be specified.
9024
9025         * all ports:
9026         Initialized the new field char *Processor field to NULL in all ports
9027
9028         * /src/pic/*:
9029         Compiler generated registers for interrupt context saving
9030         were not getting allocated.
9031
9032 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9033
9034         * /src/SDCCast.c:
9035         Fixed left shift. Will promote the left side of a left shift
9036         if a) left shifting more than size of operand or b) when assigned
9037         to something size > size of left side
9038
9039 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9040         * src/pic/*
9041         tons of changes. Register allocation has been
9042         rewritten. Added customization for the various PICs. Flow
9043         analysis is restructured. ...
9044
9045         * src/pic/device.h:
9046         Added
9047
9048         * src/pic/device.c:
9049         Added. device.c is a PIC port hack to accomodate variations
9050         in PIC devices.
9051
9052 2002-03-13  Michael Hope  <michaelh AT vroom>
9053
9054         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9055
9056 2002-03-04  johanknol  <johanknol AT manik>
9057
9058         * /src/SDCCval.c: fixed
9059
9060         const unsigned char arr[][2] = { { 0, 1 } };
9061         t18.c:1: error: Initializer element is not constant
9062
9063 2002-03-04  bela  <bela AT manik>
9064
9065         * /device/include/mcs51reg.h:
9066         ds89c420 register definition update
9067
9068 2002-03-03    <johan AT FRIJA>
9069
9070         * support/Util/SDCCerr.c: did something, but don't no why anymore
9071
9072         * support/regression/tests/bug-524691.c: made it a little less shy
9073
9074         * src/SDCCast.c (decorateType): fixed bug #524697
9075
9076         * src/SDCCast.c: made some lineno improvements
9077
9078         * src/SDCCval.c (getNelements): changed warning to error
9079
9080         * src/SDCCglue.c (printIvalArray): changed warning to error
9081
9082         * src/SDCCicode.c: fixed a warning for mingw
9083
9084         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9085
9086         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9087
9088 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9089
9090         * src/ds390/peeph.def:
9091         Added some more peephole rules
9092
9093         * src/ds390/gen.c: Various fixes & enhancements
9094
9095         * src/SDCClrange.c, src/SDCClrange.h:
9096         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9097
9098         * src/ds390/ralloc.c:
9099         various fixes & enhancements (ds390) specific
9100
9101         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9102         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9103         from rallocs.
9104
9105         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9106
9107 2002-03-02    <johan AT FRIJA>
9108
9109         * src/SDCCast.c (decorateType): fixed bug #524708
9110
9111         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9112
9113         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9114
9115 2002-03-01  Michael Hope  <michaelh AT vroom>
9116
9117         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9118
9119         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9120
9121 2002-03-01    <johan AT FRIJA>
9122
9123         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9124
9125         * src/SDCCast.c (decorateType): fixed bug #524209
9126
9127         * src/SDCCval.c (valNot): fixed bug #524195
9128
9129 2002-02-26    <johan AT balder>
9130
9131         * src/xa51/gen.c: fixed a warning
9132
9133         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9134
9135         * src/SDCCast.c (decorateType): fixed bug #522534
9136
9137 2002-02-23    <johan AT balder>
9138
9139         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9140
9141 2002-02-22    <johan AT balder>
9142
9143         * src/SDCCast.c: fixed bug #514865
9144
9145         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9146
9147 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9148
9149         * sdcc/src/SDCCloop.c:
9150         Previous fix was not good. basic blocks that have "break" or "return" are
9151         not really partof a loop , but live ranges used in these blocks should
9152         be live thru the entire loop, so set partOfLoop but don't add them to
9153         loop region
9154
9155 2002-02-21    <johan AT FRIJA>
9156
9157         * src/SDCCcse.c: fixed bug #514308
9158
9159 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9160
9161         * src/SDCCloop.c:
9162         Fixed BUG #519583. If a conditional block ended in a return/break
9163         statement inside a loop, it was not being considered part of the loop.
9164
9165         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9166
9167 2002-02-10  Karl Bongers <karl AT turbobit.com>
9168
9169         * debugger/*:
9170         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9171         with lots of comments and notes.
9172
9173         * device/examples/test2.c:
9174         Fix bug, "red" variable not being initialized(compiler complained).
9175
9176         * device/examples/Makefile, examples/test3.c:
9177         Add Makefile in device/examples folder, compiles test3.c
9178         for use as a multiple module SDCDB test case.
9179
9180         * sim/ucsim/cmd.src/cmdset.cc:
9181         Took out debug printfs in ucsim "next" command.
9182
9183         * sim/ucsim/xa.src:
9184         Karl and Johan start ucsim XA support.  Most dissassembly working,
9185         about 75% emulation done(plenty of work remaining).
9186
9187         * sim/ucsim/z80.src:
9188         Add Z80 support to ucsim, add test-ucz80 regression test,
9189         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9190         Notice z80 compiler fails on examples/test3.c/crc code.
9191
9192 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9193
9194         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9195         Added support for --parms-in-bank1
9196
9197         * src/ds390/peeph.def:
9198         added a few more peephole optimzations
9199
9200         * src/ds390/main.c:
9201         1) added __builtin_inp & __builtin_outp used to read in data of given length
9202            from a memory mapped port
9203         2) added __builtin_memcmp
9204         3) added __builtin_swapw swap bytes of a short
9205
9206         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9207         1) handle multiple send & receives from register bank1
9208         2) ralloc can now allocate DPTR1 to some liveRanges
9209
9210         * src/SDCCsymt.c, src/SDCCsymt.h:
9211         changes to handle multiple sends & receives
9212
9213         * src/SDCCptropt.h:
9214         added some pointer arithmetic optimization
9215
9216         * src/SDCCptropt.c:
9217         added some pointer arithmetic optimizations but not stable yet so not
9218         called from anywhere (will get this working shortly)
9219
9220         * src/SDCCopt.c: fixed for multiple sends & receives
9221
9222         * src/SDCCmain.c:
9223         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9224         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9225            set preprocessor defines (depending on options)
9226
9227         * src/SDCCicode.c, src/SDCCicode.h:
9228         changes made to handle multiple sends & receives
9229
9230         * src/SDCCglobl.h:
9231         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9232
9233         * src/SDCCcse.c, src/SDCCcse.h:
9234         added function findbackward def (to be used in upcoming optimization)
9235
9236         * src/SDCCcflow.c, src/SDCCcflow.h:
9237         added function returnAtEnd - to determine if a basic block terminates with
9238         a RETURN iCode
9239
9240         * src/SDCCast.c, src/SDCCast.h:
9241         added option parms-in-bank1
9242
9243         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9244         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9245         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9246         adjusted for --parms-in-bank1 option
9247
9248         * device/include/string.h:
9249         donot redefine "reentrant" keyword
9250
9251         * device/include/ds80c390.h: Added some more SFRs
9252
9253 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9254
9255         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9256
9257 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9258
9259         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9260
9261 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9262
9263         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9264
9265 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9266
9267         * Added --xram-movc option
9268
9269 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9270
9271         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9272
9273 2002-01-11  Johan Knol
9274
9275         * Added math lib of Jesus Calvino-Fraga
9276
9277 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9278
9279         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9280         * support/regression/Makefile: new target test-mcs51-stack-auto
9281         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9282
9283 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9284
9285         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9286
9287 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9288
9289         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9290
9291 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9292
9293         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9294
9295         * src/SDCCglue.h: add definition for printIvalChar()
9296
9297 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9298
9299         * src/SDCCast.c: fix #498138 by Johan
9300
9301         * src/SDCCglue.c: fix #498138 by Johan
9302
9303 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9304
9305         * support/regression/Makefile: fix clean
9306
9307         * support/regression/ports/ds390/support.c: fix transmission of last character
9308
9309 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9310
9311         * /sdcc/src/ds390/gen.c:
9312         a) improved computing address of stack variable
9313         b) took out some #if 0 code
9314         c) improved parmBytes adjustment
9315         d) improved genPlusIncr & genMinusIncr
9316         e) genCmp could generate bad code (when left assigned to DPTR)
9317         f) Fixed bug in hasInc
9318
9319         * /sdcc/src/ds390/ralloc.c:
9320         a) packRegsForSupport could mess up live information (Fixed)
9321         b) packRegsDPTRuse could be incorrect for left & right shift
9322
9323         * /sdcc/src/mcs51/ralloc.c:
9324         packRegsForSupport could mess up the live information (Fixed)
9325
9326         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9327
9328         * /sdcc/src/SDCCast.c:
9329         can reverse a loop even if function call is present as long
9330         as the loop control variable is local & is not passed as parameter
9331
9332 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9333
9334         * /sdcc/ChangeLog: *** empty log message ***
9335
9336         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9337         More builtin function additions for TININative
9338
9339         * /sdcc/src/ds390/ralloc.c:
9340         Had broken the regression testsuite
9341
9342         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9343
9344         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9345         Added funcattr hasStackParms will be set for reentrant functions when there
9346         are paramteres on the stack, this helps in minimizing frame pointer generation
9347         typeFromStr can handle function pointers now
9348
9349         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9350         *** empty log message ***
9351
9352 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9353
9354         * /src/ds390/gen.c, /src/ds390/main.c:
9355         More builtin function additions for TININative
9356
9357         * /src/ds390/ralloc.c:
9358         Had broken the regression testsuite
9359
9360         * /src/SDCCast.c: Fixed a bug in dumptree
9361
9362         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9363         Added funcattr hasStackParms will be set for reentrant functions when there
9364         are paramteres on the stack, this helps in minimizing frame pointer generation
9365         typeFromStr can handle function pointers now
9366
9367         * /doc/builtins.txt, /doc/TININative.txt:
9368         *** empty log message ***
9369
9370
9371 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9372
9373         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9374         ALPHA version for -mTININative
9375
9376         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9377         updated to reflect changes in the port structure
9378
9379         * /src/port.h:
9380         added function do_assemble (similar to do_link) if non-null this function
9381         will be called to do assembly (-mTININative) requires a multi command
9382         assembly
9383         added function genAssemblerEnd will be called to generate assembler Epilogue
9384
9385         * /src/SDCCsymt.c:
9386         added _JavaNative to debug info printing
9387
9388         * /src/SDCCmain.c: added option --tini-libid
9389         added port->do_assemble function (-mTININative) has a multi command assemble
9390
9391         * /src/SDCCglue.c: Disabled "constExpr" check
9392         added port->genAssemblerEnd function
9393
9394         * /src/SDCCglobl.h: Added option --tini-libid value
9395
9396         * /src/SDCCast.h:
9397         tookout optimizeCompare from the header (has no external references)
9398
9399         * /src/SDCCast.c: made one more function "static"
9400
9401 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9402
9403         * src/z80/mappings.i: Added z80asm support.
9404
9405         * src/z80/main.c: Added z80asm support on --asm=z80asm
9406
9407         * src/z80/gen.c: Fixed asm portability issues.
9408
9409         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9410
9411         * src/SDCCglue.c (printExterns): Added global/extern split.
9412
9413 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9414
9415         * support/regression/Makefile: added test for mcs51 model large
9416
9417         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9418
9419         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9420
9421 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9422
9423         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9424
9425 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9426
9427         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9428
9429         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9430
9431 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9432
9433         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9434
9435         * support/regression/tests/simplefloat.c: Port to mcs51.
9436
9437 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9438         * support/regression/tests/bug-485362.c: Added.
9439
9440         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9441
9442         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9443
9444         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9445
9446         * src/z80/gen.c (aopDump): Added a dump function.
9447
9448 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9449         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9450
9451         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9452
9453         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9454
9455         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9456
9457         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9458
9459         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9460
9461         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9462
9463         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9464
9465         * support/regression/ports/ds390/support.c: Use tinibios.
9466
9467         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9468
9469 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9470
9471         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9472         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9473
9474         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9475
9476         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9477
9478 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9479
9480         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9481
9482         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9483         (packRegsForIYUse): Created and optimised.
9484
9485 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9486
9487         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9488 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9489
9490         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9491
9492         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9493
9494         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9495
9496 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9497
9498         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9499
9500         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9501
9502 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9503
9504         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9505
9506         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9507
9508         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9509
9510 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9511
9512         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9513         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9514         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9515
9516         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9517
9518         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9519         (genNotFloat): Added.
9520         (genUminusFloat): Added.
9521
9522         * device/lib/z80/Makefile: Added floating pt stubs.
9523
9524         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9525
9526         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9527
9528         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9529
9530 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9531
9532         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9533
9534         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9535
9536         * sdcc/support/regression/Makefile: Add port ds390.
9537
9538         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9539
9540         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9541
9542         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9543
9544         * sdcc/support/regression/ports/ds390/support.c: Added.
9545
9546         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9547
9548         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9549
9550         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9551
9552 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9553
9554         * device/include/malloc.h: Added z80 and gbz80 support.
9555
9556         * device/lib/gbz80/heap.s: Added.
9557
9558         * device/lib/z80/heap.s: Added.
9559
9560         * device/lib/malloc.c: Added z80 and gbz80 support.
9561
9562         * support/regression/tests/malloc.c (testMalloc): Added.
9563
9564         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9565
9566         * support/regression/tests/bug-478094.c: Added.
9567
9568         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9569
9570 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9571
9572         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9573
9574         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9575
9576         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9577
9578         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9579
9580         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9581
9582 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9583
9584         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9585
9586 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9587
9588         * support/regression/tests/bug-477927.c: Added.
9589
9590         * src/z80/peeph.def: Added minor rules.
9591
9592         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9593
9594         * src/z80/peeph.def: Added jump optimisation modification.
9595
9596 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9597
9598         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9599
9600 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9601
9602         * support/regression/tests/funptrs.c: Added.
9603
9604 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9605
9606         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9607
9608 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9609
9610         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9611
9612         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9613
9614         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9615         (movLeft2ResultLong): Created.
9616
9617         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9618         (joinPushes): Added.  Joins two char pushes into a word push.
9619
9620 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9621
9622         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9623
9624         * support/makebin/Makefile (install): Added creation of dest dir.
9625
9626 2001-10-24 Karl Bongers <karl AT turbobit.com>
9627
9628         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9629
9630 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9631
9632         * src/z80/ralloc.c: Turned off faulty pack for one use.
9633
9634         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9635
9636         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9637
9638 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9639
9640         * support/regression/Makefile: Improved clean
9641
9642         * support/regression/ports/gbz80/spec.mk: Added clean
9643
9644         * support/regression/ports/host/spec.mk: Added clean
9645
9646         * support/regression/ports/z80/spec.mk: Added clean
9647
9648         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9649
9650         * support/regression/ports/mcs51/timeout.c: little improvements
9651
9652 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9653
9654         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9655
9656         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9657
9658         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9659
9660 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9661
9662         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9663
9664         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9665
9666 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9667         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9668
9669         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9670
9671         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9672
9673         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9674
9675         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9676
9677         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9678
9679         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9680
9681         * support/regression/tests/longor.c: Added.
9682
9683 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9684
9685         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9686
9687         * as/mcs51/aslink.h: define PATH_MAX
9688
9689         * as/mcs51/asm.h: define PATH_MAX
9690
9691         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9692
9693         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9694
9695         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9696
9697         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9698
9699         * src/SDCCglobl.h: define PATH_MAX
9700
9701         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9702
9703         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9704
9705 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9706
9707         * src/z80/gen.c (gencjneshort): Fixed
9708
9709         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9710
9711 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9712
9713         * support/regression/tests/bug-469671.c: Added.
9714
9715         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9716
9717 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9718
9719         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9720
9721         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9722
9723 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9724
9725         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9726
9727         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9728
9729         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9730
9731         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9732
9733         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9734
9735         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9736
9737         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9738
9739 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9740
9741         * 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.
9742
9743         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9744
9745         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9746
9747 2001-10-07    <johan AT FRIJA>
9748
9749         * device/lib/gets.c (gets): fixed the return value.
9750
9751 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9752         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9753
9754         * 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.
9755
9756         * 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.
9757
9758         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9759
9760         * src/pic/gen.c: Removed Safe_strdup.
9761
9762         * configure.in: Added option to enable libgc support.
9763
9764         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9765         (bitVectUnion): Optimised.
9766         (bitVectIntersect): Optimised.
9767         (bitVectBitsInCommon): Optimised.
9768         (bitVectCplAnd): Optimised.
9769
9770         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9771
9772 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9773
9774         * src/SDCCmain.c: distinguish between assembler debug and plain options
9775
9776         * src/avr/main.c:   remove standard assembler options
9777
9778         * src/ds390/main.c: remove standard assembler options
9779
9780         * src/mcs51/main.c: remove standard assembler options
9781
9782         * src/port.h: removed "PENDING" comment
9783
9784 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9785
9786         * src/device/lib/_mulint.c  : new, with assember functions
9787
9788         * src/device/lib/_mullong.c : new, with assember functions
9789
9790         * src/device/lib/_divuint.c : with assember functions
9791
9792         * src/device/lib/_divsint.c : with assember functions
9793
9794         * src/device/lib/_divulong.c: with assember functions
9795
9796         * src/device/lib/_divslong.c: with assember functions
9797
9798         * src/device/lib/_moduint.c : with assember functions
9799
9800         * src/device/lib/_modsint.c : with assember functions
9801
9802         * src/device/lib/_modulong.c: with assember functions
9803
9804         * src/device/lib/_modslong.c: with assember functions
9805
9806         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9807
9808         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9809
9810         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9811                                       replaced _mululong.c and _mulslong.c by _mullong.c
9812
9813 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9814
9815         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9816
9817 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9818
9819         * src/SDCCglue.c: test, if win32api is available for MINGW
9820
9821 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9822
9823         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9824         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9825         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9826         * support/regression/ports/host/spec.mk: removed GENERIC
9827         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9828         * support/regression/ports/z80/spec.mk: removed GENERIC
9829
9830 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9831
9832         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9833
9834         * support/regression/tests/bug-467035.c: Created.
9835
9836 2001-10-01    <johan AT FRIJA>
9837
9838         * src/SDCC.y: fixed bug #466586 part 1
9839
9840 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9841
9842         * SDCCicode.c: z80 has no generic pointers
9843         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9844
9845 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9846
9847         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9848
9849 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9850
9851         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9852
9853         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9854
9855 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9856
9857         * configure.in: Fixed up so that ucsim is only configured once.
9858
9859         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9860
9861         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9862         (getPathDifference): As above.
9863
9864         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9865
9866         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9867
9868 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9869         * .version: Updated to 2.3.1
9870
9871         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9872         Added copyright header.
9873
9874         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9875         (assemble): Added support for macro based assembler commands.
9876         (linkEdit): Added support for macro based linker commands.
9877         (preProcess): Changed the pre-processor to use macros.
9878         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9879         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9880
9881         * device/lib/z80/crt0.s: Added module name for debugging.
9882
9883 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9884
9885         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9886
9887         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9888
9889         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9890
9891         * src/Makefile.in: Added SDCCmacro and SDCCutil
9892
9893 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9894
9895         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9896
9897 2001-09-16    <johan AT FRIJA>
9898
9899         * 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.
9900
9901 2001-09-15    <johan AT FRIJA>
9902
9903         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9904         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9905
9906 2001-09-11    <johan AT FRIJA>
9907
9908         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9909
9910 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9911
9912         * support/regression/tests/bug-460444.c: Added test case.
9913
9914         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9915         (genCast): Added justification for all of the asserts.
9916
9917 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9918
9919         * support/regression/support.c: _xdata replaced by xdata
9920
9921         * support/regression/spec.mk: removed _generic
9922
9923 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9924
9925         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9926
9927         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9928         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9929
9930         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9931
9932         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9933
9934         * support/regression/tests/bug-460010.c: Added test case.
9935
9936         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9937
9938 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9939
9940         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9941
9942         * support/regression/testfwk.c: removed workaround for bug #436344
9943
9944         * support/regression/tests/bp.c: use less memory with mcs51
9945
9946         * support/regression/tests/bug-441448.c: use less memory
9947
9948         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9949
9950         * support/regression/collate-results.py: typo
9951
9952 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9953
9954         * support/regression/tests/fetchoverlap.c: Added new test case.
9955
9956         * support/regression/tests/bp.c: Added new test case.
9957
9958         * support/regression/tests/bug-448984.c: Added new test case.
9959
9960         * support/regression/tests/pow2shifts.c: Added new test case.
9961
9962         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9963         (genlshTwo): Fixed right shift for count > 8.
9964
9965         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9966
9967 2001-09-08    <johan AT FRIJA>
9968
9969         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9970
9971 2001-09-07    <johan AT FRIJA>
9972
9973         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9974
9975         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9976
9977 2001-09-06    <johan AT FRIJA>
9978
9979         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9980         * bernhard noted me at this: "() equals to (void)" (1.38)
9981
9982 2001-09-05    <johan AT FRIJA>
9983
9984         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9985
9986 2001-09-04    <johan AT FRIJA>
9987
9988         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9989
9990
9991 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9992
9993         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9994
9995 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9996
9997         * link/z80/aslink.h: Fixed path for PATH_MAX
9998
9999 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10000
10001         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10002
10003         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10004
10005         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10006
10007         * 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.
10008
10009 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10010
10011         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10012         (genCmp): Fixed up genCmp for the GB with longs.
10013
10014         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10015
10016         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10017
10018         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10019
10020         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10021
10022 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10023
10024         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10025
10026 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10027
10028         * 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.
10029
10030         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10031
10032 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10033
10034         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10035
10036         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10037
10038 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10039
10040   * sim/ucsim/configure:    little improvement of Cygwin-detection
10041   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10042   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10043   * support/regression/tests/bug-221100.c: small changes for mcs51
10044   * support/regression/tests/bug-221168.c: small changes for mcs51
10045   * support/regression/tests/bug-227710.c: small changes for mcs51
10046   * support/regression/tests/staticinit.c: small changes for mcs51
10047   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10048   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10049   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10050
10051 $Revision$