* src/SDCCutil.c: corrected double comparison typo
[fw/sdcc] / ChangeLog
1 2005-10-30 Borut Razem <borut.razem AT siol.net>
2
3         * src/SDCCutil.c: corrected double comparison typo
4
5 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
6
7         * device/lib/medium/Makefile: added for new memory model medium
8         * device/include/asm/mcs51/features.h: updated for medium/pdata
9         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
10           added Multiply & Accumulate sbit's and MAC0_PAGE define
11         * device/include/mcs51/c8051f300.h: added sfr16 definitions
12         * device/include/mcs51/c8051f310.h: added sfr16 definitions
13         * device/lib/_mullong.c: update for medium model
14         * device/lib/incl.mk: added medium model
15         * doc/sdccman.lyx: documented medium model
16         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
17         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
18         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
19         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
20           (allocParms): set SCLS and OCLS to pdata for medium model
21         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
22           for pdata,
23           (powof2): return <0 if not power of 2
24         * src/avr/gen.c (genBitWise): use updated powof2
25         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
26           (shiftR2Left2Result): small optimization in setup, save acc when storing,
27           (shiftLLeftOrResult): use B if necessary
28         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
29         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
30         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
31         * support/regression/Makefile.in: added test-mcs51-medium
32         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
33
34 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
35
36         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
37         specifier unsigned
38         * device/lib/time.c (mktime): fixed bug 1334315
39
40 2005-10-28 Raphael Neider <rneider AT web.de>
41
42         * device/include/pic/p16f_common.inc: added common declarations
43         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
44
45 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
46
47         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
48           (aopPutUsesAcc): added to predict accumulator use,
49           (assignResultValue): save acc if necessary,
50           (genMinusDec): store result if indirectly addressed,
51           (genDivOneByte):  save acc if necessary,
52           (movLeft2Result): bugfix if left already in acc,
53           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
54             attention to accumulator use (esp. pdata),
55           (genReceive): receive pdata correctly
56         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
57         * src/SDCCicode.h: added isOperandInPagedSpace prototype
58
59 2005-10-27 Raphael Neider <rneider AT web.de>
60
61         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
62
63 2005-10-27 Raphael Neider <rneider AT web.de>
64
65         * .version: changed version to 2.5.4
66         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
67         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
68           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
69             arithmetics support routines
70         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
71         * device/lib/Makefile.in: also create installdir for pic
72
73         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
74           pic14 port as well
75         * src/pic/device.c (dump_sfr): rewritten to delegate register
76           placement to the linker (use `extern sym' rather than sym EQU addr),
77           (validAddress): fixed to check last specified address
78         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
79           (popGetLit): truncate literal value to 8 bit,
80           (popGet): moved assert to more appropriate place
81           (popGetExternal): create pCode operand from and mark the according
82             symbol as being `extern'
83           (popGetAddr): added sanity check on immediate's offset, provide
84             GPOINTER tag on demand
85           (aopPut): fixed for immediates,
86           (mov2w_op): move operand's address or contents to WREG (depending on
87             operand type), safer variant of mov2w,
88           (movwf,call_libraryfunc): NEW, handy abbreviations,
89           (get_argument_pcop,get_return_val_pcop,pass_argument,
90           get_returnvalue): interface for accessing function parameters and
91             return values,
92           (assignResultValuei,genRet): use new parameter/return value interface
93           (pic14_getDataSize): back to old version handling generic pointers,
94           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
95             provided implementation and/or fixed old one,
96           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
97             calls, removed legacy 8051 reference code
98           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
99           (loadSignToC): NEW, move the operands sign bit to CARRY,
100           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
101             genRightShiftSigned, accepts negative shift counts,
102           (setup_fsr): load FSR and adjust IRP (indirect memory access),
103           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
104             generic pointers, __data pointers and __code pointers,
105           (genUnpackBits,genPackBits): rewritten to work with generic pointers
106             and signed bitfields, limit bitfields to 8 bit,
107           (genDataPointerGet): fixed number of bytes read,
108           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
109           (genPointerGet,genPointerSet): fixed handling of __code pointers,
110             pointers to constant data are no longer assumed to point to __code
111             space, removed invalid pointer types,
112           (bitpatternFromVal): retrieve the PICs representation of an integer
113             or float literal,
114           (genDataPointerSet): fixed assigning to po_immediate operands,
115           (genGenPointerSet): implemented as library call,
116           (genIfx): fixed incorrect condition,
117           (genAddrOf): limit generic pointers' addresses to 2 bytes,
118             provide GPOINTER tag according to destination's storage class,
119           (genCast): added code to handle casting to generic pointers, added
120             sign-/zero extension of the result
121           (aop_isLitLike,op_isLitLike): fixed handling of immediates
122         * src/pic/gen.h: added macros to access IRP bit in STATUS register
123         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
124           extend the result
125         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
126           address/register resides in the shared banks
127           (emitSymbolToFile): improved to handle global and `pinned' symbols,
128             put all variables into separate sections (have the linker arrange
129             them)
130           (picglue): put init code and interrupt handlers in separate sections
131         * src/pic/main.c: added port specific options table, modified to PORT
132           structure to make GPOINTERs 3 byte, added pic14_options
133           (_pic14_do_link): private linking routine (update paths to libraries,
134             add libsdcc.lib by default)
135         * src/pic/main.h: declare pic14_options
136         * src/pic/pcode.c: fixed instructions i/o relations,
137           (RegCond): reverted to correct version,
138           (newpCodeOpLit): truncate literals to 8 bit,
139           (genericPrint): added debug output,
140           (getRegFromInstruction): fixed for various operand types, simplified
141           (BuildFlow): fixed broken handling of isntructions with labels
142           (LinkFlow): start at last instruction in flow (skip trailing comments),
143             pass the flow on to the next instruction after CALL
144           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
145           (insertPCodeInstruction): fixed inserting after a skip instruction,
146           (DoBankSelect): fixed for labeled instructions
147           (OptimizepBlock): honor --nopeep switch
148           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
149         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
150         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
151           (pCodeOptime2pCodes): allow disabling this optimization via
152             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
153             but is still buggy), started implementation of a dataflow based
154             pCode optimization (CSE + dead code elimination)
155           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
156         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
157           names are independant of the stack location and therefore portable across
158           devices
159
160 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
161
162         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
163           (selectSpil): fixed bug 1337835 by not spilling bit variables
164         * support/regression/tests/bug1337835.c: added test for this bug
165         * src/mcs51/peeph.def: restart after rule 3.c,
166           addded rules 263.x to optimize loading constants
167
168 2005-10-26 Raphael Neider <rneider AT web.de>
169
170         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
171         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
172           (genAssign): emit warning when casting literals to generic pointer
173             type, also applies when taking the address of a fixed variable,
174           (genCast): improved casting to generic pointers
175         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
176           extern variables, added verbose error message
177         * device/include/pic16/{string.h,errno.h}: added #pragma library c
178
179 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
180
181         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
182         carry must be complemented too
183         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
184         could be emitted by genMinus
185         * src/SDCCval.c (constVal): fixed bug 1305065
186
187 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
188
189         * src/SDCCast.c (addCast): added promotion for bit variables
190         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
191         promotion casts + optimisation
192         (optimizeGetWord): fix warning 'i' might be used uninitialized
193         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
194         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
195
196 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
197
198         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
199         all chars are promoted to int; promotion should be handled in SDCCast.c
200
201 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
202
203         * device/lib/_strcmp.c: Fixed bug 1326457
204
205 2005-10-11 Raphael Neider <rneider AT web.de>
206
207         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
208         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
209
210 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
211
212         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
213         * support/regression/tests/sfr16.c: added test for the sfr32 bug
214
215 2005-10-04 Raphael Neider <rneider AT web.de>
216
217         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
218           device/lib/pic16/pics.all: added pic18f1320
219         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
220
221 2005-09-30 Raphael Neider <rneider AT web.de>
222
223         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
224         * src/pic16/devices.inc: NEW, provides device descriptions
225         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
226
227 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
228
229         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
230           GETHBIT
231
232 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
233
234         * doc/sdccman.lyx: updated Highest Order Bit documentation,
235           documented Any Order Bit, Higher Order Byte and Higher Order Word
236         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
237         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
238           (optimizeGetAbit): new, to get any bit, not only the high bit,
239           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
240           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
241           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
242           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
243             RIGHT_OP: also try GETBYTE, GETWORD optimization,
244             GETABIT, GETBYTE, GETWORD: decorate them,
245           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
246           (ast_print): added GETABIT, GETBYTE, GETWORD
247         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
248         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
249           (geniCodeBinary): new generic binary icode,
250           (ast2iCode): added GETABIT, GETBYTE, GETWORD
251         * src/port.h: updated comment for PORT.hasExtBitOp
252         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
253           (genGetByte): new, to get a single byte,
254           (genGetWord): new, to get a word from a long,
255           (gen51Code): added GETABIT, GETBYTE, GETWORD
256         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
257
258 2005-09-23 Raphael Neider <rneider AT web.de>
259
260         * configure.in, configure: have device/lib/pic configured
261         * device/lib/Makefile.in: added model-pic14
262         * device/lib/clean.mk: added pic/ to clean rule
263         * device/lib/pic: added rudimentary pic14 library providing support
264           functions for multiplication/division/generic pointer access
265         * src/SDCCopt.c (convilong): mark support functions as extern
266           for pic14 port as well
267         * src/pic/gen.c (genMult): added assertions,
268           (genpic14Code): emit warning on unhandled iCodes
269         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
270         * src/pic/pcode.c (pCodeOpCopy),
271         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
272           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
273           SFR_REGISTER}), made safe for future extensions
274         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
275           instructions even if preceeded by SKIP instructions (also remove
276           them); removed unused code
277         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
278           prevents leaving parts of the structure uninitialized after copying
279
280 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
281
282         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
283           ago by me
284         * support/regression/tests/addsub.c: added test for the bug
285
286 2005-09-21 Raphael Neider <rneider AT web.de>
287
288         * device/include/pic16/pic18f1220.h,
289           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
290         * device/lib/pic16/Makefile.rules: added missing opening paren
291         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
292           are provided in genutils.c,
293           (genUminusFloat,genUminus,genCmpEq): added asserts on different
294           operand/result sizes,
295           (genCmp): assert on NULL pointers first, then check deref'ed values
296         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
297           result size
298
299 2005-09-18 Raphael Neider <rneider AT web.de>
300
301         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
302           as these are now unused,
303           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
304         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
305           local, avoids uninitialized pointer dereference on r->name
306         * src/pic16/ralloc.c (newReg): fixed indentation
307
308 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
309
310         * src/SDCCval.c (constVal): fixed bug 730366
311         * support/Util/SDCCerr.c,
312         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
313
314 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
315
316         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
317
318 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
319
320         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
321
322 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
323
324         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
325           (hex2dec): made hex_digit unsigned char, removed ascii dependance
326         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
327           (hex2dec): made hex_digit unsigned char, removed ascii dependance
328         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
329         * packihx/packihx.c (hexDigit): made c unsigned char
330         * as/mcs51/lklibr.c (fndsym),
331         * link/z80/lkgb.c (gb),
332         * link/z80/lklibr.c (fndsym),
333         * link/z80/lkrloc.c (relr),
334         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
335         * src/SDCC.lex (checkCurrFile, process_pragma),
336         * src/SDCCglue.c (spacesToUnderscores),
337         * src/SDCCmain.c (setParseWithComma, processFile),
338         * src/asm.c (tvsprintf, printCLine),
339         * src/avr/gen.c (emitcode, aopPut),
340         * src/ds390/gen.c (emitcode),
341         * src/hc08/gen.c (emitcode, emitinline),
342         * src/mcs51/gen.c (emitcode, genInline),
343         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
344           tokenizeLineNode),
345         * src/pic/ralloc.c (debugLog),
346         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
347           tokenizeLineNode),
348         * src/pic16/ralloc.c (debugLog),
349         * src/z80/main.c (_process_pragma):
350            made all ctype.h function calls safe
351         * src/SDCCopt.c: include math.h for fabs
352         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
353           and used them throughout the code to make ctype.h function calls safe
354         * src/ds390/main.c (asmLineNodeFromLineNode),
355         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
356         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
357            unsigned char*
358         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
359           (newpCodeAsmDir): made ctype.h function calls safe
360         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
361           pic16_emitcode):  made lbp unsigned char*
362         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
363           (pic16_newpCodeAsmDir): made ctype.h function calls safe
364         * src/xa51/gen.c (emitcode),
365         * src/z80/gen.c (_emit2): made lbp unsigned char*
366         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
367            char*
368
369 2005-09-05 Raphael Neider <rneider AT web.de>
370
371         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
372           access bank splitpoint
373
374 2005-09-05 Raphael Neider <rneider AT web.de>
375
376         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
377
378 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
379
380         * .version: changed to version 2.5.3
381         * doc/sdccman.lyx: changed version to 2.5.3,
382           documented --codeseg and --constseg and pragma codeseg and constseg,
383           documented bit parameters (reentrant) and bit returning
384         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
385            currFunc->recvSize, but is this ok for all ports?
386           (ast2iCode): result of ~ on unsigned char must be cast to int for
387            bool to work
388         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
389           function pointers in bit space
390         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
391           (processFuncArgs): call port.reg_parm() with reentrancy info
392         * src/port.h,
393         * src/avr/main.c,
394         * src/ds390/main.c,
395         * src/hc08/main.c,
396         * src/pic/main.c,
397         * src/pic16/main.c,
398         * src/xa51/main.c,
399         * src/z80/main.c: port.reg_parm prototype extended with
400           "bool reentrant" parameter
401         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
402           options.stackAuto for allocating bit register parameters
403         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
404           (genSend): set BitBankUsed if it is,
405           (selectRegBank): factored out of genCall for use in genPcall,
406           (genCall): removed redundant dtype assignmen, use selectRegBank,
407           (genPcall): handle returning in Carry properly, save in F0 if needed,
408           (genReceive): handle bit register parameters
409         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
410           (mcs51_assignRegisters): enable bit registers for all reentrant
411            functions and don't set BitBankUsed unconditionally
412         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
413         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
414         * support/regression/tests/funptrs.c: added tests for BOOL and for return
415
416 2005-08-27 Borut Razem <borut.razem AT siol.net>
417
418         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
419         ppc-osx (Darwin) does not support -u option. It seems that it is
420         supported only on Linux - GNU cp
421
422 2005-08-25 Borut Razem <borut.razem AT siol.net>
423
424         * sim/ucsim/gui.src/serio.src/Makefile.in,
425           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
426           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
427           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
428           install and strip, since the strip at /usr/ccs/bin should be used
429           on solaris
430
431 2005-08-24 Borut Razem <borut.razem AT siol.net>
432
433         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
434
435 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
436
437         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
438         ffffffffu
439
440 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
441
442         * as/mcs51/aslink.h: completed lkrloc.c prototypes
443         * as/mcs51/lkmain.c (link_main): fixed warning
444         * device/include/stdbool.h: ds390 has no advanced bit support yet
445         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
446         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
447         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
448           and updated their macros
449         * src/SDCCval.c (constVal): updated comment for renamed b_long
450
451 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
452
453         * as/mcs51/asdata.c: changed ctype['['] to BINOP
454         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
455           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
456           (oprio): set priority for '['
457         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
458            and adb_24_bit
459         * as/mcs51/asm.h: added defines R_BIT and S_BIT
460         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
461         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
462         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
463           added overlayable BIT_BANK area
464         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
465           (summary2): explain 'T' in legenda
466         * as/mcs51/lkrloc.c: replaced old K&R style,
467           (relr): added R_BIT processing,
468           (errmsg): added "Bit-addressable relocation error",
469           (adb_bit): added for converting from byte- to bit-addressable space,
470           (adb_24_bit): added for converting from byte- to bit-addressable space
471         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
472            used in reentrant functions now even as return value
473         * device/lib/_gptrput.c (_gptrput): removed obsolete code
474         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
475           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
476         * src/SDCCglobl.h: added indicator BitBankUsed
477         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
478            the bit registers b0-b7
479         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
480           (geniCodeCast): fixed bug 1263853,
481           (geniCodeLogicAndOr): put result in bool or char,
482           (geniCodeReceive): added parameter func for accessing the return type,
483           (geniCodeFunctionBody): pass func to geniCodeReceive
484         * src/SDCCmain.c: added indicator BitBankUsed
485         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
486         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
487           (checkSClass): don't put automatic bool/bit on stack,
488           (checkFunction): removed check on function cannot return bit
489         * src/SDCCsymt.h: added newBoolLink prototype
490         * src/mcs51/gen.c (rb1regs): added bit registers,
491           (movc): created for assigning to carry,
492           (pushReg, popReg): created for pushing registers,
493           (sameRegs): check both AOP_REG and AOP_CRY types,
494           (aopOp): handle bit registers,
495           (aopPut): optimization no self-assign,
496           (saveRegisters): push reg->base (bits) only once for bit registers,
497            and use pushReg,
498           (unsaveRegisters): pop reg->base only once and use popReg,
499           (assignResultValue): added parameter func and return in carry for bits,
500           (genIpush): optimization no reload in A if not changed,
501           (genSend): bit parameters in reentrant functions are passed in bit
502            registers by first assigning to bits in B, then save registers and
503            copy B to bits,
504           (genCall): handle returning in Carry properly, save it in F0 if needed,
505           (genPcall): updated assignResultValue call, this is not safe yet for bit
506            returning function !!!
507           (genFunction): don't generate equ's for bit registers and use pushReg,
508           (genEndFunction): take care of bit returning functions and use popReg,
509           (genRet): return bit in Carry,
510           (genIfx): optimize bit registers and other directly addressable bits,
511           (genReceive): updated assignResultValue call
512         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
513           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
514            registers when using stack-auto
515         * src/mcs51/ralloc.c (_G): added allBitregs,
516           (regs8051): added the bit registers,
517           (createStackSpil): use macro IS_BIT,
518           (getRegBit): added to allocate a bit register, else spill,
519           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
520           (updateRegUsage): factored out to ease stepping while debugging,
521           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
522            also allocate bit registers,
523           (fillGaps): handle bit registers,
524           (findAllBitregs): added to create bit vector with all bit registers,
525           (mcs51_allBitregs): returns this bit vector,
526           (mcs51_assignRegisters): when using stack-auto use bit registers for
527            passing parameters and creating local variables
528         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
529
530 2005-08-22 Borut Razem <borut.razem AT siol.net>
531
532         * device/lib/Makefile.in: replaced find option -or with -o
533           to make it run on solaris
534
535 2005-08-22 Raphael Neider <rneider AT web.de>
536
537         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
538           fixes #1265442 (crash on Solaris)
539
540 2005-08-20 Borut Razem <borut.razem AT siol.net>
541
542         * configure, configure.in: added tests for libsocket and libnsl libraries,
543           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
544           from support/regression/Makefile.in
545         * support/regression/Makefile.in: added
546         * device/lib/pic16/Makefile.common.in: force make to use bash shell
547         * sim/ucsim/libtool: regenerated on sparc-solaris
548         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
549           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
550           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
551           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
552           sparc-solaris, which doesn't use GNU ld linker
553         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
554         * as/Makefile: find on sparc-solaris does not support -maxdepth option
555
556 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
557
558         * src/mcs51/peeph.def: updated comments
559
560 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
561
562         * device/lib/_gptrget.c,
563         * device/lib/_gptrput.c: slightly shorter
564         * doc/sdccman.lyx: incremented version
565         * src/mcs51/peeph.def: moved peephole comments to the line of first
566           change to better keep line correlation, reanimated 186.e
567         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
568
569 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
570
571         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
572           David Saxton with quotes around file name.
573
574 2005-08-15 Borut Razem <borut.razem AT siol.net>
575
576         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
577           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
578           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
579           make tests run on x86_64 platform
580
581 2005-08-13 Raphael Neider <rneider AT web.de>
582
583         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
584           as it might be executed DURING a build (parallel make is wonderful)
585
586 2005-08-13 Raphael Neider <rneider AT web.de>
587
588         * device/lib/Makefile.in (port-specific-objects-pic16):
589           revert to cp $(PORT)/bin/*.* $(PORTDIR)
590         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
591           dependency
592         * device/lib/pic16/Makefile.rules: build subdirs before creating
593           the library, removed builddir rule, create $(builddir) early in
594           recurse rule, use empty recurse rule for leaf directories
595         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
596           mkdir errors (race condition), removed duplicate suffix "hex"
597           from clean rules
598         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
599         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
600           prevents mkdir -p from aborting on Alpha
601
602 2005-08-12 Raphael Neider <rneider AT web.de>
603
604         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
605           db-statements in order to allow for arrays of pointers in code
606           sections to be placed without interspersed 0-padding, fixes
607           bug #1256215
608         * (emitStatistics): fixed division by zero for pic18f1220
609         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
610           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
611         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
612         * (pic16_pCodeConstString): keep track of already emitted string
613           literals to prevent "duplicate definitions of symbol _str_NR"
614         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
615           debug message
616         * device/lib/Makefile.in: ignore failing PIC16 library builds
617         * device/lib/pic16/Makefile: do not build if gputils are missing
618         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
619
620 2005-08-10 Raphael Neider <rneider AT web.de>
621
622         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
623           my last commit)
624
625 2005-08-10 Raphael Neider <rneider AT web.de>
626
627         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
628           Rokas' patch to add the new fixed point type "__fixed16x16"
629         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
630           functions for __fixed16x16 arithmetics
631         * device/lib/pic16: reimplemented the build system to support
632           a separate build directory, better handling of libio (create
633           the library in a separate subdir for each architecture) and
634           easier configuration (centralized in Makefile.common)
635
636 2005-08-07 Raphael Neider <rneider AT web.de>
637
638         * src/pic16/gen.c (genrshTwo): fixed sign extension
639         * src/pic16/device.c: added pic18f2320, 4220 and 4320
640         * device/include/pic16/pic18f2220.h: changed some bit definitions,
641           added T0CONbits
642         * device/include/pic16/pic18f4220.h: NEW, header for
643           pic18f4220 and pic18f4320
644         * device/include/pic16/pic18fregs.h: added new devices,
645           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
646         * device/include/pic16/signal.h: resolved name clashes
647           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
648           to also allow testing for interrupt enable bits, added
649           comments on how to use the macros
650         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
651         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
652           register definitions for the devices
653         * device/lib/pic16/pics.all: added new devices
654         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
655           allocated memory
656         * device/lib/pic16/libc/stdlib/memfree: do not count
657           the block header as free memory
658         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
659           simplified and added missing end-of-blocklist-marker
660           (reported by Peter Onion, fixes #1252814)
661         * (_mergeHeapBlock): fixed loop condition
662         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
663           len==0, restructured code
664         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
665           up a bit, reduced bitfield accesses, prevent endless loops
666           in case of heap corruption
667         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
668           "unreferenced arguments/must return a value" warnings
669         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
670           replaced BAUDREG with SPBRG
671         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
672           device/lib/pic16/debug/gstack/gstack.c: replaced
673           _naked, _asm, _endasm with __naked, __asm, __endasm
674
675 2005-08-05 Raphael Neider <rneider AT web.de>
676
677         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
678           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
679
680 2005-08-05 Borut Razem <borut.razem AT siol.net>
681
682         * device/lib/Makefile.in: added missing ';'
683         * configure: removed ^M characters
684
685 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
686
687         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
688           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
689           License
690
691 2005-08-04 Borut Razem <borut.razem AT siol.net>
692
693         * configure.in: pic16 libraries build 2nd try - enable running
694           configure in device/lib/pic16
695         * configure: regenerated from configure.in
696         * device/lib/Makefile.in: create $(PORT)/bin directory
697
698 2005-08-03 Raphael Neider <rneider AT web.de>
699
700         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
701           to get/set values via pointers
702         * (genUnpackBits,genPackBits): changed detection of
703           ptr->bitfield vs. sym.bitfield, fixed access via generic
704           pointers, removed dead (wrong) code for multibyte bitfields
705         * (genNearPointerGet, genGenPointerGet): removed useless code,
706           fixed bitfield detection, fixes #1250594
707         * (genNearPointerSet): removed useless code
708         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
709           and introduced macro pic16_emitpcode that conditionally emits
710           the origin of the following pCode (useful for debugging SDCC)
711         * src/pic16/pcode.c: changed (and disabled) some debug outputs
712         * (createDefmap): fixed handling of LFSR for --optimize-df
713
714 2005-08-02 Borut Razem <borut.razem AT siol.net>
715
716         * device/lib/Makefile.in: pic16 libraries build enabled since
717           gputils-0.13.2 are now localy installed at sourceforge's compile farm
718
719 2005-08-02 Raphael Neider <rneider AT web.de>
720
721         * src/pic16/gen.c (genPackBits): removed deprecated warning
722         * (genGenPointerSet): fixed bitfield detection
723
724 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
725
726         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
727
728 2005-07-31 Raphael Neider <rneider AT web.de>
729
730         * device/lib/pic16/libdev/pic18f458.c,
731           device/include/pic16/pic18f458.h: added missing T0CONbits
732
733 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
734
735         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
736
737 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
738
739         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
740
741 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
742
743         * device/include/mcs51/at89c51ed2.h: added.
744
745 2005-07-23 Raphael Neider <rneider AT web.de>
746
747         * src/pic/gen.h: added emitpcode macro for debugging
748         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
749           and replace by macro adding debug information on demand
750         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
751         * (gencjne): tried to fix; replaced with correct (slower) code
752         * (gen{Unp,P}ackBits): fixed single bit access
753         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
754         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
755           previous instruction
756         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
757           register has to be handled with care (forbidding movement
758           of assignments/uses, removing assignments completely, ...)
759         * (pCodeOptime2pCodes): make use of regIsSpecial
760         * added lots of debugging output (commented out)
761         * src/pic/rallloc.c (deassignLRs): prevent operand registers
762           from being reused as result UNLESS it is known to work
763
764 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
765
766         * support/Util/dbuf.h: include <stddef.h> for size_t
767         * .version: changed to version 2.5.2
768
769 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
770
771         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
772
773 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
774
775         * src/hc08/gen.c (genMinus): fixed bug #1241835,
776           (genModOneByte): removed needless psha/pula
777
778 2005-07-22 Raphael Neider <rneider AT web.de>
779
780         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
781           have PIC14 handled like PIC16, fixes broken pic14 linker calls
782         * src/pic/gen.c (resolveIfx): do not "invent" labels
783         * (genSkipc): changed to positive logic
784         * (genSkipCond): removed as no longer needed
785         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
786           backport from PIC16
787         * (genLeftShift): check operands are in different registers
788         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
789           INCF does not update CARRY...
790         * src/pic/main.c: fixed _linkCmd
791         * src/pic/pcode.c (unlinkpCode): added inactive code
792         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
793           alive (do not assign result and operand overlapping registers)
794
795 2005-07-22 Raphael Neider <rneider AT web.de>
796
797         * src/pic/device.c (dump_sfr): replaced register declaration with
798           call to emitSymbolToFile() to avoid duplicate symbols
799         * (assignRelocatableRegisters): do not declare external symbols
800         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
801           right (take size of type, not etype)
802         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
803         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
804         * (packRegsForAccUse): disabled assignment of WREG as
805           the result reg to prevent occurence of just fixed #1235003,
806           fixes #1242954
807         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
808           symbols (avoids duplicate symbols in .asm file)
809         * (pic14emitRegularMap): use emitSymbolToFile()
810         * src/pic/gen.c (aopOp): fixed spillLocation handling
811         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
812         * (genDataPointerSet): removed unneccessary variables/output
813
814 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
815
816         * as/mcs51/lkarea.c: enlarged codemap for banked memory
817         * device/lib/mcs51/crtbank.asm: added # to 0x0F
818
819 2005-07-21 Raphael Neider <rneider AT web.de>
820
821         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
822           architecture cannot handle them efficiently, fixes bug #1235003
823         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
824           check for empty sets before using them (fixes bug #1232190)
825
826 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
827
828         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
829           (lnksect2): generate warnings for memory overlap
830         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
831           constseg to set the name of these segments so you can instruct the linker
832           to place them in banks
833         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
834         * src/SDCCglobl.h: added MODEL_HUGE to enum,
835           added code_seg and const_seg to options
836         * src/SDCCglue.c (emitMaps): use options.const_seg,
837           (createInterruptVect): put interrupt vectors in segment HOME,
838           (glue): put HOME before static segment and put the main glue in HOME,
839           (glue): use options.code_seg
840         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
841         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
842           these segments so you can instruct the linker to place them in banks
843           (linkEdit): use code_loc for HOME segment which should be the first
844           segment in code memory now
845         * src/SDCCmem.c: fixed more stuff like bug 1238386
846         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
847           (changePointer): don't change function pointers to code pointers for
848           banked functions,
849           (compareType): added exceptional check for banked function pointers
850         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
851         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
852           after static in code memory
853         * src/mcs51/gen.c: added aopLiteralLong prototype,
854           (aopForSym): use getSize for functions,
855           (genCall): generate banked calls over one trampoline __sdcc_banked_call
856           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
857           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
858           the segment,
859           (genPcall): use call for literal function pointers and generate banked
860           calls over the one trampoline so there's only one place for the user to
861           modify according to his/hers hardware,
862           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
863           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
864         * src/mcs51/main.c: added keyword banked,
865           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
866         * support/Util/SDCCerr.c,
867         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
868           needed for passing the bank and address to the trampoline
869         * device/lib/mcs51/crtbank.asm: added for bankswitching
870         * device/lib/mcs51/Makefile: added crtbank
871
872 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
873
874         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
875           for fields at offset 0 of a struct or union as reported
876           on 2005-07-07 in the developer mailing list.
877
878 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
879
880         * src/SDCCmem.c: fixed bug 1238386
881
882 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
883
884         * src/mcs51/peeph.def: added labelrefcounting for peepholes
885           (patch #1144962), added peephole 300, enabled 259.x
886         * doc/sdccman.lyx: removed screenshot and provided link instead
887
888 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
889
890         * doc/sdccman.lyx: added section about debugging with ddd
891         * doc/figures/ddd_example.eps: screenshot of debugging session
892
893 2005-07-04 Raphael Neider <rneider AT web.de>
894
895         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
896           like CODE pointers, fixes #1115683
897         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
898           call, fixes bugs #1232211, #1228110,
899           fixed wrong casts to pCodeFlow from pCodeInstructions
900
901 2005-07-04 Raphael Neider <rneider AT web.de>
902
903         * src/pic/gen.c (popGet): changed assert to allow for
904           bit operands
905         * (popGetAddr): changed signature to provide
906           an additional index, patched all call sites
907         * (genCmpEq): handle literal-like operands correctly
908         * (genAddrOf): added sanity checks on __code/__data pointers
909         * (genAssign): added handling of symbols from __code section
910         * (gencjne): do not generate code for comparisons whose result
911           is neither stored nor used, fixes bug #1171114
912         * (AccLsh, AccRsh): operate on operand instead of WREG
913         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
914           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
915           by known count
916         * rewrote complete shift-by-literal logic, commented unused
917           functions out
918         * (genConstPointerGet): get multiple bytes (if result size > 1),
919           fixed handling of non-immediate addresses
920         * (genPointerGet): handle CODE pointers like CONST pointers
921         * (genpic14Code): insert C-SRC lines as Cource-pCodes
922         * ({aop,op}_isLitLike): NEW, single place to decide whether an
923           operand is to be treated as a literal or not
924         * (mov2w,genPcall,genCmpEq),
925           src/pic/genarith.c: use aop_isLitLike() to decide between
926           literal/register contents
927         * (addSign): added missing offset
928         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
929           only emit comment in debug-mode,
930           use {aop,op}_isLitLike throughout the file
931         * src/pic/glue.c: fix initializers for pointers (work in progress)
932         * src/pic/pcode.c (get_op): honor index on _const symbols
933         * ({reset,dump}pCodeStatistics): NEW, estimate code size
934         * (dumppBlock): added pCode size estimation
935         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
936           check for IS_SYMOP before OP_SYMBOL'ing
937         * fixed indentation, compacted switch-statements
938         * (allocReg): find free register and allocate it instead of
939           allocating new registers all the time
940         * (deassignLRs): prevent POINTER_GET's from being assigned the same
941           registers as its operands (necessary only for multibyte GETs)
942
943 2005-07-01 Raphael Neider <rneider AT web.de>
944
945         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
946           debugging .asm-output macros FENTRY + FEXIT
947         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
948           way... I wonder...
949         * (emitpComment): NEW, printf to pCode
950         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
951           offset handling
952         * (popGetAddr): NEW, variant of popGet to access an immediates
953           high(er) bytes instead of the n'th byte of memory they reference,
954           replaced popGet with popGetAddr where neccessary
955         * (genDataPointerGet): reactivated and fixed implementation
956         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
957           accesses
958         * (genDataPointerSet): fixed multibyte assignments
959         * (genpic14Code): fixed --i-code-in-asm handling
960         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
961         * (genPlus): fixed index-out-of-bounds error
962         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
963         * src/pic/ralloc.c: added debugging output macro FENTRY2
964         * (spillThis): fixed indentation, enbraced for-body for clarity
965         * (rematStr): commented out as now unused
966         * (regTypeNum): commented out special spill case (overwrites
967           arbitrary values)
968         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
969
970 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
971
972         * doc/sdccman.lyx: documented sfr16/sfr32,
973           added example for using storage class with function pointers
974         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
975
976 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
977
978         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
979         * device/lib/_itoa.c,
980         * device/lib/_ltoa.c: optimized codesize
981         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
982           but don't know how to suppress the double warning.
983         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
984         * support/Util/SDCCerr.c,
985         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
986
987 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
988
989         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
990           fixed old K&R prototypes
991         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
992         * device/lib/_gptrget.c,
993         * device/lib/_gptrgetc.c,
994         * device/lib/_gptrput.c: changed versions for new memory indicator values,
995           also new versions for small generic pointers and banked generic pointers
996         * src/port.h: added const_name
997         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
998         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
999         * src/SDCCcse.c (findPrevIc): check all associative operators
1000         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1001         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1002         * src/SDCCmem.c: updated comments,
1003           set far-space to 0 for pdata, results in optimized code
1004         * src/SDCCmem.h: added macro CONST_NAME
1005         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1006           moving the info into the highest bits, see also gptrget/gptrput
1007         * src/src.dsp: added sdcc.ico to project files
1008         * src/avr/gen.c (genCast): fixed bug 0x%d
1009         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1010         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1011           relation between ptr_type and DCL_TYPE,
1012           (genCast): fixed bug 0x%d
1013         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1014           (CODE)" for const_name
1015         * src/hc08/gen.c (genCast): fixed bug 0x%d
1016         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1017           (hc08_port): added "CONST (CODE)" for const_name
1018         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1019           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1020           between ptr_type and DCL_TYPE,
1021           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1022           operand* and took AOP() inside function so sfr-ness can be checked,
1023           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1024           new prototype,
1025           (genFunction, genEndFunction): optimized stack setup,
1026           (genMinus): optimized for literals with ending zeroes (in bytes),
1027           (genCast): fixed bug 0x%d
1028         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1029           (mcs51_port): added "CONST (CODE)" for const_name
1030         * src/mcs51/peeph.def: made rule 226 more generic
1031         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1032         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1033         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1034         * src/z80/main.c (z80_port): added NULL for const_name,
1035           (gbz80_port): added NULL for const_name
1036         * support/regression/tests/bug663539.c,
1037         * support/regression/tests/sfr16.c: new tests
1038
1039 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1040
1041         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1042
1043 2005-06-24 Raphael Neider <rneider AT web.de>
1044
1045         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1046           corrected typos...
1047         * device/include/pic16/signal.h: added USBIF
1048           and SIG_USB
1049
1050 2005-06-24 Raphael Neider <rneider AT web.de>
1051
1052         * device/lib/pic16/libdev/pic18f2455.c,
1053           device/include/pic16/pic18f2455.h: NEW
1054         * device/include/pic16/pic18fregs.h,
1055           device/lib/pic16/pics.all,
1056           src/pic16/device.c: added 18f2455
1057         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1058           device/include/pic16/{pic18f[68][567].h,usart.h}:
1059           replaced MULTIPLE_USARTS define with more relaible
1060           compatibility sfrs (for USART access)
1061
1062 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1063
1064         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1065           and the output asm file line is printed on two lines.
1066
1067 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1068
1069         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1070           BGT, BLE, BHI, and BLS instructions
1071         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1072           genCmpEq): removed
1073         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1074           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1075           fixes bug #1216342
1076         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1077
1078 2005-06-15 Raphael Neider <rneider AT web.de>
1079
1080         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1081         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1082         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1083           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1084           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1085
1086 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1087
1088         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1089           Marcel Telka in bug #1215704
1090
1091 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1092
1093         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1094           located in shared memory bank.
1095
1096 2005-05-31 Raphael Neider <rneider AT web.de>
1097
1098         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1099           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1100           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1101
1102 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1103
1104         * device/lib/_strncpy.c: fixed the fix
1105
1106 2005-05-26 Raphael Neider <rneider AT web.de>
1107
1108         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1109           initializers with \0, bug #1208187
1110         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1111           intializers with \0, bug #1208187
1112
1113 2005-05-26 Raphael Neider <rneider AT web.de>
1114
1115         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1116           initializers with \0, bug #1208187
1117         * src/pic16/main.c (_process_pragma): added sanity checks
1118           for stack position and size, emit warnings when appropriate
1119
1120 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1121
1122         * device/lib/_strncpy.c: fixed not filling with \0
1123
1124 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1125
1126         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1127           createFunction),
1128         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1129           compound_statement),
1130         * src/SDCCsymt.h,
1131         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1132
1133 2005-05-24 Raphael Neider <rneider AT web.de>
1134
1135         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1136
1137 2005-05-24 Raphael Neider <rneider AT web.de>
1138
1139         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1140           TRISE definitions, closes bug #1162453
1141
1142 2005-05-22 Raphael Neider <rneider AT web.de>
1143
1144         * src/pic16/main.c (_process_pragma): check for missing
1145           arguments to pragmas code and udata
1146         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1147           consistency fixes to match other headers (thanks to Jim Paris)
1148         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1149
1150 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1151
1152         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1153
1154 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1155
1156         * support/regression/tests/bug1198642.c: new test
1157         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1158         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1159         * support/scripts/resource.h,
1160         * support/scripts/resource.rc,
1161         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1162         * support/scripts/sdcc.ico: added 32x32 icon
1163
1164 2005-05-18 Raphael Neider <rneider AT web.de>
1165
1166         * device/lib/pic16/libdev/pic18f*.c,
1167         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1168           keywords to "__sfr" and "__at (X)"
1169         * device/include/pic16/pic18fregs.h: added pic18f4520
1170         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1171           #1203088 (MPLAB compatibility)
1172
1173 2005-05-17 Raphael Neider <rneider AT web.de>
1174
1175         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1176         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1177         * device/lib/pic16/pics.all: added new devices
1178         * src/pic16/device.c: added support for pic18f4520
1179
1180 2005-05-16 Raphael Neider <rneider AT web.de>
1181         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1182         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1183         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1184           convenience function for bit access
1185
1186 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1187
1188         * device/lib/printf_large.c: fixed bug 1193299
1189         * support/regression/tests/bug1057979.c: added test %3.3s
1190
1191 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1192
1193         * device/include/mcs51/8051.h,
1194         * device/include/mcs51/8052.h: made parseable with lint
1195         * device/include/mcs51/lint.h: added include file for (sp)lint
1196         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1197         * doc/cdbfileformat.lyx,
1198         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1199
1200 2005-05-14 Raphael Neider <rneider AT web.de>
1201
1202         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1203         * device/lib/pic16/libc/stdlib/itoa.c (new)
1204         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1205         * device/lib/pic16/libio/Makefile: exclude subdir according to
1206           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1207         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1208         * src/pic16/gen.c (genFunction): prevent annoying warning
1209         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1210           nameclashes on BeOS
1211         * support/cpp2/cppmain.c (cpp_output_string): new
1212         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1213           fixes bug 1116802
1214
1215 2005-05-13 Borut Razem <borut.razem AT siol.net>
1216
1217         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1218
1219 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1220
1221         * .version: changed to version 2.5.1; back to bleeding edge development
1222
1223 2005-05-11 Borut Razem <borut.razem AT siol.net>
1224
1225         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1226           generate PDF version 1.3 documents
1227
1228 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1229
1230         * .version: changed to version 2.5.0
1231
1232 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1233
1234         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1235
1236 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1237
1238         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1239         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1240         well as many smaller updates.
1241         * .version: changed to version 2.5.0-pre1
1242
1243 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1244
1245         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1246
1247 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1248
1249         * support/regression/tests/bug1185672.c: added
1250         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1251           bug 1185672
1252         * src/mcs51/gen.c (genCall): added comments, made it look safer
1253         * src/mcs51/gen.c (genEndFunction): simplified
1254
1255 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1256
1257         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1258
1259 2005-04-14 Borut Razem <borut.razem AT siol.net>
1260
1261         * fixed bug 1045046 - SIGSEGV with really simple code?:
1262           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1263           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1264
1265 2005-04-14 Borut Razem <borut.razem AT siol.net>
1266
1267         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1268           src/pic16/device.h: temporarily disabled experimental #inline pragma
1269           for 2.5.0 release
1270
1271 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1272
1273         * device/include/z80/stdio.h,
1274         * device/include/z80/string.h: removed these highly incomplete files so
1275           SDCC can use the default ones in device/include/
1276
1277 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1278
1279         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1280         gcc warning.
1281         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1282         fix sdcpp warnings.
1283
1284 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1285
1286         * device/include/malloc.h: removed redundant __reentrant prototypes
1287         * device/lib/_mullong.c: added working xstack variant in asm (C version
1288           doesn't pass regression tests)
1289         * device/lib/bpx.c: used __data and made bpx char for mcs51
1290         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1291           (createFunction): fixed bug with xstackPtr
1292         * src/SDCCcse.c: corrected comments
1293         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1294           (killDeadCode, eBBlockFromiCode): removed unused code
1295         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1296           corrected comments
1297         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1298           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1299           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1300           (genModOneByte): fixed warning in MSVC
1301         * src/mcs51/main.c (): added comments
1302         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1303
1304 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1305
1306         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1307
1308 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1309
1310         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1311
1312 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1313
1314         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1315         characters arrays of larger size than the declared one.
1316
1317 2005-04-10 Borut Razem <borut.razem AT siol.net>
1318
1319         * src/pic/gen.c (genInline),
1320           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1321           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1322           (findNextInstruction), (findPrevInstruction),
1323           (findInstructionUsingLabel),
1324           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1325         * src/pic/pcode.c (findLabel): added missing '\n'
1326         * src/src.dsp: added SDCCdwarf2.c to the project
1327
1328 2005-04-09 Borut Razem <borut.razem AT siol.net>
1329
1330         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1331
1332 2005-04-08 Raphael Neider <rneider AT web.de>
1333
1334         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1335           into the chain after a given one) and mergeDefmapSymbols (combine
1336           defmap entries for each symbol per pcode)
1337         * (createDefmap): have defmap entries merged in the end
1338         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1339           a symbol before replacing one access type's symbol, merge symbols in
1340           the end (replacement symbol might already have an entry)
1341         * (assignValnums): keep reference to written WREG intact
1342
1343 2005-04-08 Raphael Neider <rneider AT web.de>
1344
1345         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1346           Alpha)
1347
1348 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1349
1350         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1351         bytes
1352
1353 2005-04-07 Raphael Neider <rneider AT web.de>
1354
1355         * device/include/pic16/usart.h: added compatibility defines for
1356           devices with more than one USART
1357         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1358
1359 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1360
1361         * device/lib/Makefile.in: updated for port specific include
1362
1363 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1364
1365         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1366
1367 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1368
1369         * device/include/8051.h,
1370         * device/include/8052.h,
1371         * device/include/at89S8252.h,
1372         * device/include/at89c55.h,
1373         * device/include/at89x051.h,
1374         * device/include/at89x51.h,
1375         * device/include/at89x52.h,
1376         * device/include/mcs51reg.h,
1377         * device/include/reg51.h,
1378         * device/include/reg764.h,
1379         * device/include/regc515c.h,
1380         * device/include/sab80515.h: (re)moved these 12 files
1381         * device/include/mcs51/8051.h,
1382         * device/include/mcs51/8052.h,
1383         * device/include/mcs51/at89S8252.h,
1384         * device/include/mcs51/at89c55.h,
1385         * device/include/mcs51/at89x051.h,
1386         * device/include/mcs51/at89x51.h,
1387         * device/include/mcs51/at89x52.h,
1388         * device/include/mcs51/mcs51reg.h,
1389         * device/include/mcs51/reg51.h,
1390         * device/include/mcs51/reg764.h,
1391         * device/include/mcs51/regc515c.h,
1392         * device/include/mcs51/sab80515.h: and added them here
1393
1394 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1395
1396         * device/include/stdarg.h: changed SDCC specific keywords to double
1397           underlined form.
1398         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1399           mcs51 and ds390.
1400         * device/include/hc08/mc68hc908gp32.h,
1401         * device/include/hc08/mc68hc908jb8.h,
1402         * device/include/hc08/mc68hc908jkjl.h,
1403         * device/include/hc08/mc68hc908qy.h: fixed comments
1404         * device/include/mcs51/README: updated
1405         * device/include/mcs51/c8051f120.h: added PINRSF
1406         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1407         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1408           amidst code. Also inline is not supported.
1409
1410 2005-04-06 Raphael Neider <rneider AT web.de>
1411
1412         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1413         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1414           callers stack/frame pointers
1415
1416 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1417
1418         * device/include/pic16/usart.h: added, missing in previous commit,
1419         * device/include/pic16/adc.h: fixed typo,
1420         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1421         commit,
1422         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1423         <p18fxxx.inc>
1424         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1425         uninitialized because a bug appears with gplink
1426         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1427         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1428         complains for unrecognised option
1429
1430 2005-04-05 Raphael Neider <rneider AT web.de>
1431
1432         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1433           structs as well (using memcpy)
1434         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1435           on ISRs (GOTO has no label)
1436         * src/pic16/device.h: added OF_OPTIMIZE_DF
1437         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1438           new data flow analysis/optimization
1439         * src/pic16/pcode.c: added (prototypes for and implementation of)
1440           dataflow analysis functions, fixed pCodeInstructions' inCond and
1441           outCond values, made RCALL a branch instruction
1442         * (pic16_unlinkpCode): keep C line if possible
1443         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1444           C line moved if possible
1445         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1446         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1447           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1448         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1449           new flow)
1450         * (pic16_getJumptabpCode): NEW, needed in...
1451         * (LinkFlow): fixed handling of jumptables, calls and conditional
1452           branches
1453         * (pic16_InsertCommentAfter): NEW
1454         * (pic16_pCodeReplace): made verbose and flow preserving
1455         * (AnalyzeFlow): added call to data flow analysis
1456         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1457         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1458         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1459
1460 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1461
1462         * src/SDCCast.c (decorateType): fixed bug #1105626
1463
1464 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1465
1466         * device/include/asm/pic16/features.h,
1467         * pic18f*.h headers,
1468         * device/include/pic16/adc.h,
1469         * device/include/pic16/delay.h,
1470         * device/include/pic16/i2c.h,
1471         * device/include/pic16/malloc.h,
1472         * device/include/pic16/stdio.h,
1473         * device/include/pic16/stdlib.h,
1474         * device/include/pic16/string.h,
1475         * device/lib/pic16/libc/stdio/printf_tiny.c,
1476         * device/lib/pic16/libc/stdio/printf_small.c,
1477         * device/lib/pic16/libc/stdio/strmgpsim.c,
1478         * device/lib/pic16/libc/stdio/strmmssp.c,
1479         * device/lib/pic16/libc/stdio/strmusart.c,
1480         * device/lib/pic16/libc/stdio/vfprintf.c,
1481         * device/lib/pic16/libc/stdlib/ltoa.c,
1482         * device/lib/pic16/libc/stdlib/putchar.c,
1483         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1484         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1485         * device/lib/pic16/libc/stdlib/memchrram.c,
1486         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1487         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1488         * device/lib/pic16/libio/adc/adcbusy.c,
1489         * device/lib/pic16/libio/adc/adcread.c,
1490         * device/lib/pic16/libio/adc/adcsetch.c,
1491         * device/lib/pic16/libio/usart/ubaud.c,
1492         * device/lib/pic16/libio/usart/ubusy.c,
1493         * device/lib/pic16/libio/usart/udrdy.c,
1494         * device/lib/pic16/libio/usart/uopen.c,
1495         * device/lib/pic16/libio/usart/uputc.c,
1496         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1497         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1498         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1499         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1500         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1501         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1502         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1503         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1504         specific keywords to double underlined form,
1505         * device/lib/pic16/libc/Makefile.rules,
1506         * device/lib/pic16/libsdcc/Makefile.rules,
1507         * device/lib/pic16/libm/Makefile,
1508         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1509         to compile with C standard set in Makefile.common
1510         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1511         rand.c and crc.c in compilation process,
1512         * device/lib/pic16/libsdcc/int/divuint.c,
1513         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1514         `c' from signed to unsigned,
1515         * device/lib/pic16/startup/crt0.c,
1516         * device/lib/pic16/startup/crt0i.c,
1517         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1518         keywords to double underlined form, bug fixes in _do_cinit function
1519         which prevented the correct initialization of the .idata segment,
1520         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1521         core to enter a infinite loop
1522         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1523
1524 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1525
1526         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1527
1528 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1529
1530         * device/include/Makefile.in: add support for hc08 subdirectory
1531         * device/include/hc08/: new subdirectory
1532         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1533         Lucas Loizaga, thanks!
1534         * device/include/hc08/mc68hc908qy.h,
1535         * device/include/hc08/mc68hc908gp32.h,
1536         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1537         their own directory. Changed internal macro names to use the compiler
1538         reserved namespace. Changed SDCC specific keywords to double
1539         underlined form.
1540         * device/include/math.h,
1541         * device/include/malloc.h,
1542         * device/include/stdarg.h,
1543         * device/include/stdbool.h
1544         * device/include/string.h,
1545         * device/include/tinibios.h,
1546         * device/include/ds400rom.h,
1547         * device/include/8051.h,
1548         * device/include/8052.h,
1549         * device/include/80c51xa.h,
1550         * device/include/at89c55.h,
1551         * device/include/at89S8252.h,
1552         * device/include/at89x51.h,
1553         * device/include/at89x52.h,
1554         * device/include/ds80c390.h,
1555         * device/include/reg764.h,
1556         * device/include/regc515c.h,
1557         * device/include/sab80515.h,
1558         * device/include/mcs51/c8051f000.h,
1559         * device/include/mcs51/c8051f018.h,
1560         * device/include/mcs51/c8051f020.h,
1561         * device/include/mcs51/c8051f040.h,
1562         * device/include/mcs51/c8051f060.h,
1563         * device/include/mcs51/c8051f120.h,
1564         * device/include/mcs51/c8051f300.h,
1565         * device/include/mcs51/c8051f310.h,
1566         * device/include/mcs51/c8051f320.h,
1567         * device/include/mcs51/c8051f330.h,
1568         * device/include/mcs51/c8051f350.h,
1569         * device/include/z180.h: Changed SDCC specific keywords to double
1570         underlined form.
1571
1572 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1573
1574         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1575         18F4455,
1576         * (pic16_assignConfigWordValue): disable testing of configuration
1577         register value with config mask,
1578         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1579         function with port->fun_prefix,
1580         * (genFunction): when generating a naked interrupt function never
1581         create an absolute segment placed in interrupt vector address, place
1582         the actual interrupt function at IVA instead, when an interrupt
1583         function is generated with unspecified interrupt then do not create
1584         the absolute section,
1585         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1586         code for generating a call to generic pointer get/put function with
1587         a call to function pic16_callGenericPointer(),
1588         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1589         the call to the generic pointer get/put functions with prefixing the
1590         function name with port->fun_prefix,
1591         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1592         * src/pic16/main.c (_process_pragma): prefix function with
1593         port->fun_prefix,
1594         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1595         calling assembler, old 18Fxxxx macro is deprecated,
1596         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1597         PC_ASMDIR in while condition,
1598         * (findInstruction): add PC_ASMDIR in while condition,
1599         * (buildCallTree): prefix main with port->fun_prefix,
1600         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1601         identifier for variable with banked access in instructions BTFSS,
1602         BTFSC, BCF, BSF, BTG
1603         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1604         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1605         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1606         perform optimization when enviroment variable NO_REG_OPT is set,
1607         * (insideLRBlock): NEW, return 1 if register is inside an
1608         INF_LOCALREGS block,
1609         * (RemoveRegFromLRBlock): remove a register that is completely
1610         eliminated by register optimization, but it is still left in local
1611         register store/restore in/from stack block,
1612         * (Remove2pcodes): after removing register, check to see if it
1613         should be removed from local register store/restore in/from stack
1614         block,
1615         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1616         DUMMY_READ_VOLATILE,
1617
1618         * device/include/pic16/adc.h: minor prototype modifications and
1619         update,
1620         * device/include/pic16/malloc.h: added GPL notice various
1621         modifications,
1622         * device/include/pic16/stdint.h: NEW, standard header for ints
1623         * device/include/pic16/delay.h: NEW, header for delay functions,
1624         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1625         delay1mtcy,
1626         * device/include/pic16/signal.h: NEW, header providing helper macros
1627         for implementing signal handlers,
1628         * device/include/pic16/stdio.h: added prototypes for functions,
1629         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1630         prototypes for stdin and stdout, added macro PUTCHAR to
1631         automatically implement putchar function prototype,
1632         * device/include/pic16/usart.h: modified and updated USART library,
1633         * device/lib/pic16/libio/adc/,
1634         * device/lib/pic16/libio/i2c: some modifications to improve library
1635         performance,
1636         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1637         family of functions,
1638         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1639         family of functions and other sources,
1640         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1641         of the PIC18Fxx[28] devices,
1642         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1643         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1644         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1645         _do_cinit function, because the previous failed when local variables
1646         where not placed in the same memory bank,
1647         * device/lib/pic16/libsdcc/char/: various modifications to improve
1648         library performance,
1649         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1650         information on the new functions of the c library and more...
1651
1652 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1653
1654         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1655
1656 2005-03-26 Raphael Neider <rneider AT web.de>
1657
1658         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1659           if condition == CARRY)
1660         * (genCmp): adapted to new genSkipc semantics
1661         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1662           on rIfx (genCmp was broken)
1663
1664 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1665
1666         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1667         * src/z80/main.c (_keywords[]),
1668         * src/SDCCglobal.h (struct options),
1669         * src/SDCC.y,
1670         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1671         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1672         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1673         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1674         always available in leading double underscore form. The C99 support is
1675         mostly missing, but it's a start.
1676         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1677         reserved identifier "__data".
1678
1679 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1680
1681         * src/mcs51/peeph.def: fixed bug 1170013
1682
1683 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1684
1685         * device/include/mcs51reg.h: fixed bug 842007
1686
1687 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1688
1689         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1690         last time.
1691
1692 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1693
1694         * src/port.h (struct PORT),
1695         * src/avr/ralloc.c (avr_assignRegisters),
1696         * src/avr/main.c,
1697         * src/ds390/ralloc.c (ds390_assignRegisters),
1698         * src/ds390/main.c,
1699         * src/hc08/ralloc.c (hc08_assignRegisters),
1700         * src/hc08/main.c,
1701         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1702         * src/mcs51/main.c,
1703         * src/pic/ralloc.c (pic14_assignRegisters),
1704         * src/pic/main.c,
1705         * src/pic16/ralloc.c (pic16_assignRegisters),
1706         * src/pic16/main.c,
1707         * src/xa51/ralloc.c (xa51_assignRegisters),
1708         * src/xa51/main.c,
1709         * src/z80/ralloc.c (z80_assignRegisters),
1710         * src/z80/ralloc.h,
1711         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1712         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1713         * src/SDCCcse.h,
1714         * src/SDCCdflow.c (computeDataFlow),
1715         * src/SDCCdflow.h,
1716         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1717         * src/SDCCloop.h,
1718         * src/SDCCcflow.c (*),
1719         * src/SDCCcflow.h,
1720         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1721         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1722         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1723         immedDom() returning wrong block; probably fixes bug #1160833)
1724
1725 2005-03-20 Borut Razem <borut.razem AT siol.net>
1726
1727         * support/scripts/inc2h.pl: WIN32 port
1728
1729 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1730
1731         * device/lib/makefile.in: added abs.c and labs.c
1732
1733 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1734
1735         * device/include/stdint.h: added
1736         * device/lib/abs.c: added
1737         * device/lib/labs.c: added
1738         * device/include/stdlib.h: added abs() and labs() prototypes
1739         * device/lib/libsdcc.lib: added abs and labs
1740         * device/include/float.h,
1741         * device/lib/_fsmul.c,
1742         * device/lib/printf_fast.c,
1743         * device/lib/printf_tiny.c: updated comments
1744
1745 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1746
1747         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1748         bug #1164313
1749
1750 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1751
1752         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1753         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1754
1755 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1756
1757         * device/lib/printf_large.c: removed inline assembly for portability and
1758           readability. Use printf_fast if speed or size are more important.
1759         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1760         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1761
1762 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1763
1764         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1765         prevent compiler warning
1766
1767 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1768
1769         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1770         moved to level 0 and declared as static. Also they are explicit
1771         placed in access bank. This was necessery because some times they
1772         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1773         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1774         optimizations. Currently only compare to unsigned char is implemented,
1775         * src/pic16/gen.c: added fReturnIdx array,
1776         * (struct resolvedIfx) is moved to gen.h and made public,
1777         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1778         * (aopForSym): added an optimization to directly store in stack of
1779         the operand of a SEND iCode,
1780         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1781         but as registers instead (AOP_REG) using the fReturnIdx array,
1782         * (pic16_freeAsmop): remove the freed register from the
1783         _G.sregsAlloc field,
1784         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1785         a compare of 'WREG',
1786         * (pic16_popGetTempRegCond): changed function prototype, now
1787         function takes also a bitVector argument v which holds the current
1788         set of registers that are allocated for stack access by aopForSym,
1789         registers allocated in aopForSym for accessing stack symbols are not
1790         any more part of the functions usedRegs field,
1791         * (genCall): some times aopOp is called for a stack variable to be
1792         send, aopForSym might perform the push, if this is true make sure
1793         that genCall doesn't push the variable twice by testing _G.resDirect,
1794         * (genFunction): changed testing for unspecified interrupt number
1795         from 256 to INTNO_UNSPEC,
1796         * modified selection scheme of frame pointer generation. Previously
1797         if function did use local registers a frame pointer was generated,
1798         now a frame pointer is generated only if function has arguments
1799         (that need PLUSW2 register access), or has stack arguments, or the
1800         compiler is not instructed to omit the frame pointer,
1801         * (genEndFunction): before restoring local registers that were saved
1802         in the function preamble, also restore the registers that *might*
1803         have been allocated for stack access,
1804         * (genRet): removed some old comments,
1805         * (genCmp, the active (RN's) version): added a call to the
1806         pic16_genCmp_special function to perform the compare with a more
1807         robust and optimized way,
1808         * (genInline): a feature has been added in inline code generation,
1809         which allows a wildcard variable substitution when writing inline
1810         assembly. Code is incomplete and experimental therefore undocumented,
1811         * (genCast): changed order of aopOp for result and right to allow
1812         aopForSym to directly load the result if possible,
1813         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1814         perform an optimized compare on some selected special occasions,
1815         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1816         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1817         generate an IVT any more,
1818         * src/pic16/main.c (pic16_optionsTable): added command line option
1819         --optimize-cmp,
1820         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1821         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1822         macros,
1823         * src/pic16/NOTES: Raphael Neider added in list of active developers
1824         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1825         jumptable_end to prevent bug #,
1826         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1827         inCond and outCond fields,
1828         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1829         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1830         turn off register spilling,
1831         * (packRegsForOneUse): synced with other ports' versions although it
1832         is not used currently,
1833         * (pic16_packRegisters): added an optimization while reading
1834         structure bitfields, some registers may be saved (malloc code is
1835         decreased by 80 bytes)
1836
1837 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1838
1839         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1840         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1841         this can be optimized more?
1842
1843 2005-03-10 Raphael Neider <rneider AT web.de>
1844
1845         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1846           genNearPointerGet): (hopefully) fixed access to bitfields via
1847           pointers (p->bitN = x; and x = p->bitN; failed)
1848
1849 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1850
1851         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1852
1853 2005-03-09 Raphael Neider <rneider AT web.de>
1854
1855         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1856
1857 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1858
1859         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1860         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1861           (regTypeNum): set REG_BIT type if necessary
1862         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1863         * support/regression/tests/critical.c: check bug 1144613
1864
1865 2005-03-02 Raphael Neider <rneider AT web.de>
1866
1867         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1868
1869 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1870
1871         * src/avr/ralloc.c (serialRegAssign),
1872         * src/ds390/ralloc.c (serialRegAssign),
1873         * src/hc08/ralloc.c (serialRegAssign),
1874         * src/mcs51/ralloc.c (serialRegAssign),
1875         * src/pic/ralloc.c (serialRegAssign),
1876         * src/pic16/ralloc.c (serialRegAssign),
1877         * src/xa51/ralloc.c (serialRegAssign),
1878         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1879
1880 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1881
1882         * src/SDCCast.c (decorateType): fixed bug 1124787
1883
1884 2005-02-20 Hubert Sack <sack AT digiplan.de>
1885         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1886
1887         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1888         patch #1121755
1889
1890 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1891
1892         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1893         to keep the correct label reference count when adding/removing references
1894         to labels. A peephole file using this is appended to patch #1144962.
1895
1896 2005-02-14 Raphael Neider <rneider AT web.de>
1897
1898         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1899         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1900         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1901           retrievals of result operand's value on assignment
1902
1903 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1904
1905         * device/include/pic16/string.h: modified prototype for memccpy()
1906         to memccpy(void *, void *, char, size_t)
1907         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1908         check whether to omit frame pointer or not,
1909         * (genInline): convert all occurences of "\n" to LF in inline
1910         assembler blocks, this helps formatting the inline text,
1911         * (pic16_loadFSR0): modified prototype,
1912         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1913         removed some 8051 legacy code,
1914         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1915         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1916         before allocating temporary registers in functions,
1917
1918 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1919
1920         * support/regression/tests/bitvars.c: corrected the "fix"
1921
1922 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1923
1924         * support/regression/tests/bitvars.c,
1925         * support/regression/tests/bitwise.c,
1926         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1927
1928 2005-02-10 Raphael Neider <rneider AT web.de>
1929
1930         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1931           different size for Alpha
1932         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1933
1934 2005-02-09 Raphael Neider <rneider AT web.de>
1935
1936         * src/SDCC.lex(doPragma) : save and restore warning options as well
1937           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1938         * have #pragma less_pedantic set the errorlevel to WARNING
1939           (fixes #1117001)
1940         * (cloneOptimize) : fixed wrong malloc's size
1941         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1942           facilitate correct handling of #pragma (save|restore)
1943
1944 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1945
1946         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1947
1948 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1949
1950         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1951
1952 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1953
1954         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1955
1956 2005-02-02 Raphael Neider <rneider AT web.de>
1957
1958         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1959         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1960         * (pic16_storeForReturn): fixed to allow returning function pointers
1961         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1962         * device/include/pic16/{stddef.h,stdbool.h}: added
1963
1964 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1965
1966         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1967
1968 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1969
1970         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1971         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1972          appeared to be required
1973
1974 2005-01-31 Borut Razem <borut.razem AT siol.net>
1975
1976         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1977           include/mcs51 and include/z80 directories to the package
1978
1979 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1980
1981         * src/hc08/gen.c (genFunction): fixed bug #1112752
1982
1983 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1984
1985         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1986
1987 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1988
1989         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1990
1991 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1992
1993         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1994
1995 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1996
1997         * device/include/c8051fxxx.h: removed these 6 files
1998         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1999
2000 2005-01-26 Raphael Neider <rneider AT web.de>
2001
2002         * src/pic16/gen.c (genAssign): fixed assignment from longs
2003           in codespace (were cut to three bytes)
2004         * (genDummyRead): implemented (except for CODESPACE...),
2005           fixed bug #1108575
2006         * src/pic16/glue.c (emitStatistics): beautified
2007         * device/lib/pic16/libm/Makefile: added include path
2008
2009 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2010
2011         * src/z80/gen.c (aopPut): fixed bug #1103902
2012
2013 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2014
2015         * device/lib/expf.c: fixed bug #1095792
2016
2017 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2018
2019         * device/lib/pic16/libm: added Math library sources
2020
2021 2005-01-24 Raphael Neider <rneider AT web.de>
2022
2023         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2024           to enable upcast to pCodeOpReg2 (there is no type tag to
2025           differenciate the two and pic16_popGet2p cast into PCOR2)
2026         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2027           (sizeof(sectNames) changed to sizeof(sectName))
2028           Both patches fix segfaults under MinGW.
2029
2030 2005-01-23 Raphael Neider <rneider AT web.de>
2031
2032         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2033           Safe_[mc]?alloc()'ed variables
2034         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2035           of (byte sized) temporaries (assign them to WREG for now)
2036         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2037           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2038           this might fix SIGSEGVs on MinGW...
2039         * src/SDCCopt.c (killDeadCode): restored original behaviour
2040           (volatile operands might get thrown away though)
2041
2042 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2043
2044         * src/pic16/gen.c: fixed bug #1106975,
2045         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2046         pointer update, INTCON is saved, global interrupts are disabled and
2047         restored after updateing TOS.
2048         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2049         * added function attribute 'shadowregs' to take advantage of shadow
2050         registers,
2051         * added function attribute 'wparam' as an alternative to the wparam
2052         pragma,
2053         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2054         user declares a non-ISR function as 'shadowregs',
2055         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2056
2057 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2058
2059         * .version: bumped version number to 2.4.8
2060         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2061         pic16 port,
2062         * device/lib/pic16/libio/i2c/: I2C module support library,
2063         * device/include/pic16/i2c.h: I2C support library header,
2064         * device/lib/pic16/libc/stdio/: standard IO support sources,
2065         * (printf_small.c): printf_small() source, supports float print,
2066         * (printf_tiny.c): printf_tiny() source, does not support floats,
2067         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2068         enable global optimizations for entire library source, other
2069         Makefiles in the source tree are also modified to reflect this,
2070         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2071         function,
2072         * doc/sdccman.lyx: updated to reflect new changes,
2073         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2074         sym->onStack if-case,
2075         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2076         sbit, idata, _idata, xdata, _xdata,
2077         * added pragma library, to link an external library, (see doc),
2078         * removed command line options, --pomit-config-words, --pomit-ivt,
2079         --pleave-reset-vector,
2080         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2081         when calling assembler to reflect memory model used, also define
2082         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2083         reflect stack model used,
2084         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2085         on stack return NULL,
2086
2087 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2088
2089         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2090           of the operands is volatile. Fixes #1020220
2091
2092 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2093
2094         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2095         * (OptimizeRegUsage): make sure that there is really no other flow where
2096           the first pCode is used
2097
2098 2005-01-22 Raphael Neider <rneider AT web.de>
2099
2100         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2101           to fix #1106967 (pCode->seq are not set up correctly)
2102
2103 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2104
2105         * src/SDCCglue.c (glue): make sure code area is declared before the
2106         static initialization area.
2107
2108 2005-01-21 Raphael Neider <rneider AT web.de>
2109
2110         * device/lib/Makefile.in: fixed test for pic16 install dir
2111         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2112           optimizations
2113         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2114           added --optimize-goto compiler switch and pragma wparam documentation
2115         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2116         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2117           and PRODH closing bug #1071770 (peephole optimizer)
2118
2119 2005-01-19 Raphael Neider <rneider AT web.de>
2120
2121         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2122           cmdLine buffers (used when calling sdcpp...) are large enough
2123           (MAX_PATH=256 truncates arguments leading to system halts when
2124           used in MinGW...)
2125         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2126         * (genUminus): rewritten to for efficiency
2127         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2128           used uninitialized in some cases)
2129         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2130           copy the third byte from the int -- now assumes 0x80 (data memory)
2131         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2132           operands (genAddLit expects the iCode's operands to swapped as
2133           well), fixed leftover bytes (crashed for short left operands)
2134         * (pic16_genMinusDec): performance improvements, removed false
2135           PIC14 emitSKPNCs
2136         * (pic16_genMinus): fixed to cope with differently sized operands
2137         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2138           for --obanksel > 1
2139         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2140         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2141           new banksel optimization
2142         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2143           analysis for temporary registers (segfaults...)
2144         * src/pic16/peeph.def: added rule
2145
2146 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2147
2148         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2149         which converts a float number to its ASCII representation
2150         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2151         functions to convert the fractional and integer part of a float to ASCII,
2152         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2153         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2154         ram
2155         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2156         _STATMEM macros,
2157         * device/include/pic16/adc.h: added GPL info,
2158         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2159         a pCodeOp as tested operand,
2160         * (genNearPointerGet): optimized bit testing, does not use
2161         intermediate register for bit value, test directly instead with
2162         BTFSS, BTFSC, works only for single bits,
2163         * (genpic16Code): dump the name of the iCode in the asm,
2164         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2165         renamed to pic16_decodeOp,
2166         * (serialRegAssign): do not allocate a temporary register for iCode
2167         sequences that test a single bit for 1/0
2168
2169 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2170
2171         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2172         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2173         access stack and frame pointers. They are initially assigned to
2174         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2175         accessing SFRs. Updated all occurences of modification of stack or
2176         frame pointer in gen.c and pcode.c,
2177         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2178         assigning of a literal value to pointers,
2179         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2180         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2181         selected
2182
2183 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2184
2185         * doc/sdccman.lyx: update documentation about stack pragma, added
2186         some info for stack memory models
2187
2188 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2189
2190         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2191
2192 2005-01-08 Raphael Neider <rneider AT web.de>
2193
2194         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2195           udata sections to fix bug #1097823
2196
2197 2005-01-05 Raphael Neider <rneider AT web.de>
2198
2199         * src/pic16/gen.c (genGenericShift): added handling of differently
2200           sized left operand and result
2201
2202 2005-01-04 Raphael Neider <rneider AT web.de>
2203
2204         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2205         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2206           to hold the condition bit)
2207         * added new version of genCmp (old code available via #define)
2208         * added new version of genShiftLeft/genShiftRight in a generic
2209           way, now supports shifting by negative values
2210         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2211           shiftCount (expected by genGenericShift)
2212         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2213         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2214           dump
2215         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2216           is an invalid literal too...)
2217
2218 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2219
2220         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2221         from Raphael Neider,
2222         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2223         for 8-bit literals. This fixes some literal operands which are sign
2224         extended to 16-bits ints when instruction needs only 8-bits.
2225
2226 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2227
2228         * device/lib/logf.c: added mcs51 assembly version
2229         * device/lib/expf.c: added mcs51 assembly version
2230         * device/lib/_logexpf.c: new shared asm code for expf and logf
2231         * device/include/math.h: add defines for assembly math library
2232         * device/lib/Makefile.in: build new _logexpf.c
2233         * device/lib/libfloat.lib: use new _logexpf.c
2234
2235 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2236
2237         * src/pic/device.c
2238         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2239           device types which have less than 0x7f registers.
2240
2241 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2242
2243         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2244
2245 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2246
2247         * device/lib/printf_fast.c: only build on supported arch.
2248         * device/lib/printf_tiny.c: only build on supported arch.
2249         * device/lib/printf_fast_f.c: only build if asm float lib
2250         * device/lib/_fsget1arg.c: only build if asm float lib
2251         * device/lib/_fsget2args.c: only build if asm float lib
2252         * device/lib/_fsnormalize.c: only build if asm float lib
2253         * device/lib/_fsreturnval.c: only build if asm float lib
2254         * device/lib/_fsrshift.c: only build if asm float lib
2255         * device/lib/_fsswapargs.c: only build if asm float lib
2256         * device/include/stdio.h: don't provide print_fast,
2257           print_fast_f, print_tiny prototypes if --xstack used
2258
2259 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2260
2261         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2262         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2263           to the SOURCES
2264
2265 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2266
2267         * device/lib/printf_fast_f.c: same as printf_fast, but
2268           with floating point enabled
2269         * device/lib/printf_fast.c: minor tweaks
2270         * device/include/stdio.h: add printf_fast_f
2271
2272 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2273
2274         * src/SDCCmain.c: make --float-reent default for mcs51
2275         * device/lib/_fsadd.c: added mcs51 assembly version
2276         * device/lib/_fssub.c: added mcs51 assembly version
2277         * device/lib/_fsmul.c: added mcs51 assembly version
2278         * device/lib/_fsdiv.c: added mcs51 assembly version
2279         * device/lib/_fseq.c: added mcs51 assembly version
2280         * device/lib/_fsneq.c: added mcs51 assembly version
2281         * device/lib/_fsgt.c: added mcs51 assembly version
2282         * device/lib/_fslt.c: added mcs51 assembly version
2283         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2284         * device/lib/Makefile.in: add _fscmp to build
2285         * device/lib/libfloat.lib: add _fscmp to build
2286
2287 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2288
2289         * device/lib/_fs2slong.c: added mcs51 assembly version
2290         * device/lib/_fs2sint.c: added mcs51 assembly version
2291         * device/lib/_fs2schar.c: added mcs51 assembly version
2292         * device/lib/_fs2ulong.c: added mcs51 assembly version
2293         * device/lib/_fs2uint.c: added mcs51 assembly version
2294         * device/lib/_fs2uchar.c: added mcs51 assembly version
2295         * device/lib/_slong2fs.c: added mcs51 assembly version
2296         * device/lib/_sint2fs.c: added mcs51 assembly version
2297         * device/lib/_schar2fs.c: added mcs51 assembly version
2298         * device/lib/_ulong2fs.c: added mcs51 assembly version
2299         * device/lib/_uint2fs.c: added mcs51 assembly version
2300         * device/lib/_uchar2fs.c: added mcs51 assembly version
2301         * device/include/float.h: added #define to select asm vs c
2302
2303 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2304
2305         * device/lib/printf_fast.c: improvements to float output
2306         * device/include/float.h: add defines for assembly float library
2307         * device/lib/_fsget1arg.c: receive 1 float arg
2308         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2309         * device/lib/_fsnormalize.c: normalize a float
2310         * device/lib/_fsreturnval.c: return float, various helper routines
2311         * device/lib/_fsrshift.c: right shift a float's mantissa
2312         * device/lib/_fsswapargs.c: swap 2 floats
2313         * device/lib/Makefile.in: build these 6 new files for mcs51
2314         * device/lib/libfloat.lib: add these 6 files to the library
2315
2316 2004-12-26 Borut Razem <borut.razem AT siol.net>
2317
2318         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2319           built by gcc 3.4.2
2320
2321 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2322
2323         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2324           and fully reentrant and register bank neutral.
2325         * device/lib/printf_fast.c: added float (not enabled by default),
2326           added compact/slower integer (also not enabled by default),
2327           improved size/speed of fast integer code, other minor changes
2328         * device/include/stdio.h, device/lib/Makefile.in,
2329           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2330
2331 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2332
2333         * src/pic16/pcode.c: declaring variables other than at the start of a
2334           block is not supported in C by VC6.
2335
2336 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2337
2338         * applied a previous patch from Raphael Neider that wasn't included
2339         in the previous commits, which fixes infinite loops within jumptable
2340         improvements,
2341         * made some fixes that previous patches introduced
2342
2343 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2344
2345         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2346         that fixes an issue with AOP_PCODE asmop's offset,
2347         * (pic16_popCopyReg): update instance field too,
2348         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2349         function of pic port,
2350         * (genCmp, genAnd, genAssign),
2351         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2352
2353 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2354
2355         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2356         variables initial values to idata section,
2357         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2358         variables in some functions. This utilizes parmBytes field of iCode
2359         structure to hold the offset of the variable in stack. (might be
2360         able to use the stack field too?)
2361         * applied patch from Raphael Neider # ### , # ###
2362         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2363         variable initial values in idata section,
2364         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2365         for static variables with initial value
2366         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2367         applied fix in while loop from Raphael Neider.
2368
2369 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2370
2371         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2372         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2373         * src/ds390/ralloc.c (serialRegAssign): spill bits
2374         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2375         * support/Util/SDCCerr.c,
2376         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2377         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2378         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2379
2380 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2381
2382         * device/include/sdcc-lib.h: inserted LGPL, added includes
2383           asm/ds390/features.h and asm/mcs51/features.h
2384         * device/include/asm/default/features.h,
2385         * device/include/asm/gbz80/features.h,
2386         * device/include/asm/z80/features.h: added empty _AUTOMEM
2387           and _STATMEM
2388         * device/include/asm/ds390/features.h,
2389         * device/include/asm/mcs51/features.h: added files with defines for
2390           _AUTOMEM and _STATMEM indicating automatic and static storage class
2391         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2392         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2393         * src/SDCCicode.c (geniCodeCast),
2394         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2395         * src/SDCCloop.c (loopInduction): removed unused variable lr
2396         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2397           to convertToFcall to include char modulo (RFE 1065037), added check
2398           if left operand is unsigned and use abs of literal value
2399         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2400           as it doesn't work after conversion from peephole.def to peephole.rul
2401         * src/mcs51/gen.c (toBoolean): added check for size,
2402           (genModOneByte): optimized code for signed char modulo a literal
2403           power of 2 (thanks to Hubert Sack),
2404           (genRRC): removed unnecessary "clr c",
2405           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2406         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2407           jump optimization,
2408           swapped rules 256.c and 256.d,
2409           extended 256.d by using new multiple checks (thanks Erik),
2410           added rules 256.e and 256.f,
2411           updated rule 261.a and 261.b to new generated code
2412         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2413
2414 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2415
2416         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2417           induction related bugs, including first part of bug #1074377
2418
2419 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2420
2421         * applied patch from bug-report #1076292,
2422         * applied patches for genAnd and Goto-optimizations for Raphael
2423         Neider,
2424         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2425         dump a less iCode information,
2426         * src/pic16/device.h (pic16_options_t): added field debgen,
2427         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2428         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2429         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2430         puclic,
2431         * (various functions): added macros FENTRY and FENTRY2 to functions,
2432         to emit function prologue,
2433         * (various functions): fixed indentation,
2434         * (genNearPointerGet): fixed loading of FSR0,
2435         * (genPackBits): applied patch from Raphael Neider to fix updating
2436         of FSR0 and touching only the modified bits,
2437         * src/pic16/genarith.c (various functions): added macros FENTRY to
2438         emit function prologue in comments,
2439         * src/pic16/pcode.h: added functions debugf2, debugf3,
2440         * src/pic16/ralloc.c: partial fix for packForPush caused
2441         segmentation fault,
2442
2443 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2444
2445         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2446           <stsp AT users.sourceforge.net> with reversed byte order
2447         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2448
2449 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2450
2451         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2452           bug #1074377
2453         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2454         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2455
2456 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2457
2458         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2459
2460 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2461
2462         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2463           conditions,
2464           (setFromConditionArgs): friendly operand parser for peephole rules,
2465           (operandBaseName, operandsNotRelated): new peephole condition
2466           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2467           architecture specific register naming into account, handles n-way
2468           comparisons, and supports quoted literals
2469         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2470
2471 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2472
2473         * src/mcs51/peeph.def: fixed bug #1076940
2474
2475 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2476
2477         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2478
2479 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2480
2481         Adding support for replacing ljmps with sjmps in jumptables
2482         generated for switch statements. For now you need to set the
2483         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2484         Now 4 algorithms for mcs51 jumptable generation are used:
2485         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2486         addresses loaded pc-relative for up to 112 cases and stack-pushing
2487         target addresses loaded with offset from dptr for up to 256 cases.
2488
2489         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2490         * src/mcs51/main.c: adapted constants for switch table generation
2491         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2492
2493 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2494
2495         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2496         * support/regression/tests/bug1057979.c: added test for bug 1073386
2497
2498 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2499
2500         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2501         compilers
2502
2503 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2504
2505         * src/pic16/device.h,
2506         * src/pic16/genarith.c,
2507         * src/pic16/glue.c,
2508         * src/pic16/main.c,
2509         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2510
2511 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2512
2513         Large cummulative patch for pic16 port.
2514         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2515         to call when a stack overflow occurs,
2516         * (malloc.h): added CVS Id tag,
2517         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2518         variable,
2519         * added libc directory. The current version of LibC contains string
2520         functions, ctype functions and macros and some functions of the
2521         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2522         be extensively tested in the future. Standard disclaimer here.
2523         Library is not automatically build yet. But one can build it by
2524         invoking 'make' inside the libc directory.
2525         * added ADC library under libio. Preliminary version yet.
2526
2527         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2528         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2529         aopForRemat() now and not by pic16_aopOp(),
2530         * (pic16_popGetTempReg): removed warning messgae when allocating
2531         temporary registers, its a buggy feature and will be removed,
2532         * (pic16_popGet): set register instance field in AOP_CRY,
2533         * (pic16_outBitC): fixed for results in size greater than 1,
2534         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2535         * (pic16_storeForReturn): optimized return of 0,
2536         * (genCmp): experimental code for new genCmp which uses PIC18's
2537         special compare&skip instructions. Initial tests fail some times
2538         with variables grater than 1 byte in size, so new code is disabled,
2539         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2540         a single bit,
2541         * (genCast): began a fix to optimize the casting of a bit to another
2542         bit, now assigning a bitfield to another bitfield will fail, sorry,
2543         * src/pic16/main.c: disabled the use of lr-support feature,
2544         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2545         * added some function prototypes, added function _debugf prototype,
2546         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2547         bits with offset (case PO_GPR_BIT),
2548         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2549         command line,
2550         * (isBankInstruction): modified to return 0 for no banking instruction,
2551         and 1 for banking instruction,
2552         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2553         caused stop processing pCodes after a inline assembly block,
2554         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2555         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2556         registers when it shouldn't,
2557         * src/pic16/ralloc.c (allocReg): add preliminary support for
2558         supporting a limited set of temporary registers,
2559
2560 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2561
2562         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2563           genDataPointerSet): ensure assignments always copy in MSB to LSB
2564           order,
2565           (loadRegFromAop): recognize CLRH optimization,
2566           (genFunction): optimize RECEIVE iCodes in reentrant functions
2567
2568 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2569
2570         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2571           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2572           selected.
2573         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2574         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2575           contiguous with data
2576
2577 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2578
2579         * device/lib/_gptrget.c (_gptrget),
2580         * device/lib/_gptrgetc.c (_gptrgetc),
2581         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2582           instead of sjmp to ret
2583         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2584           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2585
2586 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2587
2588         * .version: bumped version to 2.4.7
2589         * device/lib/_gptrget.c (_gptrget): is now _naked
2590         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2591         * device/lib/_gptrput.c (_gptrput): is now _naked
2592         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2593           (createFunction): fixed xstack
2594         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2595         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2596           or bit either,
2597           (geniCodeCritical): store original interrupt state in an iTemp bit
2598           var unless stack-auto
2599         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2600         * src/SDCCmain.c (setIncludePath): added include/target to search path
2601         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2602         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2603           prototype,
2604           (processFuncArgs): put bit vars in bit area
2605         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2606           unsaveRBank): fixed xstack,
2607           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2608           (genFunction, genEndFunction): fixed xstack,
2609           (genAssign): optimization don't walk backwards through mem
2610         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2611         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2612         * support/regression/Makefile: also make library (for stack-auto) when
2613           making "all" and added "test-mcs51-xstack-auto"
2614         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2615         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2616         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2617         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2618         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2619           make-library by MAKE_LIBRARY
2620         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2621           regression tests for xstack
2622         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2623         * support/regression/tests/critical.c: test for critical on mcs51
2624
2625 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2626
2627         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2628           built version of sdcc instead of installed version
2629
2630 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2631
2632         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2633         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2634           vprintf.c now
2635         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2636         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2637           WARNING: remove device/lib/build/z80/printf.o by hand when
2638           updating from previous build!
2639         * device/lib/z80/printf.c: updated comment
2640         * support/regression/tests/bug1057979.c: test all ports now
2641         * support/regression/tests/bug1065458.c: file added
2642
2643 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2644
2645         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2646           *_start and *_end symbols for static functions
2647
2648 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2649
2650         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2651           and search crt0.o in all library paths,
2652           (setIncludePath): proper handling of --nostdinc,
2653           (setLibPath): proper handling of --nostdlib
2654         * support/regression/Makefile,
2655         * support/regression/ports/ds390/spec.mk,
2656         * support/regression/ports/gbz80/spec.mk,
2657         * support/regression/ports/hc08/spec.mk,
2658         * support/regression/ports/mcs51/spec.mk,
2659         * support/regression/ports/mcs51-large/spec.mk,
2660         * support/regression/ports/mcs51-stack-auto/spec.mk,
2661         * support/regression/ports/z80/spec.mk: use include and lib files from
2662           built version of sdcc instead of installed version
2663         * doc/sdccman.lyx: fixed typo in --nostdinc
2664
2665 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2666
2667         * src/pic/pcode.c,
2668         * src/pic/device.c,
2669         * src/pic/ralloc.c,
2670         * src/pic/gen.c : added support to generate code for struct bit fields.
2671
2672 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2673
2674         * as/xa51/xa_version.h,
2675         * device/include/errno.h,
2676         * device/include/regc515c.h,
2677         * device/lib/_itoa.c,
2678         * device/lib/_ltoa.c,
2679         * device/lib/ser_ir_cts_rts.c,
2680         * sim/ucsim/xa.src/glob.cc,
2681         * sim/ucsim/xa.src/inst_gen.cc,
2682         * sim/ucsim/xa.src/xa_bit.cc,
2683         * sim/ucsim/xa.src/xa_sfr.cc,
2684         * sim/ucsim/z80.src/inst_dd.cc,
2685         * sim/ucsim/z80.src/inst_fdcb.cc,
2686         * support/scripts/keil2sdcc.pl,
2687         * src/pic16/pic16.dsp,
2688         * src/pic16/pic16a.dsp: corrected cvs line endings
2689         * device/lib/printf_large.c: fixed bug 1057979
2690         * src/pic16/gen.c: fixed non-C standard code
2691         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2692         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2693         * support/regression/ports/mcs51/support.c: reload T1 asap
2694         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2695           pdata use and clear idata startup behaviour
2696         * support/regression/tests/bug1057979.c: added
2697
2698 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2699
2700         * device/examples/ds390/ow390/ad26.h,
2701         * device/examples/ds390/ow390/cnt1d.h,
2702         * device/examples/ds390/ow390/crcutil.c,
2703         * device/examples/ds390/ow390/ownet.h,
2704         * device/examples/ds390/ow390/owsesu.c,
2705         * device/examples/ds390/ow390/swt12.h,
2706         * device/examples/ds390/ow390/swtoper.c,
2707         * device/examples/ds390/ow390/temp10.h,
2708         * device/examples/ds390/ow390/thermodl.c,
2709         * device/examples/ds390/tinitalk/tinitalk.dsp,
2710         * device/examples/ds390/tinitalk/tinitalk.dsw,
2711         * device/examples/mcs51/clock/hw.h,
2712         * device/examples/mcs51/simple2/go.bat,
2713         * device/examples/serialcomm/windows/serial.h,
2714         * device/examples/xa51/dummy.c,
2715         * device/examples/xa51/hello.c,
2716         * device/include/80c51xa.h,
2717         * device/include/at89x051.h: corrected cvs line endings
2718
2719 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2720
2721         * src/pic16/main.c (options): added command line --gstack, to trace
2722         stack over/under flows,
2723         * added pragma 'wparam' to allow passing first byte of function
2724         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2725         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2726         call to __gstack_test function and sets up the symbol as extern,
2727         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2728         * popaop): added call to pic16_testStackOverflow,
2729         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2730         wparamList list,
2731         * (genCall, genPcall): now all parameters are passed via stack
2732         except in functions that are pass to wparam pragma in which WREG is
2733         used too,
2734         * (genPcall): REENTRANT flag is checked to see if variable prototype
2735         contains reentrant keyword, don't call a non-reentrant function, via
2736         a reentrant function pointer or vice versa, functions are never
2737         passed via WREG,
2738         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2739         D.Winkler,
2740         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2741         SIGSEGV when accessing a NULL register stucture,
2742         * (pic16_printGPointerType): modified to handle UPPER modifier for
2743         function initializers, changed prototype of function to simpler one,
2744         * (pic16_printIvalFuncPtr): check to see if function is already
2745         added in externs list,
2746         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2747         optimized a move from W to SFR with a move to the same register
2748         later after a CALL,
2749         * device/lib/pic16/debug: NEW directory, contains debug features
2750         which are enabled when linking with libdebug.lib, currently command
2751         line option --gstack enables stack pointer tracing for over/under
2752         flow, corresponding sources are in debug/gstack
2753
2754 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2755
2756         * doc/sdccman.lyx: updated SDCC version,
2757         * (PIC16 port): update list of command line options,
2758         * src/pic16/device.h (structure pic16_options_t): added field gstack
2759         to enable stack overflow tracing on push/pops,
2760         * src/pic16/device.c (statistics structure): added statistics
2761         structure,
2762         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2763         pic16_dump_int_registers): increase statistics counters for each
2764         * variable which is encountered
2765         * (pic16_dump_usection): emit each .udata variable to its own udata
2766         section,
2767         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2768         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2769         parameters via stack, otherwise use old scheme,
2770         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2771         assembler output file,
2772         * src/pic16/main.c: added command line options --gstack to enable
2773         push/pop tracing for stack overflow,
2774         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2775         instructions): added size of each instruction,
2776         * (pic16_countInstruction): estimate size of instructions in
2777         the_pFile list, inline assembly blocks are not counted,
2778         * (pic16_FixRegisterBanking): trace previous register usage, when
2779         banksel optimizations is greater than 0, don't emit a redudant
2780         banksel directive,
2781
2782 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2783
2784         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2785         * src/pic16/ralloc.c : applied same fix for pic16.
2786         * src/pic/gen.c : tidied it up a little.
2787
2788 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2789
2790         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2791         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2792
2793 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2794
2795         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2796
2797 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2798
2799         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2800         non-reentrant function __modsint in the interrupt function (thus
2801         corrupting math operations during serial I/O)
2802         * device/lib/ser_ir.c: as above, changed buffersize
2803         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2804         256.c,d for zeroing
2805         * doc/Makefile: added option -t for rsync
2806
2807 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2808
2809         * src/SDCCast.h (struct ast),
2810         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2811
2812 2004-10-20 Borut Razem <borut.razem AT siol.net>
2813
2814         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2815         package
2816
2817 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2818
2819         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2820         makefile targets,
2821         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2822         support functions to replace long sequences of MOVFF's from access
2823         bank registers to stack and vice versa,
2824         * src/pic16/device.h: added new field opt_flags, where optimization
2825         flags can be set to enable certain features,
2826         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2827         * pBlock, (genFunction, genEndFunction): surroung loop for
2828         saving/loading used registers in stack with PC_INFO pCodes,
2829         INF_LREGS. Code in between can then be optimized by pCode optimizer
2830         to support function calls,
2831         * (genDataPointerSet): fixed bug which loaded float fields in
2832         structures with corrupt data,
2833         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2834         in a standard way debug info on stderr. Feature used for developing
2835         and debugging only,
2836         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2837         obsolete chunks of code,
2838         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2839         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2840         * pic16/src/pcode.c (pic16_newpCodeInfo,
2841         * (pic16_newpCodeOpLocalRegs),
2842         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2843         feature,
2844         * (pic16_pCodeConstString): printing of the initial value of a
2845         symbol as a comment is inhibited since parsing was already done by
2846         copyStr and output is corrupt,
2847         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2848
2849 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2850
2851         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2852
2853 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2854
2855         * as/mcs51/lkarea.c: removed old K&R style,
2856           (lnksect): changed check on boundary error,
2857           (lnksect2): changed check on boundary error,
2858           (lnksect2): extend XSTK to end of page if size = 1
2859         * as/mcs51/lkmain.c: removed old K&R style,
2860           (Areas51): create l_IRAM symbol
2861         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2862         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2863           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2864         * device/lib/_mullong.c: added version to be compiled with xstack
2865         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2866         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2867         * device/lib/mcs51/crtxstack.asm: fixed comment
2868         * src/SDCCglue.c: maxInterrupts defaults to 0,
2869           (emitMaps): added pdata,
2870           (createInterruptVect): (re)moved default,
2871           (glue): added pdata,
2872           (glue): moved __start__xstack to XSTK with default size 1
2873         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2874           and options.float_rent when options.stackAuto is set,
2875           (linkEdit): only write XDATA_NAME if provided on command line
2876         * src/SDCCmem.h,
2877         * src/SDCCmem.c: added pdata
2878         * src/port.h: added pdata_name to PORT
2879         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2880           (saveRegisters, unsaveRegisters): removed usage of B,
2881           (genMinus): fixed accumulator clash,
2882           (genJumpTab): added comment, this needs another look
2883         * src/mcs51/gen.c: added check for "B in use" paranoia,
2884           added pushB() and popB()
2885         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2886           chance
2887         * src/avr/main.c,
2888         * src/ds390/main.c,
2889         * src/hc08/main.c,
2890         * src/mcs51/main.c,
2891         * src/pic/main.c,
2892         * src/pic16/main.c,
2893         * src/xa51/main.c,
2894         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2895           added PSEG (PAG,XDATA) or NULL to port specifier
2896         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2897         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2898           (_mcs51_genInitStartup): removed __start__xstack equ,
2899           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2900         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2901         * src/z80/gen.c (_rleAppend): fixed warnings
2902         * support/regression/tests/zeropad.c: added pdata test
2903         * .version: bumped to 2.4.6
2904
2905 2004-10-17 Borut Razem <borut.razem AT siol.net>
2906
2907         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2908         as a part of nightly build
2909
2910 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2911
2912         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2913         WREG holds the first byte function parameters,
2914         * (aopForSym): take special case for symbols which are in FARSPACE
2915         but in CODESPACE too,
2916         * (assignResultValue): modified to take into account _G.useWreg,
2917         * (genCall): don't use wreg for parameter passing when function is
2918         declared as reentrant, too, added optimization INCF to stack
2919         pointer when stack parameter count is 1,
2920         * (genFunction, genEndFunction): refurnished and fixed to not using
2921         wreg for passing parameters when function has varargs or is
2922         reentrant, fixed bug with symbol name compare for generating
2923         functions in absolute address,
2924         * (pic16_storeForReturn): refurnished,
2925         * (genCmp): began writing a new version of the function, not ready
2926         yet, therefore it is disabled,
2927         * (genAssign): do not read code memory when assigning a function to
2928         a pointer function,
2929         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2930         array of characters, not pointer,
2931         * (pic16initialComments): in debug mode emit an .ident directive for
2932         the assembler,
2933         * (_process_pragma): emit a new warning type (internal to pic16)
2934         when setting stack to default length, emit a similar warning when
2935         placing a function at absolute address and address is not word aligned
2936         * (_pic16_parseOptions): added 'return TRUE' statement,
2937         * (_pic16_linkEdit): if compiling a source, then add the source's
2938         file object, first in the list of objects to link,
2939
2940 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2941
2942         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2943         * src/pic/main.c : removed VC warning.
2944         * src/pic/gen.c : changed comment.
2945
2946 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2947
2948         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2949         reference to a deprecated symbol _GPTRREG was causing failure to
2950         link. Thanks G. M. Gallant for the info.
2951
2952 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2953
2954         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2955         comments for Bugs item #954788.
2956
2957 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2958
2959         * src/pic16/device.c (pic16_dump_gsection,
2960         * pic16_groupRegistersInSection): handle symbols declared to be in
2961         access bank differently,
2962         * src/pic16/gen.c (struct _G): added field resDirect,
2963         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2964         send values read from stack directly to result and don't allocate
2965         temporary values,
2966         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2967         same registers,
2968         * (pic16_sameRegsOfs): NEW,
2969         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2970         free because they were not allocated from temporary pool,
2971         * pic16_popRegFromString): workaround to fix a problem with
2972         allocating variables twice or never,
2973         * (genGenPointerGet): using PRODL instead of FSR0H,
2974         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2975         instead of FSR0H,
2976         * (genAssign): take advantage of the _G.resDirect flag,
2977         * (genCast): around line 11844, use mov2f instead of directly
2978         MOVFF'ing between operands to account for literal values,
2979         * src/pic16/genutils.c: some new debug functions for gpsim have been
2980         added,
2981         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2982         float with integer part only,
2983         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2984         place variables in access bank
2985         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2986         updated sources to reflect recent changes in gen.c
2987
2988 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2989
2990         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2991         sources that searched for headers in installation path, now the
2992         device/include/pic16 is used,
2993         * src/pic16/glue.c (pic16glue),
2994         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2995         .line directives if not in debug mode, this suppresses assembler's
2996         warnings for ignored directives
2997
2998 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2999
3000         * src/port.h: made reset_regparms prototype void parameter explicit.
3001         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3002         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3003         * doc/sdccman.lyx: documented warning disabling and how to use
3004           printf_large to make it print floats.
3005         * device/include/stdbool.h: NEW
3006         * device/lib/_atof.c,
3007         * device/lib/_divuint.c,
3008         * device/lib/_divulong.c,
3009         * device/lib/expf.c,
3010         * device/lib/printf_large.c,
3011         * device/lib/sincosf.c,
3012         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3013         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3014           a completely reentrant lib.
3015
3016 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3017
3018         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3019         * device/include/pic16/stdio.h: fixed bug with colon
3020
3021 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3022
3023         * device/include/pic16/stdio.h,
3024         * device/include/pic16/stdlib.h,
3025         * device/include/pic16/math.h: NEW
3026         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3027         declared as _naked to reduce overhead
3028         * device/lib/Makefile.in (target port-specific-objects-pic16):
3029         changed * to *.* so to ignore the CVS directory,
3030         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3031         stacked variables back in stack,
3032         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3033         corruption
3034
3035 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3036
3037         * .version: bumped version number to 2.4.5
3038         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3039         * support/Util/SDCCerr.c (messages structure): added entry for
3040         W_POSSBUG2
3041
3042         Large cumulative patch for pic16 port and libraries.
3043         * device/include/pic16/sdcc-lib.h,
3044         * device/include/pic16/stdarg.h,
3045         * device/include/asm/pic16/features.h,
3046         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3047         * device/include/pic16/float.h: changes reentrant keyword with
3048         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3049         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3050         updated target build-libraries to include objects from gptr,
3051         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3052         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3053         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3054         all function headings,
3055         * src/SDCCmain.c: added global parameter userIncDirsSet,
3056         * (parseCmdLine): when option -I is encountered add directory to
3057         userIncDirsSet too,
3058         * src/version.awk: added space between control and long,
3059         * src/pic16/NOTES: added some notes for the port,
3060         * src/pic16/gen.c: added prototype for mov2fp function,
3061         * (fReturnpic16[]): properly named return value registers,
3062         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3063         * (aopForSym): added code to handle symbols with onStack flag set,
3064         symbols onStack are allocated PTRSIZE bytes,
3065         * (aopFreeAsmop): handles special case where asmops are stack objects,
3066         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3067         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3068         added argument lock to trace flaws in allocating temporary registers
3069         when developing port,
3070         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3071         * (pic16_popRegFromString): reenabled allocating a direct register
3072         from string,
3073         * (assignResultValue): various beautifications,
3074         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3075         referenced function argument,
3076         * (genIpush): reenabled to allow stacked arguments, handles only
3077         ic->parmPush iCodes,
3078         * (genCall, genPcall): major changes to allow for variable argument
3079         functions, fixed a bug with falsely restoring stack pointer after
3080         returning from call,
3081         * (genFunction): pending code for critical function,
3082         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3083         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3084         * (genNearPointerGet): fixed bug with indirect reading, was always
3085         reading from INDF0
3086         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3087         pointers,
3088         * (genAddrOf): rewrote code to take address of a stacked function parameter
3089         * (genCast): fixed casting to generic pointer type,
3090         * src/pic16/gen.h: added AOP_STA,
3091         * (struct asmop): added field stk,
3092         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3093         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3094         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3095         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3096         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3097         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3098         generic pointers,
3099         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3100         and library paths,
3101         * (pic16_port structure): generic pointer size is set to 3,
3102         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3103         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3104         compiler warning,
3105         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3106         operand is an iTemp,
3107
3108 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3109
3110         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3111         * debugger/mcs51/simi.c: addapt new syntax of s51
3112
3113 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3114
3115         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3116         * src/pic16/pcode.c: commented out some calls to free() in order to
3117         fix bug #989576,
3118
3119 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3120
3121         * src/SDCCicode.h,
3122         * src/SDCCicode.c (isiCodeInFunctionCall),
3123         * src/avr/ralloc.c (selectSpil),
3124         * src/pic/ralloc.c (selectSpil),
3125         * src/pic16/ralloc.c (selectSpil),
3126         * src/ds390/ralloc.c (selectSpil),
3127         * src/hc08/ralloc.c (selectSpil),
3128         * src/xa51/ralloc.c (selectSpil),
3129         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3130         stack in the middle of a function call sequence (fixes bug #1020268)
3131         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3132         costs associated with the minimum switch case.
3133
3134 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3135
3136         * src/SDCC.lex: fixed bug #1030549
3137
3138 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3139
3140         * src/SDCCcse.h (struct cseDef),
3141         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3142         over a function call if the CSE is derived from a symbol whose
3143         address has been taken (fixes bug #1029883)
3144         * support/regression/tests/bug-1029883: a new regression test for
3145         this bug
3146
3147 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3148
3149         * src/hc08/gen.c (emitinline): fixed bug #1029778
3150         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3151         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3152         and starts toward RFE #905167)
3153
3154 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3155
3156         * src/pic16/gen.c (mov2f): New function to move an operand to
3157         another without considering if it is a literal or a register,
3158         * (pic16_sameRegs): don't check if they are both AOP_REG,
3159         * (AccRsh): removed andmask=0 lines,
3160         * (genLeftShift): duplicated to be improved in future versions,
3161         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3162         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3163         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3164         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3165         * (insertBankSwitch): fixed inserting banksel directives algorithm
3166         for instructions that follow a skip instruction, this fixes a report
3167         for broken subtraction code generation,
3168         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3169         iCode is a left op, just in case result and right share the same
3170         registers
3171
3172 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3173
3174         * src/hc08/main.c,
3175         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3176         preservation of HX
3177         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3178         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3179         on 2004-09-12; it was buggy
3180
3181 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3182
3183         * src/SDCCsymt.h: removed RESULT_CHECK
3184         * src/SDCCast.c,
3185         * src/SDCCglue.c,
3186         * src/SDCCval.c,
3187         * src/pic/glue.c,
3188         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3189
3190 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3191
3192         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3193         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3194         configuration values no more rejected by compiler, they are assigned
3195         to configuration registers with a warning message instead,
3196         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3197         the for-loop so last conf register is emitted too,
3198         * (_pic16_initPaths): link library libsdcc.lib by default,
3199         * (_hasNativeMulFor): modified test for multiplication according to
3200         Raphael Neider's remarks. Integer multiplication is also done with
3201         support functions,
3202         * device/include/pic16/pic18fregs.h: corrected type error in while
3203         testing and including 18f6720 header file
3204
3205 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3206
3207         * src/pic16/device.h (pic16_options): removed field use_crt,
3208         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3209         until an optimization to handle single bits is added,
3210         * (pic16_loadFSR0): moved before genUnpackBits,
3211         * (genAnd): some white lines removed,
3212         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3213         leave_reset flags in pic16_options when using crt modules,
3214
3215 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3216
3217         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3218           for bugs 898889 & 979599. Also used some safer print instructions.
3219
3220 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3221
3222         * src/pic16/device.h (pic16_options_t): added field use_crt,
3223         crt_name, no_crt,
3224         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3225         catch a probable future bug,
3226         * src/pic16/gen.c: aopIdx function commented out,
3227         * (genAssign): commented out old code which used aopIdx,
3228         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3229         code, added if conditionals to take into account the --use-crt
3230         command line options,
3231         * src/pic16/main.c (pic16_optionsTable): added new command line
3232         options, --use-crt= and --no-crt,
3233         * (_pic16_linkEdit): now the proper crt object is added in the
3234         linker command line except than when --no-crt is specified,
3235         * src/pic16/pcode.c,
3236         * src/pic16/pcode.h: added some structures and functions for a new
3237         optimization scheme to compansate for instruction overhead between
3238         same iCodes, this scheme is currently under development and is not
3239         working in any way,
3240         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3241         to && operator,
3242         * device/lib/pic16/startup/crt0i.c,
3243         * device/lib/pic16/startup/crt0iz.c: added global char variable
3244         __uflags to force the generation of an idata section
3245
3246 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3247
3248         * doc/Makefile,
3249         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3250         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3251
3252 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3253
3254         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3255         Frieder) and clarified the default code optimization mode
3256
3257 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3258
3259         * src/SDCC.lex (doPragma, process_pragma),
3260         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3261         "opt_code_size", and "opt_code_balanced"
3262         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3263         regrouped options by category, added support for category headers
3264         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3265         and "--opt-code-size"
3266         * doc/sdccman.lyx: documented these new options and pragmas
3267         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3268         preference into account
3269
3270 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3271
3272         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3273           geniCodePreDec): Fixed bug 904237 by generating a warning
3274         * src/SDCCerr.h,
3275         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3276
3277 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3278
3279         * src/pic/device.c : When no max ram set validate full memory range.
3280         * src/pic/pcode.c,
3281         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3282
3283 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3284
3285         * device/lib/_gptrget.c,
3286         * device/lib/_gptrput.c: updated comment
3287         * device/lib/calloc.c,
3288         * device/lib/free.c,
3289         * device/lib/malloc.c,
3290         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3291         * src/SDCCcse.c (cseBBlock),
3292         * src/SDCCicode.c (printOperand, geniCodeArray),
3293         * src/SDCCicode.h (struct operand): fixed bug 868103
3294         * support/regression/tests/bug-868103.c: added
3295         * src/SDCCast.c (searchLitOp),
3296         * src/SDCCcse.h (struct cseDef),
3297         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3298         * src/SDCCicode.h (struct operand),
3299         * src/SDCCsymt.h (struct sym_link),
3300         * src/avr/gen.c (hasInc),
3301         * src/ds390/gen.c (hasInc),
3302         * src/hc08/gen.c (genPlusIncr, hasInc),
3303         * src/mcs51/gen.c (hasInc),
3304         * src/pic16/glue.c (pic16_printIvalChar),
3305         * src/pic16/ralloc.c (regWithIdx),
3306         * src/xa51/gen.c (hasInc) : removed warnings
3307         * src/SDCCast.c (createBlock): added comment ???
3308         * src/hc08/ralloc.c: updated comments
3309
3310 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3311
3312         * doc/sdccman.lyx: updated section on switch statements, added
3313         section about semaphore locking
3314         * doc/Makefile: added option -info for latex2html
3315         * device/lib/_gptrget.c,
3316         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3317
3318 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3319
3320         * src/pic/device.h,
3321         * src/pic/device.c,
3322         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3323          maxram is less than 0x100.
3324
3325 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3326
3327         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3328
3329 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3330
3331         * src/port.h,
3332         * src/mcs51/main.c,
3333         * src/ds390/main.c,
3334         * src/z80/main.c,
3335         * src/hc08/main.c,
3336         * src/pic/main.c,
3337         * src/pic16/main.c,
3338         * src/avr/main.c,
3339         * src/xa51/main.c
3340         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3341         a jump table is the best form for a switch statement, including
3342         automatic insertion of missing cases to make the case range
3343         continuous. Developed in collaboration with Frieder Ferlemann.
3344
3345 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3346
3347         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3348         accumulator result if it needs sign extension
3349
3350 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3351
3352         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3353
3354 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3355
3356         * device/lib/gbz80/printf.c,
3357         * device/lib/z80/printf.c: removed define for NULL
3358
3359 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3360
3361         * as/xa51/xa_link.c,
3362         * device/examples/ds390/ow390/ad26.c,
3363         * device/examples/ds390/ow390/cnt1d.c,
3364         * device/examples/ds390/ow390/counter.c,
3365         * device/examples/ds390/ow390/ds2480.h,
3366         * device/examples/ds390/ow390/ds2480ut.c,
3367         * device/examples/ds390/ow390/findtype.c,
3368         * device/examples/ds390/ow390/gethumd.c,
3369         * device/examples/ds390/ow390/owllu.c,
3370         * device/examples/ds390/ow390/ownetu.c,
3371         * device/examples/ds390/ow390/swt12.c,
3372         * device/examples/ds390/ow390/swtloop.c,
3373         * device/examples/ds390/ow390/temp.c,
3374         * device/examples/ds390/ow390/temp10.c,
3375         * device/examples/ds390/ow390/thermo21.c,
3376         * device/examples/ds390/ow390/tinilnk.c,
3377         * device/examples/ds390/ow390/tstfind.c,
3378         * device/examples/serialcomm/windows/serial.cpp,
3379         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3380         * device/include/reg51.h: fixed line endings for cvs
3381
3382 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3383
3384         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3385         packRegsForAccUse, packRegisters): new accumulator register
3386         packing algorithm
3387         * support/regression/ports/hc08/support.c (_putchar): suppress
3388         warning of unused variable
3389         * src/SDCCicode.c: added SWAP entry to codeTable
3390
3391 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3392
3393         * device/lib/sprintf.c: forgot to add this file before previous commit
3394
3395 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3396
3397         * src/pic16/gen.c (genPackBits): added operand right in function
3398         parameters, load result directly if p_type is POINTER (that is
3399         called by genNearPointerSet)
3400         * (genUnPackBits): added operand left in function parameters,
3401         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3402         FSR0 if accessing bitfields,
3403
3404 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3405
3406         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3407           _print_format; updated printf, sprintf, vsprintf
3408         * device/include/asm/default/features.h: corrected comment/define
3409         * device/lib/Makefile.in: added sprintf.c
3410         * device/lib/libsdcc.lib: added sprintf module
3411         * device/lib/printf_large.c,
3412         * device/lib/vprintf.c,
3413         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3414           into these 3 files
3415         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3416         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3417         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3418           hc08 test
3419         * support/regression/tests/zeropad.c: define idata as data for hc08
3420
3421 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3422
3423         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3424         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3425         labels are referenced at least once (even if a reference is not found)
3426         * src/hc08/gen.c (emitcode): set isComment flag for comments
3427         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3428         loads), rules 6a..6b (optimize jumps to return)
3429
3430 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3431
3432         * device/lib/acosf.c (acosf),
3433         * device/lib/asinf.c (asinf),
3434         * device/lib/atanf.c (atanf),
3435         * device/lib/ceilf.c (ceilf),
3436         * device/lib/cosf.c (cosf),
3437         * device/lib/coshf.c (coshf),
3438         * device/lib/cotf.c (cotf),
3439         * device/lib/fabsf.c (fabsf),
3440         * device/lib/floorf.c (floorf),
3441         * device/lib/log10f.c (log10f),
3442         * device/lib/logf.c (logf),
3443         * device/lib/sinf.c (sinf),
3444         * device/lib/sinhf.c (sinhf),
3445         * device/lib/sqrtf.c (sqrtf),
3446         * device/lib/tanf.c (tanf),
3447         * device/lib/tanhf.c (tanhf),
3448         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3449         replaced all instances of "reentrant" in the library functions
3450         defined in math.h with this macro.
3451         * support/regression/tests/float_trans.c: reenabled test for hc08
3452
3453 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3454
3455         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3456         erroneously deleted
3457
3458 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3459
3460         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3461         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3462         multi-byte volatile operands are used
3463         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3464         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3465         initialization to area GSINIT0 so that it would always precede
3466         any static initializers in GSINIT
3467         * support/regression/tests/zeropad.c: fixed idata define for hc08
3468         * support/regression/tests/bug-927659.c,
3469         * support/regression/tests/float_trans.c: disabled tests for hc08
3470         pending missing library routines
3471         * .version: increased version number to 2.4.4 - hc08 port now passes
3472         regression tests
3473
3474
3475 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3476
3477         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3478         * Makefile.common.in,
3479         * as/Makefile,
3480         * as/hc08/Makefile.in,
3481         * as/mcs51/Makefile.in,
3482         * as/z80/Makefile.in,
3483         * debugger/mcs51/Makefile.in,
3484         * device/include/Makefile.in,
3485         * device/lib/Makefile.in,
3486         * doc/Makefile,
3487         * link/Makefile,
3488         * link/z80/Makefile.in,
3489         * packihx/Makefile.in,
3490         * sim/ucsim/main_in.mk,
3491         * sim/ucsim/avr.src/Makefile.in,
3492         * sim/ucsim/doc/Makefile.in,
3493         * sim/ucsim/gui.src/serio.src/Makefile.in,
3494         * sim/ucsim/hc08.src/Makefile.in,
3495         * sim/ucsim/s51.src/Makefile.in,
3496         * sim/ucsim/xa.src/Makefile.in,
3497         * sim/ucsim/z80.src/Makefile.in,
3498         * src/Makefile.in,
3499         * support/cpp2/Makefile.in,
3500         * support/librarian/Makefile,
3501         * support/makebin/Makefile: added DESTDIR to the install path proposed
3502         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3503         * doc/sdccman.lyx: added DESTDIR documentation
3504
3505 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3506
3507         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3508         instruction for interrupt handlers, use fast returns when returning
3509         from high priority interrupts
3510
3511 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3512
3513         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3514         code generation
3515         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3516         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3517         bugs, ported much of Bernhard's code from mcs51
3518         * src/mcs51/gen.c (genSend),
3519         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3520         than one when calling a reentrant function
3521         * device/lib/_mullong.c: defined an alternate struct layout for big
3522         endian ports (hc08)
3523
3524 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3525
3526         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3527         test
3528
3529 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3530
3531         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3532         are sane and complete before asking the port its prefered parameter
3533         passing method (fixes bug #1017633)
3534         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3535         and _ret3
3536
3537 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3538
3539         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3540         problem in bitfields >= 8 bits.
3541
3542 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3543
3544         * src/SDCCsymt.c: undid changes that were not meant to be committed
3545
3546 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3547
3548         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3549
3550 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3551
3552         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3553           copied and wrong bit got inverted
3554
3555 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3556
3557         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3558         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3559         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3560         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3561         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3562         assignments to bitfields at known addresses
3563         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3564         reads from bitfields at known addresses
3565         * src/hc08/ralloc.c (packRegisters),
3566         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3567         genhc08Code): optimize pointer get values used as conditionals
3568         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3569         and branch
3570
3571 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3572
3573         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3574         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3575         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3576         as conditionals
3577
3578 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3579
3580         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3581
3582 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3583
3584         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3585         related problems
3586
3587 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3588
3589         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3590
3591 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3592
3593         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3594         mcs51 port
3595
3596 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3597
3598         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3599
3600 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3601
3602         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3603         cases use more compact code.
3604
3605 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3606
3607         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3608
3609 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3610
3611         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3612
3613 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3614
3615         * src/SDCCsymt.h,
3616         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3617         parameter of changePointer() from symbol* to sym_link*
3618         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3619         * src/SDCCsymt.c (compareType): void* type is castable to other
3620         pointers, but not necesarily an exact match.
3621         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3622         is no longer blindly treated as an exact match.
3623         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3624
3625 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3626
3627         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3628
3629 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3630
3631         * src/pic/gen.c,
3632         * src/pic/pcode.c,
3633         * src/pic/ralloc.h,
3634         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3635
3636 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3637
3638         * src/pic/device.c,
3639         * src/pic/device.h,
3640         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3641
3642 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3643
3644         * src/mcs51/gen.c (emitcode): fixed bug #992819
3645
3646 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3647
3648         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3649           there's no need to make it worse
3650
3651 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3652
3653         * src/mcs51/ralloc.c (deassignLR),
3654         * src/ds390/ralloc.c (deassignLR),
3655         * src/hc08/ralloc.c (deassignLR),
3656         * src/z80/ralloc.c (deassignLR),
3657         * src/pic/ralloc.c (deassignLR),
3658         * src/pic16/ralloc.c (deassignLR),
3659         * src/avr/ralloc.c (deassignLR),
3660         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3661         rlivePoint): fixed another part of bug #971834
3662
3663 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3664
3665         * src/z80/main.c: enabled "critical" keyword
3666         * src/z80/mappings.i,
3667         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3668         functions (fixes bug #979646)
3669         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3670
3671 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3672
3673         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3674           such as c:\mydir.
3675
3676 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3677
3678         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3679           doesn't disable too much optimizations
3680
3681 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3682
3683         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3684
3685 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3686
3687         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3688
3689 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3690
3691         * src/pic/gen.c tidied up tabs
3692         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3693         * src/pic/main.c tidied up tabs
3694         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3695         * src/pic/pcoderegs.c tidied up tabs
3696         * src/pic/ralloc.c tidied up tabs
3697
3698 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3699
3700         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3701         to S_FIXED for pic16 port and when symbol is not in level 0,
3702         allocate for S_REGISTER storage class and pic16 port, too,
3703         * src/pic16/device.h: prototype for checkSym,
3704         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3705         * (pic16_assignConfigWordValue): test the value and the mask to
3706         validate that the value is suitable for the configuration word,
3707         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3708         collect extern declared symbols, don't emit symbol twice, check
3709         first if symbol is in publics set first,
3710         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3711         * added command line '--fstack' which enables an experimental
3712         feature for stack access, too buggy to be used yet...
3713         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3714         * (pic16_allocDirReg): when register has storage class S_REGISTER
3715         allocate in pic16_dynAccessRegs,
3716         * device/include/pic16/pic18f????.h: modified configuration word
3717         naming convention, words started as CONFIG0H but should be CONFIG1H
3718
3719 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3720
3721         * device/include/mcs51reg.h: fixed bug 970993
3722
3723 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3724
3725         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3726         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3727         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3728         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3729         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3730         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3731           error/warning numbers,
3732           added function setWarningDisabled()
3733         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3734         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3735           _memcmp.c _memmove.c calloc.c realloc.c free.c
3736         * support/regression/tests/malloc.c: added tests for new functionality
3737         * support/regression/tests/zeropad.c: added tests for truncated initializers
3738           and initialized char arrays starting with '\x0'
3739         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3740
3741 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3742
3743         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3744
3745 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3746
3747         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3748         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3749         peephole 177.e. Thanks to anonymous
3750
3751 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3752
3753         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3754         function isn't used in the source but referenced as a
3755         variable initializer then declare it as extern in .asm file
3756
3757 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3758
3759         * .version: increased version number to 2.4.3
3760
3761         Adding version extension according to ChangeLog CVS revision
3762         * src/Makefile.in (target all): added dependency 'version.h'
3763         * (rule version.h): added rule to create version.h from ChangeLog,
3764         * (rule dep): added dependency version.h,
3765         * src/version.awk: AWK script to create version.h
3766         * src/SDCCdwarf2.c (dwWriteModule),
3767         * src/SDCCglue.c (initialComments),
3768         * src/SDCCmain.c (printVersionInfo): modified to write after
3769         version string the version extension number,
3770         * src/SDCCutil.c: included "version.h"
3771         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3772         number,
3773         * src/SDCCutil.h: added prototype for getBuildNumber
3774
3775         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3776         includeDirsSet, too,
3777         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3778         const char [] is found in function prototype...
3779
3780         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3781         moving to WREG with source is already in WREG,
3782         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3783         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3784         * (aopForSym): stack'ed symbols are partially supported, added
3785         if-clause to support symbols in FARSPACE,
3786         * (sameRegs): added test for AOP_ACC to see if registers are same,
3787         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3788         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3789         * (pic16_popRegFromString): will not allocate a new register if it
3790         doesn't find one by name, bug may have introduced...
3791         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3792         * (genIpush): revived to use pic16 port's stack,
3793         * (genAddrOf): added incomplete case for stack'ed operand,
3794         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3795         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3796         can handle multibyte operands,
3797         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3798         * (pic16initialComments): added message for MPLAB compatibility
3799         mode enabled,
3800         * src/pic16/main.h: prototype for pic16_mplab_comp,
3801         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3802         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3803         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3804         because of increased complexity of procedure,
3805         * (_process_pragma): stack pragma changed to format 'stack pos len',
3806         emit symbol '_stack_end' to conform with gplink,
3807         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3808         to search for register,
3809         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3810         PO_GPR_REGISTER,
3811         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3812         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3813         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3814         case for PO_GPR_REGISTER,
3815         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3816         dies, the new era is ahead !...
3817         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3818         pic16_dynInternalRegs,
3819         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3820         * (pic16_allocDirReg): minor optimizations and bug fixes,
3821         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3822
3823         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3824         load stack and frame pointer with address of 'stack_end' symbol
3825
3826 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3827
3828         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3829         without source code but only variable initializers
3830
3831 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3832
3833         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3834         external are not declared as extern to reduce overhead while linking
3835
3836 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3837
3838         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3839
3840 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3841
3842         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3843           Yee Keat for the patch
3844         * src/SDCCast.c (decorateType): fixed bug #979599
3845         * src/ds390/gen.h: removed local fReturnSizeDS390
3846         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3847         * src/ds390/gen.c (genAnd, genOr, genXor),
3848         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3849
3850 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3851
3852         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3853         add relFilesSet to $3, manipulate $2 to handle linking of object
3854         files without source files in command line,
3855         * device/include/pic16 (all headers): added ID location macros,
3856         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3857         entries for ID location bytes,
3858         * (pic16_assignIdByteValue): NEW,
3859         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3860         added field dumpcalltree to pic16_options_t,
3861         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3862         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3863         emitting rFalseIfx label after check_carry label,
3864         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3865         pic16_emitDIRegs), NEW
3866         * (pic16glue): dump .calltree file when option --calltree found,
3867         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3868         * (_pic16_genAssemblerPreamble): emit ID locations after
3869         configuration registers,
3870         * (pic16_linkCmd): modifications of the link command,
3871         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3872         * (pic16_pCodeInitRegisters): don't init stack registers,
3873         * (pic16_findPrevInstruction): fixed bug,
3874         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3875         bug with immediate registers,
3876         * (buildCallTree): traces stack push and pop,
3877         * (pct2): dump also stack usage for each function,
3878         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3879         * (pic16_allocDirReg): various modifications,
3880         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3881         fixed to 1,
3882
3883 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3884
3885         * src/pic16/pcode.c: removed buggy double colon
3886
3887 2004-07-01 Borut Razem <borut.razem AT siol.net>
3888
3889         * support/scripts/sdcc.nsi: added include/pic16 to setup
3890
3891 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3892
3893         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3894         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3895         target 'clean',
3896         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3897         specific command line arguments. Also added sample lkr script
3898         for placing a variable at a specific memory bank.
3899         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3900         at a specific memory bank,
3901         * (pic16_dump_isection): fixed bug which caused string literals to
3902         be omitted when dumping idata section,
3903         * (pic16_groupRegistersInSection): added code to handle registers
3904         in specific memory banks,
3905         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3906         public, all references are renamed too,
3907         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3908         AOP_DPTR2,
3909         * (pic16_storeForReturn): added case to handle when dest is WREG,
3910         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3911         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3912         pic16_rel_udata, check to see if that register is marked as being
3913         a member of a specific memory bank,
3914         * (pic16_printIvalCharPtr): added code to add string literals either
3915         to code or the idata sections,
3916         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3917         also accept the 'udata' pragma,
3918         * src/pic16/main.h: new structure types sectName and sectSym
3919         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3920         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3921         * (pic16_findPrevInstruction): fixed, it returned nothing,
3922         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3923         instruction combinations,
3924         * (pic16_FixRegisterBanking): heavily reorganised,
3925         * (pic16_AnalyzeBanking): if generating banksel directives is
3926         disabled, then don't call FixRegisterBanking at all,
3927         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3928         completely removed,
3929         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3930
3931 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3932
3933         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3934         Phuah Yee Keat <yk.phuah AT nestac.com>
3935
3936 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3937
3938         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3939         correctly the IVT even if it is relocated to some other location
3940
3941 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3942
3943         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3944         * device/include/pic16/pic18f2220.h: NEW,
3945         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3946         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3947         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3948         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3949         nodefaultlibs, ivt_loc is the location of the interrupt vector
3950         table, and nodefaultlibs signs that default libraries should not be
3951         linked in link stage,
3952         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3953         according to --ivt-loc argument,
3954         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3955         when pragma stack is found,
3956
3957 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3958
3959         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3960         256 (range check), 257 (do while), 258.a-f (bit banging
3961         f.e. on 3-wire SPI bus)
3962
3963 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3964
3965         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3966         variables used exclusively within a loop
3967
3968 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3969
3970         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3971
3972 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3973
3974         * src/SDCClrange.c (computeClash): fixed bug #971834
3975
3976 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3977
3978         * src/mcs51/gen.c (genCmp): fixed bug #975903
3979         * src/hc08/gen.c (operandsEqu),
3980         * src/ds390/gen.c (operandsEqu),
3981         * src/z80/gen.c (operandsEqu),
3982         * src/pic/gen.c (operandsEqu),
3983         * src/pic16/gen.c (operandsEqu),
3984         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3985         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3986
3987 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3988
3989         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3990
3991 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3992
3993         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3994         default case in switch statement,
3995         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3996         to eliminate problem with initialisation of pointers, but problem
3997         still exists,
3998         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3999         * (emitStaticSegment): removed various lines emitting debug info,
4000         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4001         added processor registers for utilizing EEPROM,
4002         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4003         configurable and set 8
4004
4005 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4006
4007         * .version: increased version number to 2.4.2,
4008
4009         Cumulative patch for pic16 port
4010         * src/pic16/device.c: changed scheme to dump initial values for
4011         variables in idata segment, all print_idata* functions were removed,
4012         now the pic16_printIval* will be called,
4013         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4014         * _pic16_printPointerType, pic16_printPointerType,
4015         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4016         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4017         NEW, similar to the respective functions in SDCCglue.c,
4018         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4019         way, emitting hex bytes,
4020         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4021
4022 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4023
4024         * src/avr/ralloc.c (serialRegAssign),
4025         * src/xa51/ralloc.c (serialRegAssign),
4026         * src/pic/ralloc.c (serialRegAssign),
4027         * src/pic16/ralloc.c (serialRegAssign),
4028         * src/hc08/ralloc.c (serialRegAssign),
4029         * src/z80/ralloc.c (serialRegAssign),
4030         * src/ds390/ralloc.c (serialRegAssign),
4031         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4032
4033 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4034
4035         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4036         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4037
4038 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4039
4040         Cumulative patch for pic16 port:
4041         * src/pic16/device.h (typedef PIC16_device) modified fields for
4042         defining microcontrollers,
4043         * src/pic16/device.c: added new info for all devices in Pics16 array,
4044         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4045         to be optimised out by the pCode optimiser,
4046         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4047         specially, bug reported by G.M. Gallant,
4048         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4049         as force'd so that cannot be optimised out by pCode optimiser,
4050         * src/pic16/pcode.c,
4051         * src/pic16/pcodepeeph.c,
4052         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4053         they are disabled by default, but can be enabled explicit with
4054         command argument --denable-peeps, for testing,
4055         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4056         --pomit-ivt in COMPILE_FLAGS
4057
4058 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4059
4060         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4061           compilation on MSVC
4062
4063 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4064
4065         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4066
4067 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4068
4069         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4070         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4071
4072 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4073
4074         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4075         would only assign 0x300001 register.
4076
4077 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4078
4079         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4080         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4081
4082 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4083
4084         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4085         for ds80c400
4086         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4087         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4088         added peephole 254 (left shift), 255 (jump table)
4089
4090 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4091
4092         * device/lib/Makefile.in: removed comment line with model-pic16,
4093         * (target port-specific-objects-pic16): the libraries and objects
4094         are copied to the build directory form the device/lib/pic16/bin
4095         directory
4096
4097         Cumulative patch concerning pic16 port:
4098         * library directory has been re-organized,
4099         * added support for PIC18F1220,
4100         * added headers and library sources for chips 18f1220,18f6520,
4101         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4102
4103         * configuration registers setting has changed, now each supported
4104         device has a complete description of the registers it uses,
4105         * all initialisations are moved to idata sections, these section
4106         can be absolute or relocatable,
4107         * fixed initialisation of codespace variables,
4108         * fixed warning about PCLATU and gpsim,
4109         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4110         * (genAssign): use table reads when assigning from variables in codespace,
4111         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4112         char/int variables placed in codespace,
4113         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4114         registers set in .asm file, no need for --pomit-config-words anymore,
4115         * (pic16glue): some 8051 legacy segments are commented out
4116         (to be removed completely),
4117         * added support for alternative assembler and linker with --asm=
4118         and --link= command line arguments,
4119         * peepholes are disabled automatically in the port, no need to
4120         specify on command line,
4121         * port supports natively char/int/long multiplication, but converts
4122         all divisions to support functions,
4123         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4124         to the file set in variable $2,
4125         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4126         strings in ASCII format and not in hex,
4127         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4128         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4129         allocate proper register if iCodes aren't temporary,
4130
4131 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4132
4133         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4134
4135 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4136
4137         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4138         is commented out
4139
4140 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4141
4142         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4143         computed address is reused
4144         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4145         multi-byte bitfields
4146
4147 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4148
4149         * src/z80/gen.c: (genArrayInit): must check for pointers too
4150
4151 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4152
4153         * support/regression/tests/zeropad.c: never meant to commit the
4154           nestedstruct test: removed, added check for GCC version
4155
4156 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4157
4158         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4159         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4160         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4161           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4162           bugs 928906 and 954082 half-empty initializers
4163         * src/SDCCsymt.h,
4164         * src/SDCCsymt.c (getAllocSize): added for above fix
4165         * src/z80/gen.c (genArrayInit): fixed bug 741044
4166         * support/regression/tests/zeropad.c: added tests
4167
4168 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4169
4170         * src/pic16/device.c (pic16_dump_section): corrected bug which
4171         caused some symbols of the libraries to be misplaced
4172
4173 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4174
4175         * src/pic16/glue.c,
4176         * src/pic16/ralloc.h,
4177         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4178         to fix conflict with pic port
4179
4180 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4181
4182         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4183         externs configuration variables,
4184         * src/pic16/ralloc.h,
4185         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4186         prototype in header, commented out some debug messages
4187
4188 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4189
4190         * src/pic16/glue.c,
4191         * src/pic16/main.c,
4192         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4193         for gpasm COFF object generation. Thanks to D. Hawkins for
4194         his patch info
4195
4196 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4197
4198         * src/ds390/main.c,
4199         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4200         Brock for spotting this)
4201         * src/ds390/gen.c (genEndFunction),
4202         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4203         interrupt handler and critical. Disable push/pop optimizations when
4204         peephole optimizations disabled.
4205
4206 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4207
4208         Updated pic16 library sources and headers.
4209         * device/lib/pic16/pic18f*/ ,
4210         * device/include/pic16/*.h: modified to handle structured SFR
4211         definitions
4212
4213 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4214
4215         * src/port.h (PORT structure): added hook initPaths, now each
4216         port can declare its own default search paths,
4217         which can been seen with the --print-search-dirs option,
4218         see pic16 port for example,
4219         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4220         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4221         * (doPrintSearchDirs): NEW, replaces in a central manner the
4222         printing of search dirs which was split in set*Paths functions,
4223         * (main): added call to port->initPaths and doPrintSearchDirs,
4224         * src/avr/main.c,
4225         * src/ds390/main.c,
4226         * src/hc08/main.c,
4227         * src/izt/i186.c,
4228         * src/izt/tlcs900h.c,
4229         * src/mcs51/main.c,
4230         * src/pic/main.c,
4231         * src/pic16/main.c: modified port structures to reflect addition of
4232         initPaths hook,
4233
4234         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4235         * (pic16_dump_section): for registers in same address reserve memory once,
4236         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4237         to no_banksel,
4238         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4239         result is greater in size than right or left,
4240         * (pic16_genUMult8X8_8): there are some cases where the result can
4241         be 16 bits size, so handle these,
4242         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4243         * (pic16_outBitC): modified to emit pcodes,
4244         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4245         or not,
4246         * (genDivOneByte): implemented algorithm to divide 8-bits,
4247         * (genCmp): uncommented goto, but issues still exist,
4248         * (genAnd): fixed a bug with variables >8bits,
4249         * (genPackBits): optimization added that uses BCF/BSF to change a
4250         single bit,
4251         * (genAssign): fixed bug when assigning floating point literals,
4252         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4253         __sdcc_gsinit_startup label,
4254         * src/pic16/main.c (_pic16_init): removed search directory
4255         initialisations,
4256         * (_pic16_initPaths): NEW, used to initialise search directories,
4257         * (_hasNativeMulFor): support functions for all except char/int
4258         multiplication, and char division,
4259         * (PIC16_port struct): modified entry for native mul support,
4260         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4261         no_banksel option,
4262         * (buildCallTree): call to register_usage is ifdef'ed out,
4263
4264 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4265
4266         * device/include/string.h: applied Stas Sergeev's patch to make this
4267         header file compatible with the preprocessor -Wundef option
4268         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4269         failure (fixes bug #941458)
4270
4271 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4272
4273         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4274         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4275         that the variable, not the function, should be static
4276         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4277         to be consistent with non-literal case
4278
4279 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4280
4281         * src/SDCCast.c (isConformingBody): fixed bug #949967
4282         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4283         convilong): fixed bug #952086
4284
4285 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4286
4287         * src/SDCCmem.c (allocVariables): fixed bug #955321
4288
4289 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4290
4291         * src/hc08/main.c (_hc08_genAssemblerEnd),
4292         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4293         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4294         completely eliminated the use of a temporary file
4295         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4296         when more than one file linked
4297         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4298
4299 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4300
4301         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4302         which fixes bug #543481
4303         * support/regression/tests/bug-751703.c: fixed comments left from a
4304         cut and paste error
4305         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4306         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4307         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4308         scopes
4309         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4310         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4311         are now changed to underscores in moduleName
4312
4313 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4314
4315         * as/mcs51/lkmem.c: better fix for bug #954173
4316
4317 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4318         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4319
4320         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4321         * device/include/c8051f000.h,
4322         * device/include/c8051f120.h,
4323         * device/include/c8051f300.h,
4324         * device/include/c8051f310.h,
4325         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4326         PWM16) and detab'ed
4327
4328 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4329
4330         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4331         and mailing lists, doc'ed --no-peep-comments, removed reference
4332         to knoppix (newest version has no LyX/LaTeX), other minor changes
4333         * src/SDCCglue.c (glue): save 2 bytes stack space with
4334         option --main-return. The ljmp could probably be avoided too
4335
4336 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4337
4338         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4339
4340 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4341
4342         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4343         * src/SDCCopt.c (isLocalWithoutDef),
4344         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4345         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4346         (credit to Maarten Brock for patch #949363, on which this is based)
4347         * support/regression/tests/bug-751703.c: some test cases of extern used
4348         within inner scopes.
4349
4350 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4351
4352         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4353         SPEC_STRUCT
4354         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4355         struct definitions
4356         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4357         dwWriteLabel): fix to create valid debugger symbols even when
4358         the module name has non-alphanumeric symbols in it
4359         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4360         when a variable's allocation has been optimized away
4361
4362
4363 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4364
4365         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4366         * src/hc08/main.c,
4367         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4368         * src/mcs51/main.c,
4369         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4370         * src/ds390/main.c,
4371         * src/z80/gen.c (z80_emitDebuggerSymbol),
4372         * src/z80/main.c,
4373         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4374         * src/pic/main.c,
4375         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4376         * src/pic16/main.c,
4377         * src/avr/gen.c (avr_emitDebuggerSymbol),
4378         * src/avr/main.c,
4379         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4380         * src/xa51/main.c,
4381         * src/SDCCdebug.c (emitDebuggerSymbol),
4382         * src/SDCCdebug.h,
4383         * src/port.h: added a debugger struct to the port struct. Added a
4384         callback for defining debugger symbols
4385
4386         * src/SDCCast.c (createLabel),
4387         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4388         with isitmp = 1
4389         * src/SDCCicode.h,
4390         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4391         iCode back to the ast for the function
4392
4393         * src/hc08/ralloc.c (hc08_assignRegisters),
4394         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4395         unneeded fields from the regs struct.
4396         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4397         pushReg() & pullReg() functions instead of emitcode()
4398
4399         * src/hc08/gen.c (genLabel, genhc08Code),
4400         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4401
4402         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4403         debugger hooks
4404
4405         * src/hc08/gen.c (genEndFunction, genhc08Code),
4406         * src/hc08/gen.h,
4407         * src/mcs51/gen.c (genEndFunction, gen51Code),
4408         * src/mcs51/gen.h,
4409         * src/ds390/gen.c (genEndFunction, gen390Code),
4410         * src/ds390/gen.h,
4411         * src/z80/gen.c (genEndFunction, genZ80Code),
4412         * src/z80/gen.h,
4413         * src/z80/z80.h,
4414         * src/pic/gen.c (genEndFunction, genpic14Code),
4415         * src/pic/gen.h,
4416         * src/pic16/gen.c (genEndFunction, genpic16Code),
4417         * src/pic16/gen.h,
4418         * src/avr/gen.c (genEndFunction, genAVRCode),
4419         * src/avr/gen.h,
4420         * src/xa51/gen.c (genEndFunction, genXA51Code),
4421         * src/xa51/gen.h,
4422         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4423         specific code to cdbFile.c and out of the backend code generators
4424
4425         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4426         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4427         starting address is now 0
4428
4429         * as/hc08/asm.h,
4430         * as/hc08/m08pst.c,
4431         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4432         assembler directive for DWARF support
4433         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4434
4435         * src/src.dsp,
4436         * src/Makefile.in,
4437         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4438
4439 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4440
4441         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4442         and inappropriate peephole optimization in jump tables
4443
4444 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4445
4446         * as/hc08/m08pst.c,
4447         * src/SDCCglue.c: sdccopt works for the hc08 port now
4448
4449 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4450
4451         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4452
4453 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4454
4455         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4456
4457 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4458
4459         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4460         rules
4461         * src/SDCCmain.c,
4462         * src/SDCCglobl.h,
4463         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4464         comments from the peephole optimizer replacement rules
4465         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4466         symbols
4467         * src/SDCCcse.c (updateSpillLocation),
4468         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4469         equivalents
4470         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4471         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4472         objects far pointers
4473
4474 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4475
4476         * src/SDCCsymt.h: a missing part of my last change
4477         * src/pic/ralloc.c (regTypeNum),
4478         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4479
4480 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4481
4482         * src/SDCCicode.h,
4483         * src/SDCCicode.c (aggrToPtrDclType),
4484         * src/SDCCptropt.h,
4485         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4486         ptrPseudoSymConvert),
4487         * src/pic/ralloc.c (regTypeNum),
4488         * src/pic16/ralloc.c (regTypeNum),
4489         * src/hc08/ralloc.c (regTypeNum),
4490         * src/ds390/ralloc.c (regTypeNum),
4491         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4492         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4493
4494 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4495
4496         * link/z80/lkmain.c (afile),
4497         * as/hc08/lkmain.c (afile),
4498         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4499         prevent a pointer problem when a filename has no directory and
4500         no extension specified.
4501
4502 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4503
4504         * link/z80/lkmain.c (afile): allow periods in directory names
4505         * link/z80/lkmain.c (afile),
4506         * as/mcs51/lkmain.c (afile),
4507         * as/hc08/lkmain.c (afile): allow linker script file to have an
4508         extension other than ".lnk"
4509         * link/z80/lklex.c (getfid),
4510         * link/z80/lkmain.c (parse),
4511         * as/mcs51/lklex.c (getfid),
4512         * as/mcs51/lkmain.c (parse),
4513         * as/hc08/lklex.c (getfid),
4514         * as/hc08/lkmain.c (parse): Support comments in the linker script
4515         file on lines by themselves and after filenames
4516
4517 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4518
4519         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4520
4521 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4522
4523         * src/z80/peeph-z80.def: removed some peephole rules that don't
4524         work with multibyte arithmetic (fixed bug #937126)
4525         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4526         to registers and not global variables
4527         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4528         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4529         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4530         checking for assignments not internally generated (fixed bug #931895)
4531         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4532         structure member (fixed bug #930072)
4533
4534 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4535
4536         * src/SDCCmain.c (linkEdit),
4537         * src/hc08/main.c (_hc08_parseOptions),
4538         * as/hc08/Makefile.in,
4539         * as/hc08/aslink.h,
4540         * as/hc08/asm.h,
4541         * as/hc08/m08pst.c,
4542         * as/hc08/lkrloc.c (relr, rele),
4543         * as/hc08/lkarea.c (lnkarea)
4544         * as/hc08/lkmain.c (afile, parse),
4545         * as/hc08/lkelf.c: support for ELF output
4546         * as/hc08/lks19.c (s19),
4547         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4548
4549 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4550
4551         * as/mcs51/lkihx.c: Fixed bug #899105.
4552
4553 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4554
4555         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4556         .dsp files from Unix to DOS.
4557
4558 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4559
4560         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4561         function pointers; we have been compliant for several months now.
4562         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4563         change that was accidently commented out
4564         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4565         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4566         bug #922319
4567
4568 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4569
4570         * src/hc08/gen.c: output of all of the internal debugging information
4571         is now controlled by the D() macro; it is disabled by default
4572
4573 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4574
4575         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4576         harder to keep the same registers during a CAST iCode
4577         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4578         long via int can be done in a single cast, if the signedness is
4579         correct.
4580         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4581         putchar() in tinibios.c in ds390's library
4582
4583 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4584
4585         * src/SDCCast.c (decorateType): fixed bug #898889,
4586         cast result of a literal complement too
4587         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4588         fixed check for bitfields
4589
4590 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4591
4592         * src/SDCCicode.c (geniCodeLogic): made it static,
4593         (geniCodeLogicAndOr): added in order to fix bug #905492,
4594         (ast2iCode): fixed bug #905492
4595         * support/regression/tests/bug-905492.c: added
4596         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4597         (processParms): fixed bug #927659: don't copy parms, this will clear
4598         decorated flag
4599         * support/regression/tests/bug-927659.c: added
4600
4601 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4602
4603         * src/SDCCast.c (addCast): don't cast float to char
4604         * device/lib/libsdcc.lib: added _memmove
4605
4606 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4607
4608         * device/lib/large/Makefile: fixed parallel execution by
4609         replacing `make` by `$(MAKE)`
4610
4611 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4612
4613         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4614         offsets (fixes bug #923936)
4615
4616 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4617
4618         * device/lib/small/Makefile: fixed parallel execution by
4619         replacing `make` by `$(MAKE)`
4620
4621 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4622
4623         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4624
4625 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4626
4627         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4628         * src/regression/Makefile: Regression test was not running.
4629
4630 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4631
4632         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4633         complement if possible
4634         * src/SDCCval.c (valComplement),
4635         * src/SDCCicode.c (operandOperation): fixed complement of literal
4636         * support/regression/tests/onebyte.c (testComplement): added
4637
4638 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4639
4640         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4641         return an optimized tree; actually replace actParm with the new tree
4642         * src/SDCCast.h: added some parantheses to remove side effects
4643         * support/regression/tests/bug-920866.c
4644
4645 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4646         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4647         Bit operands were not being handled properly in the pic14 port.
4648         (now src/regression/add.c passes again).
4649
4650 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4651
4652         * src/SDCC.y (labeled_statement): case and default no longer require
4653         a following statement (RFE #893037)
4654
4655 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4656
4657         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4658         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4659         disabled (fixes bug #916294)
4660         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4661         "mov a,acc"; patch provided by Lenny Story
4662         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4663
4664 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4665
4666         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4667         functions
4668         * src/ds390/gen.c (genFunction, genEndFunction),
4669         * src/ds390/ralloc.c (ds390_assignRegisters),
4670         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4671         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4672         pushed if there are parameters passed on the stack. Also, a cleaner
4673         way to decide if r0/r1 should be pushed/popped. (Together they fix
4674         bug #918693)
4675
4676 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4677
4678         * doc/sdccman.lyx,
4679         * device/lib/mcs51/crtpagesfr.asm,
4680         * device/lib/mcs51/crtxinit.asm,
4681         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4682         to avoid confusion with Si Lab's SFRPAGE register.
4683
4684 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4685
4686         * src/SDCCglue.c (emitMaps): allow public sfr variables
4687         * src/SDCCglue.c (initialComments): include compiler build date
4688         with compiler version and put the timestamp of the generated
4689         assembly file on a serperate line to be less confusing.
4690         * src/port.h: added genInitStartup hook
4691         * src/avr/main.c,
4692         * src/ds390/main.c,
4693         * src/hc08/main.c,
4694         * src/pic/main.c,
4695         * src/pic16/main.c,
4696         * src/xa51/main.c,
4697         * src/z80/main.c: genInitStartup initialize as NULL (default to
4698         historical behaviour)
4699         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4700         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4701         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4702         library instead of hard coding it into the compiler.
4703         * support/regression/ports/mcs51-stack-auto/spec.mk,
4704         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4705         * device/lib/mcs51/Makefile,
4706         * device/lib/small/Makefile,
4707         * device/lib/large/Makefile,
4708         * device/lib/mcs51/crtpagesfr.asm,
4709         * device/lib/mcs51/crtstart.asm,
4710         * device/lib/mcs51/crtxclear.asm,
4711         * device/lib/mcs51/crtxinit.asm,
4712         * device/lib/mcs51/crtclear.asm,
4713         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4714         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4715         and into user configurable files.
4716         * device/lib/clean.mk: clean mcs51 directory too
4717         * support/regression/tests/longlit.c: added static to T1 declaration
4718         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4719         accesses in the initialization code
4720
4721 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4722
4723         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4724         OSCTRIMVAL as noted in bug #916008
4725
4726 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4727
4728         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4729         in loops with multiple exits (reported as incorrect registers
4730         used by Martin Helmling in Sdcc-user list)
4731
4732 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4733
4734         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4735         made ds390 register extensions look less like error messages
4736
4737 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4738
4739         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4740         reported by Adam Wozniak in Sdcc-user list
4741
4742 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4743
4744         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4745         arithmetic optimizations, added debug output
4746
4747 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4748
4749         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4750         * sdcc.spec: updated and split sdcc into 3 rpms
4751         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4752         needed for literals of LEFT_OP and '+'
4753         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4754         introduced RESULT_TYPE_NOPROM
4755         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4756         left shift
4757         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4758         limited promotion to int only for '*'
4759         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4760
4761 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4762
4763         * src/pic16/gen.c (genSkip),
4764         (genc16bit2lit), (gencjneshort): commented out
4765         (is_LitOp): new helper function, checks operand type
4766         (genCmpEq): rewritten
4767
4768 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4769
4770         * support/regression/tests/bug-908454.c: added
4771
4772 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4773
4774         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4775         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4776         (geniCodeCast): cosmetic, don't preserve bit storage class
4777         (geniCodeLeftShift): added promotion
4778         (geniCodeLogic): fixed regression
4779         * src/SDCCsymt.c (computeTypeOr): accept bits too
4780         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4781
4782 2004-03-07  Borut Razem <borut.razem AT siol.net>
4783
4784         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4785
4786 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4787
4788         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4789         version of pic16_genPackRegisters which does not check if ic is a
4790         CAST operator,
4791         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4792         function cause string1.c regression test fails
4793
4794 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4795
4796         * sim/ucsim/configure.in,
4797         * sim/ucsim/configure,
4798         * sim/ucsim/doc/Makefile.in: use docdir
4799         * src/SDCC.y: fixed sbit atrributes
4800         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4801         * src/SDCCast.c (decorateType): |^& need special promotion handling
4802         * src/SDCCast.h,
4803         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4804         * src/SDCCsymt.h (computeType),
4805         * src/SDCCicode.c: computeType() needs op
4806         * src/SDCCsymt.c (checkTypeSanity),
4807         * doc/sddman.lyx: "plain" bitfields are unsigned
4808         * src/SDCCsymt.c (computeTypeOr): added
4809         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4810         |^& ops
4811         * src/SDCCval.c (val*): computeType() needs op
4812         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4813         * support/regression/tests/onebyte.c: added tests for |^&
4814
4815 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4816
4817         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4818         for writing icode into asm output.
4819
4820 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4821
4822         * src/pic16/device.c: added some debug lines enabled
4823         with macro DEBUG_CHECK,
4824         * src/pic16/genarith.c: more debug in genPlus,
4825         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4826         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4827         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4828         * (aopForSym): onStack symbols are re-placed in data memspace,
4829         and onStack flag is cleared,
4830         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4831         copy temporary pcodeop,
4832         * (genPcall): added warning for not updating PCLATU,
4833         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4834         always true for pic16 port,
4835         * (genMultOneWord): NEW, supports integer multiplication,
4836         * (genMult): modified to call genMultOneWord,
4837         * (ifxForOp): added warning when return NULL,
4838         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4839         flag is set before call to operandFromSymbol for implicit
4840         added structures,
4841         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4842         options.intlong_rent are set by default,
4843         * (_hasNativeMulFor): modified to allow port generation of integer
4844         multiplication,
4845         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4846         set regtype to REG_SFR for all registers, restricting seting the
4847         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4848
4849 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4850
4851         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4852         more than 500 times in the regression tests
4853
4854 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4855
4856         * support/Util/SDCCerr.h,
4857         * support/Util/SDCCerr.c,
4858         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4859         enumerator_list),
4860         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4861         for symbol conflicts.
4862         * support/valdiags/tests/enum.c,
4863         * support/valdiags/tests/tentdecl.c,
4864         * support/valdiags/tests/struct.c: expect possible error messages
4865         referring to original symbol definitions.
4866         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4867         * src/SDCCsymt.h,
4868         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4869
4870 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4871
4872         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4873
4874 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4875
4876         * src/pic16/ralloc.c (newReg): fixed bug #908929
4877
4878 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4879
4880         * src/ds390/gen.c: added missing #include "main.h"
4881
4882 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4883
4884         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4885         checking if symbol is already in set,
4886         * src/pic16/device.h: prototype for checkAddSym,
4887         * src/pic16/gen.c: (_G): added entry interruptvector,
4888         * (assignResultValue): removed some commented out lines,
4889         * (genFunction): check for ISR via sym->type, absolute section for
4890         interrupt code is created via a new pBlock, the goto instruction is
4891         placed now correctly at the interrupt vector position, changed all
4892         references from ivec to _G.interruptvector,
4893         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4894         is the interrupt is a high priority one, same for return from ISR,
4895         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4896         externs to calls of checkAddSym,
4897         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4898         pic16_pcode_verbose flag is set,
4899         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4900         * src/pic16/pcoderegs.c: message about how many registers are saved
4901         will only be emitted if pic16_pcode_verbose flag is set,
4902
4903 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4904
4905         * src/ds390/ralloc.h,
4906         * src/ds390/ralloc.c (ds390_regWithIdx),
4907         * src/ds390/gen.c (emitcode),
4908         * src/ds390/main.h,
4909         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4910         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4911         ds390operandCompare, getRegsRead, getRegsWritten,
4912         initializeAsmLineNode): customized instruction size calculation for
4913         ds390, started basis for some register optimizations
4914         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4915         corresponding assembly output
4916         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4917         missing push/pop of r0/r1. Optimized push/pops
4918
4919 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4920
4921         * src/mcs51/main.c (instructionSize): fixed ACALL size
4922         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4923
4924 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4925
4926         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4927         the sorting of rlist with NULL elements
4928         * (print_idataType, print_idata): NEW to create idata sections
4929         * src/pic16/device.h: idataSymSet new variable
4930         * src/pic16/gen.c (genFunction): fixed some bugs in string
4931         comparing, improved the absolute section creation for ISRs,
4932         added FSR0L/FSR0H in registers that are saved in an ISR,
4933         * (genInline): fixed the processing of inline snippets,
4934         now they undergo no process by the peephole optimizer
4935         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4936         are placed in idataSymSet,
4937         * (pic16emitStaticSeg): extern symbols are added in externs,
4938         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4939         switching when aboslute variables are placed in access bank memory
4940         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4941         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4942         commented out with #if,
4943         * (pic16_packRegisters): reintroduce the check for CAST because some
4944         symbols are not correctly handled,
4945         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4946         pCodeInstruction instead of pCode,
4947         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4948         pCodeAsmDir definition,
4949         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4950         directive, then the argument directive is emitted without the leading
4951         tab, hack for inline labels which must be in the first column,
4952         * (compareLabel,pic16_findNextInstruction),
4953         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4954         * (insertBankSwitch): modified for the new pCodeAsmDir,
4955
4956 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4957         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4958
4959         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4960         instance,
4961         * (pushSide): commented out with #if,
4962         * (assignResultValue): fixed some typos in saving
4963         registers,
4964         * (genPcall): FIXED and sync'ed with genCall,
4965         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4966         * (genNearPointerGet): fixed to handle some more cases,
4967         implementation scheme via table reads,
4968         * (genConstPointerGet): modified to access code memory correct,
4969         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4970         and improved to handle some cases
4971         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4972         instead of "RETLW" for init data
4973         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4974         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4975         variables are placed in access bank memory (<0x80 and >=0xf80),
4976         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4977         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4978         TBLWT_POSTDEC,TBLWT_PREINC
4979         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4980         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4981         directives
4982         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4983         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4984         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4985         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4986
4987 2004-02-29  Borut Razem <borut.razem AT siol.net>
4988
4989         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4990         support/Util/findme.h, support/Util/system.h: enhance binary relative
4991         search for lib and include by using findProgramPath()
4992
4993 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4994
4995         * src/SDCCpeeph.h,
4996         * src/SDCCpeeph.c (pcDistance),
4997         * src/port.h,
4998         * src/mcs51/ralloc.h,
4999         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5000         * src/mcs51/main.h,
5001         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5002         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5003         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5004         size calculation port specific, started basis for some register
5005         optimizations
5006         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5007         missing push/pop of r0/r1. Optimized push/pops
5008         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5009         * device/lib/_modsint.c (_modsint),
5010         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5011         and stack version so regression tests pass
5012
5013 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5014
5015         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5016         * src/SDCCast.c (decorateType): catch another small optimization
5017         with '?' operator
5018         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5019         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5020         modified to finally use computeType() all over SDCC,
5021         see Feature Request #877103
5022         * src/SDCCval.h: cosmetic
5023         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5024         valCompare(); regression tested in muldiv.c
5025         * support/regression/tests/muldiv.c (testMod): mod sign follows
5026         dividend only
5027
5028 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5029
5030         * src/SDCCast.c (decorateType): fixed bug #902362
5031         * doc/INSTALL.txt: fixed install instructions for win32
5032
5033 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5034
5035         * device/include/Makefile.in (install): fixed by replacing spaces
5036         by tabs
5037         * doc/README.txt,
5038         * doc/INSTALL.txt: updated for release
5039         * doc/sdccman.lyx: added warning for --xstack being buggy
5040
5041 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5042
5043         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5044         to eliminate build warnings.
5045         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5046
5047 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5048            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5049
5050         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5051         removed -penable-stack, added comment for stack pragma, added
5052         warning for not initializing the stack/frame registers, removed
5053         comment at interrupts section
5054
5055         Stack is made permanent, there is no ability to disable stack usage.
5056         * src/pic16/device.h,
5057         * src/pic16/device.c: removed all references to USE_STACK macro,
5058         * src/pic16/device.c (pic16_dump_section): when no elements in
5059         rlist, free rlist before return,
5060         * (pic16_dump_int_registers): NEW, internal registers are a new set
5061         of general purpose registers reused by each function,
5062         * (checkAddReg): returns 1 if registers is added to set,
5063         * (pic16_groupRegistersInSection): when a registers is of type
5064         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5065         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5066         SRCASECMP macro is moved here from device.c
5067         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5068         PO_PCLATU, PO_PRODL, PO_PRODH,
5069         * (pic16_pCodeOpType, genMinus,
5070         changed compares to "a" register, with AOP_ACC,
5071         * (pic16_genPlus): fixed some bugs and indented properly,
5072         * (pic16_addSign): changed size to size+offset in the MOVWF
5073         instruction,
5074         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5075         multiply 8-bit operand by literal, result is 8-bit,
5076         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5077         multiply 2 8-bit operand, result is 8-bit,
5078         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5079         genUMult8X*_16,
5080         * src/pic16/gen.c: changed accUse to contain WREG only,
5081         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5082         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5083         true, do not use immediate addressing any more unless sym is a
5084         pointer in codespace,
5085         * (aopForRemat): do not use immediate addressing when symbol not in
5086         codespace and when symbol's address is requested,
5087         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5088         accUse size (= 1),
5089         * (aopGet): added case for AOP_ACC and don't return "accumulator
5090         bug" but WREG instead,
5091         * (popGetTempReg): pushes contents of temporary register in stack,
5092         * (popReleaseTempReg): pops contents of temporary register from
5093         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5094         * (pic16_popGet): separated case AOP_ACC to return register WREG
5095         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5096         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5097         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5098         the use of immediate pointers to certain cases only.
5099
5100         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5101         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5102         * (assignResultValue, genCall, genRet): modified to use the new
5103         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5104         genPcall is still broken,
5105         * (genFunction): added code to create 'A' type pBlocks when
5106         interrupt functions are generated, code not extensively tested yet,
5107         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5108         * (genEndFunction): modified so ISRs pop stored registers from stack,
5109         * (genMultOneByte): cleanup,
5110         * (AccRsh): added flag andmask, to and result with appropriate mask,
5111         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5112         * (genDataPointerGet): fixed and reenabled its use,
5113         * (genNearDataPointerGet): bugs fixed,
5114         * (genDataPointerSet): bugs fixed,
5115         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5116         pic16_DumpSymbol, pic16_DumpOp,
5117         * src/pic16/genutils.h: function prototypes for the above functions,
5118         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5119         pointers,
5120         * (pic16emitRegularMap): many many many improvements, but needs a
5121         major cleanup,
5122         * src/pic16/main.c: enable_stack in pic16_options is removed,
5123         * (_pic16_parseOptions): removed command line options -penable-stack,
5124         * (_process_pragma): emit stack symbol only when stack pragma is
5125         processed,
5126         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5127         redirected to FSR0L/FSR0H pair,
5128         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5129         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5130         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5131         for immediates,
5132         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5133         * (dumpPicOptype): NEW,
5134         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5135         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5136         with movff instruction,
5137         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5138         added pic16_int_regs, some packRegsFor* functions are commented out,
5139         because produce errors,
5140         * src/pic16/NOTES: minor modifications
5141
5142 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5143
5144         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5145         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5146         --pack-iram.
5147         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5148         * as/mcs51/lkaomf51.c: fixed bug #895763
5149
5150 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5151
5152         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5153
5154 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5155
5156         * doc/sdccman.lyx: added details about the HC08 storage classes and
5157         interrupts, fixed the register usage info for z80 & gbz80
5158
5159 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5160
5161         * doc/sdccman.lyx: added more pic16 port documentation
5162         * device/include/pic16/: added header pic18fregs.h
5163
5164 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5165
5166         * doc/sdccman.lyx: added Vangelis' contribution
5167
5168 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5169
5170         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5171         extend to the next CALL or PCALL, not just to the next CALL.
5172
5173 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5174
5175         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5176
5177 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5178
5179         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5180         bug #895752 and a better fix for bug #716790
5181
5182 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5183
5184         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5185
5186 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5187
5188         * doc/sdccman.lyx: minor changes, minor changed
5189
5190 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5191
5192         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5193         which can't handle SDCC_NEWONEBYTEOPS,
5194         (geniCodeMultiply): removed conversion from mult to shift for pic14
5195         and pic16
5196
5197 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5198
5199         * src/hc08/gen.h,
5200         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5201         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5202         thus fixing bug #895406
5203
5204 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5205
5206         * device/lib/_modsint.c,
5207         * device/lib/_modslong.c: sign follows divisor only
5208         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5209         signs or signedness can be ignored
5210         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5211         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5212         added optimization for IFX,
5213         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5214         arguments;
5215         reenabled optimization for IFX, which was removed on 2004-01-11
5216         * src/SDCCast.h: added return type IFX
5217         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5218         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5219         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5220         SDCC_OLDONEBYTEOPS selects the old behaviour
5221         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5222         changed again and commented promotion rule
5223         * src/SDCCval.c (valDiv): promotion no longer necessary
5224         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5225         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5226         rewritten
5227         * support/regression/tests/onebyte.c: added
5228
5229 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5230
5231         * gen.c (genInline): reverted to old code for assemnling inline
5232         code because of bug reported James Chadd
5233
5234 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5235
5236         * ralloc.h: missing declarations from previous patch,
5237         seems that patch for ralloc.h was never applied, fixed
5238
5239 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5240            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5241
5242         * pcode.c,
5243         * pcode.h,
5244         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5245         indirect addressing. Marked FSR0 as deprecated
5246         * gen.c (pointerCode): commented out, not needed now
5247         (pic16_popGet2p): new MOVFF helper function
5248         (genGenPointerGet),
5249         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5250         (shiftRLong): removed duplicate debugging info
5251
5252 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5253
5254         * src/ds390/gen.c (genNearPointerGet),
5255         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5256         optimization with bits, but not bitfields.
5257         * src/ds390/ralloc.c (packRegisters),
5258         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5259
5260 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5261
5262         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5263
5264 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5265
5266         * src/SDCCsymt.h,
5267         * src/SDCCicode.c (operandFromSymbol),
5268         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5269         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5270         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5271         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5272         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5273         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5274         bug #892038
5275         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5276         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5277         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5278         * src/SDCCsymt.c (newSymbol),
5279         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5280         enumerator_list),
5281         * src/SDCCval.h,
5282         * src/SDCCval.c (newiList): fixed bug #885705
5283
5284 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5285
5286         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5287         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5288
5289 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5290
5291         * device/include/c8051f120.h,
5292         * device/include/c8051f300.h,
5293         * device/include/c8051f310.h: added/updated header files for Silicon
5294         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5295         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5296         in new section Submitting patches
5297
5298 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5299
5300         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5301         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5302         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5303         genGenPointerSet),
5304         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5305         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5306         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5307         genGenPointerSet),
5308         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5309         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5310         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5311         genGenPointerSet),
5312         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5313         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5314         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5315         genGenPointerSet): fixed bug #892400
5316         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5317         to eliminate build warnings.
5318         * src/SDCCast.c (processParms),
5319         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5320         fixed bug 751859
5321         * support/valdiag/valdiag.py: added GCC to the list of defines active
5322         when compiling with gcc
5323
5324 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5325
5326         * support/Util/SDCCerr.h,
5327         * support/Util/SDCCerr.c,
5328         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5329         with an incomplete type (fixed bug #883734)
5330         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5331
5332 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5335
5336 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5337
5338         * src/SDCCast.c (decorateType),
5339         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5340         function pointer implementation
5341         * support/regression/tests/funptrs.c: added tests to verify both forms
5342         of function pointers work correctly. Added tests to verify parameters
5343         are passed in the correct order.
5344
5345 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5346
5347         * device.c (regCompare): registers are sorted by ascending
5348         address and increasing size,
5349         * main.c (_pic16_finaliseOptions): removed the declaration
5350         of compiler macro MCU. Now a macro of the format pic18fxxxx
5351         will be defined from the command line
5352
5353 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5354             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5355
5356         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5357         PCOP_RLCF was overwritten!
5358         * gen.c (genSkip): commented out calls to pic16_emitcode,
5359         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5360         * (genlshTwo),
5361         * (genRRC): added debugging info,
5362         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5363         overwritten while shifting,
5364         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5365         overwritten while shifting,
5366         * (AccLsh),
5367         * (AccRsh),
5368         * (shiftLLeftOrResult),
5369         * (shiftRLeftOrResult),
5370         * (shiftRLong),
5371         * (shiftLLong): Implemented with pic16_emitpcode
5372         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5373         * (genLeftShift): Fixed bug, operand for shift by variable always
5374         was "and"ed with 0x0f,
5375         * (genLeftShiftLiteral),
5376         * (genrshTwo),
5377         * (genRightShiftLiteral): added debugging info,
5378         * (genrshFour): added comment,
5379         * (genRightShift): determined signedness from operand "left"
5380         instead of "result"
5381
5382 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5383
5384         * src/SDCCicode.c (geniCodeParms),
5385         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5386         function pointers, fixed function pointer bugs #861242 and #861896
5387
5388 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5389
5390         * device/include/c8051f000.h,
5391         * device/include/c8051f120.h,
5392         * device/include/c8051f300.h: added header files for Silicon
5393         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5394
5395 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5396
5397         * src/SDCCast.c (processParams): added new type flow and restructured
5398         (gatherAutoInit): added new type flow
5399         (addCast): cosmetic changes
5400         (getLeftResultType): added new type flow for array indices, patch
5401         provided by Stas, see FR #877103
5402         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5403         array index patch by Stas
5404         * src/SDCCast.h: added prototype getResultTypeFromType()
5405         * src/SDCCval.h,
5406         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5407         * src/pic/glue.c (pic14emitStaticSeg),
5408         * src/pic16/glue.c (pic16emitStaticSeg),
5409         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5410         for initialization of symbols
5411         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5412         * support/Util/SDCCerr.h:
5413         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5414         * .version: bumped version number to 2.3.8
5415         * device/include/Makefile.in (install),
5416         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5417         avoid warnings
5418
5419 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5420
5421         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5422         Slade Rich fixed an optimization bug
5423         * src/pic/pcodepeep.c,
5424         * src/pic/pcoderegs.c
5425         * doc/Makefile (install): added test for directory
5426
5427 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5428
5429         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5430         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5431         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5432         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5433         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5434         * as/mcs51/asexpr.c (term),
5435         * as/hc08/asexpr.c (term): fixed bug #887146
5436
5437 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5438
5439         * src/z80/gen.c (genMult): handle single byte result product
5440         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5441         DUMMY_READ_VOLATILE (fixed bug #886367)
5442
5443 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5444
5445         * support/regression/tests/libmullong.c: fixed logic, on little endian
5446         hosts we ended without a mullong_wrapper()
5447
5448 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5449
5450         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5451         virus/worm forged address usage.
5452
5453 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5454
5455         Fixed promotion, it should be done on AST level:
5456         * src/SDCCast.c (addCast): added promotion to int
5457         (decorateType): updated call to upCast()
5458         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5459         usualUnaryConversions()
5460
5461 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5462
5463         * support/regression/tests/literalop.c (mulWrapper): Added a
5464         wrapper to remove integer overflow warnings.
5465
5466         * support/regression/tests/float_trans.c: Made work on host.
5467
5468         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5469         location of sz80.
5470
5471         * support/regression/generate-cases.py (main): Changed from inline
5472         to a main method.
5473
5474         * doc/Makefile (install): Changed to depth first to get rid of
5475         missing directory install warning.
5476
5477         * as/Makefile (install-doc): Made work on Mac.
5478
5479 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5480
5481         * src/SDCCast.c: added an additional type flow in decorateType() of
5482         opposite direction, see feature request #860006; it's enabled at runtime
5483         by setting the environment variable SDCC_NEWTYPEFLOW
5484         * src/SDCCast.h: changed prototype of decorateType()
5485         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5486         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5487         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5488         see feature request #877103
5489         * src/SDCCval.c: updated call of decorateType()
5490         (valBitwise): fixed bug #882876
5491         (valMinus): added promotion
5492         (valLogicAndOr): result is unsigned
5493         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5494         * src/SDCCsymt.c (computeType),
5495         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5496         must not cause an unsigned operation
5497         * src/pic/glue (pic14emitRegularMap),
5498         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5499
5500 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5501
5502         * src/pic/pcode.c (PCodeID): commented out left over debug code
5503
5504 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5505
5506         * support/valdiag/tests/overflow.c: added shift tests
5507         * src/pic/device.c,
5508         * src/pic/gen.c,
5509         * src/pic/gen.h,
5510         * src/pic/glue.c,
5511         * src/pic/main.c,
5512         * src/pic/pcode.c,
5513         * src/pic/pcode.h,
5514         * src/pic/pcodepeep.c,
5515         * src/pic/pcoderegs.c,
5516         * src/pic/ralloc.c,
5517         * src/pic/ralloc.h: applied patch from Slade Rich;
5518         added support for multiple code pages and multiple RAM banks on the
5519         PIC 14 port. The ASM files now no longer simply assume all the
5520         code / RAM are in the same page / bank. This means the linker can
5521         safely allocate code/RAM of separate ASM files to different pages/banks.
5522         * doc/sdccman.lyx: added Slade's tips
5523         * src/mcs51/peeph.def: fixed bug #880768
5524
5525 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5526
5527         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5528         * src/SDCCast.c (decorateType): fixed bug #880197
5529
5530 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5531
5532         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5533         getopt.h.
5534
5535         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5536         strtof is not part of C89 and isn't included with Mac OS X.
5537
5538 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5539
5540         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5541         shiftL2Left2Result): fixed bug #879326
5542         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5543         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5544         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5545         address fetch for clr instruction
5546         * device/lib/hc08/_mulint.c: created optimized assembly version
5547         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5548
5549 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5550
5551         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5552         proposed in FR #877103
5553
5554 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5555
5556         * src/SDCCval.c (cheapestVal): added missing checks
5557         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5558         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5559
5560 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5561
5562         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5563         equal operands
5564
5565 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5566
5567         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5568         loaded with the linker search paths (-L arguments) and the libraries
5569         to be linked with the current source (-l arguments). Changes
5570         currently will affect only the pic16 port.
5571         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5572         include path the port specific paths and port specific libraries,
5573         * gplink command now contains the $3 argument,
5574         * src/pic16/device.h,
5575         * src/pic16/device.c,: structure PIC_device is made public and
5576         renamed to PIC16_device, the same for variable Pics which is renamed
5577         to Pics16. Updated all references to them.
5578         * src/pic16/glue.c (pic16glue): corrected bug with code
5579         initialization which bypassed the variable initializations block.
5580
5581         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5582         COMPILE_FLAGS and added the --nostdinc option
5583
5584 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5585
5586         * device/include/mc68hc908jb8.h: Register defs for another member
5587         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5588
5589 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5590
5591         Documenting changes from previous commits.
5592         * configure.in (version 1.56),
5593         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5594         when generating output files to configure the pic16 library,
5595         but now I've commented it out, since gputils aren't installed in the
5596         SF compile farm, so library won't compile
5597
5598         * device/lib/Makefile.in (version 1.56): initially I've added in
5599         target 'all' the prerequestive 'model-pic16' so it compiled the
5600         pic16 library, but now I've commented it out for the same reasons
5601         above,
5602         * added targets 'model-pic16' and 'objects-pic16' to compile the
5603         library
5604         * added target 'port-specific-objects-pic16' to handle the
5605         generated libraries and copy them into the build/ directory
5606         * added target 'clean-intermediate-pic16' to clean intermediate
5607         files into pic16 directory
5608         * in target 'installdirs' added line to create directory pic16 in
5609         the installation path
5610
5611         * device/include/Makefile.in (version 1.11): in target 'install'
5612         added lines to copy all header files to installation path,
5613         * in target 'installdirs' added line create directory for pic16
5614         headers in the installation path
5615
5616 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5617
5618         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5619          a function call
5620
5621 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5622
5623         * configure,
5624         * device/lib/configure.in,
5625         * device/lib/configure: fixed for autoconf 2.57
5626
5627 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5628
5629         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5630         option so that it actually works. Made it specific to the z80, since
5631         the gbz80 doesn't have these kinds of I/O ports.
5632
5633 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5634
5635         * device/include/z180.h,
5636         * device/lib/_memcpy.c,
5637         * device/lib/_memmove.c,
5638         * device/lib/_mulint.c,
5639         * device/lib/ser_ir.c,
5640         * device/lib/ser_ir_cts_rts.c,
5641         * device/lib/_strcmp.c,
5642         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5643         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5644         portmode; added deprecation warning for bank= and protmode= forms.
5645         Also, guard against buffer overflow.
5646         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5647
5648 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5649
5650         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5651         changed interrupt vector table generation to only emit declared vectors.
5652         * device/include/Makefile.in: added missing backslash
5653         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5654
5655 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5656
5657         Mainly changes to support compilation of the device libraries
5658         * src/pic16/device.c: stack is allocated via symbol and not
5659         via literal number. The symbol is placed in the corresponding
5660         position of the data ram
5661         * (pic16_dump_section): relocatable and absolute uninitialized
5662         data are now emitted in sorted order to reduce section naming,
5663         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5664         weren't marked as being in the access bank,
5665
5666 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5667
5668         Added portion of GNU PIC Library under the directory
5669         device/include/pic16 and device/lib/pic16. These files
5670         contain the declarations of SFRs for the PIC18Fxx2 devices.
5671         The directory is initialized via configure from toplevel.
5672
5673 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5674
5675         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5676         the spilllocations to be compared correctly
5677
5678 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5679
5680         * src/SDCCast.c (decorateType): fixed bug introduced today
5681
5682 2004-01-12  Borut Razem <borut.razem AT siol.net>
5683
5684         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5685         doc/sdccman.lyx: upper case pragmas are deprecated
5686
5687 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5688
5689         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5690         in simpler and even better code
5691
5692 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5693
5694         * src/SDCCicode.c (operandOperation): fixed bug #874819
5695         * src/SDCCast.c (decorateType): fixed
5696         char foo (unsigned long ul) { return ul > 0; }
5697
5698 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5699
5700         * doc/sdccman.lyx: Moved and added some sections, small changes
5701         all over. Telling LaTeX to be less strict with word spacing
5702         to better keep the right margin. Changed some notes about
5703         maintainance of the ports in section 3.2.1 - is it OK like this?
5704
5705 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5706
5707         SDCC source changes:
5708         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5709         convilong): modified to inform the pic16 port that builtin functions
5710         are external
5711
5712         PIC16 PORT specific changes:
5713         * src/pic16/device.c pic16_dump_equates() added,
5714         processor registers declared internally by the port are emitted in
5715         the translation as equates,
5716         * src/pic16/gen.c: inline code is passed unprocessed to the
5717         translation,
5718         * (pic16_popGetLit2): fnuction modified to take second operand as
5719         pCodeOp pointer and not as literal,
5720         * (popRegFromIdx): prefixed with pic16_,
5721         * (pic16_popCombine2): modified to receive already allocated pCode
5722         operands,
5723         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5724         * (genFunction): initializes local stack frame and pushes on stack
5725         all the registers used by this function,
5726         * (genEndFunction): restores all registers from stack and restores
5727         stack frame,
5728         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5729         improvements,
5730         * (pic16glue): changed the program startup sequence,
5731         * added new dbName code 'A' for functions placed in absolute section
5732         * src/pic16/main.c: added function attribute _naked,
5733         * added pragma 'code' to place a fnuction at an absolute address,
5734         * added command line arguments --debug-ralloc and --pcode-verbose,
5735         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5736         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5737         * (pic16_newpCodeOpLit2): modified to take the second operand as
5738         pCodeOp pointer,
5739         * (pic16_printpBlock): modified to emit each function in a separate
5740         section,
5741         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5742         UPPER for immediate operands,
5743         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5744         instruction,
5745         * src/pic16/peeph.def: all peepholes with movff are commented out,
5746         because there is a problem in the pcode peep optimizer,
5747         * src/pic16/ralloc.c: the register allocator can now reuse local
5748         function symbols for another function. This saves register usage.
5749         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5750
5751         Added file src/pic16/NOTES with information about program writing on
5752         the current port version.
5753
5754 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5755
5756         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5757         and peephole 252 (array access)
5758
5759 2004-01-09  Borut Razem <borut.razem AT siol.net>
5760
5761         * src/SDCCmain.c : fixed #872250: -l command line defined library
5762           files are scanned before standard library files
5763
5764 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5765
5766         * src/SDCCast.c (decorateType): fixed bug #874046
5767
5768 2004-01-09  Borut Razem <borut.razem AT siol.net>
5769
5770         * support/scripts/sdcc.nsi: remove previous installation
5771
5772 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5773
5774         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5775         bytes for last interrupt vector (mcs51)
5776         * sdcc.spec: fixed typo
5777
5778 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5779
5780         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5781         gen51Code): more efficient parameter receive for --model-large
5782         ("bug" #845294)
5783
5784 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5785
5786         * src/ds390/main.c,
5787         * src/z80/main.c: added missed needLinkerScript flags (more than
5788         one port structure defined in these file)
5789         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5790         bug #795325
5791
5792 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5793
5794         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5795         * src/port.h: added flag needLinkerScript in port->linker
5796         structure to inform whether to create a .lnk file or not,
5797         * src/avr/main.c,
5798         * src/ds390/main.c,
5799         * src/hc08/main.c,
5800         * src/mcs51/main.c,
5801         * src/pic/main.c,
5802         * src/pic16/main.c,
5803         * src/xa51/main.c,
5804         * src/z80/main.c: changed appropriately to configure
5805         needLinkerScript flag
5806         * src/pic/gen.c,
5807         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5808         * src/pic/glue.c: added variable udata_section_name to
5809         override default uninitialized data segment definition for
5810         devices only with SHAREBANK memory (reported from Erik Epetrich)
5811         * (pic14emitOverlay): modified to emit a commented overlay segment
5812         directive when no overlay data exist
5813         * (picglue): modified to emit uninitialized data segment
5814         according to udata_section_name
5815         * src/pic/main.c (_pic14_parseOptions): added command line
5816         options --udata-section-name=[name] to override default
5817         udata definition name
5818         * modified _linkCmd and _asmCmd to include compiler passed
5819         arguments via -W option
5820         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5821         object file from '.rel' to '.o' in port->linker structure,
5822         changed size of fptr from 2 to 3 in port structure
5823
5824 2004-01-07  Borut Razem <borut.razem AT siol.net>
5825
5826         * support/scripts/sdcc.nsi: update PATH
5827         * support/scripts/sdcc.ico: craeted
5828
5829 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5830
5831         * device/include/Makefile.in: fix install
5832         * doc/Makefile: fix install
5833
5834 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5835
5836         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5837         in bug #860505
5838         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5839         how the function variable allocation summary is displayed; also
5840         include information about variables allocated to the overlay
5841         segment
5842
5843 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5844
5845         * as/mcs51/lkmain.c: Help about -Y option
5846         * as/mcs51/lkarea.c: Fixed gcc warnings
5847
5848 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5849
5850         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5851         fixed warning
5852         * support/valdiag/tests/overflow.c: added
5853         * src/SDCCast.c (decorateType),
5854         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5855         LEFT_OP (left shift)
5856
5857 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5858
5859         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5860         (default behaviour).
5861
5862 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5863
5864         A python script to validate compiler diagnostic messages. It can be
5865         used to verify that sdcc complains about bad c source code and
5866         gives a good location of the error.
5867         * support/valdiag/Makefile,
5868         * support/valdiag/valdiag.py,
5869         * support/valdiag/tests/*
5870
5871 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5872
5873         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5874         * src/SDCCsymt.c (newEnumType),
5875         * src/SDCCsymt.h
5876         * support/Util/SDCCerr.c,
5877         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5878         enum related bugs.
5879         * support/regression/tests/enum.c: added test for enum values that
5880         require at least 2 bytes of storage.
5881
5882 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5883
5884         * src/common.h: added ifndef/define/endif macros
5885         around the header file.
5886         Bug reported from Jesus Calvino-Fraga
5887
5888 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5889
5890         * sdcc.spec: updated
5891         * device/include/Makefile.in: don't install CVS directories
5892         * device/lib/Makefile.in: added removal of CVS directories after install
5893         * doc/Makefile: fixed install, added local_icons
5894         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5895         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5896         * src/ds390/gen.c (genRightShift): fixed bug #870788
5897         * src/SDCCast.c (decorateType): fixed bug #870781
5898
5899 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5900
5901         PIC16 port related changes:
5902         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5903         added variable stackPos,
5904
5905         * gen.c: genCall, assignResultValue: added support for
5906         pushing/retrieving function parameters to/from stack,
5907         genFunction,genEndFunction: setup stack frame for the
5908         generated function,
5909         genAddrOf: will be changed according to bug 863624
5910
5911         * added files genutils.c and genutils.h which contain gen*
5912         debugged and optimised functions extracted from gen.c
5913
5914         * glue.c: added variable 'externs' which holds extern symbols,
5915         pic16emitRegularMap: is modified to properly handle relocatable
5916          symbols under the new scheme,
5917         pic16createInterruptVect: is modified
5918         pic16printPublics: is modified to emit 'global' assembler directives,
5919         added pic16_printExterns to print extern symbols,
5920         pic16glue: initializes stack/frame pointer in the beginning of
5921         the assembly output. Temporary hack, will be corrected later,
5922         because gplink yet does not support stack and SDCC does not
5923         yet support a type of crt0.o object to create the final binary.
5924
5925         * Removed many lines that contain 8051 legacy code.
5926         * The code is finally placed under a 'code' directive.
5927         * Added port specific options.
5928
5929         * _process_pragma: simplified since now we do not need *special*
5930         include file to define SFR registers. But a separate header
5931         will be needed. This will be developed later.
5932         * _pic16_parseOptions: added, parses port specific options:
5933         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5934         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5935         --preplace-udata-with=
5936
5937         * _pic16_setDefaultOptions: modified to initialize section names,
5938         but hack is temporarly out of order since it needs improvement.
5939         * _pic16_genAssemblerPreamble: configuration words are emitted by
5940         their address instead of their name. This part is incomplete and
5941         supports only the 18Fxx2 devices. Other devices will emit an error
5942         during assembly since they do not contain the same set of config
5943         registers
5944         * _pic16_genIVT: is modified,
5945
5946         * pcode.c: added definitions for some hardware registers that are needed
5947         for stack support
5948         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5949         All PCI entries are updated. Now LFSR is supported.
5950         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5951         * added pic16_newpCodeOpLit2 to support instructions with
5952         two literal arguments
5953         * pic16_pCode2str: corrected code that emits assembler instructions
5954         with two literal operands and those that have an access bit modifier
5955         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5956         this fixes a bug which caused some labels to be lost, when an
5957         assembler directive was added, i.e. banksel,
5958         * pic16_FixRegisterBanking: improved logic that causes the insertion
5959         of bank switching,
5960         * InlineFunction: functions that are called once, are not any more
5961         inlined. This can be a port option in the future,
5962
5963         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5964
5965         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5966         hold the corresponding uninitialized symbols,
5967         * pic16_allocProcessorRegister: registers have explicit marked the
5968         accessBank field,
5969         * pic16_allocInternalRegister: registers are explicit marked as
5970         not used,
5971         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5972         processing list, so bit registers were lost,
5973         *
5974
5975         * ralloc.h: added field 'accessBank' and original symbol operand
5976         in register definition,
5977         * removed the field isMapped from register definition,
5978
5979         ** Several functions have been removed from various sources:
5980         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5981         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5982         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5983         pic16_assignRelocatableRegisters
5984
5985         ** others have been introduced:
5986         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5987         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5988
5989 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5990
5991         * support/scripts/inc2h.pl: changed definition of BIT_AT
5992         to emit 'sbit at' instead of 'bit at'. This was a request.
5993
5994         PIC16 port related preliminary changes:
5995         * gen.c: prefixed function popRegFromString with
5996         pic16_ and all references to it corrected
5997         * pcode.c: all pic16_pc_* hardware registers prefixed
5998         with underscore (_),
5999         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6000         * ralloc.c: newReg(): when register is REG_SFR then
6001         set address to rIdx,
6002         pic16_allocProcessorRegister(): marks register wasUsed=0
6003         pic16_writeUsedRegs(): added a call to assign processor
6004         registers via pic16_assignFixedRegisters
6005
6006 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6007
6008         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6009         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6010         variables in unused register banks.  Also the SSEG is placed
6011         wherever there is enough space for it, and IDATA can be anywhere
6012         in internal RAM.  For now compile using -Wl-Y[stack_size].
6013         The mem file is different for this option as well, since it
6014         makes no sense of talking about DSEG lenght.
6015
6016 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6017
6018         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6019         in certain cases, e.g. when ROM assignment, patch provided
6020         from Albert den Haan.
6021
6022 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6023
6024         Many signedness and type propagation fixes:
6025         * src/SDCCicode.c: made geniCodeCast() static
6026         replaced SPEC_ by IS_ (cosmetic)
6027         (operandOperation): fixed div and mod operation
6028         (usualBinaryConversions): added support for promotion of char
6029         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6030         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6031         (geniCodeAdd): an array index will stay unsigned, even if promoted
6032         from char to int
6033         (geniCodeArray): ditto
6034         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6035         * src/SDCCsymt.c (computeType): added more support for char;
6036         promotion of char is selectable by promoteCharToInt, fixed signedness
6037         for all cases
6038         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6039         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6040         * src/SDCCval (val*): replaced signedness calculation by
6041         computeType()
6042         rearranged if-branches (cosmetic)
6043         (valShift): added warning W_SHIFT_CHANGED
6044         (valCompare): fixed problem with different types
6045         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6046         * support/regression/tests/literalop.c: added many cases
6047         * support/regression/tests/ast_constant_folding.c: changed finally to
6048         'unsigned int'
6049         * .version: new year, new version: 2.3.7
6050         * src/SDCCmain.c (main): applied patch #866468
6051         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6052         provided by Scott Bronson
6053         * doc/sdccman.lyx: updated documentation for sdcdb
6054         updated and added chapter tips
6055
6056 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6057
6058         * src/SDCCsymt.h: missing from yesterday's commits
6059
6060 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6061
6062         * src/SDCC.y (struct_or_union_specifier),
6063         * support/Util/SDCCerr.c,
6064         * support/Util/SDCCerr.h: verify that struct & union tags are used
6065         as declared.
6066
6067 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6068
6069         * src/SDCCglobl.h: missing from yesterday's commits
6070
6071 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6072
6073         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6074         sft_attributes, struct_declaration, parameter_declaration,
6075         type_name, start_block, declaration_list),
6076         * src/SDCC.lex (check_type): support redefinition of typedef names
6077
6078 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6079
6080         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6081         aligned xdata arrays. Erik helped me with the if clause.
6082
6083 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6084
6085         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6086         warning
6087
6088 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6089
6090         * src/SDCCast.h,
6091         * src/SDCCast.c (newAst_),
6092         * src/SDCCicode.h,
6093         * src/SDCCicode.c (ast2iCode, newiCode),
6094         * src/SDCCglobl.h,
6095         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6096         expr, statement, expression_statement, selection_statement,
6097         iteration_statement, expr_opt, jump_statement): foundation for tracking
6098         sequence points
6099         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6100         point code too)
6101
6102 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * support/Util/SDCCerr.c,
6105         * src/SDCCast.h,
6106         * src/SDCCast.c (createCase, createDefault, decorateType),
6107         * src/SDCClabel.c (labelUnreach),
6108         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6109         to error messages.
6110         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6111         (with thanks to Stas Sergeev)
6112         * device/include/time.h,
6113         * device/lib/time.c (CheckTime): suppress unreachable code warning
6114
6115 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6116
6117         * src/SDCCast.c (createIvalCharPtr),
6118         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6119         bug #753752)
6120         * support/regression/tests/nullstring.c: tests for these two bugs
6121
6122 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6123
6124         * support/Util/SDCCerr.h,
6125         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6126         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6127         about storage class and 'at' used inside struct or union
6128         * src/SDCCBBlock.c (iCodeFromeBBlock),
6129         * src/SDCCcse.c (ifxOptimize),
6130         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6131         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6132         printIval, emitStaticSeg, emitOverlay),
6133         * src/SDCClabel.c (deleteIfx),
6134         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6135         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6136         gatherAutoInit, processParms),
6137         * support/Util/SDCCerr.h,
6138         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6139         reporting for post-parse errors.
6140
6141 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6142
6143         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6144         implicit casts via union; they don't work on big endian systems
6145         (possible fix for bug #861138)
6146
6147 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6148
6149         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6150         * src/mcs51/main.c: fixed the fix for bug #737001
6151
6152 2003-12-15  Borut Razem <borut.razem AT siol.net>
6153
6154         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6155
6156 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6157
6158         * support/makebin/makebin.c: put output in binary mode
6159
6160 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6161
6162         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6163         xdata and data memory on startup. Set the environment variable
6164         SDCC_NOGENRAMCLEAR to disable this.
6165         * src/mcs51/peephole.def,
6166         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6167         (allows non-interrupt and interrupt code to safely compete for a resource
6168         without the non-interrupt code having to disable interrupts)
6169
6170 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6171
6172         * src/SDCCicode.c (geniCodeAdd),
6173         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6174         with valFromType if type might be a pointer and host is big endian).
6175         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6176         types, not just integer types.
6177         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6178         multiply defined with mismatching "at" address.
6179
6180 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6181
6182         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6183         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6184         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6185         with embedded nulls (fixed bug #753752)
6186
6187 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6188
6189         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6190         Apparently this did not see much testing (endless loop)
6191
6192 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6193
6194         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6195
6196 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6197
6198         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6199         gracefully handle NULL memmap pointers
6200
6201 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6202
6203         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6204         instead of deleting the iCode when an operand is volatile
6205         * src/z80/gen.c (genDummyRead),
6206         * src/mcs51/gen.c (genDummyRead),
6207         * src/ds390/gen.c (genDummyRead),
6208         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6209         not just IC_RIGHT
6210         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6211         * src/SDCC.y: fixed bug #850420
6212
6213 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6214
6215         Applied z80 i/o port patch from Peter Townson and fixed some operators
6216         to better handle operands in A register.
6217         * device/include/z180.h
6218         * src/SDCC.y
6219         * src/SDCCglue.c
6220         * src/z80/gen.c
6221         * src/z80/gen.h
6222         * src/z80/main.c
6223         * src/z80/peeph-z80.def
6224         * src/z80/peeph.def
6225         * src/z80/z80.h
6226
6227 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6228
6229         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6230
6231 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * device/lib/hc08/_mullong.c: Removed extra #endif
6234
6235 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6236
6237         * sim/ucsim/hc08.src/inst.cc,
6238         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6239         carries from x to h
6240         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6241         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6242         * device/include/stdarg.h: fixed varargs for hc08
6243         * device/lib/Makefile.in,
6244         * device/lib/hc08/Makefile,
6245         * device/lib/hc08/_mulint.c,
6246         * device/lib/hc08/_mullong.c: fixed some endian problems
6247
6248 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6249
6250         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6251         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6252         * device/lib/_gptrget.c,
6253         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6254
6255 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6256
6257         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6258         * src/SDCCast.c (astErrors): fixed bug #846007
6259         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6260
6261 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6262
6263         * src/SDCCast.c (decorateType): disabled a transformation I added in
6264         revision 1.188 (access to fields of a structure at an absolute address);
6265         it breaks with bitfields, extern declarations, and gcse analysis.
6266         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6267         could be assigned through a pointer, so don't complain.
6268         * src/SDCCast.c (astErrors),
6269         * src/SDCCast.h,
6270         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6271
6272 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6273
6274         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6275         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6276         output of __config directives, since gpasm now supports them
6277         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6278         pre-processor macro, i.e. -DMCU=p18f452
6279         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6280         and modified to handle 'cast' icode similarly to '=' icode
6281         * src/pic16/device.h (typedef struct PIC_device): added field
6282         'extMIface' to indicate that chip has external memory interface
6283         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6284         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6285         18F8720
6286
6287 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6288
6289         * src/SDCC.y (pointer): fixed bug #846006
6290         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6291         * src/SDCCast.c (decorateType): fixed bug #846009
6292         * src/ds390/peeph.def,
6293         * src/ds390/gen.c (genAnd, genOr),
6294         * src/mcs51/peeph.def,
6295         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6296
6297 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6298
6299         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6300         * src/SDCCdflow.c
6301         * src/SDCCcse.c
6302         * src/SDCCcse.h
6303         * src/SDCCBBlock.h
6304         * src/SDCCBBlock.c
6305
6306 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6307
6308         fixed bug #845089
6309         * src/SDCCbitv.h,
6310         * src/SDCCbitv.c: added function to free a bitvector
6311         * src/SDCClrange.h,
6312         * src/SDCClrange.c: added function to recompute the liveranges
6313         * src/avr/ralloc.c,
6314         * src/ds390/ralloc.c,
6315         * src/hc08/ralloc.c,
6316         * src/mcs51/ralloc.c,
6317         * src/pic/ralloc.c,
6318         * src/pic16/ralloc.c,
6319         * src/xa51/ralloc.c,
6320         * src/z80/ralloc.c: recompute the liveranges after register packing
6321
6322 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6323
6324         * src/SDCCloop.c (newInduction): fixed bug #845630
6325
6326 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6327
6328         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6329         inadvertantly left behind from my 2003-11-12 change
6330
6331 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6332
6333         Updated headers I neglected to commit yesterday.
6334         * src/SDCClrange.h,
6335         * src/SDCCicode.h
6336
6337 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6338
6339         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6340         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6341         * src/SDCCopt.c (eBBlockFromiCode),
6342         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6343         the creation of the key hash table from the sequencing so it can be used
6344         earlier (for some GCSE bug fixes still pending)
6345
6346 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6347
6348         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6349         * support/regression/tests/addsub.c: testing genPlus shortcut
6350
6351 2003-11-15  Borut Razem <borut.razem AT siol.net>
6352
6353         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6354
6355 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6356
6357         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6358         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6359         ordering is immaterial.
6360         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6361
6362 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6363
6364         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6365         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6366         (SIGSEV) of bug #840381
6367         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6368         unlink new file before rename if new and old filenames are the same)
6369
6370 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6371
6372         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6373         uninitialized variables) for the mcs51. Set environment variable
6374         SDCC_GENRAMCLEAR to test.
6375         xdata initialization slightly shorter
6376
6377 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6378
6379         * src/SDCCsymt.h,
6380         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6381         #838241 & 780691 (basicly the same bug)
6382         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6383         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6384
6385 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6386
6387         * src/SDCCmain.c (linkEdit): "fix" #834252
6388
6389 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6390
6391         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6392         * src/SDCCast.h,
6393         * src/SDCC.y: fixed bug #819403
6394
6395 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6396
6397         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6398         the reentrant attribute.
6399         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6400         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6401         simulation
6402         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6403         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6404         erroneously reduced to a literal.
6405         * src/hc08/ralloc.c (packRegisters, rematStr),
6406         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6407         some cases
6408
6409 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6410
6411         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6412         * doc/sdccman.lyx: changed from 'article' to 'book'
6413         * doc/Makefile: readded test_suite_spec and cdbfileformat
6414
6415 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6416
6417         * device/include/stdlib.h: include malloc.h to comply with ANSI
6418         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6419
6420 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6421
6422         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6423         * doc/clean.mk: also remove *.out files
6424         * doc/sdccman.lyx: some additions, larger top/bottom margins
6425
6426 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/SDCC.y: fixed bug #837365
6429         * support/regression/tests/bitopcse.c
6430         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6431         a symbol (might be valop instead)
6432         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6433         * device/lib/clean.mk: added hc08 to the cleaning list
6434
6435 2003-11-04  Borut Razem <borut.razem AT siol.net>
6436
6437         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6438           made 2003-11-04
6439         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6440           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6441           malloc is declared in standard stdlib.h
6442
6443 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6444
6445         * device/lib/hc08/Makefile: need to clean .rel not .o files
6446         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6447
6448 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6449
6450         * src/port.h,
6451         * src/hc08/main.c,
6452         * src/mcs51/main.c,
6453         * src/ds390/main.c,
6454         * src/z80/main.c,
6455         * src/avr/main.c,
6456         * src/pic/main.c,
6457         * src/pic16/main.c,
6458         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6459         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6460         tests (which uses the port's oclsExpense function)
6461         * src/SDCC.y,
6462         * src/SDCCast.c,
6463         * src/SDCCicode.c,
6464         * src/hc08/gen.c,
6465         * src/ds390/gen.c,
6466         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6467
6468 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6469
6470         * src/SDCCcse.c (ifxOptimize),
6471         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6472         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6473         deleting the IFX iCode.
6474         * src/hc08/ralloc.c: reduced unneeded slocs
6475         * src/hc08/gen.c: fixed bug in asmopToBoolean
6476
6477 2003-11-04  Borut Razem <borut.razem AT siol.net>
6478
6479         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6480           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6481           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6482           transferred to configure
6483
6484 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6485
6486         Use headers defined in the C[++] standards:
6487         * sim/ucsim/gui.src/serio.src/fileio.cc
6488         * sim/ucsim/gui.src/serio.src/frontend.cc
6489         * sim/ucsim/gui.src/serio.src/main.cc
6490         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6491         * support/Util/NewAlloc.c
6492         * as/hc08/lklibr.c
6493         * as/mcs51/lklibr.c
6494         * as/z80/aslist.c
6495         * as/z80/assym.c
6496
6497 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6498
6499         * Added MSVC projects for hc08 assembler and linker:
6500         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6501         /as/hc08/link_hc08.dsp
6502
6503 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6504
6505         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6506
6507 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6508
6509         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6510
6511 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6512
6513         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6514
6515 2003-10-31  Borut Razem <borut.razem AT siol.net>
6516
6517         * support/cpp2/cpplib.h,
6518           support/cpp2/cpplib.c,
6519           support/cpp2/cpplex.c,
6520           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6521           to switch _asm block preprocessing on / off. Default is
6522           #pragma preproc_asm +
6523
6524 2003-10-31  Borut Razem <borut.razem AT siol.net>
6525
6526         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6527           when outputting comment blocks (when executed with -C option) and
6528           _asm (SDCPP specific) blocks
6529
6530 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6531
6532         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6533
6534 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6535
6536         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6537
6538 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6539
6540         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6541         * src/SDCCast.c (decorateType): fixed bug #832664
6542
6543 2003-10-31  Borut Razem <borut.razem AT siol.net>
6544
6545         * support\cpp2\cpplex.c: fixed for SDCPP:
6546           comments(when executed with -C option) and _asm blocks
6547           were included even if they where in skipped #if block.
6548           Applied solution from GCC cpp 3.3.2
6549
6550 2003-10-31  Borut Razem <borut.razem AT siol.net>
6551
6552         * src/SDCC.lex: sdcc now understands both formats:
6553           '# <line_number> <file_name>' and
6554           '#line <line_number> <file_name>'
6555         * support/cpp2/cppmain.c: sdcpp now generates the standard
6556           '# <line_number> <file_name>' instead of former
6557           '#line <line_number> <file_name>'
6558
6559 2003-10-30  Borut Razem <borut.razem AT siol.net>
6560
6561         * support/cpp2/cpphash.h,
6562         * support/cpp2/cpplib.h
6563         * support/cpp2/cpplex.c,
6564         * support/cpp2/cppmain.c,
6565         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6566
6567 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6568
6569         Fixed a number of problems revealed by bug #827883.
6570         * src/SDCCloop.c (loopInvariants): Spill location of the
6571         result operand should be recomputed if extracted from
6572         a loop. Also, don't extract assignments of an iTemp
6573         from a literal.
6574         * src/SDCCast.c (isConformingBody): loop reversal should
6575         not occur if the control variable is involved with a
6576         relational operator.
6577
6578 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6579
6580         * .version: bumped to 2.3.6 to reflect the big improvements
6581         made by Erik and Klaus. Thanks!
6582
6583 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6584
6585         Replaced the livrange code.
6586         * src/SDCClrange.c: added new LR code
6587         * src/SDCCloop.c,
6588         * src/SDCCBBlock.h: removed remainig parts from old LR code
6589         * src/ds390/ralloc.c,
6590         * src/ds390/gen.c: minor fixes to make it work with new code
6591
6592 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6593
6594         * as/hc08/asm.h,
6595         * as/hc08/lkrloc.c,
6596         * src/hc08/gen.c,
6597         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6598         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6599         (tweaked fix for bug #818696)
6600
6601 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6602
6603         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6604
6605 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6606
6607         * src/SDCCmain.c,
6608         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6609         * src/mcs51/gen.c (gencjneshort),
6610         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6611         more efficient (per Scott Bronson's suggestion)
6612
6613 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6614
6615         Extended the semantics of the critical keyword to include
6616         individual statements. See RFE #827755 and #799831
6617         * src/SDCC.y
6618         * src/SDCCicode.c
6619         * src/SDCCopt.c
6620         * src/SDCCast.c
6621         * support/Util/SDCCerr.c
6622         * support/Util/SDCCerr.h
6623         * src/mcs51/gen.c
6624         * src/ds390/gen.c
6625         * src/hc08/gen.c
6626
6627 2003-10-19  Borut Razem <borut.razem AT siol.net>
6628
6629         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6630
6631 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6632
6633         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6634         Fixed bug #818696
6635         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6636         and predecrement operand is displayed
6637
6638 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6639
6640         * src/SDCCval.c (valMinus): fixed bug #826041
6641
6642 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6643
6644         Some hc08 related updates that I missed earlier
6645         * sim/ucsim/stypes.h
6646         * support/regression/ports/hc08/spec.mk
6647
6648 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6649
6650         New target "hc08" for the Motorola 68hc08 family of micros
6651
6652         * configure
6653         * configure.in
6654         * Makefile
6655         * src/hc08/*
6656         * src/SDCCmain.c
6657         * src/port.h
6658         * sim/ucsim/hc08.src/*
6659         * sim/ucsim/configure.in
6660         * src/ucsim/configure
6661         * sim/ucsim/packages_in.mk
6662         * as/hc08/*
6663         * as/Makefile
6664         * device/include/mc68hc908qy.h
6665         * device/lib/hc08/*
6666         * device/lib/Makefile.in
6667         * support/regression/ports/hc08/*
6668         * support/regression/Makefile
6669
6670 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6671
6672         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6673         regression test
6674         * src/ds390/gen.c (genCast): fixed bug #821957
6675
6676 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6677
6678         * device/lib/logf.c: "fixed" overlay bug
6679         * support/regression/ports/host/spec.mk: added m library
6680         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6681         * support/regression/tests/float_trans: added (for Eric)
6682
6683 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6684
6685         * src/mcs51/gen.c (genCpl): fixed bug
6686         http://sf.net/mailarchive/message.php?msg_id=6263915
6687
6688 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6689
6690         * src/SDCCast.c (decorateType): added extended constant folding
6691         * src/SDCCsymt.c (computeType): cleanup
6692         * src/SDCCval.c (valShift): minor optimization
6693         * support/regression/tests/ast_constant_folding.c: added
6694
6695 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6696
6697         * src/SDCCmain.c: removed some unintended changes
6698
6699 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6700
6701         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6702         * src/z80/gen.c: fixed part of bug #817589
6703         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6704
6705 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6706
6707         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6708         * src/SDCCcflow.c
6709         * src/SDCCcse.c
6710         * src/SDCCdflow.c
6711         * src/SDCClabel.c
6712         * src/SDCClrange.c
6713         * src/SDCCmem.c
6714         * src/SDCCopt.c
6715         * src/SDCCpeeph.c
6716         * src/SDCCset.c
6717         * src/avr/ralloc.c
6718         * src/ds390/ralloc.c
6719         * src/izt/ralloc.c
6720         * src/mcs51/ralloc.c
6721         * src/pic/ralloc.c
6722         * src/pic16/ralloc.c
6723         * src/xa51/ralloc.c
6724         * src/z80/ralloc.c
6725         * src/z80/gen.c: removed unused label "release:"
6726
6727 2003-10-06  Borut Razem <borut.razem AT siol.net>
6728
6729         * src/SDCC.lex: removed definition of unused variables
6730           save_optimize and save_options
6731
6732 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6733
6734         * clean.mk: removed '=' in "-maxdepth=1"
6735         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6736         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6737
6738 2003-10-06  Borut Razem <borut.razem AT siol.net>
6739
6740         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6741           my_unput() replaced by unput()
6742
6743 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6744
6745         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6746         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6747         type-punned pointer will break strict-aliasing rules"
6748         Old LR behaviour is again default; Klaus' LR can be choosen by
6749         defining the environment variable LRKLAUS
6750         * src/SDCCBBlock.h
6751         * src/SDCCloop.c
6752         * src/SDCClrange.c
6753         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6754         * clean.mk: fixed removal of files in bin/CVS/
6755         * device/lib/clean.mk: fixed removal of directories small and large
6756         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6757         * src/SDCCicode.c,
6758         * src/SDCCval.c: removed superflous test for pedantic
6759
6760 2003-10-05  Borut Razem <borut.razem AT siol.net>
6761
6762         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6763           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6764           message "unmatched #pragma SAVE and #pragma RESTORE"
6765
6766 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6767
6768         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6769           assembly, critical functions, atomic, nojtbound)
6770
6771 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6772
6773         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6774         * src/SDCCBBlock.h
6775         * src/SDCCloop.c
6776         * src/SDCCloop.h
6777         * src/SDCClrange.c
6778
6779 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6780
6781         * src/z80/gen.h,
6782         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6783         * src/mcs51/gen.h
6784         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6785         * src/ds390/gen.h
6786         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6787         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6788         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6789
6790 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6791
6792         * src/z80/gen.c (genRet): fixed bug #524753
6793         * src/z80/gen.c (genCast): fixed internal error on cast from
6794         pointer to long
6795         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6796         fix for bug #477835 to the z80
6797         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6798         for tracking iCodes in the peephole optimizer for z80
6799
6800 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6801
6802         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6803         the other part of bug #814548
6804         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6805
6806 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6807
6808         * src/SDCCcse.c: fixed part of bug #814548
6809
6810 2003-09-28  Borut Razem <borut.razem AT siol.net>
6811
6812         * src/asm.c: rewrite of printILine() to use temporary file instead
6813           a pipe
6814         * src/xa51/main.c: commented out declaration of int rewinds
6815
6816 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6817
6818         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6819
6820 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6821
6822         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6823         * src/asm.c (printILine): Fixed bug #811015
6824
6825 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6826
6827         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6828         freeing.
6829
6830 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6831
6832         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6833         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6834         to correctly handle general case of AOP_PAIRPTR
6835         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6836
6837 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6838
6839         * src/mcs51/ralloc.c (fillGaps),
6840         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6841         register positioning bug)
6842
6843 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6844
6845         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6846
6847 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6848
6849         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6850         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6851         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6852         (ralloc doesn't intentionally do this now, but perhaps later)
6853         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6854         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6855         register positioning bugs (Fixed bug #762602 and #795325)
6856         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6857         (Fixed bug #808779)
6858         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6859         lines that --i-code-in-asm generates
6860
6861 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6862
6863         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6864         trying to fclose a FILE* that was already closed.
6865
6866 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6867
6868         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6869         of const struct should be treated as if const themselves)
6870
6871 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6872
6873         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6874
6875 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6876
6877         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6878         Unix (/n) and DOS (/r/n) line terminations.
6879
6880 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6881
6882         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6883         bug #613775
6884
6885 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6886
6887         * src/mcs51/gen.c (genFunction, genEndFunction),
6888         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6889         and restore of EA so that stack offsets to parameters are
6890         correct when using both critical and reentrant/stack-auto.
6891         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6892         size (can be triggered in error if sloc is shared between
6893         different sized objects)
6894         * device/include/float.h: fixed macros to explicitly use
6895         unsigned long where needed
6896
6897 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6898
6899         Feature req. 799831: added code to allow nesting of critical functions
6900         * src/mcs51/gen.c (genFunction, genEndFunction)
6901         * src/ds390/gen.c (genFunction, genEndFunction)
6902
6903 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6904
6905         * src/SDCCsymt.c (sclsFromPtr),
6906         * src/SDCCsymt.h,
6907         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6908         support for standard C idiom of memory mapped variables; for
6909         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6910         to xdata int at 0x1234 tempvar = 1.
6911         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6912         provided by Akiya ISHIDA
6913
6914 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6915
6916         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6917         * src/SDCCval.c (constVal): added reduction from int to char
6918         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6919         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6920         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6921         to ignore the sign
6922         * support/regression/tests/shifts.c: fixed
6923
6924 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6925
6926         * src/z80/gen.c (genXor): Fixed bug #805445
6927
6928 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6929
6930         Fixed bug #621531 (const & volatile confusion in the type chain).
6931         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6932         refer to the const or volatile state of the pointer itself.
6933
6934         * src/SDCCast.c
6935         * src/SDCCglue.c
6936         * src/SDCCicode.c
6937         * src/SDCCsymt.c
6938         * src/SDCCval.c
6939         * src/SDCC.y
6940         * src/SDCCsymt.h
6941         * src/pic/gen.c
6942         * src/pic/ralloc.c
6943         * src/pic16/gen.c
6944         * src/pic16/ralloc.c
6945         * support/regression/tests/const.c
6946
6947 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6948
6949         When checking for duplicated modules, use absolute paths
6950         instead of relative paths.  Files changed:
6951
6952         * as/mcs51/lklib.c
6953         * link/z80/lklib.c
6954
6955 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6956
6957         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6958
6959 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6960
6961         * device/include/string.h: added size_t typedef, changed
6962         prototypes to use size_t, eliminated separate reentrant and
6963         non-reentrant declarations, added _memmove declaration
6964         * device/lib/_memcpy.c: changed to use size_t instead of int,
6965         changed /4 to >>2 to avoid division library call
6966         * device/lib/_memcmp.c,
6967         * device/lib/_memset.c,
6968         * device/lib/_strncat.c,
6969         * device/lib/_strncpy.c,
6970         * device/lib/_strncmp.c: changed to use size_t instead of int
6971         * device/lib/_memmove.c: new file (fixed bug #772294)
6972         * device/lib/Makefile.in: added _memmove.c
6973         * device/lib/z80/asm_strings.s: fixed bug #772290
6974         * support/regression/tests/bitfields.c: attempt to fix host assertion
6975         failure on amd64-unknown-linux2.2
6976
6977 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6978
6979         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6980         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6981         * as/z80/asmain.c (main): fixed bug #801766
6982
6983 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6984
6985         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6986         compilers
6987
6988 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6989
6990         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6991         reported in bug #800609
6992
6993 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6994
6995         * Top header beautifications in src/pic16 directory:
6996           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6997           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6998           pcoderegs.h, ralloc.c, ralloc.h
6999         * main.c: added top header and GPL license notice
7000         * pcode.c: fixed the if-conditional warning
7001
7002 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7003
7004         * device/lib/_mullong.c: replaced int by short for gcc
7005
7006 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7007
7008         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7009         and JUMPTABLE iCodes properly now (worked by accident before)
7010         * src/mcs51/gen.c (leftRightUseAcc),
7011         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7012         iCode properly now. Use getSize instead of nRegs since a & b
7013         aren't part of the nRegs tally.
7014
7015 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7016
7017         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7018         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7019           before instructions that use the _STATUS register
7020
7021 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7022
7023         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7024         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7025         fetching of the pointer
7026         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7027         copied from genNearPointerSet()
7028         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7029         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7030         If they pop r0/r1 they must be called in the opposite order than aopOp().
7031         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7032         (resp. --stack-auto), prepared for --xstack
7033
7034 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7035
7036         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7037
7038 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7039
7040         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7041         these ports have their own __sdcc_external_start()
7042
7043 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7044
7045         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7046         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7047         type for bits was changed. It resulted in bit variables becoming
7048         global, which is not permitted in PIC 14 assembly output.
7049
7050 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7051
7052         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7053
7054 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7055
7056         Z80 and MCS51 linkers complaint if a public symbol is defined
7057         in more than one library module:
7058
7059         * as/mcs51/lklib.c
7060         * link/z80/lklib.c
7061         * as/mcs51/Makefile.in
7062
7063 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7064
7065         A few small changes that speed up the peephole optimizer.
7066
7067         * src/SDCCpeeph.c
7068
7069 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7070
7071         Try to make the peephole optimizer smarter by maintaining
7072         an association between the assembly source code and the
7073         iCodes that originated them. Put this information to use
7074         with a new peephole rule condition "notVolatile" so that
7075         the rules can be aggressive yet still safe.
7076
7077         * src/SDCCpeeph.c
7078         * src/SDCCpeeph.h
7079         * src/mcs51/gen.c
7080         * src/mcs51/peeph.def
7081
7082 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7083
7084         Fixed bug #741761
7085
7086         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7087         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7088         if the left or right operand symbols have the accuse flag set.
7089
7090 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7091
7092         Changed the type of the result of the ! (NOT) operator to char;
7093         previously it returned the same type as the source. This allows
7094         us to eliminate all the genFloatNot functions (all of its target
7095         implementations were very buggy) since !float can use the same
7096         code as !long now.
7097
7098         * src/SDCCicode.c (ast2iCode): ! returns char
7099         * src/mcs51/gen.c (genNot, genNotFloat),
7100         * src/ds390/gen.c (genNot, genNotFloat),
7101         * src/z80/gen.c (genNot, genNotFloat),
7102         * src/pic/gen.c (genNot, genNotFloat),
7103         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7104
7105 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7106
7107         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7108         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7109            during interrupts. Ensure WSAVE is located at a shared bank address.
7110         2. Fixed page selection in some places
7111         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7112            the registers name strings.
7113         4. Fixed "signed / unsigned compare" compiler warnings.
7114         5. The PIC port manages its own allocation of the general purpose
7115            registers, but makes no attempt to reuse them. As a result when
7116            compiling it soon runs out of general purpose registers. Some
7117            additional code was added to the files pcode.c and device.c to walk
7118            through the function call tree and rename the registers so that they
7119            get reused.
7120
7121         * src/pic/device.c
7122         * src/pic/gen.c
7123         * src/pic/glue.c
7124         * src/pic/pcode.c
7125         * src/pic/pcode.h
7126         * src/pic/ralloc.c
7127         * src/pic/ralloc.h
7128         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7129         genPlus() & genMinus() when the result is the same as left or right
7130
7131 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7132
7133         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7134
7135 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7136
7137         Made bitfield a distinct type from bit so that bitfields
7138         convert as per ANSI C and bits retain their traditional
7139         boolean style behaviour. Implemented bitfield support in
7140         the z80 port.
7141
7142         * src/SDCCsymt.h,
7143         * src/SDCCsymt.c,
7144         * src/SDCCast.c,
7145         * src/cdbFile.c,
7146         * src/mcs51/gen.c,
7147         * src/ds390/gen.c: bit v bitfield split
7148         * src/z80/gen.c: New support for bitfields
7149         * support/regression/tests/bitfields.c: reenabled z80,
7150         added more tests
7151
7152 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7153
7154         Rules 246.x, 247.x relate to bitfields, the others speed up
7155         access to xdata mapped I/O devices.
7156
7157         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7158
7159 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7160
7161         Cleaned up genPackBits and genUnpackBits and added two helper
7162         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7163         for literal assignments in genPackBits (thanks to Frieder for
7164         reminding me).
7165
7166         * src/mcs51/gen.c
7167         * src/ds390/gen.c
7168
7169 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7170
7171         Fixed bug #748310 (pointer to function type mishandled when the
7172         function name is omitted). Also fixed a SIGSEGV when a function
7173         attribute (reentrant, etc) is used on a non-function or on a
7174         function but misplaced before the parameter list.
7175
7176         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7177         bug #748310
7178         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7179         * support/Util/SDCCerr.h,
7180         * support/Util/SDCCerr.c: Added func attr misuse error msg
7181
7182 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7183
7184         Fixed bug #787649 by anonymous
7185         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7186         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7187
7188 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7189
7190         Fixed numerous bitfield problems.
7191
7192         * src/SDCC.y: More bitfield related error checking
7193         * src/SDCCsymt.h,
7194         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7195         * support/Util/SDCCerr.h,
7196         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7197         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7198         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7199         * support/regression/tests/bitfields.c: tests added
7200
7201 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7202
7203         Made the constant following the "interrupt" keyword optional. If
7204         omitted, the function will not automatically be given an entry
7205         in the interrupt vector table (similar to #pragma NOIV, but
7206         less syntacticly kludgy). The interrupt number is also now
7207         range checked. Also fixed a bug in the high order bit example
7208         in the manual.
7209
7210         * src/SDCC.y
7211         * src/SDCCmem.c
7212         * src/SDCCglue.c
7213         * src/SDCCsymt.h
7214         * support/Util/SDCCerr.c
7215         * support/Util/SDCCerr.h
7216         * doc/sdccman.lyx
7217
7218 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7219
7220         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7221         * src/SDCCicode.c (operandOperation): rewritten some ops
7222         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7223         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7224         other type
7225         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7226         be re-activated by defining REDUCE_LITERALS)
7227         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7228         unsigned, but are signed by default
7229         * src/SDCCval.c (constVal): rearranged
7230         * src/SDCCval.c (valMod): preliminary fix
7231         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7232         * support/regression/literalop.c: added, work in progress
7233
7234 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7235
7236         Generate warnings for useless declarations like "char data;"
7237         that don't do what new users expect.
7238
7239         * src/SDCC.y
7240         * support/Util/SDCCerr.h
7241         * support/Util/SDCCerr.c
7242
7243 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7244
7245         * src/SDCCval.c (valMult): fix overflow detection of negative int
7246
7247 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7248
7249         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7250
7251         Changes to support big endian targets:
7252
7253         * src/ports.h
7254         * src/SDCCglue.c
7255         * src/avr/main.c
7256         * src/ds390/main.c
7257         * src/izt/i186.c
7258         * src/mcs51/main.c
7259         * src/pic/main.c
7260         * src/pic16/main.c
7261         * src/xa51/main.c
7262         * src/z80/main.c
7263
7264 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7265
7266         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7267         * device/lib/time.c: fixed warning "integer overflow in expression"
7268
7269 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7270
7271         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7272         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7273         constants are unsigned; added recognition of "u" flag for unsigned
7274         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7275         * src/SDCCval.c (valDiv, valMod): fixed signdness
7276         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7277         signedness of modulo, left and right shift
7278         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7279         * support/Util/SDCCerr.h: added warning W_INT_OVL
7280         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7281         * src/SDCCast.c (ast_print): improved output of constants
7282
7283 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7284
7285         Fixed some warnings when building with MSVC:
7286
7287         * as\mcs51\asdata.c
7288         * as\z80\asdata.c
7289         * as\mcs51\asm.h
7290         * as\z80\asm.h
7291         * link\z80\aslink.h
7292         * link\z80\lkdata.c
7293         * link\z80\lkeval.c
7294         * link\z80\lkgb.c
7295         * link\z80\lkihx.c
7296         * link\z80\lks19.c
7297         * link\z80\lksym.c
7298         * support\cpp2\cpplib.c
7299         * src\ds390\gen.c
7300         * src\mcs51\gen.c
7301
7302 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7303
7304         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7305
7306 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7307
7308         * support\librarian\clean.mk: Do not remove Makefile.
7309         * support\librarian\Makefile: added.
7310
7311 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7312
7313         Added librarian to MSVC build:
7314         * all.dsp
7315         * sdcc.dsw
7316         * support\librarian\librarian.dsp
7317
7318         'configure' not needed for librarian, removed:
7319         * support\librarian\configure
7320         * support\librarian\configure.in
7321         * support\librarian\config_in.h
7322         * support\librarian\Makefile.in
7323
7324         Hopefully these ones built the librarian and the rest of sdcc properly:
7325         * Makefile
7326         * Makefile.common.in
7327
7328         Messed up 'configure', so revert to previous version:
7329         * configure
7330         * configure.in
7331
7332 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7333
7334         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7335         there, while the mantissa of a double is "only" 53 bits wide.
7336
7337 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7338
7339         Adding sdcclib to the build.  MSVC project coming soon.
7340         Files added/changed:
7341
7342         * support\librarian\clean.mk
7343         * support\librarian\configure
7344         * support\librarian\configure.in
7345         * support\librarian\config_in.h
7346         * support\librarian\Makefile.bcc
7347         * support\librarian\Makefile.in
7348         * support\librarian\sdcclib.c
7349         * Makefile.bcc
7350         * Makefile
7351         * Makefile.common.in
7352         * configure
7353         * configure.in
7354
7355 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7356
7357         Linker now complaints if linked modules have conflicting options, for
7358         example, one compiled using --model-large and another one compiled with
7359         --model-small.  The following files were modified:
7360
7361         * as\mcs51\asdata.c
7362         * as\mcs51\aslink.h
7363         * as\mcs51\asm.h
7364         * as\mcs51\asmain.c
7365         * as\mcs51\asout.c
7366         * as\mcs51\i51pst.c
7367         * as\mcs51\lkdata.c
7368         * as\mcs51\lklibr.c
7369         * as\mcs51\lkmain.c
7370         * as\z80\asdata.c
7371         * as\z80\asm.h
7372         * as\z80\asmain.c
7373         * as\z80\asout.c
7374         * as\z80\z80pst.c
7375         * link\z80\aslink.h
7376         * link\z80\lkdata.c
7377         * link\z80\lklibr.c
7378         * link\z80\lkmain.c
7379         * src\SDCCglue.c
7380
7381 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7382
7383         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7384         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7385
7386 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7387
7388         * src/z80/mappings.i: fix _mul[us][int,long] entries
7389
7390 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7391
7392         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7393
7394 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7395
7396         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7397         * support/regression/tests/bitopcse.c: added
7398         fixed warning:
7399         * src/avr/gen.c:
7400         * src/pic/gen.c:
7401         * src/pic16/gen.c:
7402         * src/z80/gen.c:
7403         * src/xa51/gen.c:
7404
7405 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7406
7407         added support for new library format to z80, gbz80 linkers:
7408         *link/z80/aslink.h
7409         *link/z80/lklex.c
7410         *link/z80/lklib.c
7411         *link/z80/lklist.c
7412
7413 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7414
7415         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7416         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7417
7418 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7419
7420         added DUMMY_READ_VOLATILE:
7421         * src/SDCC.y:
7422         * src/avr/gen.c:
7423         * src/xa51/gen.c:
7424         * src/z80/gen.c:
7425         * src/pic/gen.c:
7426         * src/pic16/gen.c:
7427         * src/mcs51/gen.c:
7428         * src/ds390/gen.c:
7429         * src/SDCCcse.c (algebraicOpts): many improvements
7430         * src/SDCCcse.h: removed algebraicOpts()
7431         * src/SDCCicode.c (picDummyRead): added
7432
7433 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7434
7435         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7436         "Insufficient space in data memory".
7437
7438 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7439
7440         * src/mcs51/gen.c: fixed bug #771358
7441         * src/z80/gen.c: fixed bug #759087
7442
7443 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7444
7445         * src/pic16/glue.c: minor cleanup by Vangelis
7446
7447 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7448
7449         * device/include/regc515c.h: fixed #758477
7450         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7451         * device/lib/_gptrput.c: saved a few bytes
7452         * my tab spacing is 8, yours too?)
7453         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7454         * device/lib/serial.c: process RX bytes earlier than TX bytes
7455         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7456
7457 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7458
7459         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7460
7461 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7462
7463     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7464
7465 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7466
7467         * device/lib/Makefile.in: bad fix, reverted to 1.43
7468
7469 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7470
7471         * device/lib/Makefile.in: added missing z80 object files
7472
7473 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7474
7475         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7476         pic16 progress by Vangelis:
7477         * src/SDCCglobl.h:
7478         * src/SDCCmain.c:
7479         * src/pic/Makefile:
7480         * src/pic:
7481         * pic/Makefile:
7482         * pic16/device.c:
7483         * pic16/device.h:
7484         * pic16/gen.c:
7485         * pic16/gen.h:
7486         * pic16/genarith.c:
7487         * pic16/glue.c:
7488         * pic16/main.c:
7489         * pic16/pcode.c:
7490         * pic16/pcode.h:
7491         * pic16/pcodepeep.c:
7492         * pic16/peeph.def:
7493
7494 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7495
7496     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7497
7498 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7499
7500     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7501     added gbz80 build to MSVC project.
7502     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7503     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7504     from 8051 stuff and setup so it links using a .lnk file.
7505
7506 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7507
7508     * support/librarian/sdcclib.c: sdcc librarian.
7509     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7510     with sdcclib.
7511
7512 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7513
7514     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7515
7516 2003-07-02  Borut Razem <borut.razem AT siol.net>
7517
7518         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7519         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7520         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7521         src/xa51/main.c, src/z80/main.c:
7522         virtualization of glue() function: each port has it's own glue function,
7523         which is accessed by do_glue function pointer in PORT.general structure
7524
7525 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7526
7527         * DS800C400 fun, improved ROM interface and tinibios.
7528
7529 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7530
7531         * More support for DS80C400. Now includes beginning of interface to ROM.
7532
7533 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7534
7535         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7536
7537 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7538
7539         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7540
7541 2003-06-19  Borut Razem <borut.razem AT siol.net>
7542
7543         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7544
7545 2003-06-19  Borut Razem <borut.razem AT siol.net>
7546
7547         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7548         fixed Z80 port - crt0.o: cannot open.
7549
7550 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7551
7552         * support/Util/MySystem.c (merge_command): revert bad fix
7553
7554 2003-06-18  Borut Razem <borut.razem AT siol.net>
7555
7556         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7557
7558 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7559
7560         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7561         option --use-stdout sends errors to stdout instead of stderr.
7562
7563 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7564
7565         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7566
7567 2003-06-15  Borut Razem <borut.razem AT siol.net>
7568
7569         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7570         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7571         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7572         fixed width array of pointers replaced with sets;
7573         multiple include and lib paths ared transferred to preprocessor and linker
7574         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7575         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7576         fixed width array of pointers
7577         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7578         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7579         fixupPath(), getPathDifference()
7580         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7581         fixed width array of pointers
7582
7583 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7584
7585         * src/pic16/ralloc.c: fix warnings
7586         * src/pic16/pcode.c: fix warning
7587
7588 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7589
7590          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7591         know all the details, but essentially this set of changes enable
7592         the pic16 port to generate movff instructions and generate assembler
7593         directives,
7594         * src/SDCCmain.c:
7595         * src/pic16/gen.c:
7596         * src/pic16/glue.c:
7597         * src/pic16/pcode.c:
7598         * src/pic16/device.c:
7599         * src/pic16/main.c:
7600         * src/pic16/pcode.h:
7601         * src/pic16/pcoderegs.c:
7602         * src/pic16/ralloc.c:
7603         * src/pic16/ralloc.h:
7604
7605 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7606
7607         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7608         added option --vc, so sdcc errors and warnings are compatible with
7609         Microsoft Visual Studio.
7610
7611 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7612
7613         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7614           device/lib/libfloat.lib: added atof function.
7615
7616 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7617
7618         * doc/sdccman.lyx: updated to Lyx 1.3
7619         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7620         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7621         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7622
7623 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7624
7625         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7626
7627 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7628
7629         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7630           additions to the "related tools/documentation" section
7631
7632 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7633
7634         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7635
7636 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7637
7638         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7639         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7640
7641 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7642
7643         * doc/sdccman.lyx: fix double dash and other minor things
7644         * doc/Makefile: fix double dash
7645
7646 2003-05-28  Karl Bongers(patches from Martin Helmling)
7647         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7648           condition and ignore commands.
7649
7650 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7651
7652         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7653           is in parts still quite out of date, I did changes as far as I felt makes sense
7654           for a non-native english speaker.
7655           Please feel free to add to the manual or to correct my changes.
7656         * doc/Makefile: undid touching the date of intermediate tex files.
7657
7658 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7659
7660         * doc/sdccman.lyx: Manual has an index now
7661
7662 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7663
7664         Finalize muluint/mulsint and mululong/mulslong merging:
7665         * device/lib/_mulint.c
7666         * device/lib/_mullong.c
7667         * device/lib/gbz80/mul.s
7668         * device/lib/gbz80/stubs.s
7669         * device/lib/z80/mul.s
7670         * device/lib/z80/stubs.s
7671         * src/SDCCsymt.c (initCSupport)
7672
7673 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7674
7675         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7676         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7677           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7678           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7679           instead of /Zm500.
7680
7681 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7682
7683         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7684           the regression tests I'm not brave enough to enable 245.b, 245.c
7685         * doc/sdccman.lyx: added latex preamble for hyperref package.
7686           Using pdflatex this will give you a hyperlinked pdf file with
7687           bookmarks. (prepend '%' before /usepackage if this breaks something)
7688
7689 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7690
7691          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7692
7693 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7694
7695         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7696
7697 2003-05-21    <johan AT balder>
7698
7699         * src/SDCCglue.c (printIval): fixed bug #739934
7700
7701 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7702
7703         Applied patch from bug 737905 (renamed yylineo to mylineno):
7704         * src/altlex.c
7705         * src/SDCCast.c
7706         * src/SDCglobl.h
7707         * src/SDCC.lex
7708         * src/SDCCsymt.c
7709         * src/SDCCval.c
7710         * src/pic16/pcode.c: Cleaned warnings
7711         * src/pic16/pcodeflow.c: Cleaned warnings
7712         * src/pic16/pcoderegs.c: Cleaned warnings
7713
7714 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7715
7716         * src/pic16/pcode.c: Cleaned warnings
7717         * src/pic16/pcodepeep.c: Cleaned warnings
7718         * src/pic16/ralloc.c: Cleaned warnings
7719
7720 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7721
7722         * doc/sdccman.lyx: fixed bug 739745
7723         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7724
7725 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7726
7727         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7728         it can be defined with CFLAGS when running configure
7729         * src/SDCCmain.c: fixed compiling + linking with object files
7730
7731 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7732
7733         * configure.in: configure for pic16 port,
7734             added --disable-pic16-port
7735         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7736         * src/SDCCmain.c: linkOptions is changed to set *,
7737             added if/endif conditional macros to remove options help
7738             messages from optionsTable when a port is not configured, added
7739             support for the PIc16 port in the ports table, when executing
7740             the compiler with no port specified on command line, a default
7741             port is selected with the new macro DEFAULT_PORT which is
7742             defined in port.h, in setDefaultOptions() linkOptions is removed
7743             from initialization assignment, since now it is a set,
7744             parseCmdLine uses setParseWithComma for linkOptions, in
7745             linkEdit() linkOptions are accessed with new function indexSet()
7746             which returns the i'th item of a set variable. See SDCCset.c, in
7747             linkEdit() when calling buildCmdLine(), added linkOptions as
7748             last argument. Now users can pass arguments to gplink via the
7749             -Wl option, main() uses pic16glue() to glue up pic16 programs
7750         * src/SDCCpeeph.c: various changes to support pic16
7751         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7752             return the i'th item of the set
7753         * src/SDCCset.h: added function prototype for indexSet()
7754         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7755         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7756         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7757             added macro DEFAULT_PORT
7758         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7759         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7760             generated
7761         * src/pic16/glue.c: commented out some error producing lines
7762         * src/pic16/main.c: __config directives are commented out to stop
7763             gpasm complaining and test the linkage with gplink, _linkCmd and
7764             _asmCmd changed to be more gplink and gpasm friendly
7765         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7766             produced an error when parsed, peep rule 12 is added to utilize
7767             movff, but it is commented out since the pCode does not support
7768             yet a command with 2 address arguments
7769
7770 2003-05-18    <johan AT balder>
7771
7772         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7773         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7774 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7775
7776         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7777   Added feature to script commands from file.
7778
7779 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7780
7781         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7782         * src/SDCCutil.c: include ctype.h for win32
7783
7784 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7785
7786         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7787
7788 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7789
7790         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7791   Fixed so you can set breakpoints prior to run, run does not stop
7792   on entry now.  Add tbreak.  Other enhancements and fixes for use
7793   with ddd.
7794
7795 2003-05-12  Borut Razem <borut.razem AT siol.net>
7796
7797         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7798
7799 2003-05-11  Borut Razem <borut.razem AT siol.net>
7800
7801         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7802         the path of bin directory, so that PATH is the only env. variable, which has to be set
7803         in case of standard installation.
7804         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7805         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7806         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7807
7808 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7809
7810         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7811         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7812         temp files are in the port dir; clean the gen/test directory when
7813         generating new test.c
7814         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7815         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7816         * support/regression/tests/zeropad.c: added
7817
7818 2003-05-09    <johan AT balder>
7819
7820         * src/SDCCglue.c: fixed bug #597940
7821
7822 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7823
7824         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7825   cache sfr, optimize next,step, fix off by one sourceline,
7826   support ddd list function.
7827         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7828
7829 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7830
7831         * support/regression/HTMLgen.py: added compare_s2f()
7832         * support/regression/Makefile: redo 1.27
7833         * support/regression/generate-cases.py: redo 1.5
7834
7835 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7836
7837         * support/regression/tests/float.c: workaround 33 bit hex constant
7838         * support/regression/tests/simplefloat.c: fix division for host
7839
7840 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7841
7842         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7843         that tame's the PIC's over-aggressive optimizer.
7844
7845 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7846
7847          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7848          support for MSVC.
7849
7850 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7851
7852         Initial support for DS80C400. "Hello world" runs on TINIm400
7853         (with polled I/O).
7854
7855 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7856
7857          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7858          * Some notes on ddd usage added in debugger/README
7859          Martin Helmling adding more features and fixes for ddd GUI debugger.
7860          Code added for nexti, stepi, up, down, and other adjustments.
7861
7862 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7863
7864         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7865         * src/pic/peeph.def Added two rules to optimize carry manipulation
7866         * src/pic/* removed debug printfs
7867
7868 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7869
7870         * debugger/mcs51/cmd.c: added header newalloc.h
7871
7872 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7873
7874         * as/Makefile: new EXEEXT
7875         * as/z80/Makefile: remove trailing slash of BUILDIR
7876         * as/z80/clean.mk: new EXEEXT
7877         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7878         * support/cpp2/Makefile.in: new EXEEXT
7879         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7880
7881 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7882
7883         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7884         EXEEXT was introduced to fix all related problems with targets
7885         "clean", "install" and "uninstall"; a couple of further flaws
7886         especially with "clean" have been fixed too
7887         * as/mcs51/Makefile.in
7888         * as/mcs51/clean.mk
7889         * as/z80/Makefile
7890         * Makefile
7891         * clean.mk
7892         * debugger/mcs51/Makefile.in
7893         * debugger/mcs51/clean.mk
7894         * link/z80/Makefile
7895         * link/z80/Makefile.in
7896         * link/z80/clean.mk
7897         * link/Makefile
7898         * packihx/Makefile.in
7899         * packihx/clean.mk
7900         * sim/ucsim/Makefile
7901         * sim/ucsim/clean.mk
7902         * sim/ucsim/avr.src/Makefile.in
7903         * sim/ucsim/avr.src/clean.mk
7904         * sim/ucsim/s51.src/Makefile.in
7905         * sim/ucsim/s51.src/clean.mk
7906         * sim/ucsim/xa.src/Makefile.in
7907         * sim/ucsim/xa.src/clean.mk
7908         * sim/ucsim/z80.src/Makefile.in
7909         * sim/ucsim/z80.src/clean.mk
7910         * sim/ucsim/main_in.mk
7911         * sim/ucsim/packages_in.mk
7912         * sim/ucsim/gui.src/Makefile.in
7913         * sim/ucsim/gui.src/serio.src/Makefile.in
7914         * sim/ucsim/gui.src/serio.src/clean.mk
7915         * src/Makefile.in
7916         * src/clean.mk
7917         * support/cpp2/Makefile.in
7918         * support/cpp2/clean.mk
7919         * support/makebin/Makefile
7920         * support/makebin/clean.mk
7921         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7922         * doc/sdccman.lyx: --program-suffix no longer needed
7923
7924 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7925
7926          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7927          Martin Helmling added support for ddd GUI debugger.
7928          Code added to display assembly, set variables, and other commands
7929          to interface to ddd.
7930
7931 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7932
7933         * as/Makefile: fix target clean
7934         * as/clean.mk: fix target clean
7935         * as/z80/clean.mk: fix target clean
7936
7937 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7938
7939         * Makefile.common.in: added  AT EXEEXT AT
7940         * configure.in: removed all mingw32 stuff
7941         * configure: rebuilt from configure.in
7942         * doc/sdccman.lyx: updated section "installation"
7943         * support/scripts/sdcc_mingw32: adapted to configure
7944         * support/scripts/sdcc_cygwin_mingw32: added
7945
7946 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7947
7948         * src/pic Added object file support for the PIC port
7949         * src/pic Applied patch from Craig Franklin (this started the object file support)
7950         * src/regression Updated the PIC regression tests for object files
7951
7952 2003-04-20  Borut Razem <borut.razem AT siol.net>
7953
7954         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7955           lklex.c: In function `getfid':
7956           lklex.c:203: warning: array subscript has type `char'
7957         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7958           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7959         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7960           stack handling macros
7961
7962 2003-04-19  Borut Razem <borut.razem AT siol.net>
7963
7964         * "handling space characters in file path" task:
7965         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7966         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7967         * support/Util/MySystem.h: make it self-sufficient
7968         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7969           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7970           handling space characters in file path
7971         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7972           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7973         * support/Util/MySystem.c: handling space characters in executable's path
7974
7975 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7976
7977         * as/z80/Makefile: fix permanent rebuild of z80
7978         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7979         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7980
7981 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7982
7983         * src/SDCCopt.c: add special case optimization to replace modulo by
7984           a power of two with a bitwise AND.
7985
7986 2003-04-18    <johan AT balder>
7987
7988         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7989
7990 2003-04-17    <johan AT balder>
7991
7992         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7993         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7994
7995 2003-04-13  Borut Razem <borut.razem AT siol.net>
7996
7997         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7998         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7999           fixed mingw problem in adl_NORMALIZE_PATH
8000
8001 2003-04-12  Borut Razem <borut.razem AT siol.net>
8002
8003         * fixed "#pragma SAVE/RESTORE can not be nested":
8004         * src/SDCC.lex: reworked pragma handling functions
8005         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8006         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8007
8008 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8009
8010         * src/SDCCutil.c (pathEquivalent): defined but not used
8011         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8012         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8013         * configure: rebuilt from configure.in
8014         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8015         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8016         * device/include/Makefile.in: replace sdcc_datadir
8017         * device/lib/Makefile.in: replace sdcc_datadir
8018         * Makefile.common.in: add LDFLAGS from configure
8019         * packihx/Makefile.in: use LDFLAGS
8020         * src/Makefile.in: use LDFLAGS
8021         * support/cpp2/Makefile.in: add LDFLAGS from configure
8022         * support/makebin/Makefile: use LDFLAGS
8023         * .version: bumped version number to 2.3.5
8024
8025 2003-04-12  Borut Razem <borut.razem AT siol.net>
8026
8027         * completed "different paths" task:
8028         * src/SDCCmacro.c: fixed bug in handling quotes
8029         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8030         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8031
8032 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8033
8034         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8035
8036 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8037
8038         * ds390/gen.c ds390/peeph.def: fix bug 706781
8039
8040 2003-04-11  Borut Razem <borut.razem AT siol.net>
8041
8042         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8043
8044 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8045
8046         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8047         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8048          set - this bit used to not be set...).
8049         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8050           bad code in PIC Port
8051         * src/regression/and2.c added to test bug 609268
8052         * src/regression/Makefile added and2.c to regression test
8053
8054
8055 2003-04-08    <johan AT CP255758-A>
8056
8057         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8058         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8059         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8060
8061 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8062
8063         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8064         fix bug #487815
8065         * support/cpp2/Makefile.in: fix bug #487815
8066         * configure: rebuilt from configure.in
8067         * Makefile.common.in: docdir changed, new path suffixes
8068         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8069         * sdcc_vc_in.h: reflect changes from sdccconf.h
8070         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8071         * src/SDCCutil.h: remove BINDIR hack
8072         * doc/sdccman.lyx: update new path hierarchy
8073
8074 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8075
8076         * src/SDCCpeeph.c: added okToRemoveSLOC test
8077
8078 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8079
8080         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8081
8082 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8083
8084         * src/SDCCpeeph.c: added labelIsReturnOnly test
8085         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8086
8087 2003-04-05    <johan AT balder>
8088
8089         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8090         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8091         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8092         * src/SDCCast.c: fixed a warning
8093         * src/SDCCast.h: fixed a warning
8094         * src/SDCCicode.c (operandFromAst): fixed a warning
8095
8096 2003-04-04    <johan AT balder>
8097
8098         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8099         * src/SDCCast.c (decorateType): fixed bug #715076
8100         * src/SDCC.y: fixed bug #702907
8101
8102 2003-04-03    <johan AT balder>
8103
8104         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8105         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8106         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8107         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8108         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8109
8110 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8111
8112         * _decdptr.c: fix return values
8113         * _gptrget.c: fix return values
8114         * _gptrgetc.c: fix return values
8115         * _gptrput.c: fix return values
8116         * _mulint.c: fix return values
8117         * as/z80/Makefile: fix 'make -j' problem
8118
8119 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8120
8121         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8122         * configure.in: big cleanup, updated to autoconf 2.5x
8123         * configure: rebuilt from configure.in
8124         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8125         * sdcc_vc_in.h: reflect changes from sdccconf.h
8126         * doc/Makefile: fixed a flaw in "make install"
8127
8128 2003-04-02    <johan AT balder>
8129
8130         * src/ds390/gen.c (genCmp): no comments
8131         * src/mcs51/gen.c (genCmp): no comments
8132         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8133         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8134
8135 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8136
8137         * support/regression/generate-cases.py: place generated file in given sub directory
8138         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8139         * support/regression/Makefile: improvements for 'make -j';
8140         side effect: it's simpler and faster now
8141
8142 2003-03-31  Borut Razem <borut.razem AT siol.net>
8143
8144         * src/z80/main.c: link-{port} and as-{port} defined without path
8145         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8146
8147 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8148
8149         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8150
8151 2003-03-30  Borut Razem <borut.razem AT siol.net>
8152
8153         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8154           changed type of list parameter to set
8155         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8156         * src/port.h: changed type of do_assemble() parameter to set
8157         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8158           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8159           definition of "cppoutfilename" macro with NULL value in preProcess()
8160         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8161         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8162         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8163           replaced with set *binPathSet
8164         * shash_add() deallocates the item, if allready exsists, before adding the new one
8165         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8166
8167 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8168
8169         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8170           a nested for loop bug in the PIC port
8171         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8172           for loops
8173
8174 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8175
8176         * support/Util/dbuf.h: remove C++ stuff to make it portable
8177
8178 2003-03-28  Borut Razem <borut.razem AT siol.net>
8179
8180         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8181           literal strings in stringLiteral()
8182         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8183         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8184           to the project
8185
8186 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8187
8188         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8189
8190 2003-03-26    <johan AT balder>
8191
8192         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8193         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8194         * src/SDCCast.c (decorateType): fixed " -v < 3"
8195
8196 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8197
8198         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8199         Added Lenny Story's debug infrastructure changes:
8200         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8201         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8202         * src/cdbFile.c: added
8203         * src/SDCCdebug.c: added
8204         * src/SDCCdebug.h: added
8205         * src/SDCCast.c (createFunction)
8206         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8207         * src/SDCCmain.c (parseCmdLine, main)
8208         * src/SDCCmem.c (redoStackOffsets)
8209         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8210         * src/SDCCsymt.h
8211         * src/common.h
8212         * src/avr/gen.c (genAVRCode)
8213         * src/ds390/gen.c (gen390Code)
8214         * src/mcs51/gen.c (gen51Code)
8215         * src/pic/gen.c (genpic14Code)
8216         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8217         * src/xa51/gen.c (genXA51Code)
8218         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8219
8220 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8221
8222         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8223         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8224
8225 2003-03-22    <johan AT balder>
8226
8227         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8228
8229 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8230
8231         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8232         * doc/cdbfileformat.lyx: added, written by Lenny Story
8233         * doc/Makefile: added cdbfileformat.lyx
8234         * doc/clean.mk: added cdbfileformat.lyx
8235
8236 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8237
8238         * src/mcs51/peeph.def: fix bug #705773
8239
8240 2003-03-20    <johan AT balder>
8241
8242         An sfr/sbit can have an "at #" AND an initializer
8243         * src/SDCCsymt.c (checkSClass):
8244         * src/SDCCmem.c (allocGlobal):
8245         * src/SDCCmem.c (allocLocal):
8246         * src/SDCCast.c (createBlock):
8247
8248 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8249
8250         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8251
8252 2003-03-16    <johan AT balder>
8253
8254         Undid the hackup of const and volatile, the problem is much bigger
8255         * src/SDCC.y:1.65
8256         * src/SDCCast.c:1.171
8257         * src/SDCCglue.c:1.138
8258         * src/SDCCicode.c:1.146
8259         * src/SDCCsymt.c:1.150
8260         * src/SDCCval.c:1.65
8261
8262 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8263
8264         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8265         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8266
8267 2003-03-13    <johan AT balder>
8268
8269         Hackup const and volatile modifiers in type chains a bit:
8270         * src/SDCC.y:1.63
8271         * src/SDCCast.c:1.169
8272         * src/SDCCglue.c:1.136
8273         * src/SDCCicode.c:1.143
8274         * src/SDCCsymt.c1.146
8275         * src/SDCCsymt.h1.59
8276         * src/SDCCval.c:1.63
8277
8278 2003-03-12    <johan AT balder>
8279
8280         * src/SDCCBBlock.h: more LRH debugging junk
8281         * src/SDCCcflow.h: more LRH debugging junk
8282         * src/SDCCloop.c: more LRH debugging junk
8283         * src/SDCC.y (struct_declaration): fixed bug #697590
8284         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8285         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8286         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8287
8288 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8289         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8290         test function names must now match exactly).
8291         * src/SDCCcse.c: added special case in findCheaperOp to allow
8292         extending a short integer. Makes less awful code for bug 700121 test case.
8293
8294 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8295
8296         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8297         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8298
8299 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8300
8301         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8302         actually called (operandsNotEqual() was called for all
8303         operandsNotEqualX tests).
8304
8305 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8306
8307         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8308         with shorter literals. Fixes bug 700121.
8309
8310 2003-03-11    <johan AT balder>
8311
8312         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8313
8314 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8315
8316         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8317         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8318
8319 2003-03-10  Borut Razem <borut.razem AT siol.net>
8320
8321         * src/SDCCmain.c: pipe preprocessor's output
8322         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8323         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8324         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8325         which closes all pipes in pipeSet set
8326         * src/SDCCset.c: free deleted item in function deleteSetItem()
8327         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8328         moved from z80 to src subproject
8329         * .version: increased version number to 2.3.4
8330
8331 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8332
8333         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8334         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8335         * support/regression/ports/xa51/spec.mk: fix typo
8336
8337 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8338
8339         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8340
8341 2003-03-09  Borut Razem <borut.razem AT siol.net>
8342
8343         * src/SDCCmain.c: pipe preprocessor's output
8344         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8345         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8346         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8347         which closes all pipes in pipeSet set
8348         * src/SDCCset.c: free deleted item in function deleteSetItem()
8349         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8350         moved from z80 to src subproject
8351
8352 2003-03-09  Borut Razem <borut.razem AT siol.net>
8353
8354         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8355         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8356         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8357         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8358         * src/SDCCglobl.h: unification of WIN32 native definitions
8359
8360 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8361
8362         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8363
8364 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8365
8366         * src/configure.in:   check for endianess (even while cross-compiling)
8367         * src/configure:      check for endianess (even while cross-compiling)
8368         * src/configure_in.h: check for endianess (even while cross-compiling)
8369         * src/avr/gen.c:        remove old endianess stuff
8370         * src/mcs51/gen.c:      remove old endianess stuff
8371         * src/ds390/gen.c:      remove old endianess stuff
8372         * src/pic/gen.c:        remove old endianess stuff
8373         * src/pic/genarith.c:   remove old endianess stuff
8374         * src/pic/glue.c:       fix endianess check
8375         * src/pic16/gen.c:      remove old endianess stuff
8376         * src/pic16/genarith.c: remove old endianess stuff
8377         * src/pic16/glue.c:     fix endianess check
8378         * src/xa51/gen.c:       remove old endianess stuff
8379         * src/z80/gen.c:        fix endianess check
8380         * src/SDCCglue.c:       fix endianess check
8381         * src/ds390/peeph.def: fix bug 700036
8382
8383 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8384
8385         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8386         * src/configure: find appropriate data-types on host for SDCC's int and long
8387         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8388         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8389         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8390
8391 2003-03-07    <johan AT balder>
8392
8393         Just a big NOOP:
8394                 some minor cleanups before the big shot
8395                 OP_DEFS and OP_USES now use Kevin's protection
8396                 new option --nolabelopt
8397
8398         * src/SDCCBBlock.c:
8399         * src/SDCCast.c,:
8400         * src/SDCCcflow.c:
8401         * src/SDCCcse.c:
8402         * src/SDCCicode.c:
8403         * src/SDCCicode.h:
8404         * src/SDCClabel.c:
8405         * src/SDCCloop.c:
8406         * src/SDCCmain.c:
8407         * src/ds390/ralloc.c:
8408         * src/mcs51/ralloc.c:
8409         * src/pic/ralloc.c:
8410         * src/xa51/ralloc.c:
8411         * src/z80/ralloc.c:
8412
8413 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8414
8415         * src/pic/pcode.c (get_op): fix 64 bit warnings
8416         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8417         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8418         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8419         * support/regression/tests/malloc.c: fix 64 bit warnings
8420
8421 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8422
8423         * src/mcs51/gen.c (genMinus): fixed bug 696436
8424
8425 2003-03-02  Borut Razem <borut.razem AT siol.net>
8426
8427         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8428
8429 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8430
8431         * configure.in: test for mkstemp
8432         * sdccconf_in.h: add HAVE_MKSTEMP
8433
8434 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8435
8436         * device/include/ctype.h: removed warning while using --stack-auto
8437         * device/include/malloc.h: removed warning while using --stack-auto
8438         * device/include/string.h: removed warning while using --stack-auto
8439
8440 2003-02-23  Borut Razem <borut.razem AT siol.net>
8441
8442         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8443         because NDEBUG is defined (see man assert)
8444         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8445
8446 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8447
8448         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8449         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8450
8451 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8452
8453         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8454         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8455
8456 2003-02-18    <johan AT balder>
8457
8458         * as/mcs51/asmain.c (asmbl): module can start with a digit
8459         * as/z80/asmain.c (asmbl): module can start with a digit
8460
8461 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8462
8463         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8464         * src/asm.c: fix pipe() for Mingw32
8465
8466 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8467
8468         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8469         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8470         make -V work again; --c1mode reads now from stdin
8471         * doc/sdccman.lyx: added --c1mode
8472         * support/Util/SDCCerr.c: new messages for c1 mode
8473         * support/Util/SDCCerr.h: new messages for c1 mode
8474         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8475
8476 2003-02-15    <johan AT balder>
8477
8478         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8479
8480 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8481
8482         * doc/sdccman.lyx: Environment variables, -o and other minor things
8483
8484 2003-02-14    <johan AT balder>
8485
8486         * src/xa51/main.c: before anyone really tries to use it :)
8487
8488         * Install doc's in share/sdcc/doc
8489         * removed some obsolete files
8490         * Do a proper make distclean and uninstall
8491         M Makefile.common.in
8492         R sdccbuild.sh
8493         M as/Makefile
8494         M device/include/Makefile.in
8495         M device/lib/Makefile.in
8496         M doc/sdccman.lyx
8497         M link/Makefile
8498         M sim/ucsim/doc/Makefile.in
8499         M src/clean.mk
8500         R src/avr/peeph.rul
8501         R src/xa51/peeph.rul
8502         M support/cpp2/Makefile.in
8503         M support/makebin/Makefile
8504
8505
8506 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8507
8508         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8509
8510 2003-02-10  Borut Razem <borut.razem AT siol.net>
8511
8512         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8513         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8514         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8515         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8516         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8517         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8518         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8519         src/z80/Makefile.bcc: Borland Makefile cleanup
8520         * as/z80/Makefile.bcc: Added Borland Makefile
8521         * support/cpp2/borland.h: Removed
8522
8523 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8524
8525         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8526         * src/SDCC.lex: new pragma NOIV
8527         * src/SDCCglobl.h: new pragma NOIV
8528         * src/SDCCmem.c: new pragma NOIV
8529
8530 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8531
8532         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8533
8534 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8535
8536         * src/SDCCmain.c: signal handling is switched off by --debug
8537         * doc/Makefile: small fix for install; use clean.mk again
8538         * doc/clean.mk: clean *.pdf and *.html too
8539
8540 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8541
8542         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8543         * device/lib/printfl.c: fix a ds390 bug by making it portable
8544         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8545         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8546         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8547         * debugger/mcs51/cmd.c: converted multi-line string literals
8548         * sim/ucsim/globals.cc: converted multi-line string literals
8549         * src/SDCCmain.c: introduced signal handler to remove temp files
8550         * doc/Makefile: small tweaks, implement clean
8551         * doc: removed generated files
8552
8553 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8554
8555         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8556         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8557         Address Record is not correctly generated for DS390."
8558
8559 2003-02-02  Borut Razem <borut.razem AT siol.net>
8560
8561         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8562         * as/mcs51/asm.h: fixed compilation with Borland C
8563         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8564         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8565         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8566         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8567         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8568         src/z80/Makefile.bcc: delete $(LIB) only if exist
8569         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8570
8571 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8572
8573         * device/include/malloc.h: introduced NULL
8574         * device/include/string.h: introduced NULL
8575         * device/include/stdlib.h: introduced NULL
8576         * device/lib/_memcpy.c: removed NULL
8577         * device/lib/_strcat.c: removed NULL
8578         * device/lib/_strchr.c: removed NULL
8579         * device/lib/_strcmp.c: removed NULL
8580         * device/lib/_strcpy.c: removed NULL
8581         * device/lib/_strcspn.c: removed NULL
8582         * device/lib/_strlen.c: removed NULL
8583         * device/lib/_strncat.c: removed NULL
8584         * device/lib/_strncmp.c: removed NULL
8585         * device/lib/_strncpy.c: removed NULL
8586         * device/lib/_strpbrk.c: removed NULL
8587         * device/lib/_strrchr.c: removed NULL
8588         * device/lib/_strspn.c: removed NULL
8589         * device/lib/_strstr.c: removed NULL
8590         * device/lib/_strtok.c: removed NULL
8591         * device/lib/malloc.c: removed NULL, include own header
8592
8593 2003-02-02    <johan AT balder>
8594
8595         * 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
8596         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8597         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8598         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8599         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8600         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8601
8602 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8603
8604         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8605         area 'DATA'"
8606
8607 2003-02-01    <johan AT balder>
8608
8609         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8610
8611 2003-01-31    <johan AT CP255758-A>
8612
8613         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8614
8615 2003-01-30    <johan AT balder>
8616
8617         * src/SDCCBBlock.c: automatic bug detection
8618         * src/SDCCicode.c: automatic bug detection
8619
8620 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8621
8622         * src/SDCCglobl.h:   now --xram-size 0 works
8623         * src/SDCCmain.c:    now --xram-size 0 works
8624
8625 2003-01-29    <johan AT balder>
8626
8627         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8628
8629 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8630
8631         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8632         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8633         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8634         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8635         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8636         * src/SDCCmain.c:    Added options --xram-size and --code-size
8637
8638 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8639
8640         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8641         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8642
8643 2003-01-27    <johan AT balder>
8644
8645         * src/SDCC.y: fixed bug #613764
8646
8647 2003-01-26    <johan AT balder>
8648
8649         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8650         * src/SDCCsymt.h: fixed bug #673374
8651         * src/SDCCglue.c: fixed bug #661910
8652         * src/SDCCast.c: fixed bug #458099 and 673374
8653
8654 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8655
8656         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8657         * as/mcs51/strcmpi.h: added
8658         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8659         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8660         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8661         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8662         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8663         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8664         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8665         * as/mcs51/Makefile.aslink: new module strcmpi
8666         * as/mcs51/Makefile.asx8051: new module strcmpi
8667         * as/mcs51/Makefil.bcc: new module strcmpi
8668         * as/mcs51/Makefile.in: new module strcmpi
8669         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8670
8671 2003-01-26    <johan AT balder>
8672
8673         * src/SDCCglue.c: reverted back to 1.124
8674         * src/SDCCast.c: reverted back to 1.156
8675         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8676
8677 2003-01-25    <johan AT balder>
8678
8679         * src/SDCCglue.c: A better fix for bug #661910
8680         * src/SDCCast.c: A better fix for bug #661910
8681         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8682
8683 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8684
8685         * src/Makefile.in: remove spawn.o
8686         * src/SDCCmain.c: remove spawn.h
8687         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8688         * src/spawn.c: removed
8689         * src/spawn.h: removed
8690         * support/regression/ports/ds390/spec.mk: link with -r
8691
8692 2003-01-24    <johan AT CP255758-A>
8693
8694         * src/ds390/gen.c (aopOp): fixed bug #667458
8695         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8696         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8697         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8698
8699 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8700
8701         * src/mcs51/peeph.def: better assembler identation by Frieder
8702         * src/mcs51/gen.c: better assembler identation by Frieder
8703
8704 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8705
8706         * as/z80/string.h: removed for gcc 3.2
8707         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8708         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8709
8710 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8711
8712         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8713         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8714         * support/regression/Makefile: separate temp files for ports
8715         * support/regression/generate-cases.py: separate temp files for ports
8716         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8717         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8718
8719 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8720
8721         * moved tinitalk to device/examples/ds390
8722
8723 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8724
8725         * as/mcs51/lkmem.c: rflag is for DS390
8726         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8727         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8728                          (linkEdit): move mem- and map-files the same way as ihx-files
8729         * src/z80/main.c (_setDefaultOptions): removed --generic
8730         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8731         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8732         * src/pic/glue.c (picglue): --c1mode works again
8733         * src/pic16/glue.c (pic16glue): --c1mode works again
8734         * src/asm.c (printCLine): fix #660034
8735
8736 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8737
8738         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8739         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8740         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8741         * as/mcs51/lkmem (summary): better fix for sp problem
8742         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8743         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8744         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8745                                               remove --stack-after-data
8746
8747 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8748
8749         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8750         * src/SDCCutil.c (join): ugly bug: missing '\0'
8751         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8752
8753 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8756         * src/port.h: typo
8757         * src/pic/main.c (_asmCmd): gpasm supports -o
8758         * src/z80/main.c: more general macros
8759         * device/lib/Makefile.in: remove intermediate files
8760
8761 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8762
8763         * .version: Bumped version number to 2.3.3
8764         * src/SDCCBBlock.c: new option -o
8765         * src/SDCCglobl.h: new option -o
8766         * src/SDCCglue.c: new option -o
8767         * src/SDCCmain.c: new option -o
8768         * src/asm.c: new option -o
8769         * src/ds390/main.c: new option -o
8770         * src/pic/glue.c: new option -o
8771         * src/pic/pcode.c: new option -o
8772         * src/pic/ralloc.c: new option -o
8773         * src/pic16/glue.c: new option -o
8774         * src/pic16/pcode.c: new option -o
8775         * src/pic16/ralloc.c: new option -o
8776         * src/z80/main.c: new option -o
8777         * device/lib/Makefile.in: use -o
8778         * support/regression/ports/ds390/spec.mk: use -o
8779         * support/regression/ports/gbz80/spec.mk: use -o
8780         * support/regression/ports/mcs51/spec.mk: use -o
8781         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8782         * support/regression/ports/z80/spec.mk: use -o
8783         * support/regression/ports/ucz80/spec.mk: use -o
8784         * support/regression/ports/xa51/spec.mk: use -o
8785         * support/regression/fwk/lib/timeout.c: fix usage string
8786
8787 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8788         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8789
8790 2003-01-07    <johan AT balder>
8791
8792         * src/SDCCast.c (decorateType): fixed bug #600035
8793
8794 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8795         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8796         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8797         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8798         * src/pic/pcode.c: outcommented unused variable to remove warnings
8799         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8800
8801 2003-01-06    <karl AT turbobit.com>
8802         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8803    regression tests.
8804
8805 2003-01-06    <johan AT balder>
8806
8807         * src/SDCCicode.c: fixed array add
8808
8809 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8810         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8811         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8812
8813 2003-01-04    <johan AT balder>
8814
8815         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8816
8817 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8818         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8819
8820 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8821         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8822         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8823
8824 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8825         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8826
8827 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8828         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8829
8830 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8831         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8832
8833 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8834
8835     * in \sdcc\as\mcs51\ changed these files in order to create an
8836     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8837     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8838     following files to include the previous two files: aslink.dsp,
8839     Makefile.aslink, Makefile.bcc, and Makefile.in.
8840
8841     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8842     .adb instead of .cdb
8843
8844 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8845
8846         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8847         value from option --iram-size.
8848
8849 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8850
8851         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8852         dram[] array.
8853
8854 2002-09-18    <wiml AT hhhh.org>
8855
8856         * SDCClrange.h: exposed setFromRange() and setToRange()
8857         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8858           packRegsForAccUse() (bug 542397)
8859         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8860           multiple times and emitting the fetch operations more than once
8861           added aopGetUsesAcc() function to allow binary operators to
8862           fetch their operands in the correct order; made genMinus() emit
8863           compact code for X = LITERAL - Y
8864
8865 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8866         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8867         sprintf() in line 1267.
8868
8869 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8870         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8871         like ports.
8872
8873 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8874         Changes to aslink (All the changes are marked with 'JCF'):
8875
8876         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8877         summary().
8878
8879         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8880         area BSEG.  Also moves, if possible, the DATA area down into the internal
8881         ram so more space is available.
8882
8883         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8884         sflag.
8885
8886         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8887         not bytes.  Function summary() which creates a memory usage summary
8888         file with extension .mem.  Reports of overlaping stack and small stack
8889         size.  If the space for the stack is less than 16 bytes aslink trows a
8890         warning.
8891
8892         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8893         the 8051.  Option 'y' for memory summary output file.
8894
8895         Changes to sdcc (All the changes are marked with 'JCF'):
8896
8897         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8898
8899         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8900         overlaying area for it (uses RegBankUsed[4]).
8901
8902         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8903         bank zero as used by default.  By default aslink locates the stack
8904         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8905         the creation of the .mem file.  Delegates the allocation of data area
8906         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8907         the begining of the stack area to aslink.
8908
8909         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8910         glue() in SDCCglue.c creates an area for it.
8911
8912 2002-09-03  Borut Razem <borut.razem AT siol.net>
8913         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8914         sdcc/src/pic/glue.c:
8915         introduced atexit() handler for teporay files removal in case of
8916         errors, assertions, ...
8917
8918 2002-08-29  Borut Razem <borut.razem AT siol.net>
8919         * sdcc/support/cpp2/auto-host_vc_in.h:
8920         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8921         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8922         Maybe there is a similar problem with BORLANDC? It should be checked!
8923
8924         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8925         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8926         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8927         was not executed, and the compiler (cl) launched a warning:
8928         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8929
8930 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8931         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8932
8933 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8934         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8935
8936         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8937           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8938           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8939           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8940           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8941           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8942           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8943         - added Release configuration in VS projects
8944         - review of compiler an linker options
8945         - VC .exe files are generated in bin_vc directory, not to interfere
8946           with binaries generated from other projects (cygwin, mingw, bcc ...)
8947
8948         * sdcc/src/yacc.dsp: added
8949
8950         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8951         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8952         and insert the version number definitions from .version
8953
8954         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8955
8956         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8957         added - genarate auto-host.h using auto-host_vc_in.h as template
8958
8959         * sdcc/sdcc_vc.h,
8960         removed from CVS, generated automatically
8961
8962 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8963         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8964
8965 2002-08-11  Borut Razem <borut.razem AT siol.net>
8966         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8967
8968 2002-08-10  Borut Razem <borut.razem AT siol.net>
8969         * src/SDCCmain.c (main):
8970         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8971         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8972         The consequence was that some temporary files were not removed.
8973
8974         * src/SDCCglue.c:
8975         unification of code in functions tempfilename() and tempfile():
8976         function tempnam() is defined in Visual Studio 6.0 and .NET
8977
8978         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8979
8980         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8981           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8982         - removed compiler command line option /WX: Treats all warnings as errors
8983         - update a list of source files, included into the project
8984
8985         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8986           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8987         changed project type to Generic Project so that can be correcly converted to VS.NET project
8988
8989         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8990
8991         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8992
8993         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8994
8995         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8996         added return 0 statements after assert() to make compiler happy
8997
8998         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8999         added newline in the def file to keep MSC compiler satisfied
9000
9001         * sdcc/src/z80/gen.c:
9002         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9003           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9004         - solved MSC error in function aopDump()
9005
9006         * sdcc_vc.h: define PREFIX as "\\sdcc"
9007
9008 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9009         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9010
9011 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9012         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9013         - Rewrote the register banking algorithm.
9014         - Added pCode live-range analysis to registers (for now, only non-used and
9015         singly-used registers optimized away)
9016
9017         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9018
9019         * 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.
9020
9021 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9022         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9023
9024 2002-04-22  Michael Hope  <michaelh AT vroom>
9025
9026         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9027
9028         * configure.in (DD_COPT): Added include support required for gbdk.
9029
9030         * .version: Bumped version number just to increase it.
9031
9032         * src/SDCCmain.c: Added -nostdinc to the default options.
9033
9034 2002-04-15  Michael Hope  <michaelh AT vroom>
9035
9036         * device/lib/z80/printf.c (sprintf): Added.
9037
9038         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9039
9040         * src/z80/peeph.def: Added transpose redundent load rule.
9041
9042         * src/z80/main.c: Added force callee saves for jaune.
9043
9044         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9045
9046         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9047
9048 2002-03-28  Johan Knol  <johan AT balder>
9049
9050         * src/SDCCval.c: fixed bug #532436
9051
9052 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9053         * /src/port.h:
9054         Added "char *Processor" field to the port structure.
9055
9056         * /src/SDCCmain.c:
9057         Added -p option. Allows port dependent processor to be specified.
9058
9059         * all ports:
9060         Initialized the new field char *Processor field to NULL in all ports
9061
9062         * /src/pic/*:
9063         Compiler generated registers for interrupt context saving
9064         were not getting allocated.
9065
9066 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9067
9068         * /src/SDCCast.c:
9069         Fixed left shift. Will promote the left side of a left shift
9070         if a) left shifting more than size of operand or b) when assigned
9071         to something size > size of left side
9072
9073 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9074         * src/pic/*
9075         tons of changes. Register allocation has been
9076         rewritten. Added customization for the various PICs. Flow
9077         analysis is restructured. ...
9078
9079         * src/pic/device.h:
9080         Added
9081
9082         * src/pic/device.c:
9083         Added. device.c is a PIC port hack to accomodate variations
9084         in PIC devices.
9085
9086 2002-03-13  Michael Hope  <michaelh AT vroom>
9087
9088         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9089
9090 2002-03-04  johanknol  <johanknol AT manik>
9091
9092         * /src/SDCCval.c: fixed
9093
9094         const unsigned char arr[][2] = { { 0, 1 } };
9095         t18.c:1: error: Initializer element is not constant
9096
9097 2002-03-04  bela  <bela AT manik>
9098
9099         * /device/include/mcs51reg.h:
9100         ds89c420 register definition update
9101
9102 2002-03-03    <johan AT FRIJA>
9103
9104         * support/Util/SDCCerr.c: did something, but don't no why anymore
9105
9106         * support/regression/tests/bug-524691.c: made it a little less shy
9107
9108         * src/SDCCast.c (decorateType): fixed bug #524697
9109
9110         * src/SDCCast.c: made some lineno improvements
9111
9112         * src/SDCCval.c (getNelements): changed warning to error
9113
9114         * src/SDCCglue.c (printIvalArray): changed warning to error
9115
9116         * src/SDCCicode.c: fixed a warning for mingw
9117
9118         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9119
9120         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9121
9122 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9123
9124         * src/ds390/peeph.def:
9125         Added some more peephole rules
9126
9127         * src/ds390/gen.c: Various fixes & enhancements
9128
9129         * src/SDCClrange.c, src/SDCClrange.h:
9130         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9131
9132         * src/ds390/ralloc.c:
9133         various fixes & enhancements (ds390) specific
9134
9135         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9136         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9137         from rallocs.
9138
9139         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9140
9141 2002-03-02    <johan AT FRIJA>
9142
9143         * src/SDCCast.c (decorateType): fixed bug #524708
9144
9145         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9146
9147         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9148
9149 2002-03-01  Michael Hope  <michaelh AT vroom>
9150
9151         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9152
9153         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9154
9155 2002-03-01    <johan AT FRIJA>
9156
9157         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9158
9159         * src/SDCCast.c (decorateType): fixed bug #524209
9160
9161         * src/SDCCval.c (valNot): fixed bug #524195
9162
9163 2002-02-26    <johan AT balder>
9164
9165         * src/xa51/gen.c: fixed a warning
9166
9167         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9168
9169         * src/SDCCast.c (decorateType): fixed bug #522534
9170
9171 2002-02-23    <johan AT balder>
9172
9173         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9174
9175 2002-02-22    <johan AT balder>
9176
9177         * src/SDCCast.c: fixed bug #514865
9178
9179         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9180
9181 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9182
9183         * sdcc/src/SDCCloop.c:
9184         Previous fix was not good. basic blocks that have "break" or "return" are
9185         not really partof a loop , but live ranges used in these blocks should
9186         be live thru the entire loop, so set partOfLoop but don't add them to
9187         loop region
9188
9189 2002-02-21    <johan AT FRIJA>
9190
9191         * src/SDCCcse.c: fixed bug #514308
9192
9193 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9194
9195         * src/SDCCloop.c:
9196         Fixed BUG #519583. If a conditional block ended in a return/break
9197         statement inside a loop, it was not being considered part of the loop.
9198
9199         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9200
9201 2002-02-10  Karl Bongers <karl AT turbobit.com>
9202
9203         * debugger/*:
9204         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9205         with lots of comments and notes.
9206
9207         * device/examples/test2.c:
9208         Fix bug, "red" variable not being initialized(compiler complained).
9209
9210         * device/examples/Makefile, examples/test3.c:
9211         Add Makefile in device/examples folder, compiles test3.c
9212         for use as a multiple module SDCDB test case.
9213
9214         * sim/ucsim/cmd.src/cmdset.cc:
9215         Took out debug printfs in ucsim "next" command.
9216
9217         * sim/ucsim/xa.src:
9218         Karl and Johan start ucsim XA support.  Most dissassembly working,
9219         about 75% emulation done(plenty of work remaining).
9220
9221         * sim/ucsim/z80.src:
9222         Add Z80 support to ucsim, add test-ucz80 regression test,
9223         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9224         Notice z80 compiler fails on examples/test3.c/crc code.
9225
9226 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9227
9228         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9229         Added support for --parms-in-bank1
9230
9231         * src/ds390/peeph.def:
9232         added a few more peephole optimzations
9233
9234         * src/ds390/main.c:
9235         1) added __builtin_inp & __builtin_outp used to read in data of given length
9236            from a memory mapped port
9237         2) added __builtin_memcmp
9238         3) added __builtin_swapw swap bytes of a short
9239
9240         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9241         1) handle multiple send & receives from register bank1
9242         2) ralloc can now allocate DPTR1 to some liveRanges
9243
9244         * src/SDCCsymt.c, src/SDCCsymt.h:
9245         changes to handle multiple sends & receives
9246
9247         * src/SDCCptropt.h:
9248         added some pointer arithmetic optimization
9249
9250         * src/SDCCptropt.c:
9251         added some pointer arithmetic optimizations but not stable yet so not
9252         called from anywhere (will get this working shortly)
9253
9254         * src/SDCCopt.c: fixed for multiple sends & receives
9255
9256         * src/SDCCmain.c:
9257         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9258         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9259            set preprocessor defines (depending on options)
9260
9261         * src/SDCCicode.c, src/SDCCicode.h:
9262         changes made to handle multiple sends & receives
9263
9264         * src/SDCCglobl.h:
9265         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9266
9267         * src/SDCCcse.c, src/SDCCcse.h:
9268         added function findbackward def (to be used in upcoming optimization)
9269
9270         * src/SDCCcflow.c, src/SDCCcflow.h:
9271         added function returnAtEnd - to determine if a basic block terminates with
9272         a RETURN iCode
9273
9274         * src/SDCCast.c, src/SDCCast.h:
9275         added option parms-in-bank1
9276
9277         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9278         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9279         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9280         adjusted for --parms-in-bank1 option
9281
9282         * device/include/string.h:
9283         donot redefine "reentrant" keyword
9284
9285         * device/include/ds80c390.h: Added some more SFRs
9286
9287 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9288
9289         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9290
9291 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9292
9293         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9294
9295 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9296
9297         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9298
9299 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9300
9301         * Added --xram-movc option
9302
9303 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9304
9305         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9306
9307 2002-01-11  Johan Knol
9308
9309         * Added math lib of Jesus Calvino-Fraga
9310
9311 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9312
9313         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9314         * support/regression/Makefile: new target test-mcs51-stack-auto
9315         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9316
9317 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9318
9319         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9320
9321 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9322
9323         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9324
9325 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9326
9327         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9328
9329         * src/SDCCglue.h: add definition for printIvalChar()
9330
9331 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9332
9333         * src/SDCCast.c: fix #498138 by Johan
9334
9335         * src/SDCCglue.c: fix #498138 by Johan
9336
9337 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9338
9339         * support/regression/Makefile: fix clean
9340
9341         * support/regression/ports/ds390/support.c: fix transmission of last character
9342
9343 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9344
9345         * /sdcc/src/ds390/gen.c:
9346         a) improved computing address of stack variable
9347         b) took out some #if 0 code
9348         c) improved parmBytes adjustment
9349         d) improved genPlusIncr & genMinusIncr
9350         e) genCmp could generate bad code (when left assigned to DPTR)
9351         f) Fixed bug in hasInc
9352
9353         * /sdcc/src/ds390/ralloc.c:
9354         a) packRegsForSupport could mess up live information (Fixed)
9355         b) packRegsDPTRuse could be incorrect for left & right shift
9356
9357         * /sdcc/src/mcs51/ralloc.c:
9358         packRegsForSupport could mess up the live information (Fixed)
9359
9360         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9361
9362         * /sdcc/src/SDCCast.c:
9363         can reverse a loop even if function call is present as long
9364         as the loop control variable is local & is not passed as parameter
9365
9366 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9367
9368         * /sdcc/ChangeLog: *** empty log message ***
9369
9370         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9371         More builtin function additions for TININative
9372
9373         * /sdcc/src/ds390/ralloc.c:
9374         Had broken the regression testsuite
9375
9376         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9377
9378         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9379         Added funcattr hasStackParms will be set for reentrant functions when there
9380         are paramteres on the stack, this helps in minimizing frame pointer generation
9381         typeFromStr can handle function pointers now
9382
9383         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9384         *** empty log message ***
9385
9386 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9387
9388         * /src/ds390/gen.c, /src/ds390/main.c:
9389         More builtin function additions for TININative
9390
9391         * /src/ds390/ralloc.c:
9392         Had broken the regression testsuite
9393
9394         * /src/SDCCast.c: Fixed a bug in dumptree
9395
9396         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9397         Added funcattr hasStackParms will be set for reentrant functions when there
9398         are paramteres on the stack, this helps in minimizing frame pointer generation
9399         typeFromStr can handle function pointers now
9400
9401         * /doc/builtins.txt, /doc/TININative.txt:
9402         *** empty log message ***
9403
9404
9405 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9406
9407         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9408         ALPHA version for -mTININative
9409
9410         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9411         updated to reflect changes in the port structure
9412
9413         * /src/port.h:
9414         added function do_assemble (similar to do_link) if non-null this function
9415         will be called to do assembly (-mTININative) requires a multi command
9416         assembly
9417         added function genAssemblerEnd will be called to generate assembler Epilogue
9418
9419         * /src/SDCCsymt.c:
9420         added _JavaNative to debug info printing
9421
9422         * /src/SDCCmain.c: added option --tini-libid
9423         added port->do_assemble function (-mTININative) has a multi command assemble
9424
9425         * /src/SDCCglue.c: Disabled "constExpr" check
9426         added port->genAssemblerEnd function
9427
9428         * /src/SDCCglobl.h: Added option --tini-libid value
9429
9430         * /src/SDCCast.h:
9431         tookout optimizeCompare from the header (has no external references)
9432
9433         * /src/SDCCast.c: made one more function "static"
9434
9435 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9436
9437         * src/z80/mappings.i: Added z80asm support.
9438
9439         * src/z80/main.c: Added z80asm support on --asm=z80asm
9440
9441         * src/z80/gen.c: Fixed asm portability issues.
9442
9443         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9444
9445         * src/SDCCglue.c (printExterns): Added global/extern split.
9446
9447 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9448
9449         * support/regression/Makefile: added test for mcs51 model large
9450
9451         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9452
9453         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9454
9455 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9456
9457         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9458
9459 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9460
9461         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9462
9463         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9464
9465 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9466
9467         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9468
9469         * support/regression/tests/simplefloat.c: Port to mcs51.
9470
9471 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9472         * support/regression/tests/bug-485362.c: Added.
9473
9474         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9475
9476         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9477
9478         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9479
9480         * src/z80/gen.c (aopDump): Added a dump function.
9481
9482 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9483         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9484
9485         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9486
9487         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9488
9489         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9490
9491         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9492
9493         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9494
9495         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9496
9497         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9498
9499         * support/regression/ports/ds390/support.c: Use tinibios.
9500
9501         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9502
9503 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9504
9505         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9506         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9507
9508         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9509
9510         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9511
9512 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9513
9514         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9515
9516         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9517         (packRegsForIYUse): Created and optimised.
9518
9519 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9520
9521         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9522 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9523
9524         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9525
9526         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9527
9528         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9529
9530 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9531
9532         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9533
9534         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9535
9536 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9537
9538         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9539
9540         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9541
9542         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9543
9544 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9545
9546         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9547         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9548         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9549
9550         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9551
9552         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9553         (genNotFloat): Added.
9554         (genUminusFloat): Added.
9555
9556         * device/lib/z80/Makefile: Added floating pt stubs.
9557
9558         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9559
9560         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9561
9562         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9563
9564 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9565
9566         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9567
9568         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9569
9570         * sdcc/support/regression/Makefile: Add port ds390.
9571
9572         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9573
9574         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9575
9576         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9577
9578         * sdcc/support/regression/ports/ds390/support.c: Added.
9579
9580         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9581
9582         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9583
9584         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9585
9586 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9587
9588         * device/include/malloc.h: Added z80 and gbz80 support.
9589
9590         * device/lib/gbz80/heap.s: Added.
9591
9592         * device/lib/z80/heap.s: Added.
9593
9594         * device/lib/malloc.c: Added z80 and gbz80 support.
9595
9596         * support/regression/tests/malloc.c (testMalloc): Added.
9597
9598         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9599
9600         * support/regression/tests/bug-478094.c: Added.
9601
9602         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9603
9604 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9605
9606         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9607
9608         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9609
9610         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9611
9612         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9613
9614         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9615
9616 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9617
9618         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9619
9620 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9621
9622         * support/regression/tests/bug-477927.c: Added.
9623
9624         * src/z80/peeph.def: Added minor rules.
9625
9626         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9627
9628         * src/z80/peeph.def: Added jump optimisation modification.
9629
9630 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9631
9632         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9633
9634 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9635
9636         * support/regression/tests/funptrs.c: Added.
9637
9638 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9639
9640         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9641
9642 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9643
9644         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9645
9646         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9647
9648         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9649         (movLeft2ResultLong): Created.
9650
9651         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9652         (joinPushes): Added.  Joins two char pushes into a word push.
9653
9654 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9655
9656         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9657
9658         * support/makebin/Makefile (install): Added creation of dest dir.
9659
9660 2001-10-24 Karl Bongers <karl AT turbobit.com>
9661
9662         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9663
9664 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9665
9666         * src/z80/ralloc.c: Turned off faulty pack for one use.
9667
9668         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9669
9670         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9671
9672 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9673
9674         * support/regression/Makefile: Improved clean
9675
9676         * support/regression/ports/gbz80/spec.mk: Added clean
9677
9678         * support/regression/ports/host/spec.mk: Added clean
9679
9680         * support/regression/ports/z80/spec.mk: Added clean
9681
9682         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9683
9684         * support/regression/ports/mcs51/timeout.c: little improvements
9685
9686 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9687
9688         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9689
9690         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9691
9692         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9693
9694 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9695
9696         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9697
9698         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9699
9700 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9701         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9702
9703         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9704
9705         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9706
9707         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9708
9709         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9710
9711         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9712
9713         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9714
9715         * support/regression/tests/longor.c: Added.
9716
9717 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9718
9719         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9720
9721         * as/mcs51/aslink.h: define PATH_MAX
9722
9723         * as/mcs51/asm.h: define PATH_MAX
9724
9725         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9726
9727         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9728
9729         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9730
9731         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9732
9733         * src/SDCCglobl.h: define PATH_MAX
9734
9735         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9736
9737         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9738
9739 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9740
9741         * src/z80/gen.c (gencjneshort): Fixed
9742
9743         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9744
9745 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9746
9747         * support/regression/tests/bug-469671.c: Added.
9748
9749         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9750
9751 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9752
9753         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9754
9755         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9756
9757 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9758
9759         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9760
9761         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9762
9763         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9764
9765         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9766
9767         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9768
9769         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9770
9771         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9772
9773 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9774
9775         * 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.
9776
9777         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9778
9779         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9780
9781 2001-10-07    <johan AT FRIJA>
9782
9783         * device/lib/gets.c (gets): fixed the return value.
9784
9785 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9786         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9787
9788         * 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.
9789
9790         * 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.
9791
9792         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9793
9794         * src/pic/gen.c: Removed Safe_strdup.
9795
9796         * configure.in: Added option to enable libgc support.
9797
9798         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9799         (bitVectUnion): Optimised.
9800         (bitVectIntersect): Optimised.
9801         (bitVectBitsInCommon): Optimised.
9802         (bitVectCplAnd): Optimised.
9803
9804         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9805
9806 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9807
9808         * src/SDCCmain.c: distinguish between assembler debug and plain options
9809
9810         * src/avr/main.c:   remove standard assembler options
9811
9812         * src/ds390/main.c: remove standard assembler options
9813
9814         * src/mcs51/main.c: remove standard assembler options
9815
9816         * src/port.h: removed "PENDING" comment
9817
9818 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9819
9820         * src/device/lib/_mulint.c  : new, with assember functions
9821
9822         * src/device/lib/_mullong.c : new, with assember functions
9823
9824         * src/device/lib/_divuint.c : with assember functions
9825
9826         * src/device/lib/_divsint.c : with assember functions
9827
9828         * src/device/lib/_divulong.c: with assember functions
9829
9830         * src/device/lib/_divslong.c: with assember functions
9831
9832         * src/device/lib/_moduint.c : with assember functions
9833
9834         * src/device/lib/_modsint.c : with assember functions
9835
9836         * src/device/lib/_modulong.c: with assember functions
9837
9838         * src/device/lib/_modslong.c: with assember functions
9839
9840         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9841
9842         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9843
9844         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9845                                       replaced _mululong.c and _mulslong.c by _mullong.c
9846
9847 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9848
9849         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9850
9851 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9852
9853         * src/SDCCglue.c: test, if win32api is available for MINGW
9854
9855 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9856
9857         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9858         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9859         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9860         * support/regression/ports/host/spec.mk: removed GENERIC
9861         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9862         * support/regression/ports/z80/spec.mk: removed GENERIC
9863
9864 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9865
9866         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9867
9868         * support/regression/tests/bug-467035.c: Created.
9869
9870 2001-10-01    <johan AT FRIJA>
9871
9872         * src/SDCC.y: fixed bug #466586 part 1
9873
9874 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9875
9876         * SDCCicode.c: z80 has no generic pointers
9877         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9878
9879 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9880
9881         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9882
9883 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9884
9885         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9886
9887         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9888
9889 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9890
9891         * configure.in: Fixed up so that ucsim is only configured once.
9892
9893         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9894
9895         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9896         (getPathDifference): As above.
9897
9898         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9899
9900         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9901
9902 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9903         * .version: Updated to 2.3.1
9904
9905         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9906         Added copyright header.
9907
9908         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9909         (assemble): Added support for macro based assembler commands.
9910         (linkEdit): Added support for macro based linker commands.
9911         (preProcess): Changed the pre-processor to use macros.
9912         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9913         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9914
9915         * device/lib/z80/crt0.s: Added module name for debugging.
9916
9917 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9918
9919         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9920
9921         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9922
9923         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9924
9925         * src/Makefile.in: Added SDCCmacro and SDCCutil
9926
9927 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9928
9929         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9930
9931 2001-09-16    <johan AT FRIJA>
9932
9933         * 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.
9934
9935 2001-09-15    <johan AT FRIJA>
9936
9937         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9938         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9939
9940 2001-09-11    <johan AT FRIJA>
9941
9942         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9943
9944 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9945
9946         * support/regression/tests/bug-460444.c: Added test case.
9947
9948         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9949         (genCast): Added justification for all of the asserts.
9950
9951 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9952
9953         * support/regression/support.c: _xdata replaced by xdata
9954
9955         * support/regression/spec.mk: removed _generic
9956
9957 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9958
9959         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9960
9961         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9962         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9963
9964         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9965
9966         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9967
9968         * support/regression/tests/bug-460010.c: Added test case.
9969
9970         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9971
9972 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9973
9974         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9975
9976         * support/regression/testfwk.c: removed workaround for bug #436344
9977
9978         * support/regression/tests/bp.c: use less memory with mcs51
9979
9980         * support/regression/tests/bug-441448.c: use less memory
9981
9982         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9983
9984         * support/regression/collate-results.py: typo
9985
9986 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9987
9988         * support/regression/tests/fetchoverlap.c: Added new test case.
9989
9990         * support/regression/tests/bp.c: Added new test case.
9991
9992         * support/regression/tests/bug-448984.c: Added new test case.
9993
9994         * support/regression/tests/pow2shifts.c: Added new test case.
9995
9996         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9997         (genlshTwo): Fixed right shift for count > 8.
9998
9999         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10000
10001 2001-09-08    <johan AT FRIJA>
10002
10003         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10004
10005 2001-09-07    <johan AT FRIJA>
10006
10007         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10008
10009         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10010
10011 2001-09-06    <johan AT FRIJA>
10012
10013         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10014         * bernhard noted me at this: "() equals to (void)" (1.38)
10015
10016 2001-09-05    <johan AT FRIJA>
10017
10018         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10019
10020 2001-09-04    <johan AT FRIJA>
10021
10022         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10023
10024
10025 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10026
10027         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10028
10029 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10030
10031         * link/z80/aslink.h: Fixed path for PATH_MAX
10032
10033 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10034
10035         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10036
10037         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10038
10039         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10040
10041         * 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.
10042
10043 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10044
10045         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10046         (genCmp): Fixed up genCmp for the GB with longs.
10047
10048         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10049
10050         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10051
10052         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10053
10054         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10055
10056 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10057
10058         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10059
10060 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10061
10062         * 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.
10063
10064         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10065
10066 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10067
10068         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10069
10070         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10071
10072 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10073
10074   * sim/ucsim/configure:    little improvement of Cygwin-detection
10075   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10076   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10077   * support/regression/tests/bug-221100.c: small changes for mcs51
10078   * support/regression/tests/bug-221168.c: small changes for mcs51
10079   * support/regression/tests/bug-227710.c: small changes for mcs51
10080   * support/regression/tests/staticinit.c: small changes for mcs51
10081   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10082   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10083   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10084
10085 $Revision$