* device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
[fw/sdcc] / ChangeLog
1 2005-11-17 Borut Razem <borut.razem AT siol.net>
2
3         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
4           itroduced SILENT option to make building of pic16 libraries less
5           verbose - used for nightly snapshot build
6         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
7           available on Win32 platforms.
8
9 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10
11         * device/lib/printf_large.c: Temporary patch for bug 1358192: 
12           printf("%f"...) sets fraction to zero. 
13
14 2005-11-16 Raphael Neider <rneider AT web.de>
15
16         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
17           fixes #1357221
18         * src/pic/gen.c (genIfx): implemented for CARRY bit
19         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
20           to generic pointers, fixes #1357332,
21           (pic16_movLit2f): NEW,
22           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
23
24 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
25
26         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
27
28 2005-11-11 Raphael Neider <rneider AT web.de>
29
30         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
31         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
32           compute pointer's type from operand,
33           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
34           improved single bit reads, fixes bug #1353379
35
36 2005-11-09 Borut Razem <borut.razem AT siol.net>
37
38         * support/scripts/sdcc.nsi: added lib/pic to the package
39
40 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
41
42         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
43
44 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
45
46         * support/regression/tests/bug1348008.c: added
47         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
48         * support/regression/tests/bug1337835.c: updated comment
49
50 2005-11-06 Borut Razem <borut.razem AT siol.net>
51
52         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
53           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
54           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
55           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
56           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
57           dynamic construction of cl_error_class and derivates - 2.nd try
58
59 2005-11-05 Borut Razem <borut.razem AT siol.net>
60
61         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
62           bug, which caused Bus Errors on sparc solaris
63
64 2005-11-04 Borut Razem <borut.razem AT siol.net>
65
66         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
67           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
68           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
69           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
70           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
71           and derivates to resolve the initialization problem on OSX
72
73 2005-11-02 Borut Razem <borut.razem AT siol.net>
74
75         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
76           corrected typo - #include <winsock2.h>
77
78 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
79
80         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
81           (_asxxxx_mapping): added org directive for future enhancements
82
83 2005-11-01 Borut Razem <borut.razem AT siol.net>
84
85         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
86           enabled sockets on WIN32
87         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
88
89 2005-10-31 Borut Razem <borut.razem AT siol.net>
90
91         * support/regression/generate-cases.py: escape backslashes in {testcase}:
92           WIN32 backslash path delimiters should be escaped when used in C strings
93         * support/regression/tests/bitfields.c: exclude failing assertions for
94           __CYGWIN32__ and __MINGW32__ hosts
95
96 2005-10-30 Borut Razem <borut.razem AT siol.net>
97
98         * src/SDCCutil.c: corrected double comparison typo
99
100 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
101
102         * device/lib/medium/Makefile: added for new memory model medium
103         * device/include/asm/mcs51/features.h: updated for medium/pdata
104         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
105           added Multiply & Accumulate sbit's and MAC0_PAGE define
106         * device/include/mcs51/c8051f300.h: added sfr16 definitions
107         * device/include/mcs51/c8051f310.h: added sfr16 definitions
108         * device/lib/_mullong.c: update for medium model
109         * device/lib/incl.mk: added medium model
110         * doc/sdccman.lyx: documented medium model
111         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
112         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
113         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
114         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
115           (allocParms): set SCLS and OCLS to pdata for medium model
116         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
117           for pdata,
118           (powof2): return <0 if not power of 2
119         * src/avr/gen.c (genBitWise): use updated powof2
120         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
121           (shiftR2Left2Result): small optimization in setup, save acc when storing,
122           (shiftLLeftOrResult): use B if necessary
123         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
124         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
125         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
126         * support/regression/Makefile.in: added test-mcs51-medium
127         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
128
129 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
130
131         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
132         specifier unsigned
133         * device/lib/time.c (mktime): fixed bug 1334315
134
135 2005-10-28 Raphael Neider <rneider AT web.de>
136
137         * device/include/pic/p16f_common.inc: added common declarations
138         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
139
140 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
141
142         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
143           (aopPutUsesAcc): added to predict accumulator use,
144           (assignResultValue): save acc if necessary,
145           (genMinusDec): store result if indirectly addressed,
146           (genDivOneByte):  save acc if necessary,
147           (movLeft2Result): bugfix if left already in acc,
148           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
149             attention to accumulator use (esp. pdata),
150           (genReceive): receive pdata correctly
151         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
152         * src/SDCCicode.h: added isOperandInPagedSpace prototype
153
154 2005-10-27 Raphael Neider <rneider AT web.de>
155
156         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
157
158 2005-10-27 Raphael Neider <rneider AT web.de>
159
160         * .version: changed version to 2.5.4
161         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
162         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
163           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
164             arithmetics support routines
165         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
166         * device/lib/Makefile.in: also create installdir for pic
167
168         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
169           pic14 port as well
170         * src/pic/device.c (dump_sfr): rewritten to delegate register
171           placement to the linker (use `extern sym' rather than sym EQU addr),
172           (validAddress): fixed to check last specified address
173         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
174           (popGetLit): truncate literal value to 8 bit,
175           (popGet): moved assert to more appropriate place
176           (popGetExternal): create pCode operand from and mark the according
177             symbol as being `extern'
178           (popGetAddr): added sanity check on immediate's offset, provide
179             GPOINTER tag on demand
180           (aopPut): fixed for immediates,
181           (mov2w_op): move operand's address or contents to WREG (depending on
182             operand type), safer variant of mov2w,
183           (movwf,call_libraryfunc): NEW, handy abbreviations,
184           (get_argument_pcop,get_return_val_pcop,pass_argument,
185           get_returnvalue): interface for accessing function parameters and
186             return values,
187           (assignResultValuei,genRet): use new parameter/return value interface
188           (pic14_getDataSize): back to old version handling generic pointers,
189           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
190             provided implementation and/or fixed old one,
191           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
192             calls, removed legacy 8051 reference code
193           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
194           (loadSignToC): NEW, move the operands sign bit to CARRY,
195           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
196             genRightShiftSigned, accepts negative shift counts,
197           (setup_fsr): load FSR and adjust IRP (indirect memory access),
198           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
199             generic pointers, __data pointers and __code pointers,
200           (genUnpackBits,genPackBits): rewritten to work with generic pointers
201             and signed bitfields, limit bitfields to 8 bit,
202           (genDataPointerGet): fixed number of bytes read,
203           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
204           (genPointerGet,genPointerSet): fixed handling of __code pointers,
205             pointers to constant data are no longer assumed to point to __code
206             space, removed invalid pointer types,
207           (bitpatternFromVal): retrieve the PICs representation of an integer
208             or float literal,
209           (genDataPointerSet): fixed assigning to po_immediate operands,
210           (genGenPointerSet): implemented as library call,
211           (genIfx): fixed incorrect condition,
212           (genAddrOf): limit generic pointers' addresses to 2 bytes,
213             provide GPOINTER tag according to destination's storage class,
214           (genCast): added code to handle casting to generic pointers, added
215             sign-/zero extension of the result
216           (aop_isLitLike,op_isLitLike): fixed handling of immediates
217         * src/pic/gen.h: added macros to access IRP bit in STATUS register
218         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
219           extend the result
220         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
221           address/register resides in the shared banks
222           (emitSymbolToFile): improved to handle global and `pinned' symbols,
223             put all variables into separate sections (have the linker arrange
224             them)
225           (picglue): put init code and interrupt handlers in separate sections
226         * src/pic/main.c: added port specific options table, modified to PORT
227           structure to make GPOINTERs 3 byte, added pic14_options
228           (_pic14_do_link): private linking routine (update paths to libraries,
229             add libsdcc.lib by default)
230         * src/pic/main.h: declare pic14_options
231         * src/pic/pcode.c: fixed instructions i/o relations,
232           (RegCond): reverted to correct version,
233           (newpCodeOpLit): truncate literals to 8 bit,
234           (genericPrint): added debug output,
235           (getRegFromInstruction): fixed for various operand types, simplified
236           (BuildFlow): fixed broken handling of isntructions with labels
237           (LinkFlow): start at last instruction in flow (skip trailing comments),
238             pass the flow on to the next instruction after CALL
239           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
240           (insertPCodeInstruction): fixed inserting after a skip instruction,
241           (DoBankSelect): fixed for labeled instructions
242           (OptimizepBlock): honor --nopeep switch
243           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
244         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
245         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
246           (pCodeOptime2pCodes): allow disabling this optimization via
247             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
248             but is still buggy), started implementation of a dataflow based
249             pCode optimization (CSE + dead code elimination)
250           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
251         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
252           names are independant of the stack location and therefore portable across
253           devices
254
255 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
256
257         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
258           (selectSpil): fixed bug 1337835 by not spilling bit variables
259         * support/regression/tests/bug1337835.c: added test for this bug
260         * src/mcs51/peeph.def: restart after rule 3.c,
261           addded rules 263.x to optimize loading constants
262
263 2005-10-26 Raphael Neider <rneider AT web.de>
264
265         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
266         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
267           (genAssign): emit warning when casting literals to generic pointer
268             type, also applies when taking the address of a fixed variable,
269           (genCast): improved casting to generic pointers
270         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
271           extern variables, added verbose error message
272         * device/include/pic16/{string.h,errno.h}: added #pragma library c
273
274 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
275
276         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
277         carry must be complemented too
278         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
279         could be emitted by genMinus
280         * src/SDCCval.c (constVal): fixed bug 1305065
281
282 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
283
284         * src/SDCCast.c (addCast): added promotion for bit variables
285         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
286         promotion casts + optimisation
287         (optimizeGetWord): fix warning 'i' might be used uninitialized
288         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
289         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
290
291 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
292
293         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
294         all chars are promoted to int; promotion should be handled in SDCCast.c
295
296 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
297
298         * device/lib/_strcmp.c: Fixed bug 1326457
299
300 2005-10-11 Raphael Neider <rneider AT web.de>
301
302         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
303         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
304
305 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
306
307         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
308         * support/regression/tests/sfr16.c: added test for the sfr32 bug
309
310 2005-10-04 Raphael Neider <rneider AT web.de>
311
312         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
313           device/lib/pic16/pics.all: added pic18f1320
314         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
315
316 2005-09-30 Raphael Neider <rneider AT web.de>
317
318         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
319         * src/pic16/devices.inc: NEW, provides device descriptions
320         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
321
322 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
323
324         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
325           GETHBIT
326
327 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
328
329         * doc/sdccman.lyx: updated Highest Order Bit documentation,
330           documented Any Order Bit, Higher Order Byte and Higher Order Word
331         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
332         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
333           (optimizeGetAbit): new, to get any bit, not only the high bit,
334           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
335           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
336           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
337           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
338             RIGHT_OP: also try GETBYTE, GETWORD optimization,
339             GETABIT, GETBYTE, GETWORD: decorate them,
340           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
341           (ast_print): added GETABIT, GETBYTE, GETWORD
342         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
343         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
344           (geniCodeBinary): new generic binary icode,
345           (ast2iCode): added GETABIT, GETBYTE, GETWORD
346         * src/port.h: updated comment for PORT.hasExtBitOp
347         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
348           (genGetByte): new, to get a single byte,
349           (genGetWord): new, to get a word from a long,
350           (gen51Code): added GETABIT, GETBYTE, GETWORD
351         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
352
353 2005-09-23 Raphael Neider <rneider AT web.de>
354
355         * configure.in, configure: have device/lib/pic configured
356         * device/lib/Makefile.in: added model-pic14
357         * device/lib/clean.mk: added pic/ to clean rule
358         * device/lib/pic: added rudimentary pic14 library providing support
359           functions for multiplication/division/generic pointer access
360         * src/SDCCopt.c (convilong): mark support functions as extern
361           for pic14 port as well
362         * src/pic/gen.c (genMult): added assertions,
363           (genpic14Code): emit warning on unhandled iCodes
364         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
365         * src/pic/pcode.c (pCodeOpCopy),
366         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
367           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
368           SFR_REGISTER}), made safe for future extensions
369         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
370           instructions even if preceeded by SKIP instructions (also remove
371           them); removed unused code
372         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
373           prevents leaving parts of the structure uninitialized after copying
374
375 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
376
377         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
378           ago by me
379         * support/regression/tests/addsub.c: added test for the bug
380
381 2005-09-21 Raphael Neider <rneider AT web.de>
382
383         * device/include/pic16/pic18f1220.h,
384           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
385         * device/lib/pic16/Makefile.rules: added missing opening paren
386         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
387           are provided in genutils.c,
388           (genUminusFloat,genUminus,genCmpEq): added asserts on different
389           operand/result sizes,
390           (genCmp): assert on NULL pointers first, then check deref'ed values
391         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
392           result size
393
394 2005-09-18 Raphael Neider <rneider AT web.de>
395
396         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
397           as these are now unused,
398           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
399         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
400           local, avoids uninitialized pointer dereference on r->name
401         * src/pic16/ralloc.c (newReg): fixed indentation
402
403 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
404
405         * src/SDCCval.c (constVal): fixed bug 730366
406         * support/Util/SDCCerr.c,
407         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
408
409 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
410
411         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
412
413 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
414
415         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
416
417 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
418
419         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
420           (hex2dec): made hex_digit unsigned char, removed ascii dependance
421         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
422           (hex2dec): made hex_digit unsigned char, removed ascii dependance
423         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
424         * packihx/packihx.c (hexDigit): made c unsigned char
425         * as/mcs51/lklibr.c (fndsym),
426         * link/z80/lkgb.c (gb),
427         * link/z80/lklibr.c (fndsym),
428         * link/z80/lkrloc.c (relr),
429         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
430         * src/SDCC.lex (checkCurrFile, process_pragma),
431         * src/SDCCglue.c (spacesToUnderscores),
432         * src/SDCCmain.c (setParseWithComma, processFile),
433         * src/asm.c (tvsprintf, printCLine),
434         * src/avr/gen.c (emitcode, aopPut),
435         * src/ds390/gen.c (emitcode),
436         * src/hc08/gen.c (emitcode, emitinline),
437         * src/mcs51/gen.c (emitcode, genInline),
438         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
439           tokenizeLineNode),
440         * src/pic/ralloc.c (debugLog),
441         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
442           tokenizeLineNode),
443         * src/pic16/ralloc.c (debugLog),
444         * src/z80/main.c (_process_pragma):
445            made all ctype.h function calls safe
446         * src/SDCCopt.c: include math.h for fabs
447         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
448           and used them throughout the code to make ctype.h function calls safe
449         * src/ds390/main.c (asmLineNodeFromLineNode),
450         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
451         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
452            unsigned char*
453         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
454           (newpCodeAsmDir): made ctype.h function calls safe
455         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
456           pic16_emitcode):  made lbp unsigned char*
457         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
458           (pic16_newpCodeAsmDir): made ctype.h function calls safe
459         * src/xa51/gen.c (emitcode),
460         * src/z80/gen.c (_emit2): made lbp unsigned char*
461         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
462            char*
463
464 2005-09-05 Raphael Neider <rneider AT web.de>
465
466         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
467           access bank splitpoint
468
469 2005-09-05 Raphael Neider <rneider AT web.de>
470
471         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
472
473 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
474
475         * .version: changed to version 2.5.3
476         * doc/sdccman.lyx: changed version to 2.5.3,
477           documented --codeseg and --constseg and pragma codeseg and constseg,
478           documented bit parameters (reentrant) and bit returning
479         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
480            currFunc->recvSize, but is this ok for all ports?
481           (ast2iCode): result of ~ on unsigned char must be cast to int for
482            bool to work
483         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
484           function pointers in bit space
485         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
486           (processFuncArgs): call port.reg_parm() with reentrancy info
487         * src/port.h,
488         * src/avr/main.c,
489         * src/ds390/main.c,
490         * src/hc08/main.c,
491         * src/pic/main.c,
492         * src/pic16/main.c,
493         * src/xa51/main.c,
494         * src/z80/main.c: port.reg_parm prototype extended with
495           "bool reentrant" parameter
496         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
497           options.stackAuto for allocating bit register parameters
498         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
499           (genSend): set BitBankUsed if it is,
500           (selectRegBank): factored out of genCall for use in genPcall,
501           (genCall): removed redundant dtype assignmen, use selectRegBank,
502           (genPcall): handle returning in Carry properly, save in F0 if needed,
503           (genReceive): handle bit register parameters
504         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
505           (mcs51_assignRegisters): enable bit registers for all reentrant
506            functions and don't set BitBankUsed unconditionally
507         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
508         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
509         * support/regression/tests/funptrs.c: added tests for BOOL and for return
510
511 2005-08-27 Borut Razem <borut.razem AT siol.net>
512
513         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
514         ppc-osx (Darwin) does not support -u option. It seems that it is
515         supported only on Linux - GNU cp
516
517 2005-08-25 Borut Razem <borut.razem AT siol.net>
518
519         * sim/ucsim/gui.src/serio.src/Makefile.in,
520           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
521           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
522           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
523           install and strip, since the strip at /usr/ccs/bin should be used
524           on solaris
525
526 2005-08-24 Borut Razem <borut.razem AT siol.net>
527
528         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
529
530 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
531
532         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
533         ffffffffu
534
535 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
536
537         * as/mcs51/aslink.h: completed lkrloc.c prototypes
538         * as/mcs51/lkmain.c (link_main): fixed warning
539         * device/include/stdbool.h: ds390 has no advanced bit support yet
540         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
541         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
542         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
543           and updated their macros
544         * src/SDCCval.c (constVal): updated comment for renamed b_long
545
546 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
547
548         * as/mcs51/asdata.c: changed ctype['['] to BINOP
549         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
550           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
551           (oprio): set priority for '['
552         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
553            and adb_24_bit
554         * as/mcs51/asm.h: added defines R_BIT and S_BIT
555         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
556         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
557         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
558           added overlayable BIT_BANK area
559         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
560           (summary2): explain 'T' in legenda
561         * as/mcs51/lkrloc.c: replaced old K&R style,
562           (relr): added R_BIT processing,
563           (errmsg): added "Bit-addressable relocation error",
564           (adb_bit): added for converting from byte- to bit-addressable space,
565           (adb_24_bit): added for converting from byte- to bit-addressable space
566         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
567            used in reentrant functions now even as return value
568         * device/lib/_gptrput.c (_gptrput): removed obsolete code
569         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
570           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
571         * src/SDCCglobl.h: added indicator BitBankUsed
572         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
573            the bit registers b0-b7
574         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
575           (geniCodeCast): fixed bug 1263853,
576           (geniCodeLogicAndOr): put result in bool or char,
577           (geniCodeReceive): added parameter func for accessing the return type,
578           (geniCodeFunctionBody): pass func to geniCodeReceive
579         * src/SDCCmain.c: added indicator BitBankUsed
580         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
581         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
582           (checkSClass): don't put automatic bool/bit on stack,
583           (checkFunction): removed check on function cannot return bit
584         * src/SDCCsymt.h: added newBoolLink prototype
585         * src/mcs51/gen.c (rb1regs): added bit registers,
586           (movc): created for assigning to carry,
587           (pushReg, popReg): created for pushing registers,
588           (sameRegs): check both AOP_REG and AOP_CRY types,
589           (aopOp): handle bit registers,
590           (aopPut): optimization no self-assign,
591           (saveRegisters): push reg->base (bits) only once for bit registers,
592            and use pushReg,
593           (unsaveRegisters): pop reg->base only once and use popReg,
594           (assignResultValue): added parameter func and return in carry for bits,
595           (genIpush): optimization no reload in A if not changed,
596           (genSend): bit parameters in reentrant functions are passed in bit
597            registers by first assigning to bits in B, then save registers and
598            copy B to bits,
599           (genCall): handle returning in Carry properly, save it in F0 if needed,
600           (genPcall): updated assignResultValue call, this is not safe yet for bit
601            returning function !!!
602           (genFunction): don't generate equ's for bit registers and use pushReg,
603           (genEndFunction): take care of bit returning functions and use popReg,
604           (genRet): return bit in Carry,
605           (genIfx): optimize bit registers and other directly addressable bits,
606           (genReceive): updated assignResultValue call
607         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
608           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
609            registers when using stack-auto
610         * src/mcs51/ralloc.c (_G): added allBitregs,
611           (regs8051): added the bit registers,
612           (createStackSpil): use macro IS_BIT,
613           (getRegBit): added to allocate a bit register, else spill,
614           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
615           (updateRegUsage): factored out to ease stepping while debugging,
616           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
617            also allocate bit registers,
618           (fillGaps): handle bit registers,
619           (findAllBitregs): added to create bit vector with all bit registers,
620           (mcs51_allBitregs): returns this bit vector,
621           (mcs51_assignRegisters): when using stack-auto use bit registers for
622            passing parameters and creating local variables
623         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
624
625 2005-08-22 Borut Razem <borut.razem AT siol.net>
626
627         * device/lib/Makefile.in: replaced find option -or with -o
628           to make it run on solaris
629
630 2005-08-22 Raphael Neider <rneider AT web.de>
631
632         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
633           fixes #1265442 (crash on Solaris)
634
635 2005-08-20 Borut Razem <borut.razem AT siol.net>
636
637         * configure, configure.in: added tests for libsocket and libnsl libraries,
638           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
639           from support/regression/Makefile.in
640         * support/regression/Makefile.in: added
641         * device/lib/pic16/Makefile.common.in: force make to use bash shell
642         * sim/ucsim/libtool: regenerated on sparc-solaris
643         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
644           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
645           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
646           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
647           sparc-solaris, which doesn't use GNU ld linker
648         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
649         * as/Makefile: find on sparc-solaris does not support -maxdepth option
650
651 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
652
653         * src/mcs51/peeph.def: updated comments
654
655 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
656
657         * device/lib/_gptrget.c,
658         * device/lib/_gptrput.c: slightly shorter
659         * doc/sdccman.lyx: incremented version
660         * src/mcs51/peeph.def: moved peephole comments to the line of first
661           change to better keep line correlation, reanimated 186.e
662         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
663
664 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
665
666         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
667           David Saxton with quotes around file name.
668
669 2005-08-15 Borut Razem <borut.razem AT siol.net>
670
671         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
672           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
673           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
674           make tests run on x86_64 platform
675
676 2005-08-13 Raphael Neider <rneider AT web.de>
677
678         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
679           as it might be executed DURING a build (parallel make is wonderful)
680
681 2005-08-13 Raphael Neider <rneider AT web.de>
682
683         * device/lib/Makefile.in (port-specific-objects-pic16):
684           revert to cp $(PORT)/bin/*.* $(PORTDIR)
685         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
686           dependency
687         * device/lib/pic16/Makefile.rules: build subdirs before creating
688           the library, removed builddir rule, create $(builddir) early in
689           recurse rule, use empty recurse rule for leaf directories
690         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
691           mkdir errors (race condition), removed duplicate suffix "hex"
692           from clean rules
693         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
694         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
695           prevents mkdir -p from aborting on Alpha
696
697 2005-08-12 Raphael Neider <rneider AT web.de>
698
699         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
700           db-statements in order to allow for arrays of pointers in code
701           sections to be placed without interspersed 0-padding, fixes
702           bug #1256215
703         * (emitStatistics): fixed division by zero for pic18f1220
704         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
705           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
706         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
707         * (pic16_pCodeConstString): keep track of already emitted string
708           literals to prevent "duplicate definitions of symbol _str_NR"
709         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
710           debug message
711         * device/lib/Makefile.in: ignore failing PIC16 library builds
712         * device/lib/pic16/Makefile: do not build if gputils are missing
713         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
714
715 2005-08-10 Raphael Neider <rneider AT web.de>
716
717         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
718           my last commit)
719
720 2005-08-10 Raphael Neider <rneider AT web.de>
721
722         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
723           Rokas' patch to add the new fixed point type "__fixed16x16"
724         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
725           functions for __fixed16x16 arithmetics
726         * device/lib/pic16: reimplemented the build system to support
727           a separate build directory, better handling of libio (create
728           the library in a separate subdir for each architecture) and
729           easier configuration (centralized in Makefile.common)
730
731 2005-08-07 Raphael Neider <rneider AT web.de>
732
733         * src/pic16/gen.c (genrshTwo): fixed sign extension
734         * src/pic16/device.c: added pic18f2320, 4220 and 4320
735         * device/include/pic16/pic18f2220.h: changed some bit definitions,
736           added T0CONbits
737         * device/include/pic16/pic18f4220.h: NEW, header for
738           pic18f4220 and pic18f4320
739         * device/include/pic16/pic18fregs.h: added new devices,
740           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
741         * device/include/pic16/signal.h: resolved name clashes
742           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
743           to also allow testing for interrupt enable bits, added
744           comments on how to use the macros
745         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
746         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
747           register definitions for the devices
748         * device/lib/pic16/pics.all: added new devices
749         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
750           allocated memory
751         * device/lib/pic16/libc/stdlib/memfree: do not count
752           the block header as free memory
753         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
754           simplified and added missing end-of-blocklist-marker
755           (reported by Peter Onion, fixes #1252814)
756         * (_mergeHeapBlock): fixed loop condition
757         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
758           len==0, restructured code
759         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
760           up a bit, reduced bitfield accesses, prevent endless loops
761           in case of heap corruption
762         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
763           "unreferenced arguments/must return a value" warnings
764         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
765           replaced BAUDREG with SPBRG
766         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
767           device/lib/pic16/debug/gstack/gstack.c: replaced
768           _naked, _asm, _endasm with __naked, __asm, __endasm
769
770 2005-08-05 Raphael Neider <rneider AT web.de>
771
772         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
773           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
774
775 2005-08-05 Borut Razem <borut.razem AT siol.net>
776
777         * device/lib/Makefile.in: added missing ';'
778         * configure: removed ^M characters
779
780 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
781
782         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
783           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
784           License
785
786 2005-08-04 Borut Razem <borut.razem AT siol.net>
787
788         * configure.in: pic16 libraries build 2nd try - enable running
789           configure in device/lib/pic16
790         * configure: regenerated from configure.in
791         * device/lib/Makefile.in: create $(PORT)/bin directory
792
793 2005-08-03 Raphael Neider <rneider AT web.de>
794
795         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
796           to get/set values via pointers
797         * (genUnpackBits,genPackBits): changed detection of
798           ptr->bitfield vs. sym.bitfield, fixed access via generic
799           pointers, removed dead (wrong) code for multibyte bitfields
800         * (genNearPointerGet, genGenPointerGet): removed useless code,
801           fixed bitfield detection, fixes #1250594
802         * (genNearPointerSet): removed useless code
803         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
804           and introduced macro pic16_emitpcode that conditionally emits
805           the origin of the following pCode (useful for debugging SDCC)
806         * src/pic16/pcode.c: changed (and disabled) some debug outputs
807         * (createDefmap): fixed handling of LFSR for --optimize-df
808
809 2005-08-02 Borut Razem <borut.razem AT siol.net>
810
811         * device/lib/Makefile.in: pic16 libraries build enabled since
812           gputils-0.13.2 are now localy installed at sourceforge's compile farm
813
814 2005-08-02 Raphael Neider <rneider AT web.de>
815
816         * src/pic16/gen.c (genPackBits): removed deprecated warning
817         * (genGenPointerSet): fixed bitfield detection
818
819 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
820
821         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
822
823 2005-07-31 Raphael Neider <rneider AT web.de>
824
825         * device/lib/pic16/libdev/pic18f458.c,
826           device/include/pic16/pic18f458.h: added missing T0CONbits
827
828 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
829
830         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
831
832 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
833
834         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
835
836 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
837
838         * device/include/mcs51/at89c51ed2.h: added.
839
840 2005-07-23 Raphael Neider <rneider AT web.de>
841
842         * src/pic/gen.h: added emitpcode macro for debugging
843         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
844           and replace by macro adding debug information on demand
845         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
846         * (gencjne): tried to fix; replaced with correct (slower) code
847         * (gen{Unp,P}ackBits): fixed single bit access
848         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
849         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
850           previous instruction
851         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
852           register has to be handled with care (forbidding movement
853           of assignments/uses, removing assignments completely, ...)
854         * (pCodeOptime2pCodes): make use of regIsSpecial
855         * added lots of debugging output (commented out)
856         * src/pic/rallloc.c (deassignLRs): prevent operand registers
857           from being reused as result UNLESS it is known to work
858
859 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
860
861         * support/Util/dbuf.h: include <stddef.h> for size_t
862         * .version: changed to version 2.5.2
863
864 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
865
866         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
867
868 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
869
870         * src/hc08/gen.c (genMinus): fixed bug #1241835,
871           (genModOneByte): removed needless psha/pula
872
873 2005-07-22 Raphael Neider <rneider AT web.de>
874
875         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
876           have PIC14 handled like PIC16, fixes broken pic14 linker calls
877         * src/pic/gen.c (resolveIfx): do not "invent" labels
878         * (genSkipc): changed to positive logic
879         * (genSkipCond): removed as no longer needed
880         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
881           backport from PIC16
882         * (genLeftShift): check operands are in different registers
883         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
884           INCF does not update CARRY...
885         * src/pic/main.c: fixed _linkCmd
886         * src/pic/pcode.c (unlinkpCode): added inactive code
887         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
888           alive (do not assign result and operand overlapping registers)
889
890 2005-07-22 Raphael Neider <rneider AT web.de>
891
892         * src/pic/device.c (dump_sfr): replaced register declaration with
893           call to emitSymbolToFile() to avoid duplicate symbols
894         * (assignRelocatableRegisters): do not declare external symbols
895         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
896           right (take size of type, not etype)
897         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
898         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
899         * (packRegsForAccUse): disabled assignment of WREG as
900           the result reg to prevent occurence of just fixed #1235003,
901           fixes #1242954
902         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
903           symbols (avoids duplicate symbols in .asm file)
904         * (pic14emitRegularMap): use emitSymbolToFile()
905         * src/pic/gen.c (aopOp): fixed spillLocation handling
906         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
907         * (genDataPointerSet): removed unneccessary variables/output
908
909 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
910
911         * as/mcs51/lkarea.c: enlarged codemap for banked memory
912         * device/lib/mcs51/crtbank.asm: added # to 0x0F
913
914 2005-07-21 Raphael Neider <rneider AT web.de>
915
916         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
917           architecture cannot handle them efficiently, fixes bug #1235003
918         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
919           check for empty sets before using them (fixes bug #1232190)
920
921 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
922
923         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
924           (lnksect2): generate warnings for memory overlap
925         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
926           constseg to set the name of these segments so you can instruct the linker
927           to place them in banks
928         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
929         * src/SDCCglobl.h: added MODEL_HUGE to enum,
930           added code_seg and const_seg to options
931         * src/SDCCglue.c (emitMaps): use options.const_seg,
932           (createInterruptVect): put interrupt vectors in segment HOME,
933           (glue): put HOME before static segment and put the main glue in HOME,
934           (glue): use options.code_seg
935         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
936         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
937           these segments so you can instruct the linker to place them in banks
938           (linkEdit): use code_loc for HOME segment which should be the first
939           segment in code memory now
940         * src/SDCCmem.c: fixed more stuff like bug 1238386
941         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
942           (changePointer): don't change function pointers to code pointers for
943           banked functions,
944           (compareType): added exceptional check for banked function pointers
945         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
946         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
947           after static in code memory
948         * src/mcs51/gen.c: added aopLiteralLong prototype,
949           (aopForSym): use getSize for functions,
950           (genCall): generate banked calls over one trampoline __sdcc_banked_call
951           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
952           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
953           the segment,
954           (genPcall): use call for literal function pointers and generate banked
955           calls over the one trampoline so there's only one place for the user to
956           modify according to his/hers hardware,
957           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
958           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
959         * src/mcs51/main.c: added keyword banked,
960           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
961         * support/Util/SDCCerr.c,
962         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
963           needed for passing the bank and address to the trampoline
964         * device/lib/mcs51/crtbank.asm: added for bankswitching
965         * device/lib/mcs51/Makefile: added crtbank
966
967 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
968
969         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
970           for fields at offset 0 of a struct or union as reported
971           on 2005-07-07 in the developer mailing list.
972
973 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
974
975         * src/SDCCmem.c: fixed bug 1238386
976
977 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
978
979         * src/mcs51/peeph.def: added labelrefcounting for peepholes
980           (patch #1144962), added peephole 300, enabled 259.x
981         * doc/sdccman.lyx: removed screenshot and provided link instead
982
983 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
984
985         * doc/sdccman.lyx: added section about debugging with ddd
986         * doc/figures/ddd_example.eps: screenshot of debugging session
987
988 2005-07-04 Raphael Neider <rneider AT web.de>
989
990         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
991           like CODE pointers, fixes #1115683
992         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
993           call, fixes bugs #1232211, #1228110,
994           fixed wrong casts to pCodeFlow from pCodeInstructions
995
996 2005-07-04 Raphael Neider <rneider AT web.de>
997
998         * src/pic/gen.c (popGet): changed assert to allow for
999           bit operands
1000         * (popGetAddr): changed signature to provide
1001           an additional index, patched all call sites
1002         * (genCmpEq): handle literal-like operands correctly
1003         * (genAddrOf): added sanity checks on __code/__data pointers
1004         * (genAssign): added handling of symbols from __code section
1005         * (gencjne): do not generate code for comparisons whose result
1006           is neither stored nor used, fixes bug #1171114
1007         * (AccLsh, AccRsh): operate on operand instead of WREG
1008         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1009           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1010           by known count
1011         * rewrote complete shift-by-literal logic, commented unused
1012           functions out
1013         * (genConstPointerGet): get multiple bytes (if result size > 1),
1014           fixed handling of non-immediate addresses
1015         * (genPointerGet): handle CODE pointers like CONST pointers
1016         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1017         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1018           operand is to be treated as a literal or not
1019         * (mov2w,genPcall,genCmpEq),
1020           src/pic/genarith.c: use aop_isLitLike() to decide between
1021           literal/register contents
1022         * (addSign): added missing offset
1023         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1024           only emit comment in debug-mode,
1025           use {aop,op}_isLitLike throughout the file
1026         * src/pic/glue.c: fix initializers for pointers (work in progress)
1027         * src/pic/pcode.c (get_op): honor index on _const symbols
1028         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1029         * (dumppBlock): added pCode size estimation
1030         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1031           check for IS_SYMOP before OP_SYMBOL'ing
1032         * fixed indentation, compacted switch-statements
1033         * (allocReg): find free register and allocate it instead of
1034           allocating new registers all the time
1035         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1036           registers as its operands (necessary only for multibyte GETs)
1037
1038 2005-07-01 Raphael Neider <rneider AT web.de>
1039
1040         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1041           debugging .asm-output macros FENTRY + FEXIT
1042         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1043           way... I wonder...
1044         * (emitpComment): NEW, printf to pCode
1045         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1046           offset handling
1047         * (popGetAddr): NEW, variant of popGet to access an immediates
1048           high(er) bytes instead of the n'th byte of memory they reference,
1049           replaced popGet with popGetAddr where neccessary
1050         * (genDataPointerGet): reactivated and fixed implementation
1051         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1052           accesses
1053         * (genDataPointerSet): fixed multibyte assignments
1054         * (genpic14Code): fixed --i-code-in-asm handling
1055         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1056         * (genPlus): fixed index-out-of-bounds error
1057         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1058         * src/pic/ralloc.c: added debugging output macro FENTRY2
1059         * (spillThis): fixed indentation, enbraced for-body for clarity
1060         * (rematStr): commented out as now unused
1061         * (regTypeNum): commented out special spill case (overwrites
1062           arbitrary values)
1063         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1064
1065 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1066
1067         * doc/sdccman.lyx: documented sfr16/sfr32,
1068           added example for using storage class with function pointers
1069         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1070
1071 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1072
1073         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1074         * device/lib/_itoa.c,
1075         * device/lib/_ltoa.c: optimized codesize
1076         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1077           but don't know how to suppress the double warning.
1078         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1079         * support/Util/SDCCerr.c,
1080         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1081
1082 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1083
1084         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1085           fixed old K&R prototypes
1086         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1087         * device/lib/_gptrget.c,
1088         * device/lib/_gptrgetc.c,
1089         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1090           also new versions for small generic pointers and banked generic pointers
1091         * src/port.h: added const_name
1092         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1093         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1094         * src/SDCCcse.c (findPrevIc): check all associative operators
1095         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1096         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1097         * src/SDCCmem.c: updated comments,
1098           set far-space to 0 for pdata, results in optimized code
1099         * src/SDCCmem.h: added macro CONST_NAME
1100         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1101           moving the info into the highest bits, see also gptrget/gptrput
1102         * src/src.dsp: added sdcc.ico to project files
1103         * src/avr/gen.c (genCast): fixed bug 0x%d
1104         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1105         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1106           relation between ptr_type and DCL_TYPE,
1107           (genCast): fixed bug 0x%d
1108         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1109           (CODE)" for const_name
1110         * src/hc08/gen.c (genCast): fixed bug 0x%d
1111         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1112           (hc08_port): added "CONST (CODE)" for const_name
1113         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1114           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1115           between ptr_type and DCL_TYPE,
1116           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1117           operand* and took AOP() inside function so sfr-ness can be checked,
1118           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1119           new prototype,
1120           (genFunction, genEndFunction): optimized stack setup,
1121           (genMinus): optimized for literals with ending zeroes (in bytes),
1122           (genCast): fixed bug 0x%d
1123         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1124           (mcs51_port): added "CONST (CODE)" for const_name
1125         * src/mcs51/peeph.def: made rule 226 more generic
1126         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1127         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1128         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1129         * src/z80/main.c (z80_port): added NULL for const_name,
1130           (gbz80_port): added NULL for const_name
1131         * support/regression/tests/bug663539.c,
1132         * support/regression/tests/sfr16.c: new tests
1133
1134 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1135
1136         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1137
1138 2005-06-24 Raphael Neider <rneider AT web.de>
1139
1140         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1141           corrected typos...
1142         * device/include/pic16/signal.h: added USBIF
1143           and SIG_USB
1144
1145 2005-06-24 Raphael Neider <rneider AT web.de>
1146
1147         * device/lib/pic16/libdev/pic18f2455.c,
1148           device/include/pic16/pic18f2455.h: NEW
1149         * device/include/pic16/pic18fregs.h,
1150           device/lib/pic16/pics.all,
1151           src/pic16/device.c: added 18f2455
1152         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1153           device/include/pic16/{pic18f[68][567].h,usart.h}:
1154           replaced MULTIPLE_USARTS define with more relaible
1155           compatibility sfrs (for USART access)
1156
1157 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1158
1159         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1160           and the output asm file line is printed on two lines.
1161
1162 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1163
1164         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1165           BGT, BLE, BHI, and BLS instructions
1166         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1167           genCmpEq): removed
1168         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1169           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1170           fixes bug #1216342
1171         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1172
1173 2005-06-15 Raphael Neider <rneider AT web.de>
1174
1175         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1176         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1177         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1178           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1179           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1180
1181 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1182
1183         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1184           Marcel Telka in bug #1215704
1185
1186 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1187
1188         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1189           located in shared memory bank.
1190
1191 2005-05-31 Raphael Neider <rneider AT web.de>
1192
1193         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1194           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1195           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1196
1197 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1198
1199         * device/lib/_strncpy.c: fixed the fix
1200
1201 2005-05-26 Raphael Neider <rneider AT web.de>
1202
1203         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1204           initializers with \0, bug #1208187
1205         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1206           intializers with \0, bug #1208187
1207
1208 2005-05-26 Raphael Neider <rneider AT web.de>
1209
1210         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1211           initializers with \0, bug #1208187
1212         * src/pic16/main.c (_process_pragma): added sanity checks
1213           for stack position and size, emit warnings when appropriate
1214
1215 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1216
1217         * device/lib/_strncpy.c: fixed not filling with \0
1218
1219 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1220
1221         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1222           createFunction),
1223         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1224           compound_statement),
1225         * src/SDCCsymt.h,
1226         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1227
1228 2005-05-24 Raphael Neider <rneider AT web.de>
1229
1230         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1231
1232 2005-05-24 Raphael Neider <rneider AT web.de>
1233
1234         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1235           TRISE definitions, closes bug #1162453
1236
1237 2005-05-22 Raphael Neider <rneider AT web.de>
1238
1239         * src/pic16/main.c (_process_pragma): check for missing
1240           arguments to pragmas code and udata
1241         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1242           consistency fixes to match other headers (thanks to Jim Paris)
1243         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1244
1245 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1246
1247         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1248
1249 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1250
1251         * support/regression/tests/bug1198642.c: new test
1252         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1253         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1254         * support/scripts/resource.h,
1255         * support/scripts/resource.rc,
1256         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1257         * support/scripts/sdcc.ico: added 32x32 icon
1258
1259 2005-05-18 Raphael Neider <rneider AT web.de>
1260
1261         * device/lib/pic16/libdev/pic18f*.c,
1262         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1263           keywords to "__sfr" and "__at (X)"
1264         * device/include/pic16/pic18fregs.h: added pic18f4520
1265         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1266           #1203088 (MPLAB compatibility)
1267
1268 2005-05-17 Raphael Neider <rneider AT web.de>
1269
1270         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1271         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1272         * device/lib/pic16/pics.all: added new devices
1273         * src/pic16/device.c: added support for pic18f4520
1274
1275 2005-05-16 Raphael Neider <rneider AT web.de>
1276         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1277         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1278         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1279           convenience function for bit access
1280
1281 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1282
1283         * device/lib/printf_large.c: fixed bug 1193299
1284         * support/regression/tests/bug1057979.c: added test %3.3s
1285
1286 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1287
1288         * device/include/mcs51/8051.h,
1289         * device/include/mcs51/8052.h: made parseable with lint
1290         * device/include/mcs51/lint.h: added include file for (sp)lint
1291         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1292         * doc/cdbfileformat.lyx,
1293         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1294
1295 2005-05-14 Raphael Neider <rneider AT web.de>
1296
1297         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1298         * device/lib/pic16/libc/stdlib/itoa.c (new)
1299         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1300         * device/lib/pic16/libio/Makefile: exclude subdir according to
1301           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1302         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1303         * src/pic16/gen.c (genFunction): prevent annoying warning
1304         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1305           nameclashes on BeOS
1306         * support/cpp2/cppmain.c (cpp_output_string): new
1307         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1308           fixes bug 1116802
1309
1310 2005-05-13 Borut Razem <borut.razem AT siol.net>
1311
1312         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1313
1314 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1315
1316         * .version: changed to version 2.5.1; back to bleeding edge development
1317
1318 2005-05-11 Borut Razem <borut.razem AT siol.net>
1319
1320         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1321           generate PDF version 1.3 documents
1322
1323 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1324
1325         * .version: changed to version 2.5.0
1326
1327 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1328
1329         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1330
1331 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1332
1333         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1334         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1335         well as many smaller updates.
1336         * .version: changed to version 2.5.0-pre1
1337
1338 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1339
1340         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1341
1342 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1343
1344         * support/regression/tests/bug1185672.c: added
1345         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1346           bug 1185672
1347         * src/mcs51/gen.c (genCall): added comments, made it look safer
1348         * src/mcs51/gen.c (genEndFunction): simplified
1349
1350 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1351
1352         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1353
1354 2005-04-14 Borut Razem <borut.razem AT siol.net>
1355
1356         * fixed bug 1045046 - SIGSEGV with really simple code?:
1357           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1358           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1359
1360 2005-04-14 Borut Razem <borut.razem AT siol.net>
1361
1362         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1363           src/pic16/device.h: temporarily disabled experimental #inline pragma
1364           for 2.5.0 release
1365
1366 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1367
1368         * device/include/z80/stdio.h,
1369         * device/include/z80/string.h: removed these highly incomplete files so
1370           SDCC can use the default ones in device/include/
1371
1372 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1373
1374         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1375         gcc warning.
1376         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1377         fix sdcpp warnings.
1378
1379 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1380
1381         * device/include/malloc.h: removed redundant __reentrant prototypes
1382         * device/lib/_mullong.c: added working xstack variant in asm (C version
1383           doesn't pass regression tests)
1384         * device/lib/bpx.c: used __data and made bpx char for mcs51
1385         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1386           (createFunction): fixed bug with xstackPtr
1387         * src/SDCCcse.c: corrected comments
1388         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1389           (killDeadCode, eBBlockFromiCode): removed unused code
1390         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1391           corrected comments
1392         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1393           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1394           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1395           (genModOneByte): fixed warning in MSVC
1396         * src/mcs51/main.c (): added comments
1397         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1398
1399 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1400
1401         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1402
1403 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1404
1405         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1406
1407 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1408
1409         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1410         characters arrays of larger size than the declared one.
1411
1412 2005-04-10 Borut Razem <borut.razem AT siol.net>
1413
1414         * src/pic/gen.c (genInline),
1415           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1416           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1417           (findNextInstruction), (findPrevInstruction),
1418           (findInstructionUsingLabel),
1419           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1420         * src/pic/pcode.c (findLabel): added missing '\n'
1421         * src/src.dsp: added SDCCdwarf2.c to the project
1422
1423 2005-04-09 Borut Razem <borut.razem AT siol.net>
1424
1425         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1426
1427 2005-04-08 Raphael Neider <rneider AT web.de>
1428
1429         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1430           into the chain after a given one) and mergeDefmapSymbols (combine
1431           defmap entries for each symbol per pcode)
1432         * (createDefmap): have defmap entries merged in the end
1433         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1434           a symbol before replacing one access type's symbol, merge symbols in
1435           the end (replacement symbol might already have an entry)
1436         * (assignValnums): keep reference to written WREG intact
1437
1438 2005-04-08 Raphael Neider <rneider AT web.de>
1439
1440         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1441           Alpha)
1442
1443 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1444
1445         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1446         bytes
1447
1448 2005-04-07 Raphael Neider <rneider AT web.de>
1449
1450         * device/include/pic16/usart.h: added compatibility defines for
1451           devices with more than one USART
1452         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1453
1454 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1455
1456         * device/lib/Makefile.in: updated for port specific include
1457
1458 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1459
1460         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1461
1462 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1463
1464         * device/include/8051.h,
1465         * device/include/8052.h,
1466         * device/include/at89S8252.h,
1467         * device/include/at89c55.h,
1468         * device/include/at89x051.h,
1469         * device/include/at89x51.h,
1470         * device/include/at89x52.h,
1471         * device/include/mcs51reg.h,
1472         * device/include/reg51.h,
1473         * device/include/reg764.h,
1474         * device/include/regc515c.h,
1475         * device/include/sab80515.h: (re)moved these 12 files
1476         * device/include/mcs51/8051.h,
1477         * device/include/mcs51/8052.h,
1478         * device/include/mcs51/at89S8252.h,
1479         * device/include/mcs51/at89c55.h,
1480         * device/include/mcs51/at89x051.h,
1481         * device/include/mcs51/at89x51.h,
1482         * device/include/mcs51/at89x52.h,
1483         * device/include/mcs51/mcs51reg.h,
1484         * device/include/mcs51/reg51.h,
1485         * device/include/mcs51/reg764.h,
1486         * device/include/mcs51/regc515c.h,
1487         * device/include/mcs51/sab80515.h: and added them here
1488
1489 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1490
1491         * device/include/stdarg.h: changed SDCC specific keywords to double
1492           underlined form.
1493         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1494           mcs51 and ds390.
1495         * device/include/hc08/mc68hc908gp32.h,
1496         * device/include/hc08/mc68hc908jb8.h,
1497         * device/include/hc08/mc68hc908jkjl.h,
1498         * device/include/hc08/mc68hc908qy.h: fixed comments
1499         * device/include/mcs51/README: updated
1500         * device/include/mcs51/c8051f120.h: added PINRSF
1501         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1502         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1503           amidst code. Also inline is not supported.
1504
1505 2005-04-06 Raphael Neider <rneider AT web.de>
1506
1507         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1508         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1509           callers stack/frame pointers
1510
1511 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1512
1513         * device/include/pic16/usart.h: added, missing in previous commit,
1514         * device/include/pic16/adc.h: fixed typo,
1515         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1516         commit,
1517         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1518         <p18fxxx.inc>
1519         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1520         uninitialized because a bug appears with gplink
1521         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1522         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1523         complains for unrecognised option
1524
1525 2005-04-05 Raphael Neider <rneider AT web.de>
1526
1527         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1528           structs as well (using memcpy)
1529         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1530           on ISRs (GOTO has no label)
1531         * src/pic16/device.h: added OF_OPTIMIZE_DF
1532         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1533           new data flow analysis/optimization
1534         * src/pic16/pcode.c: added (prototypes for and implementation of)
1535           dataflow analysis functions, fixed pCodeInstructions' inCond and
1536           outCond values, made RCALL a branch instruction
1537         * (pic16_unlinkpCode): keep C line if possible
1538         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1539           C line moved if possible
1540         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1541         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1542           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1543         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1544           new flow)
1545         * (pic16_getJumptabpCode): NEW, needed in...
1546         * (LinkFlow): fixed handling of jumptables, calls and conditional
1547           branches
1548         * (pic16_InsertCommentAfter): NEW
1549         * (pic16_pCodeReplace): made verbose and flow preserving
1550         * (AnalyzeFlow): added call to data flow analysis
1551         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1552         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1553         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1554
1555 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1556
1557         * src/SDCCast.c (decorateType): fixed bug #1105626
1558
1559 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1560
1561         * device/include/asm/pic16/features.h,
1562         * pic18f*.h headers,
1563         * device/include/pic16/adc.h,
1564         * device/include/pic16/delay.h,
1565         * device/include/pic16/i2c.h,
1566         * device/include/pic16/malloc.h,
1567         * device/include/pic16/stdio.h,
1568         * device/include/pic16/stdlib.h,
1569         * device/include/pic16/string.h,
1570         * device/lib/pic16/libc/stdio/printf_tiny.c,
1571         * device/lib/pic16/libc/stdio/printf_small.c,
1572         * device/lib/pic16/libc/stdio/strmgpsim.c,
1573         * device/lib/pic16/libc/stdio/strmmssp.c,
1574         * device/lib/pic16/libc/stdio/strmusart.c,
1575         * device/lib/pic16/libc/stdio/vfprintf.c,
1576         * device/lib/pic16/libc/stdlib/ltoa.c,
1577         * device/lib/pic16/libc/stdlib/putchar.c,
1578         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1579         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1580         * device/lib/pic16/libc/stdlib/memchrram.c,
1581         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1582         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1583         * device/lib/pic16/libio/adc/adcbusy.c,
1584         * device/lib/pic16/libio/adc/adcread.c,
1585         * device/lib/pic16/libio/adc/adcsetch.c,
1586         * device/lib/pic16/libio/usart/ubaud.c,
1587         * device/lib/pic16/libio/usart/ubusy.c,
1588         * device/lib/pic16/libio/usart/udrdy.c,
1589         * device/lib/pic16/libio/usart/uopen.c,
1590         * device/lib/pic16/libio/usart/uputc.c,
1591         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1592         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1593         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1594         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1595         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1596         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1597         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1598         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1599         specific keywords to double underlined form,
1600         * device/lib/pic16/libc/Makefile.rules,
1601         * device/lib/pic16/libsdcc/Makefile.rules,
1602         * device/lib/pic16/libm/Makefile,
1603         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1604         to compile with C standard set in Makefile.common
1605         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1606         rand.c and crc.c in compilation process,
1607         * device/lib/pic16/libsdcc/int/divuint.c,
1608         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1609         `c' from signed to unsigned,
1610         * device/lib/pic16/startup/crt0.c,
1611         * device/lib/pic16/startup/crt0i.c,
1612         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1613         keywords to double underlined form, bug fixes in _do_cinit function
1614         which prevented the correct initialization of the .idata segment,
1615         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1616         core to enter a infinite loop
1617         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1618
1619 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1620
1621         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1622
1623 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1624
1625         * device/include/Makefile.in: add support for hc08 subdirectory
1626         * device/include/hc08/: new subdirectory
1627         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1628         Lucas Loizaga, thanks!
1629         * device/include/hc08/mc68hc908qy.h,
1630         * device/include/hc08/mc68hc908gp32.h,
1631         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1632         their own directory. Changed internal macro names to use the compiler
1633         reserved namespace. Changed SDCC specific keywords to double
1634         underlined form.
1635         * device/include/math.h,
1636         * device/include/malloc.h,
1637         * device/include/stdarg.h,
1638         * device/include/stdbool.h
1639         * device/include/string.h,
1640         * device/include/tinibios.h,
1641         * device/include/ds400rom.h,
1642         * device/include/8051.h,
1643         * device/include/8052.h,
1644         * device/include/80c51xa.h,
1645         * device/include/at89c55.h,
1646         * device/include/at89S8252.h,
1647         * device/include/at89x51.h,
1648         * device/include/at89x52.h,
1649         * device/include/ds80c390.h,
1650         * device/include/reg764.h,
1651         * device/include/regc515c.h,
1652         * device/include/sab80515.h,
1653         * device/include/mcs51/c8051f000.h,
1654         * device/include/mcs51/c8051f018.h,
1655         * device/include/mcs51/c8051f020.h,
1656         * device/include/mcs51/c8051f040.h,
1657         * device/include/mcs51/c8051f060.h,
1658         * device/include/mcs51/c8051f120.h,
1659         * device/include/mcs51/c8051f300.h,
1660         * device/include/mcs51/c8051f310.h,
1661         * device/include/mcs51/c8051f320.h,
1662         * device/include/mcs51/c8051f330.h,
1663         * device/include/mcs51/c8051f350.h,
1664         * device/include/z180.h: Changed SDCC specific keywords to double
1665         underlined form.
1666
1667 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1668
1669         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1670         18F4455,
1671         * (pic16_assignConfigWordValue): disable testing of configuration
1672         register value with config mask,
1673         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1674         function with port->fun_prefix,
1675         * (genFunction): when generating a naked interrupt function never
1676         create an absolute segment placed in interrupt vector address, place
1677         the actual interrupt function at IVA instead, when an interrupt
1678         function is generated with unspecified interrupt then do not create
1679         the absolute section,
1680         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1681         code for generating a call to generic pointer get/put function with
1682         a call to function pic16_callGenericPointer(),
1683         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1684         the call to the generic pointer get/put functions with prefixing the
1685         function name with port->fun_prefix,
1686         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1687         * src/pic16/main.c (_process_pragma): prefix function with
1688         port->fun_prefix,
1689         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1690         calling assembler, old 18Fxxxx macro is deprecated,
1691         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1692         PC_ASMDIR in while condition,
1693         * (findInstruction): add PC_ASMDIR in while condition,
1694         * (buildCallTree): prefix main with port->fun_prefix,
1695         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1696         identifier for variable with banked access in instructions BTFSS,
1697         BTFSC, BCF, BSF, BTG
1698         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1699         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1700         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1701         perform optimization when enviroment variable NO_REG_OPT is set,
1702         * (insideLRBlock): NEW, return 1 if register is inside an
1703         INF_LOCALREGS block,
1704         * (RemoveRegFromLRBlock): remove a register that is completely
1705         eliminated by register optimization, but it is still left in local
1706         register store/restore in/from stack block,
1707         * (Remove2pcodes): after removing register, check to see if it
1708         should be removed from local register store/restore in/from stack
1709         block,
1710         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1711         DUMMY_READ_VOLATILE,
1712
1713         * device/include/pic16/adc.h: minor prototype modifications and
1714         update,
1715         * device/include/pic16/malloc.h: added GPL notice various
1716         modifications,
1717         * device/include/pic16/stdint.h: NEW, standard header for ints
1718         * device/include/pic16/delay.h: NEW, header for delay functions,
1719         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1720         delay1mtcy,
1721         * device/include/pic16/signal.h: NEW, header providing helper macros
1722         for implementing signal handlers,
1723         * device/include/pic16/stdio.h: added prototypes for functions,
1724         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1725         prototypes for stdin and stdout, added macro PUTCHAR to
1726         automatically implement putchar function prototype,
1727         * device/include/pic16/usart.h: modified and updated USART library,
1728         * device/lib/pic16/libio/adc/,
1729         * device/lib/pic16/libio/i2c: some modifications to improve library
1730         performance,
1731         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1732         family of functions,
1733         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1734         family of functions and other sources,
1735         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1736         of the PIC18Fxx[28] devices,
1737         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1738         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1739         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1740         _do_cinit function, because the previous failed when local variables
1741         where not placed in the same memory bank,
1742         * device/lib/pic16/libsdcc/char/: various modifications to improve
1743         library performance,
1744         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1745         information on the new functions of the c library and more...
1746
1747 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1748
1749         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1750
1751 2005-03-26 Raphael Neider <rneider AT web.de>
1752
1753         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1754           if condition == CARRY)
1755         * (genCmp): adapted to new genSkipc semantics
1756         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1757           on rIfx (genCmp was broken)
1758
1759 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1760
1761         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1762         * src/z80/main.c (_keywords[]),
1763         * src/SDCCglobal.h (struct options),
1764         * src/SDCC.y,
1765         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1766         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1767         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1768         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1769         always available in leading double underscore form. The C99 support is
1770         mostly missing, but it's a start.
1771         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1772         reserved identifier "__data".
1773
1774 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1775
1776         * src/mcs51/peeph.def: fixed bug 1170013
1777
1778 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1779
1780         * device/include/mcs51reg.h: fixed bug 842007
1781
1782 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1783
1784         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1785         last time.
1786
1787 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1788
1789         * src/port.h (struct PORT),
1790         * src/avr/ralloc.c (avr_assignRegisters),
1791         * src/avr/main.c,
1792         * src/ds390/ralloc.c (ds390_assignRegisters),
1793         * src/ds390/main.c,
1794         * src/hc08/ralloc.c (hc08_assignRegisters),
1795         * src/hc08/main.c,
1796         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1797         * src/mcs51/main.c,
1798         * src/pic/ralloc.c (pic14_assignRegisters),
1799         * src/pic/main.c,
1800         * src/pic16/ralloc.c (pic16_assignRegisters),
1801         * src/pic16/main.c,
1802         * src/xa51/ralloc.c (xa51_assignRegisters),
1803         * src/xa51/main.c,
1804         * src/z80/ralloc.c (z80_assignRegisters),
1805         * src/z80/ralloc.h,
1806         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1807         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1808         * src/SDCCcse.h,
1809         * src/SDCCdflow.c (computeDataFlow),
1810         * src/SDCCdflow.h,
1811         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1812         * src/SDCCloop.h,
1813         * src/SDCCcflow.c (*),
1814         * src/SDCCcflow.h,
1815         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1816         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1817         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1818         immedDom() returning wrong block; probably fixes bug #1160833)
1819
1820 2005-03-20 Borut Razem <borut.razem AT siol.net>
1821
1822         * support/scripts/inc2h.pl: WIN32 port
1823
1824 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1825
1826         * device/lib/makefile.in: added abs.c and labs.c
1827
1828 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1829
1830         * device/include/stdint.h: added
1831         * device/lib/abs.c: added
1832         * device/lib/labs.c: added
1833         * device/include/stdlib.h: added abs() and labs() prototypes
1834         * device/lib/libsdcc.lib: added abs and labs
1835         * device/include/float.h,
1836         * device/lib/_fsmul.c,
1837         * device/lib/printf_fast.c,
1838         * device/lib/printf_tiny.c: updated comments
1839
1840 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1841
1842         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1843         bug #1164313
1844
1845 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1846
1847         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1848         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1849
1850 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1851
1852         * device/lib/printf_large.c: removed inline assembly for portability and
1853           readability. Use printf_fast if speed or size are more important.
1854         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1855         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1856
1857 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1858
1859         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1860         prevent compiler warning
1861
1862 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1863
1864         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1865         moved to level 0 and declared as static. Also they are explicit
1866         placed in access bank. This was necessery because some times they
1867         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1868         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1869         optimizations. Currently only compare to unsigned char is implemented,
1870         * src/pic16/gen.c: added fReturnIdx array,
1871         * (struct resolvedIfx) is moved to gen.h and made public,
1872         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1873         * (aopForSym): added an optimization to directly store in stack of
1874         the operand of a SEND iCode,
1875         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1876         but as registers instead (AOP_REG) using the fReturnIdx array,
1877         * (pic16_freeAsmop): remove the freed register from the
1878         _G.sregsAlloc field,
1879         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1880         a compare of 'WREG',
1881         * (pic16_popGetTempRegCond): changed function prototype, now
1882         function takes also a bitVector argument v which holds the current
1883         set of registers that are allocated for stack access by aopForSym,
1884         registers allocated in aopForSym for accessing stack symbols are not
1885         any more part of the functions usedRegs field,
1886         * (genCall): some times aopOp is called for a stack variable to be
1887         send, aopForSym might perform the push, if this is true make sure
1888         that genCall doesn't push the variable twice by testing _G.resDirect,
1889         * (genFunction): changed testing for unspecified interrupt number
1890         from 256 to INTNO_UNSPEC,
1891         * modified selection scheme of frame pointer generation. Previously
1892         if function did use local registers a frame pointer was generated,
1893         now a frame pointer is generated only if function has arguments
1894         (that need PLUSW2 register access), or has stack arguments, or the
1895         compiler is not instructed to omit the frame pointer,
1896         * (genEndFunction): before restoring local registers that were saved
1897         in the function preamble, also restore the registers that *might*
1898         have been allocated for stack access,
1899         * (genRet): removed some old comments,
1900         * (genCmp, the active (RN's) version): added a call to the
1901         pic16_genCmp_special function to perform the compare with a more
1902         robust and optimized way,
1903         * (genInline): a feature has been added in inline code generation,
1904         which allows a wildcard variable substitution when writing inline
1905         assembly. Code is incomplete and experimental therefore undocumented,
1906         * (genCast): changed order of aopOp for result and right to allow
1907         aopForSym to directly load the result if possible,
1908         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1909         perform an optimized compare on some selected special occasions,
1910         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1911         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1912         generate an IVT any more,
1913         * src/pic16/main.c (pic16_optionsTable): added command line option
1914         --optimize-cmp,
1915         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1916         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1917         macros,
1918         * src/pic16/NOTES: Raphael Neider added in list of active developers
1919         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1920         jumptable_end to prevent bug #,
1921         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1922         inCond and outCond fields,
1923         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1924         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1925         turn off register spilling,
1926         * (packRegsForOneUse): synced with other ports' versions although it
1927         is not used currently,
1928         * (pic16_packRegisters): added an optimization while reading
1929         structure bitfields, some registers may be saved (malloc code is
1930         decreased by 80 bytes)
1931
1932 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1933
1934         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1935         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1936         this can be optimized more?
1937
1938 2005-03-10 Raphael Neider <rneider AT web.de>
1939
1940         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1941           genNearPointerGet): (hopefully) fixed access to bitfields via
1942           pointers (p->bitN = x; and x = p->bitN; failed)
1943
1944 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1945
1946         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1947
1948 2005-03-09 Raphael Neider <rneider AT web.de>
1949
1950         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1951
1952 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1953
1954         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1955         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1956           (regTypeNum): set REG_BIT type if necessary
1957         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1958         * support/regression/tests/critical.c: check bug 1144613
1959
1960 2005-03-02 Raphael Neider <rneider AT web.de>
1961
1962         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1963
1964 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1965
1966         * src/avr/ralloc.c (serialRegAssign),
1967         * src/ds390/ralloc.c (serialRegAssign),
1968         * src/hc08/ralloc.c (serialRegAssign),
1969         * src/mcs51/ralloc.c (serialRegAssign),
1970         * src/pic/ralloc.c (serialRegAssign),
1971         * src/pic16/ralloc.c (serialRegAssign),
1972         * src/xa51/ralloc.c (serialRegAssign),
1973         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1974
1975 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1976
1977         * src/SDCCast.c (decorateType): fixed bug 1124787
1978
1979 2005-02-20 Hubert Sack <sack AT digiplan.de>
1980         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1981
1982         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1983         patch #1121755
1984
1985 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1986
1987         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1988         to keep the correct label reference count when adding/removing references
1989         to labels. A peephole file using this is appended to patch #1144962.
1990
1991 2005-02-14 Raphael Neider <rneider AT web.de>
1992
1993         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1994         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1995         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1996           retrievals of result operand's value on assignment
1997
1998 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1999
2000         * device/include/pic16/string.h: modified prototype for memccpy()
2001         to memccpy(void *, void *, char, size_t)
2002         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2003         check whether to omit frame pointer or not,
2004         * (genInline): convert all occurences of "\n" to LF in inline
2005         assembler blocks, this helps formatting the inline text,
2006         * (pic16_loadFSR0): modified prototype,
2007         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2008         removed some 8051 legacy code,
2009         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2010         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2011         before allocating temporary registers in functions,
2012
2013 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2014
2015         * support/regression/tests/bitvars.c: corrected the "fix"
2016
2017 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2018
2019         * support/regression/tests/bitvars.c,
2020         * support/regression/tests/bitwise.c,
2021         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2022
2023 2005-02-10 Raphael Neider <rneider AT web.de>
2024
2025         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2026           different size for Alpha
2027         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2028
2029 2005-02-09 Raphael Neider <rneider AT web.de>
2030
2031         * src/SDCC.lex(doPragma) : save and restore warning options as well
2032           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2033         * have #pragma less_pedantic set the errorlevel to WARNING
2034           (fixes #1117001)
2035         * (cloneOptimize) : fixed wrong malloc's size
2036         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2037           facilitate correct handling of #pragma (save|restore)
2038
2039 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2040
2041         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2042
2043 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2044
2045         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2046
2047 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2048
2049         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2050
2051 2005-02-02 Raphael Neider <rneider AT web.de>
2052
2053         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2054         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2055         * (pic16_storeForReturn): fixed to allow returning function pointers
2056         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2057         * device/include/pic16/{stddef.h,stdbool.h}: added
2058
2059 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2060
2061         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2062
2063 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2064
2065         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2066         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2067          appeared to be required
2068
2069 2005-01-31 Borut Razem <borut.razem AT siol.net>
2070
2071         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2072           include/mcs51 and include/z80 directories to the package
2073
2074 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2075
2076         * src/hc08/gen.c (genFunction): fixed bug #1112752
2077
2078 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2079
2080         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2081
2082 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2083
2084         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2085
2086 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2087
2088         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2089
2090 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2091
2092         * device/include/c8051fxxx.h: removed these 6 files
2093         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2094
2095 2005-01-26 Raphael Neider <rneider AT web.de>
2096
2097         * src/pic16/gen.c (genAssign): fixed assignment from longs
2098           in codespace (were cut to three bytes)
2099         * (genDummyRead): implemented (except for CODESPACE...),
2100           fixed bug #1108575
2101         * src/pic16/glue.c (emitStatistics): beautified
2102         * device/lib/pic16/libm/Makefile: added include path
2103
2104 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2105
2106         * src/z80/gen.c (aopPut): fixed bug #1103902
2107
2108 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2109
2110         * device/lib/expf.c: fixed bug #1095792
2111
2112 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2113
2114         * device/lib/pic16/libm: added Math library sources
2115
2116 2005-01-24 Raphael Neider <rneider AT web.de>
2117
2118         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2119           to enable upcast to pCodeOpReg2 (there is no type tag to
2120           differenciate the two and pic16_popGet2p cast into PCOR2)
2121         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2122           (sizeof(sectNames) changed to sizeof(sectName))
2123           Both patches fix segfaults under MinGW.
2124
2125 2005-01-23 Raphael Neider <rneider AT web.de>
2126
2127         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2128           Safe_[mc]?alloc()'ed variables
2129         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2130           of (byte sized) temporaries (assign them to WREG for now)
2131         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2132           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2133           this might fix SIGSEGVs on MinGW...
2134         * src/SDCCopt.c (killDeadCode): restored original behaviour
2135           (volatile operands might get thrown away though)
2136
2137 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2138
2139         * src/pic16/gen.c: fixed bug #1106975,
2140         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2141         pointer update, INTCON is saved, global interrupts are disabled and
2142         restored after updateing TOS.
2143         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2144         * added function attribute 'shadowregs' to take advantage of shadow
2145         registers,
2146         * added function attribute 'wparam' as an alternative to the wparam
2147         pragma,
2148         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2149         user declares a non-ISR function as 'shadowregs',
2150         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2151
2152 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2153
2154         * .version: bumped version number to 2.4.8
2155         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2156         pic16 port,
2157         * device/lib/pic16/libio/i2c/: I2C module support library,
2158         * device/include/pic16/i2c.h: I2C support library header,
2159         * device/lib/pic16/libc/stdio/: standard IO support sources,
2160         * (printf_small.c): printf_small() source, supports float print,
2161         * (printf_tiny.c): printf_tiny() source, does not support floats,
2162         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2163         enable global optimizations for entire library source, other
2164         Makefiles in the source tree are also modified to reflect this,
2165         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2166         function,
2167         * doc/sdccman.lyx: updated to reflect new changes,
2168         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2169         sym->onStack if-case,
2170         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2171         sbit, idata, _idata, xdata, _xdata,
2172         * added pragma library, to link an external library, (see doc),
2173         * removed command line options, --pomit-config-words, --pomit-ivt,
2174         --pleave-reset-vector,
2175         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2176         when calling assembler to reflect memory model used, also define
2177         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2178         reflect stack model used,
2179         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2180         on stack return NULL,
2181
2182 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2183
2184         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2185           of the operands is volatile. Fixes #1020220
2186
2187 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2188
2189         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2190         * (OptimizeRegUsage): make sure that there is really no other flow where
2191           the first pCode is used
2192
2193 2005-01-22 Raphael Neider <rneider AT web.de>
2194
2195         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2196           to fix #1106967 (pCode->seq are not set up correctly)
2197
2198 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2199
2200         * src/SDCCglue.c (glue): make sure code area is declared before the
2201         static initialization area.
2202
2203 2005-01-21 Raphael Neider <rneider AT web.de>
2204
2205         * device/lib/Makefile.in: fixed test for pic16 install dir
2206         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2207           optimizations
2208         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2209           added --optimize-goto compiler switch and pragma wparam documentation
2210         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2211         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2212           and PRODH closing bug #1071770 (peephole optimizer)
2213
2214 2005-01-19 Raphael Neider <rneider AT web.de>
2215
2216         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2217           cmdLine buffers (used when calling sdcpp...) are large enough
2218           (MAX_PATH=256 truncates arguments leading to system halts when
2219           used in MinGW...)
2220         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2221         * (genUminus): rewritten to for efficiency
2222         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2223           used uninitialized in some cases)
2224         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2225           copy the third byte from the int -- now assumes 0x80 (data memory)
2226         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2227           operands (genAddLit expects the iCode's operands to swapped as
2228           well), fixed leftover bytes (crashed for short left operands)
2229         * (pic16_genMinusDec): performance improvements, removed false
2230           PIC14 emitSKPNCs
2231         * (pic16_genMinus): fixed to cope with differently sized operands
2232         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2233           for --obanksel > 1
2234         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2235         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2236           new banksel optimization
2237         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2238           analysis for temporary registers (segfaults...)
2239         * src/pic16/peeph.def: added rule
2240
2241 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2242
2243         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2244         which converts a float number to its ASCII representation
2245         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2246         functions to convert the fractional and integer part of a float to ASCII,
2247         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2248         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2249         ram
2250         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2251         _STATMEM macros,
2252         * device/include/pic16/adc.h: added GPL info,
2253         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2254         a pCodeOp as tested operand,
2255         * (genNearPointerGet): optimized bit testing, does not use
2256         intermediate register for bit value, test directly instead with
2257         BTFSS, BTFSC, works only for single bits,
2258         * (genpic16Code): dump the name of the iCode in the asm,
2259         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2260         renamed to pic16_decodeOp,
2261         * (serialRegAssign): do not allocate a temporary register for iCode
2262         sequences that test a single bit for 1/0
2263
2264 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2265
2266         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2267         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2268         access stack and frame pointers. They are initially assigned to
2269         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2270         accessing SFRs. Updated all occurences of modification of stack or
2271         frame pointer in gen.c and pcode.c,
2272         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2273         assigning of a literal value to pointers,
2274         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2275         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2276         selected
2277
2278 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2279
2280         * doc/sdccman.lyx: update documentation about stack pragma, added
2281         some info for stack memory models
2282
2283 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2284
2285         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2286
2287 2005-01-08 Raphael Neider <rneider AT web.de>
2288
2289         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2290           udata sections to fix bug #1097823
2291
2292 2005-01-05 Raphael Neider <rneider AT web.de>
2293
2294         * src/pic16/gen.c (genGenericShift): added handling of differently
2295           sized left operand and result
2296
2297 2005-01-04 Raphael Neider <rneider AT web.de>
2298
2299         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2300         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2301           to hold the condition bit)
2302         * added new version of genCmp (old code available via #define)
2303         * added new version of genShiftLeft/genShiftRight in a generic
2304           way, now supports shifting by negative values
2305         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2306           shiftCount (expected by genGenericShift)
2307         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2308         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2309           dump
2310         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2311           is an invalid literal too...)
2312
2313 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2314
2315         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2316         from Raphael Neider,
2317         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2318         for 8-bit literals. This fixes some literal operands which are sign
2319         extended to 16-bits ints when instruction needs only 8-bits.
2320
2321 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2322
2323         * device/lib/logf.c: added mcs51 assembly version
2324         * device/lib/expf.c: added mcs51 assembly version
2325         * device/lib/_logexpf.c: new shared asm code for expf and logf
2326         * device/include/math.h: add defines for assembly math library
2327         * device/lib/Makefile.in: build new _logexpf.c
2328         * device/lib/libfloat.lib: use new _logexpf.c
2329
2330 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2331
2332         * src/pic/device.c
2333         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2334           device types which have less than 0x7f registers.
2335
2336 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2337
2338         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2339
2340 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2341
2342         * device/lib/printf_fast.c: only build on supported arch.
2343         * device/lib/printf_tiny.c: only build on supported arch.
2344         * device/lib/printf_fast_f.c: only build if asm float lib
2345         * device/lib/_fsget1arg.c: only build if asm float lib
2346         * device/lib/_fsget2args.c: only build if asm float lib
2347         * device/lib/_fsnormalize.c: only build if asm float lib
2348         * device/lib/_fsreturnval.c: only build if asm float lib
2349         * device/lib/_fsrshift.c: only build if asm float lib
2350         * device/lib/_fsswapargs.c: only build if asm float lib
2351         * device/include/stdio.h: don't provide print_fast,
2352           print_fast_f, print_tiny prototypes if --xstack used
2353
2354 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2355
2356         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2357         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2358           to the SOURCES
2359
2360 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2361
2362         * device/lib/printf_fast_f.c: same as printf_fast, but
2363           with floating point enabled
2364         * device/lib/printf_fast.c: minor tweaks
2365         * device/include/stdio.h: add printf_fast_f
2366
2367 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2368
2369         * src/SDCCmain.c: make --float-reent default for mcs51
2370         * device/lib/_fsadd.c: added mcs51 assembly version
2371         * device/lib/_fssub.c: added mcs51 assembly version
2372         * device/lib/_fsmul.c: added mcs51 assembly version
2373         * device/lib/_fsdiv.c: added mcs51 assembly version
2374         * device/lib/_fseq.c: added mcs51 assembly version
2375         * device/lib/_fsneq.c: added mcs51 assembly version
2376         * device/lib/_fsgt.c: added mcs51 assembly version
2377         * device/lib/_fslt.c: added mcs51 assembly version
2378         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2379         * device/lib/Makefile.in: add _fscmp to build
2380         * device/lib/libfloat.lib: add _fscmp to build
2381
2382 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2383
2384         * device/lib/_fs2slong.c: added mcs51 assembly version
2385         * device/lib/_fs2sint.c: added mcs51 assembly version
2386         * device/lib/_fs2schar.c: added mcs51 assembly version
2387         * device/lib/_fs2ulong.c: added mcs51 assembly version
2388         * device/lib/_fs2uint.c: added mcs51 assembly version
2389         * device/lib/_fs2uchar.c: added mcs51 assembly version
2390         * device/lib/_slong2fs.c: added mcs51 assembly version
2391         * device/lib/_sint2fs.c: added mcs51 assembly version
2392         * device/lib/_schar2fs.c: added mcs51 assembly version
2393         * device/lib/_ulong2fs.c: added mcs51 assembly version
2394         * device/lib/_uint2fs.c: added mcs51 assembly version
2395         * device/lib/_uchar2fs.c: added mcs51 assembly version
2396         * device/include/float.h: added #define to select asm vs c
2397
2398 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2399
2400         * device/lib/printf_fast.c: improvements to float output
2401         * device/include/float.h: add defines for assembly float library
2402         * device/lib/_fsget1arg.c: receive 1 float arg
2403         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2404         * device/lib/_fsnormalize.c: normalize a float
2405         * device/lib/_fsreturnval.c: return float, various helper routines
2406         * device/lib/_fsrshift.c: right shift a float's mantissa
2407         * device/lib/_fsswapargs.c: swap 2 floats
2408         * device/lib/Makefile.in: build these 6 new files for mcs51
2409         * device/lib/libfloat.lib: add these 6 files to the library
2410
2411 2004-12-26 Borut Razem <borut.razem AT siol.net>
2412
2413         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2414           built by gcc 3.4.2
2415
2416 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2417
2418         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2419           and fully reentrant and register bank neutral.
2420         * device/lib/printf_fast.c: added float (not enabled by default),
2421           added compact/slower integer (also not enabled by default),
2422           improved size/speed of fast integer code, other minor changes
2423         * device/include/stdio.h, device/lib/Makefile.in,
2424           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2425
2426 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2427
2428         * src/pic16/pcode.c: declaring variables other than at the start of a
2429           block is not supported in C by VC6.
2430
2431 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2432
2433         * applied a previous patch from Raphael Neider that wasn't included
2434         in the previous commits, which fixes infinite loops within jumptable
2435         improvements,
2436         * made some fixes that previous patches introduced
2437
2438 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2439
2440         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2441         that fixes an issue with AOP_PCODE asmop's offset,
2442         * (pic16_popCopyReg): update instance field too,
2443         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2444         function of pic port,
2445         * (genCmp, genAnd, genAssign),
2446         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2447
2448 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2449
2450         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2451         variables initial values to idata section,
2452         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2453         variables in some functions. This utilizes parmBytes field of iCode
2454         structure to hold the offset of the variable in stack. (might be
2455         able to use the stack field too?)
2456         * applied patch from Raphael Neider # ### , # ###
2457         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2458         variable initial values in idata section,
2459         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2460         for static variables with initial value
2461         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2462         applied fix in while loop from Raphael Neider.
2463
2464 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2465
2466         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2467         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2468         * src/ds390/ralloc.c (serialRegAssign): spill bits
2469         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2470         * support/Util/SDCCerr.c,
2471         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2472         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2473         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2474
2475 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2476
2477         * device/include/sdcc-lib.h: inserted LGPL, added includes
2478           asm/ds390/features.h and asm/mcs51/features.h
2479         * device/include/asm/default/features.h,
2480         * device/include/asm/gbz80/features.h,
2481         * device/include/asm/z80/features.h: added empty _AUTOMEM
2482           and _STATMEM
2483         * device/include/asm/ds390/features.h,
2484         * device/include/asm/mcs51/features.h: added files with defines for
2485           _AUTOMEM and _STATMEM indicating automatic and static storage class
2486         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2487         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2488         * src/SDCCicode.c (geniCodeCast),
2489         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2490         * src/SDCCloop.c (loopInduction): removed unused variable lr
2491         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2492           to convertToFcall to include char modulo (RFE 1065037), added check
2493           if left operand is unsigned and use abs of literal value
2494         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2495           as it doesn't work after conversion from peephole.def to peephole.rul
2496         * src/mcs51/gen.c (toBoolean): added check for size,
2497           (genModOneByte): optimized code for signed char modulo a literal
2498           power of 2 (thanks to Hubert Sack),
2499           (genRRC): removed unnecessary "clr c",
2500           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2501         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2502           jump optimization,
2503           swapped rules 256.c and 256.d,
2504           extended 256.d by using new multiple checks (thanks Erik),
2505           added rules 256.e and 256.f,
2506           updated rule 261.a and 261.b to new generated code
2507         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2508
2509 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2510
2511         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2512           induction related bugs, including first part of bug #1074377
2513
2514 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2515
2516         * applied patch from bug-report #1076292,
2517         * applied patches for genAnd and Goto-optimizations for Raphael
2518         Neider,
2519         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2520         dump a less iCode information,
2521         * src/pic16/device.h (pic16_options_t): added field debgen,
2522         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2523         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2524         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2525         puclic,
2526         * (various functions): added macros FENTRY and FENTRY2 to functions,
2527         to emit function prologue,
2528         * (various functions): fixed indentation,
2529         * (genNearPointerGet): fixed loading of FSR0,
2530         * (genPackBits): applied patch from Raphael Neider to fix updating
2531         of FSR0 and touching only the modified bits,
2532         * src/pic16/genarith.c (various functions): added macros FENTRY to
2533         emit function prologue in comments,
2534         * src/pic16/pcode.h: added functions debugf2, debugf3,
2535         * src/pic16/ralloc.c: partial fix for packForPush caused
2536         segmentation fault,
2537
2538 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2539
2540         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2541           <stsp AT users.sourceforge.net> with reversed byte order
2542         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2543
2544 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2545
2546         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2547           bug #1074377
2548         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2549         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2550
2551 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2552
2553         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2554
2555 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2556
2557         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2558           conditions,
2559           (setFromConditionArgs): friendly operand parser for peephole rules,
2560           (operandBaseName, operandsNotRelated): new peephole condition
2561           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2562           architecture specific register naming into account, handles n-way
2563           comparisons, and supports quoted literals
2564         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2565
2566 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2567
2568         * src/mcs51/peeph.def: fixed bug #1076940
2569
2570 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2571
2572         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2573
2574 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2575
2576         Adding support for replacing ljmps with sjmps in jumptables
2577         generated for switch statements. For now you need to set the
2578         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2579         Now 4 algorithms for mcs51 jumptable generation are used:
2580         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2581         addresses loaded pc-relative for up to 112 cases and stack-pushing
2582         target addresses loaded with offset from dptr for up to 256 cases.
2583
2584         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2585         * src/mcs51/main.c: adapted constants for switch table generation
2586         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2587
2588 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2589
2590         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2591         * support/regression/tests/bug1057979.c: added test for bug 1073386
2592
2593 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2594
2595         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2596         compilers
2597
2598 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2599
2600         * src/pic16/device.h,
2601         * src/pic16/genarith.c,
2602         * src/pic16/glue.c,
2603         * src/pic16/main.c,
2604         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2605
2606 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2607
2608         Large cummulative patch for pic16 port.
2609         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2610         to call when a stack overflow occurs,
2611         * (malloc.h): added CVS Id tag,
2612         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2613         variable,
2614         * added libc directory. The current version of LibC contains string
2615         functions, ctype functions and macros and some functions of the
2616         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2617         be extensively tested in the future. Standard disclaimer here.
2618         Library is not automatically build yet. But one can build it by
2619         invoking 'make' inside the libc directory.
2620         * added ADC library under libio. Preliminary version yet.
2621
2622         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2623         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2624         aopForRemat() now and not by pic16_aopOp(),
2625         * (pic16_popGetTempReg): removed warning messgae when allocating
2626         temporary registers, its a buggy feature and will be removed,
2627         * (pic16_popGet): set register instance field in AOP_CRY,
2628         * (pic16_outBitC): fixed for results in size greater than 1,
2629         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2630         * (pic16_storeForReturn): optimized return of 0,
2631         * (genCmp): experimental code for new genCmp which uses PIC18's
2632         special compare&skip instructions. Initial tests fail some times
2633         with variables grater than 1 byte in size, so new code is disabled,
2634         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2635         a single bit,
2636         * (genCast): began a fix to optimize the casting of a bit to another
2637         bit, now assigning a bitfield to another bitfield will fail, sorry,
2638         * src/pic16/main.c: disabled the use of lr-support feature,
2639         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2640         * added some function prototypes, added function _debugf prototype,
2641         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2642         bits with offset (case PO_GPR_BIT),
2643         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2644         command line,
2645         * (isBankInstruction): modified to return 0 for no banking instruction,
2646         and 1 for banking instruction,
2647         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2648         caused stop processing pCodes after a inline assembly block,
2649         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2650         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2651         registers when it shouldn't,
2652         * src/pic16/ralloc.c (allocReg): add preliminary support for
2653         supporting a limited set of temporary registers,
2654
2655 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2656
2657         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2658           genDataPointerSet): ensure assignments always copy in MSB to LSB
2659           order,
2660           (loadRegFromAop): recognize CLRH optimization,
2661           (genFunction): optimize RECEIVE iCodes in reentrant functions
2662
2663 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2664
2665         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2666           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2667           selected.
2668         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2669         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2670           contiguous with data
2671
2672 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2673
2674         * device/lib/_gptrget.c (_gptrget),
2675         * device/lib/_gptrgetc.c (_gptrgetc),
2676         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2677           instead of sjmp to ret
2678         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2679           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2680
2681 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2682
2683         * .version: bumped version to 2.4.7
2684         * device/lib/_gptrget.c (_gptrget): is now _naked
2685         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2686         * device/lib/_gptrput.c (_gptrput): is now _naked
2687         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2688           (createFunction): fixed xstack
2689         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2690         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2691           or bit either,
2692           (geniCodeCritical): store original interrupt state in an iTemp bit
2693           var unless stack-auto
2694         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2695         * src/SDCCmain.c (setIncludePath): added include/target to search path
2696         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2697         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2698           prototype,
2699           (processFuncArgs): put bit vars in bit area
2700         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2701           unsaveRBank): fixed xstack,
2702           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2703           (genFunction, genEndFunction): fixed xstack,
2704           (genAssign): optimization don't walk backwards through mem
2705         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2706         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2707         * support/regression/Makefile: also make library (for stack-auto) when
2708           making "all" and added "test-mcs51-xstack-auto"
2709         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2710         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2711         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2712         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2713         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2714           make-library by MAKE_LIBRARY
2715         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2716           regression tests for xstack
2717         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2718         * support/regression/tests/critical.c: test for critical on mcs51
2719
2720 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2721
2722         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2723           built version of sdcc instead of installed version
2724
2725 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2726
2727         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2728         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2729           vprintf.c now
2730         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2731         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2732           WARNING: remove device/lib/build/z80/printf.o by hand when
2733           updating from previous build!
2734         * device/lib/z80/printf.c: updated comment
2735         * support/regression/tests/bug1057979.c: test all ports now
2736         * support/regression/tests/bug1065458.c: file added
2737
2738 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2739
2740         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2741           *_start and *_end symbols for static functions
2742
2743 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2744
2745         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2746           and search crt0.o in all library paths,
2747           (setIncludePath): proper handling of --nostdinc,
2748           (setLibPath): proper handling of --nostdlib
2749         * support/regression/Makefile,
2750         * support/regression/ports/ds390/spec.mk,
2751         * support/regression/ports/gbz80/spec.mk,
2752         * support/regression/ports/hc08/spec.mk,
2753         * support/regression/ports/mcs51/spec.mk,
2754         * support/regression/ports/mcs51-large/spec.mk,
2755         * support/regression/ports/mcs51-stack-auto/spec.mk,
2756         * support/regression/ports/z80/spec.mk: use include and lib files from
2757           built version of sdcc instead of installed version
2758         * doc/sdccman.lyx: fixed typo in --nostdinc
2759
2760 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2761
2762         * src/pic/pcode.c,
2763         * src/pic/device.c,
2764         * src/pic/ralloc.c,
2765         * src/pic/gen.c : added support to generate code for struct bit fields.
2766
2767 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2768
2769         * as/xa51/xa_version.h,
2770         * device/include/errno.h,
2771         * device/include/regc515c.h,
2772         * device/lib/_itoa.c,
2773         * device/lib/_ltoa.c,
2774         * device/lib/ser_ir_cts_rts.c,
2775         * sim/ucsim/xa.src/glob.cc,
2776         * sim/ucsim/xa.src/inst_gen.cc,
2777         * sim/ucsim/xa.src/xa_bit.cc,
2778         * sim/ucsim/xa.src/xa_sfr.cc,
2779         * sim/ucsim/z80.src/inst_dd.cc,
2780         * sim/ucsim/z80.src/inst_fdcb.cc,
2781         * support/scripts/keil2sdcc.pl,
2782         * src/pic16/pic16.dsp,
2783         * src/pic16/pic16a.dsp: corrected cvs line endings
2784         * device/lib/printf_large.c: fixed bug 1057979
2785         * src/pic16/gen.c: fixed non-C standard code
2786         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2787         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2788         * support/regression/ports/mcs51/support.c: reload T1 asap
2789         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2790           pdata use and clear idata startup behaviour
2791         * support/regression/tests/bug1057979.c: added
2792
2793 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2794
2795         * device/examples/ds390/ow390/ad26.h,
2796         * device/examples/ds390/ow390/cnt1d.h,
2797         * device/examples/ds390/ow390/crcutil.c,
2798         * device/examples/ds390/ow390/ownet.h,
2799         * device/examples/ds390/ow390/owsesu.c,
2800         * device/examples/ds390/ow390/swt12.h,
2801         * device/examples/ds390/ow390/swtoper.c,
2802         * device/examples/ds390/ow390/temp10.h,
2803         * device/examples/ds390/ow390/thermodl.c,
2804         * device/examples/ds390/tinitalk/tinitalk.dsp,
2805         * device/examples/ds390/tinitalk/tinitalk.dsw,
2806         * device/examples/mcs51/clock/hw.h,
2807         * device/examples/mcs51/simple2/go.bat,
2808         * device/examples/serialcomm/windows/serial.h,
2809         * device/examples/xa51/dummy.c,
2810         * device/examples/xa51/hello.c,
2811         * device/include/80c51xa.h,
2812         * device/include/at89x051.h: corrected cvs line endings
2813
2814 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2815
2816         * src/pic16/main.c (options): added command line --gstack, to trace
2817         stack over/under flows,
2818         * added pragma 'wparam' to allow passing first byte of function
2819         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2820         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2821         call to __gstack_test function and sets up the symbol as extern,
2822         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2823         * popaop): added call to pic16_testStackOverflow,
2824         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2825         wparamList list,
2826         * (genCall, genPcall): now all parameters are passed via stack
2827         except in functions that are pass to wparam pragma in which WREG is
2828         used too,
2829         * (genPcall): REENTRANT flag is checked to see if variable prototype
2830         contains reentrant keyword, don't call a non-reentrant function, via
2831         a reentrant function pointer or vice versa, functions are never
2832         passed via WREG,
2833         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2834         D.Winkler,
2835         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2836         SIGSEGV when accessing a NULL register stucture,
2837         * (pic16_printGPointerType): modified to handle UPPER modifier for
2838         function initializers, changed prototype of function to simpler one,
2839         * (pic16_printIvalFuncPtr): check to see if function is already
2840         added in externs list,
2841         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2842         optimized a move from W to SFR with a move to the same register
2843         later after a CALL,
2844         * device/lib/pic16/debug: NEW directory, contains debug features
2845         which are enabled when linking with libdebug.lib, currently command
2846         line option --gstack enables stack pointer tracing for over/under
2847         flow, corresponding sources are in debug/gstack
2848
2849 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2850
2851         * doc/sdccman.lyx: updated SDCC version,
2852         * (PIC16 port): update list of command line options,
2853         * src/pic16/device.h (structure pic16_options_t): added field gstack
2854         to enable stack overflow tracing on push/pops,
2855         * src/pic16/device.c (statistics structure): added statistics
2856         structure,
2857         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2858         pic16_dump_int_registers): increase statistics counters for each
2859         * variable which is encountered
2860         * (pic16_dump_usection): emit each .udata variable to its own udata
2861         section,
2862         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2863         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2864         parameters via stack, otherwise use old scheme,
2865         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2866         assembler output file,
2867         * src/pic16/main.c: added command line options --gstack to enable
2868         push/pop tracing for stack overflow,
2869         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2870         instructions): added size of each instruction,
2871         * (pic16_countInstruction): estimate size of instructions in
2872         the_pFile list, inline assembly blocks are not counted,
2873         * (pic16_FixRegisterBanking): trace previous register usage, when
2874         banksel optimizations is greater than 0, don't emit a redudant
2875         banksel directive,
2876
2877 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2878
2879         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2880         * src/pic16/ralloc.c : applied same fix for pic16.
2881         * src/pic/gen.c : tidied it up a little.
2882
2883 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2884
2885         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2886         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2887
2888 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2889
2890         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2891
2892 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2893
2894         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2895         non-reentrant function __modsint in the interrupt function (thus
2896         corrupting math operations during serial I/O)
2897         * device/lib/ser_ir.c: as above, changed buffersize
2898         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2899         256.c,d for zeroing
2900         * doc/Makefile: added option -t for rsync
2901
2902 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2903
2904         * src/SDCCast.h (struct ast),
2905         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2906
2907 2004-10-20 Borut Razem <borut.razem AT siol.net>
2908
2909         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2910         package
2911
2912 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2913
2914         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2915         makefile targets,
2916         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2917         support functions to replace long sequences of MOVFF's from access
2918         bank registers to stack and vice versa,
2919         * src/pic16/device.h: added new field opt_flags, where optimization
2920         flags can be set to enable certain features,
2921         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2922         * pBlock, (genFunction, genEndFunction): surroung loop for
2923         saving/loading used registers in stack with PC_INFO pCodes,
2924         INF_LREGS. Code in between can then be optimized by pCode optimizer
2925         to support function calls,
2926         * (genDataPointerSet): fixed bug which loaded float fields in
2927         structures with corrupt data,
2928         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2929         in a standard way debug info on stderr. Feature used for developing
2930         and debugging only,
2931         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2932         obsolete chunks of code,
2933         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2934         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2935         * pic16/src/pcode.c (pic16_newpCodeInfo,
2936         * (pic16_newpCodeOpLocalRegs),
2937         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2938         feature,
2939         * (pic16_pCodeConstString): printing of the initial value of a
2940         symbol as a comment is inhibited since parsing was already done by
2941         copyStr and output is corrupt,
2942         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2943
2944 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2945
2946         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2947
2948 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2949
2950         * as/mcs51/lkarea.c: removed old K&R style,
2951           (lnksect): changed check on boundary error,
2952           (lnksect2): changed check on boundary error,
2953           (lnksect2): extend XSTK to end of page if size = 1
2954         * as/mcs51/lkmain.c: removed old K&R style,
2955           (Areas51): create l_IRAM symbol
2956         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2957         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2958           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2959         * device/lib/_mullong.c: added version to be compiled with xstack
2960         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2961         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2962         * device/lib/mcs51/crtxstack.asm: fixed comment
2963         * src/SDCCglue.c: maxInterrupts defaults to 0,
2964           (emitMaps): added pdata,
2965           (createInterruptVect): (re)moved default,
2966           (glue): added pdata,
2967           (glue): moved __start__xstack to XSTK with default size 1
2968         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2969           and options.float_rent when options.stackAuto is set,
2970           (linkEdit): only write XDATA_NAME if provided on command line
2971         * src/SDCCmem.h,
2972         * src/SDCCmem.c: added pdata
2973         * src/port.h: added pdata_name to PORT
2974         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2975           (saveRegisters, unsaveRegisters): removed usage of B,
2976           (genMinus): fixed accumulator clash,
2977           (genJumpTab): added comment, this needs another look
2978         * src/mcs51/gen.c: added check for "B in use" paranoia,
2979           added pushB() and popB()
2980         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2981           chance
2982         * src/avr/main.c,
2983         * src/ds390/main.c,
2984         * src/hc08/main.c,
2985         * src/mcs51/main.c,
2986         * src/pic/main.c,
2987         * src/pic16/main.c,
2988         * src/xa51/main.c,
2989         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2990           added PSEG (PAG,XDATA) or NULL to port specifier
2991         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2992         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2993           (_mcs51_genInitStartup): removed __start__xstack equ,
2994           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2995         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2996         * src/z80/gen.c (_rleAppend): fixed warnings
2997         * support/regression/tests/zeropad.c: added pdata test
2998         * .version: bumped to 2.4.6
2999
3000 2004-10-17 Borut Razem <borut.razem AT siol.net>
3001
3002         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3003         as a part of nightly build
3004
3005 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3006
3007         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3008         WREG holds the first byte function parameters,
3009         * (aopForSym): take special case for symbols which are in FARSPACE
3010         but in CODESPACE too,
3011         * (assignResultValue): modified to take into account _G.useWreg,
3012         * (genCall): don't use wreg for parameter passing when function is
3013         declared as reentrant, too, added optimization INCF to stack
3014         pointer when stack parameter count is 1,
3015         * (genFunction, genEndFunction): refurnished and fixed to not using
3016         wreg for passing parameters when function has varargs or is
3017         reentrant, fixed bug with symbol name compare for generating
3018         functions in absolute address,
3019         * (pic16_storeForReturn): refurnished,
3020         * (genCmp): began writing a new version of the function, not ready
3021         yet, therefore it is disabled,
3022         * (genAssign): do not read code memory when assigning a function to
3023         a pointer function,
3024         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3025         array of characters, not pointer,
3026         * (pic16initialComments): in debug mode emit an .ident directive for
3027         the assembler,
3028         * (_process_pragma): emit a new warning type (internal to pic16)
3029         when setting stack to default length, emit a similar warning when
3030         placing a function at absolute address and address is not word aligned
3031         * (_pic16_parseOptions): added 'return TRUE' statement,
3032         * (_pic16_linkEdit): if compiling a source, then add the source's
3033         file object, first in the list of objects to link,
3034
3035 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3036
3037         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3038         * src/pic/main.c : removed VC warning.
3039         * src/pic/gen.c : changed comment.
3040
3041 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3042
3043         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3044         reference to a deprecated symbol _GPTRREG was causing failure to
3045         link. Thanks G. M. Gallant for the info.
3046
3047 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3048
3049         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3050         comments for Bugs item #954788.
3051
3052 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3053
3054         * src/pic16/device.c (pic16_dump_gsection,
3055         * pic16_groupRegistersInSection): handle symbols declared to be in
3056         access bank differently,
3057         * src/pic16/gen.c (struct _G): added field resDirect,
3058         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3059         send values read from stack directly to result and don't allocate
3060         temporary values,
3061         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3062         same registers,
3063         * (pic16_sameRegsOfs): NEW,
3064         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3065         free because they were not allocated from temporary pool,
3066         * pic16_popRegFromString): workaround to fix a problem with
3067         allocating variables twice or never,
3068         * (genGenPointerGet): using PRODL instead of FSR0H,
3069         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3070         instead of FSR0H,
3071         * (genAssign): take advantage of the _G.resDirect flag,
3072         * (genCast): around line 11844, use mov2f instead of directly
3073         MOVFF'ing between operands to account for literal values,
3074         * src/pic16/genutils.c: some new debug functions for gpsim have been
3075         added,
3076         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3077         float with integer part only,
3078         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3079         place variables in access bank
3080         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3081         updated sources to reflect recent changes in gen.c
3082
3083 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3084
3085         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3086         sources that searched for headers in installation path, now the
3087         device/include/pic16 is used,
3088         * src/pic16/glue.c (pic16glue),
3089         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3090         .line directives if not in debug mode, this suppresses assembler's
3091         warnings for ignored directives
3092
3093 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3094
3095         * src/port.h: made reset_regparms prototype void parameter explicit.
3096         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3097         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3098         * doc/sdccman.lyx: documented warning disabling and how to use
3099           printf_large to make it print floats.
3100         * device/include/stdbool.h: NEW
3101         * device/lib/_atof.c,
3102         * device/lib/_divuint.c,
3103         * device/lib/_divulong.c,
3104         * device/lib/expf.c,
3105         * device/lib/printf_large.c,
3106         * device/lib/sincosf.c,
3107         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3108         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3109           a completely reentrant lib.
3110
3111 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3112
3113         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3114         * device/include/pic16/stdio.h: fixed bug with colon
3115
3116 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3117
3118         * device/include/pic16/stdio.h,
3119         * device/include/pic16/stdlib.h,
3120         * device/include/pic16/math.h: NEW
3121         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3122         declared as _naked to reduce overhead
3123         * device/lib/Makefile.in (target port-specific-objects-pic16):
3124         changed * to *.* so to ignore the CVS directory,
3125         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3126         stacked variables back in stack,
3127         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3128         corruption
3129
3130 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3131
3132         * .version: bumped version number to 2.4.5
3133         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3134         * support/Util/SDCCerr.c (messages structure): added entry for
3135         W_POSSBUG2
3136
3137         Large cumulative patch for pic16 port and libraries.
3138         * device/include/pic16/sdcc-lib.h,
3139         * device/include/pic16/stdarg.h,
3140         * device/include/asm/pic16/features.h,
3141         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3142         * device/include/pic16/float.h: changes reentrant keyword with
3143         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3144         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3145         updated target build-libraries to include objects from gptr,
3146         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3147         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3148         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3149         all function headings,
3150         * src/SDCCmain.c: added global parameter userIncDirsSet,
3151         * (parseCmdLine): when option -I is encountered add directory to
3152         userIncDirsSet too,
3153         * src/version.awk: added space between control and long,
3154         * src/pic16/NOTES: added some notes for the port,
3155         * src/pic16/gen.c: added prototype for mov2fp function,
3156         * (fReturnpic16[]): properly named return value registers,
3157         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3158         * (aopForSym): added code to handle symbols with onStack flag set,
3159         symbols onStack are allocated PTRSIZE bytes,
3160         * (aopFreeAsmop): handles special case where asmops are stack objects,
3161         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3162         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3163         added argument lock to trace flaws in allocating temporary registers
3164         when developing port,
3165         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3166         * (pic16_popRegFromString): reenabled allocating a direct register
3167         from string,
3168         * (assignResultValue): various beautifications,
3169         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3170         referenced function argument,
3171         * (genIpush): reenabled to allow stacked arguments, handles only
3172         ic->parmPush iCodes,
3173         * (genCall, genPcall): major changes to allow for variable argument
3174         functions, fixed a bug with falsely restoring stack pointer after
3175         returning from call,
3176         * (genFunction): pending code for critical function,
3177         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3178         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3179         * (genNearPointerGet): fixed bug with indirect reading, was always
3180         reading from INDF0
3181         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3182         pointers,
3183         * (genAddrOf): rewrote code to take address of a stacked function parameter
3184         * (genCast): fixed casting to generic pointer type,
3185         * src/pic16/gen.h: added AOP_STA,
3186         * (struct asmop): added field stk,
3187         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3188         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3189         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3190         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3191         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3192         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3193         generic pointers,
3194         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3195         and library paths,
3196         * (pic16_port structure): generic pointer size is set to 3,
3197         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3198         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3199         compiler warning,
3200         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3201         operand is an iTemp,
3202
3203 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3204
3205         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3206         * debugger/mcs51/simi.c: addapt new syntax of s51
3207
3208 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3209
3210         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3211         * src/pic16/pcode.c: commented out some calls to free() in order to
3212         fix bug #989576,
3213
3214 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3215
3216         * src/SDCCicode.h,
3217         * src/SDCCicode.c (isiCodeInFunctionCall),
3218         * src/avr/ralloc.c (selectSpil),
3219         * src/pic/ralloc.c (selectSpil),
3220         * src/pic16/ralloc.c (selectSpil),
3221         * src/ds390/ralloc.c (selectSpil),
3222         * src/hc08/ralloc.c (selectSpil),
3223         * src/xa51/ralloc.c (selectSpil),
3224         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3225         stack in the middle of a function call sequence (fixes bug #1020268)
3226         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3227         costs associated with the minimum switch case.
3228
3229 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3230
3231         * src/SDCC.lex: fixed bug #1030549
3232
3233 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3234
3235         * src/SDCCcse.h (struct cseDef),
3236         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3237         over a function call if the CSE is derived from a symbol whose
3238         address has been taken (fixes bug #1029883)
3239         * support/regression/tests/bug-1029883: a new regression test for
3240         this bug
3241
3242 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3243
3244         * src/hc08/gen.c (emitinline): fixed bug #1029778
3245         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3246         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3247         and starts toward RFE #905167)
3248
3249 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3250
3251         * src/pic16/gen.c (mov2f): New function to move an operand to
3252         another without considering if it is a literal or a register,
3253         * (pic16_sameRegs): don't check if they are both AOP_REG,
3254         * (AccRsh): removed andmask=0 lines,
3255         * (genLeftShift): duplicated to be improved in future versions,
3256         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3257         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3258         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3259         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3260         * (insertBankSwitch): fixed inserting banksel directives algorithm
3261         for instructions that follow a skip instruction, this fixes a report
3262         for broken subtraction code generation,
3263         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3264         iCode is a left op, just in case result and right share the same
3265         registers
3266
3267 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3268
3269         * src/hc08/main.c,
3270         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3271         preservation of HX
3272         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3273         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3274         on 2004-09-12; it was buggy
3275
3276 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3277
3278         * src/SDCCsymt.h: removed RESULT_CHECK
3279         * src/SDCCast.c,
3280         * src/SDCCglue.c,
3281         * src/SDCCval.c,
3282         * src/pic/glue.c,
3283         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3284
3285 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3286
3287         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3288         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3289         configuration values no more rejected by compiler, they are assigned
3290         to configuration registers with a warning message instead,
3291         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3292         the for-loop so last conf register is emitted too,
3293         * (_pic16_initPaths): link library libsdcc.lib by default,
3294         * (_hasNativeMulFor): modified test for multiplication according to
3295         Raphael Neider's remarks. Integer multiplication is also done with
3296         support functions,
3297         * device/include/pic16/pic18fregs.h: corrected type error in while
3298         testing and including 18f6720 header file
3299
3300 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3301
3302         * src/pic16/device.h (pic16_options): removed field use_crt,
3303         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3304         until an optimization to handle single bits is added,
3305         * (pic16_loadFSR0): moved before genUnpackBits,
3306         * (genAnd): some white lines removed,
3307         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3308         leave_reset flags in pic16_options when using crt modules,
3309
3310 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3311
3312         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3313           for bugs 898889 & 979599. Also used some safer print instructions.
3314
3315 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3316
3317         * src/pic16/device.h (pic16_options_t): added field use_crt,
3318         crt_name, no_crt,
3319         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3320         catch a probable future bug,
3321         * src/pic16/gen.c: aopIdx function commented out,
3322         * (genAssign): commented out old code which used aopIdx,
3323         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3324         code, added if conditionals to take into account the --use-crt
3325         command line options,
3326         * src/pic16/main.c (pic16_optionsTable): added new command line
3327         options, --use-crt= and --no-crt,
3328         * (_pic16_linkEdit): now the proper crt object is added in the
3329         linker command line except than when --no-crt is specified,
3330         * src/pic16/pcode.c,
3331         * src/pic16/pcode.h: added some structures and functions for a new
3332         optimization scheme to compansate for instruction overhead between
3333         same iCodes, this scheme is currently under development and is not
3334         working in any way,
3335         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3336         to && operator,
3337         * device/lib/pic16/startup/crt0i.c,
3338         * device/lib/pic16/startup/crt0iz.c: added global char variable
3339         __uflags to force the generation of an idata section
3340
3341 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3342
3343         * doc/Makefile,
3344         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3345         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3346
3347 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3348
3349         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3350         Frieder) and clarified the default code optimization mode
3351
3352 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3353
3354         * src/SDCC.lex (doPragma, process_pragma),
3355         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3356         "opt_code_size", and "opt_code_balanced"
3357         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3358         regrouped options by category, added support for category headers
3359         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3360         and "--opt-code-size"
3361         * doc/sdccman.lyx: documented these new options and pragmas
3362         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3363         preference into account
3364
3365 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3366
3367         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3368           geniCodePreDec): Fixed bug 904237 by generating a warning
3369         * src/SDCCerr.h,
3370         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3371
3372 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3373
3374         * src/pic/device.c : When no max ram set validate full memory range.
3375         * src/pic/pcode.c,
3376         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3377
3378 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3379
3380         * device/lib/_gptrget.c,
3381         * device/lib/_gptrput.c: updated comment
3382         * device/lib/calloc.c,
3383         * device/lib/free.c,
3384         * device/lib/malloc.c,
3385         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3386         * src/SDCCcse.c (cseBBlock),
3387         * src/SDCCicode.c (printOperand, geniCodeArray),
3388         * src/SDCCicode.h (struct operand): fixed bug 868103
3389         * support/regression/tests/bug-868103.c: added
3390         * src/SDCCast.c (searchLitOp),
3391         * src/SDCCcse.h (struct cseDef),
3392         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3393         * src/SDCCicode.h (struct operand),
3394         * src/SDCCsymt.h (struct sym_link),
3395         * src/avr/gen.c (hasInc),
3396         * src/ds390/gen.c (hasInc),
3397         * src/hc08/gen.c (genPlusIncr, hasInc),
3398         * src/mcs51/gen.c (hasInc),
3399         * src/pic16/glue.c (pic16_printIvalChar),
3400         * src/pic16/ralloc.c (regWithIdx),
3401         * src/xa51/gen.c (hasInc) : removed warnings
3402         * src/SDCCast.c (createBlock): added comment ???
3403         * src/hc08/ralloc.c: updated comments
3404
3405 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3406
3407         * doc/sdccman.lyx: updated section on switch statements, added
3408         section about semaphore locking
3409         * doc/Makefile: added option -info for latex2html
3410         * device/lib/_gptrget.c,
3411         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3412
3413 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3414
3415         * src/pic/device.h,
3416         * src/pic/device.c,
3417         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3418          maxram is less than 0x100.
3419
3420 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3421
3422         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3423
3424 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3425
3426         * src/port.h,
3427         * src/mcs51/main.c,
3428         * src/ds390/main.c,
3429         * src/z80/main.c,
3430         * src/hc08/main.c,
3431         * src/pic/main.c,
3432         * src/pic16/main.c,
3433         * src/avr/main.c,
3434         * src/xa51/main.c
3435         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3436         a jump table is the best form for a switch statement, including
3437         automatic insertion of missing cases to make the case range
3438         continuous. Developed in collaboration with Frieder Ferlemann.
3439
3440 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3441
3442         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3443         accumulator result if it needs sign extension
3444
3445 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3446
3447         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3448
3449 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3450
3451         * device/lib/gbz80/printf.c,
3452         * device/lib/z80/printf.c: removed define for NULL
3453
3454 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3455
3456         * as/xa51/xa_link.c,
3457         * device/examples/ds390/ow390/ad26.c,
3458         * device/examples/ds390/ow390/cnt1d.c,
3459         * device/examples/ds390/ow390/counter.c,
3460         * device/examples/ds390/ow390/ds2480.h,
3461         * device/examples/ds390/ow390/ds2480ut.c,
3462         * device/examples/ds390/ow390/findtype.c,
3463         * device/examples/ds390/ow390/gethumd.c,
3464         * device/examples/ds390/ow390/owllu.c,
3465         * device/examples/ds390/ow390/ownetu.c,
3466         * device/examples/ds390/ow390/swt12.c,
3467         * device/examples/ds390/ow390/swtloop.c,
3468         * device/examples/ds390/ow390/temp.c,
3469         * device/examples/ds390/ow390/temp10.c,
3470         * device/examples/ds390/ow390/thermo21.c,
3471         * device/examples/ds390/ow390/tinilnk.c,
3472         * device/examples/ds390/ow390/tstfind.c,
3473         * device/examples/serialcomm/windows/serial.cpp,
3474         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3475         * device/include/reg51.h: fixed line endings for cvs
3476
3477 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3478
3479         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3480         packRegsForAccUse, packRegisters): new accumulator register
3481         packing algorithm
3482         * support/regression/ports/hc08/support.c (_putchar): suppress
3483         warning of unused variable
3484         * src/SDCCicode.c: added SWAP entry to codeTable
3485
3486 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3487
3488         * device/lib/sprintf.c: forgot to add this file before previous commit
3489
3490 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3491
3492         * src/pic16/gen.c (genPackBits): added operand right in function
3493         parameters, load result directly if p_type is POINTER (that is
3494         called by genNearPointerSet)
3495         * (genUnPackBits): added operand left in function parameters,
3496         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3497         FSR0 if accessing bitfields,
3498
3499 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3500
3501         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3502           _print_format; updated printf, sprintf, vsprintf
3503         * device/include/asm/default/features.h: corrected comment/define
3504         * device/lib/Makefile.in: added sprintf.c
3505         * device/lib/libsdcc.lib: added sprintf module
3506         * device/lib/printf_large.c,
3507         * device/lib/vprintf.c,
3508         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3509           into these 3 files
3510         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3511         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3512         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3513           hc08 test
3514         * support/regression/tests/zeropad.c: define idata as data for hc08
3515
3516 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3517
3518         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3519         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3520         labels are referenced at least once (even if a reference is not found)
3521         * src/hc08/gen.c (emitcode): set isComment flag for comments
3522         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3523         loads), rules 6a..6b (optimize jumps to return)
3524
3525 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3526
3527         * device/lib/acosf.c (acosf),
3528         * device/lib/asinf.c (asinf),
3529         * device/lib/atanf.c (atanf),
3530         * device/lib/ceilf.c (ceilf),
3531         * device/lib/cosf.c (cosf),
3532         * device/lib/coshf.c (coshf),
3533         * device/lib/cotf.c (cotf),
3534         * device/lib/fabsf.c (fabsf),
3535         * device/lib/floorf.c (floorf),
3536         * device/lib/log10f.c (log10f),
3537         * device/lib/logf.c (logf),
3538         * device/lib/sinf.c (sinf),
3539         * device/lib/sinhf.c (sinhf),
3540         * device/lib/sqrtf.c (sqrtf),
3541         * device/lib/tanf.c (tanf),
3542         * device/lib/tanhf.c (tanhf),
3543         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3544         replaced all instances of "reentrant" in the library functions
3545         defined in math.h with this macro.
3546         * support/regression/tests/float_trans.c: reenabled test for hc08
3547
3548 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3549
3550         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3551         erroneously deleted
3552
3553 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3554
3555         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3556         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3557         multi-byte volatile operands are used
3558         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3559         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3560         initialization to area GSINIT0 so that it would always precede
3561         any static initializers in GSINIT
3562         * support/regression/tests/zeropad.c: fixed idata define for hc08
3563         * support/regression/tests/bug-927659.c,
3564         * support/regression/tests/float_trans.c: disabled tests for hc08
3565         pending missing library routines
3566         * .version: increased version number to 2.4.4 - hc08 port now passes
3567         regression tests
3568
3569
3570 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3571
3572         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3573         * Makefile.common.in,
3574         * as/Makefile,
3575         * as/hc08/Makefile.in,
3576         * as/mcs51/Makefile.in,
3577         * as/z80/Makefile.in,
3578         * debugger/mcs51/Makefile.in,
3579         * device/include/Makefile.in,
3580         * device/lib/Makefile.in,
3581         * doc/Makefile,
3582         * link/Makefile,
3583         * link/z80/Makefile.in,
3584         * packihx/Makefile.in,
3585         * sim/ucsim/main_in.mk,
3586         * sim/ucsim/avr.src/Makefile.in,
3587         * sim/ucsim/doc/Makefile.in,
3588         * sim/ucsim/gui.src/serio.src/Makefile.in,
3589         * sim/ucsim/hc08.src/Makefile.in,
3590         * sim/ucsim/s51.src/Makefile.in,
3591         * sim/ucsim/xa.src/Makefile.in,
3592         * sim/ucsim/z80.src/Makefile.in,
3593         * src/Makefile.in,
3594         * support/cpp2/Makefile.in,
3595         * support/librarian/Makefile,
3596         * support/makebin/Makefile: added DESTDIR to the install path proposed
3597         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3598         * doc/sdccman.lyx: added DESTDIR documentation
3599
3600 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3601
3602         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3603         instruction for interrupt handlers, use fast returns when returning
3604         from high priority interrupts
3605
3606 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3607
3608         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3609         code generation
3610         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3611         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3612         bugs, ported much of Bernhard's code from mcs51
3613         * src/mcs51/gen.c (genSend),
3614         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3615         than one when calling a reentrant function
3616         * device/lib/_mullong.c: defined an alternate struct layout for big
3617         endian ports (hc08)
3618
3619 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3620
3621         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3622         test
3623
3624 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3625
3626         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3627         are sane and complete before asking the port its prefered parameter
3628         passing method (fixes bug #1017633)
3629         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3630         and _ret3
3631
3632 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3633
3634         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3635         problem in bitfields >= 8 bits.
3636
3637 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3638
3639         * src/SDCCsymt.c: undid changes that were not meant to be committed
3640
3641 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3642
3643         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3644
3645 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3646
3647         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3648           copied and wrong bit got inverted
3649
3650 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3651
3652         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3653         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3654         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3655         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3656         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3657         assignments to bitfields at known addresses
3658         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3659         reads from bitfields at known addresses
3660         * src/hc08/ralloc.c (packRegisters),
3661         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3662         genhc08Code): optimize pointer get values used as conditionals
3663         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3664         and branch
3665
3666 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3667
3668         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3669         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3670         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3671         as conditionals
3672
3673 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3674
3675         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3676
3677 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3678
3679         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3680         related problems
3681
3682 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3683
3684         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3685
3686 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3687
3688         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3689         mcs51 port
3690
3691 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3692
3693         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3694
3695 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3696
3697         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3698         cases use more compact code.
3699
3700 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3701
3702         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3703
3704 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3705
3706         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3707
3708 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3709
3710         * src/SDCCsymt.h,
3711         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3712         parameter of changePointer() from symbol* to sym_link*
3713         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3714         * src/SDCCsymt.c (compareType): void* type is castable to other
3715         pointers, but not necesarily an exact match.
3716         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3717         is no longer blindly treated as an exact match.
3718         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3719
3720 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3721
3722         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3723
3724 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3725
3726         * src/pic/gen.c,
3727         * src/pic/pcode.c,
3728         * src/pic/ralloc.h,
3729         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3730
3731 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3732
3733         * src/pic/device.c,
3734         * src/pic/device.h,
3735         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3736
3737 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3738
3739         * src/mcs51/gen.c (emitcode): fixed bug #992819
3740
3741 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3742
3743         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3744           there's no need to make it worse
3745
3746 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3747
3748         * src/mcs51/ralloc.c (deassignLR),
3749         * src/ds390/ralloc.c (deassignLR),
3750         * src/hc08/ralloc.c (deassignLR),
3751         * src/z80/ralloc.c (deassignLR),
3752         * src/pic/ralloc.c (deassignLR),
3753         * src/pic16/ralloc.c (deassignLR),
3754         * src/avr/ralloc.c (deassignLR),
3755         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3756         rlivePoint): fixed another part of bug #971834
3757
3758 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3759
3760         * src/z80/main.c: enabled "critical" keyword
3761         * src/z80/mappings.i,
3762         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3763         functions (fixes bug #979646)
3764         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3765
3766 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3767
3768         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3769           such as c:\mydir.
3770
3771 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3772
3773         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3774           doesn't disable too much optimizations
3775
3776 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3777
3778         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3779
3780 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3781
3782         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3783
3784 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3785
3786         * src/pic/gen.c tidied up tabs
3787         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3788         * src/pic/main.c tidied up tabs
3789         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3790         * src/pic/pcoderegs.c tidied up tabs
3791         * src/pic/ralloc.c tidied up tabs
3792
3793 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3794
3795         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3796         to S_FIXED for pic16 port and when symbol is not in level 0,
3797         allocate for S_REGISTER storage class and pic16 port, too,
3798         * src/pic16/device.h: prototype for checkSym,
3799         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3800         * (pic16_assignConfigWordValue): test the value and the mask to
3801         validate that the value is suitable for the configuration word,
3802         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3803         collect extern declared symbols, don't emit symbol twice, check
3804         first if symbol is in publics set first,
3805         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3806         * added command line '--fstack' which enables an experimental
3807         feature for stack access, too buggy to be used yet...
3808         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3809         * (pic16_allocDirReg): when register has storage class S_REGISTER
3810         allocate in pic16_dynAccessRegs,
3811         * device/include/pic16/pic18f????.h: modified configuration word
3812         naming convention, words started as CONFIG0H but should be CONFIG1H
3813
3814 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3815
3816         * device/include/mcs51reg.h: fixed bug 970993
3817
3818 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3819
3820         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3821         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3822         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3823         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3824         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3825         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3826           error/warning numbers,
3827           added function setWarningDisabled()
3828         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3829         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3830           _memcmp.c _memmove.c calloc.c realloc.c free.c
3831         * support/regression/tests/malloc.c: added tests for new functionality
3832         * support/regression/tests/zeropad.c: added tests for truncated initializers
3833           and initialized char arrays starting with '\x0'
3834         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3835
3836 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3837
3838         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3839
3840 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3841
3842         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3843         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3844         peephole 177.e. Thanks to anonymous
3845
3846 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3847
3848         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3849         function isn't used in the source but referenced as a
3850         variable initializer then declare it as extern in .asm file
3851
3852 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3853
3854         * .version: increased version number to 2.4.3
3855
3856         Adding version extension according to ChangeLog CVS revision
3857         * src/Makefile.in (target all): added dependency 'version.h'
3858         * (rule version.h): added rule to create version.h from ChangeLog,
3859         * (rule dep): added dependency version.h,
3860         * src/version.awk: AWK script to create version.h
3861         * src/SDCCdwarf2.c (dwWriteModule),
3862         * src/SDCCglue.c (initialComments),
3863         * src/SDCCmain.c (printVersionInfo): modified to write after
3864         version string the version extension number,
3865         * src/SDCCutil.c: included "version.h"
3866         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3867         number,
3868         * src/SDCCutil.h: added prototype for getBuildNumber
3869
3870         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3871         includeDirsSet, too,
3872         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3873         const char [] is found in function prototype...
3874
3875         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3876         moving to WREG with source is already in WREG,
3877         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3878         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3879         * (aopForSym): stack'ed symbols are partially supported, added
3880         if-clause to support symbols in FARSPACE,
3881         * (sameRegs): added test for AOP_ACC to see if registers are same,
3882         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3883         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3884         * (pic16_popRegFromString): will not allocate a new register if it
3885         doesn't find one by name, bug may have introduced...
3886         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3887         * (genIpush): revived to use pic16 port's stack,
3888         * (genAddrOf): added incomplete case for stack'ed operand,
3889         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3890         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3891         can handle multibyte operands,
3892         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3893         * (pic16initialComments): added message for MPLAB compatibility
3894         mode enabled,
3895         * src/pic16/main.h: prototype for pic16_mplab_comp,
3896         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3897         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3898         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3899         because of increased complexity of procedure,
3900         * (_process_pragma): stack pragma changed to format 'stack pos len',
3901         emit symbol '_stack_end' to conform with gplink,
3902         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3903         to search for register,
3904         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3905         PO_GPR_REGISTER,
3906         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3907         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3908         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3909         case for PO_GPR_REGISTER,
3910         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3911         dies, the new era is ahead !...
3912         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3913         pic16_dynInternalRegs,
3914         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3915         * (pic16_allocDirReg): minor optimizations and bug fixes,
3916         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3917
3918         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3919         load stack and frame pointer with address of 'stack_end' symbol
3920
3921 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3922
3923         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3924         without source code but only variable initializers
3925
3926 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3927
3928         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3929         external are not declared as extern to reduce overhead while linking
3930
3931 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3932
3933         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3934
3935 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3936
3937         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3938           Yee Keat for the patch
3939         * src/SDCCast.c (decorateType): fixed bug #979599
3940         * src/ds390/gen.h: removed local fReturnSizeDS390
3941         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3942         * src/ds390/gen.c (genAnd, genOr, genXor),
3943         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3944
3945 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3946
3947         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3948         add relFilesSet to $3, manipulate $2 to handle linking of object
3949         files without source files in command line,
3950         * device/include/pic16 (all headers): added ID location macros,
3951         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3952         entries for ID location bytes,
3953         * (pic16_assignIdByteValue): NEW,
3954         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3955         added field dumpcalltree to pic16_options_t,
3956         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3957         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3958         emitting rFalseIfx label after check_carry label,
3959         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3960         pic16_emitDIRegs), NEW
3961         * (pic16glue): dump .calltree file when option --calltree found,
3962         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3963         * (_pic16_genAssemblerPreamble): emit ID locations after
3964         configuration registers,
3965         * (pic16_linkCmd): modifications of the link command,
3966         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3967         * (pic16_pCodeInitRegisters): don't init stack registers,
3968         * (pic16_findPrevInstruction): fixed bug,
3969         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3970         bug with immediate registers,
3971         * (buildCallTree): traces stack push and pop,
3972         * (pct2): dump also stack usage for each function,
3973         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3974         * (pic16_allocDirReg): various modifications,
3975         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3976         fixed to 1,
3977
3978 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3979
3980         * src/pic16/pcode.c: removed buggy double colon
3981
3982 2004-07-01 Borut Razem <borut.razem AT siol.net>
3983
3984         * support/scripts/sdcc.nsi: added include/pic16 to setup
3985
3986 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3987
3988         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3989         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3990         target 'clean',
3991         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3992         specific command line arguments. Also added sample lkr script
3993         for placing a variable at a specific memory bank.
3994         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3995         at a specific memory bank,
3996         * (pic16_dump_isection): fixed bug which caused string literals to
3997         be omitted when dumping idata section,
3998         * (pic16_groupRegistersInSection): added code to handle registers
3999         in specific memory banks,
4000         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4001         public, all references are renamed too,
4002         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4003         AOP_DPTR2,
4004         * (pic16_storeForReturn): added case to handle when dest is WREG,
4005         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4006         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4007         pic16_rel_udata, check to see if that register is marked as being
4008         a member of a specific memory bank,
4009         * (pic16_printIvalCharPtr): added code to add string literals either
4010         to code or the idata sections,
4011         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4012         also accept the 'udata' pragma,
4013         * src/pic16/main.h: new structure types sectName and sectSym
4014         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4015         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4016         * (pic16_findPrevInstruction): fixed, it returned nothing,
4017         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4018         instruction combinations,
4019         * (pic16_FixRegisterBanking): heavily reorganised,
4020         * (pic16_AnalyzeBanking): if generating banksel directives is
4021         disabled, then don't call FixRegisterBanking at all,
4022         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4023         completely removed,
4024         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4025
4026 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4027
4028         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4029         Phuah Yee Keat <yk.phuah AT nestac.com>
4030
4031 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4032
4033         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4034         correctly the IVT even if it is relocated to some other location
4035
4036 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4037
4038         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4039         * device/include/pic16/pic18f2220.h: NEW,
4040         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4041         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4042         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4043         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4044         nodefaultlibs, ivt_loc is the location of the interrupt vector
4045         table, and nodefaultlibs signs that default libraries should not be
4046         linked in link stage,
4047         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4048         according to --ivt-loc argument,
4049         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4050         when pragma stack is found,
4051
4052 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4053
4054         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4055         256 (range check), 257 (do while), 258.a-f (bit banging
4056         f.e. on 3-wire SPI bus)
4057
4058 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4059
4060         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4061         variables used exclusively within a loop
4062
4063 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4064
4065         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4066
4067 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4068
4069         * src/SDCClrange.c (computeClash): fixed bug #971834
4070
4071 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4072
4073         * src/mcs51/gen.c (genCmp): fixed bug #975903
4074         * src/hc08/gen.c (operandsEqu),
4075         * src/ds390/gen.c (operandsEqu),
4076         * src/z80/gen.c (operandsEqu),
4077         * src/pic/gen.c (operandsEqu),
4078         * src/pic16/gen.c (operandsEqu),
4079         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4080         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4081
4082 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4083
4084         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4085
4086 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4087
4088         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4089         default case in switch statement,
4090         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4091         to eliminate problem with initialisation of pointers, but problem
4092         still exists,
4093         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4094         * (emitStaticSegment): removed various lines emitting debug info,
4095         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4096         added processor registers for utilizing EEPROM,
4097         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4098         configurable and set 8
4099
4100 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4101
4102         * .version: increased version number to 2.4.2,
4103
4104         Cumulative patch for pic16 port
4105         * src/pic16/device.c: changed scheme to dump initial values for
4106         variables in idata segment, all print_idata* functions were removed,
4107         now the pic16_printIval* will be called,
4108         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4109         * _pic16_printPointerType, pic16_printPointerType,
4110         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4111         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4112         NEW, similar to the respective functions in SDCCglue.c,
4113         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4114         way, emitting hex bytes,
4115         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4116
4117 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4118
4119         * src/avr/ralloc.c (serialRegAssign),
4120         * src/xa51/ralloc.c (serialRegAssign),
4121         * src/pic/ralloc.c (serialRegAssign),
4122         * src/pic16/ralloc.c (serialRegAssign),
4123         * src/hc08/ralloc.c (serialRegAssign),
4124         * src/z80/ralloc.c (serialRegAssign),
4125         * src/ds390/ralloc.c (serialRegAssign),
4126         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4127
4128 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4129
4130         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4131         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4132
4133 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4134
4135         Cumulative patch for pic16 port:
4136         * src/pic16/device.h (typedef PIC16_device) modified fields for
4137         defining microcontrollers,
4138         * src/pic16/device.c: added new info for all devices in Pics16 array,
4139         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4140         to be optimised out by the pCode optimiser,
4141         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4142         specially, bug reported by G.M. Gallant,
4143         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4144         as force'd so that cannot be optimised out by pCode optimiser,
4145         * src/pic16/pcode.c,
4146         * src/pic16/pcodepeeph.c,
4147         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4148         they are disabled by default, but can be enabled explicit with
4149         command argument --denable-peeps, for testing,
4150         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4151         --pomit-ivt in COMPILE_FLAGS
4152
4153 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4154
4155         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4156           compilation on MSVC
4157
4158 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4159
4160         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4161
4162 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4163
4164         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4165         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4166
4167 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4168
4169         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4170         would only assign 0x300001 register.
4171
4172 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4173
4174         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4175         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4176
4177 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4178
4179         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4180         for ds80c400
4181         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4182         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4183         added peephole 254 (left shift), 255 (jump table)
4184
4185 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4186
4187         * device/lib/Makefile.in: removed comment line with model-pic16,
4188         * (target port-specific-objects-pic16): the libraries and objects
4189         are copied to the build directory form the device/lib/pic16/bin
4190         directory
4191
4192         Cumulative patch concerning pic16 port:
4193         * library directory has been re-organized,
4194         * added support for PIC18F1220,
4195         * added headers and library sources for chips 18f1220,18f6520,
4196         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4197
4198         * configuration registers setting has changed, now each supported
4199         device has a complete description of the registers it uses,
4200         * all initialisations are moved to idata sections, these section
4201         can be absolute or relocatable,
4202         * fixed initialisation of codespace variables,
4203         * fixed warning about PCLATU and gpsim,
4204         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4205         * (genAssign): use table reads when assigning from variables in codespace,
4206         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4207         char/int variables placed in codespace,
4208         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4209         registers set in .asm file, no need for --pomit-config-words anymore,
4210         * (pic16glue): some 8051 legacy segments are commented out
4211         (to be removed completely),
4212         * added support for alternative assembler and linker with --asm=
4213         and --link= command line arguments,
4214         * peepholes are disabled automatically in the port, no need to
4215         specify on command line,
4216         * port supports natively char/int/long multiplication, but converts
4217         all divisions to support functions,
4218         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4219         to the file set in variable $2,
4220         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4221         strings in ASCII format and not in hex,
4222         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4223         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4224         allocate proper register if iCodes aren't temporary,
4225
4226 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4227
4228         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4229
4230 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4231
4232         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4233         is commented out
4234
4235 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4236
4237         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4238         computed address is reused
4239         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4240         multi-byte bitfields
4241
4242 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4243
4244         * src/z80/gen.c: (genArrayInit): must check for pointers too
4245
4246 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4247
4248         * support/regression/tests/zeropad.c: never meant to commit the
4249           nestedstruct test: removed, added check for GCC version
4250
4251 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4252
4253         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4254         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4255         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4256           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4257           bugs 928906 and 954082 half-empty initializers
4258         * src/SDCCsymt.h,
4259         * src/SDCCsymt.c (getAllocSize): added for above fix
4260         * src/z80/gen.c (genArrayInit): fixed bug 741044
4261         * support/regression/tests/zeropad.c: added tests
4262
4263 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4264
4265         * src/pic16/device.c (pic16_dump_section): corrected bug which
4266         caused some symbols of the libraries to be misplaced
4267
4268 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4269
4270         * src/pic16/glue.c,
4271         * src/pic16/ralloc.h,
4272         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4273         to fix conflict with pic port
4274
4275 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4276
4277         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4278         externs configuration variables,
4279         * src/pic16/ralloc.h,
4280         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4281         prototype in header, commented out some debug messages
4282
4283 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4284
4285         * src/pic16/glue.c,
4286         * src/pic16/main.c,
4287         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4288         for gpasm COFF object generation. Thanks to D. Hawkins for
4289         his patch info
4290
4291 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4292
4293         * src/ds390/main.c,
4294         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4295         Brock for spotting this)
4296         * src/ds390/gen.c (genEndFunction),
4297         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4298         interrupt handler and critical. Disable push/pop optimizations when
4299         peephole optimizations disabled.
4300
4301 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4302
4303         Updated pic16 library sources and headers.
4304         * device/lib/pic16/pic18f*/ ,
4305         * device/include/pic16/*.h: modified to handle structured SFR
4306         definitions
4307
4308 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4309
4310         * src/port.h (PORT structure): added hook initPaths, now each
4311         port can declare its own default search paths,
4312         which can been seen with the --print-search-dirs option,
4313         see pic16 port for example,
4314         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4315         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4316         * (doPrintSearchDirs): NEW, replaces in a central manner the
4317         printing of search dirs which was split in set*Paths functions,
4318         * (main): added call to port->initPaths and doPrintSearchDirs,
4319         * src/avr/main.c,
4320         * src/ds390/main.c,
4321         * src/hc08/main.c,
4322         * src/izt/i186.c,
4323         * src/izt/tlcs900h.c,
4324         * src/mcs51/main.c,
4325         * src/pic/main.c,
4326         * src/pic16/main.c: modified port structures to reflect addition of
4327         initPaths hook,
4328
4329         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4330         * (pic16_dump_section): for registers in same address reserve memory once,
4331         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4332         to no_banksel,
4333         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4334         result is greater in size than right or left,
4335         * (pic16_genUMult8X8_8): there are some cases where the result can
4336         be 16 bits size, so handle these,
4337         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4338         * (pic16_outBitC): modified to emit pcodes,
4339         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4340         or not,
4341         * (genDivOneByte): implemented algorithm to divide 8-bits,
4342         * (genCmp): uncommented goto, but issues still exist,
4343         * (genAnd): fixed a bug with variables >8bits,
4344         * (genPackBits): optimization added that uses BCF/BSF to change a
4345         single bit,
4346         * (genAssign): fixed bug when assigning floating point literals,
4347         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4348         __sdcc_gsinit_startup label,
4349         * src/pic16/main.c (_pic16_init): removed search directory
4350         initialisations,
4351         * (_pic16_initPaths): NEW, used to initialise search directories,
4352         * (_hasNativeMulFor): support functions for all except char/int
4353         multiplication, and char division,
4354         * (PIC16_port struct): modified entry for native mul support,
4355         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4356         no_banksel option,
4357         * (buildCallTree): call to register_usage is ifdef'ed out,
4358
4359 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4360
4361         * device/include/string.h: applied Stas Sergeev's patch to make this
4362         header file compatible with the preprocessor -Wundef option
4363         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4364         failure (fixes bug #941458)
4365
4366 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4367
4368         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4369         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4370         that the variable, not the function, should be static
4371         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4372         to be consistent with non-literal case
4373
4374 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4375
4376         * src/SDCCast.c (isConformingBody): fixed bug #949967
4377         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4378         convilong): fixed bug #952086
4379
4380 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4381
4382         * src/SDCCmem.c (allocVariables): fixed bug #955321
4383
4384 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4385
4386         * src/hc08/main.c (_hc08_genAssemblerEnd),
4387         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4388         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4389         completely eliminated the use of a temporary file
4390         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4391         when more than one file linked
4392         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4393
4394 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4395
4396         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4397         which fixes bug #543481
4398         * support/regression/tests/bug-751703.c: fixed comments left from a
4399         cut and paste error
4400         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4401         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4402         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4403         scopes
4404         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4405         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4406         are now changed to underscores in moduleName
4407
4408 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4409
4410         * as/mcs51/lkmem.c: better fix for bug #954173
4411
4412 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4413         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4414
4415         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4416         * device/include/c8051f000.h,
4417         * device/include/c8051f120.h,
4418         * device/include/c8051f300.h,
4419         * device/include/c8051f310.h,
4420         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4421         PWM16) and detab'ed
4422
4423 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4424
4425         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4426         and mailing lists, doc'ed --no-peep-comments, removed reference
4427         to knoppix (newest version has no LyX/LaTeX), other minor changes
4428         * src/SDCCglue.c (glue): save 2 bytes stack space with
4429         option --main-return. The ljmp could probably be avoided too
4430
4431 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4432
4433         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4434
4435 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4436
4437         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4438         * src/SDCCopt.c (isLocalWithoutDef),
4439         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4440         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4441         (credit to Maarten Brock for patch #949363, on which this is based)
4442         * support/regression/tests/bug-751703.c: some test cases of extern used
4443         within inner scopes.
4444
4445 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4446
4447         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4448         SPEC_STRUCT
4449         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4450         struct definitions
4451         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4452         dwWriteLabel): fix to create valid debugger symbols even when
4453         the module name has non-alphanumeric symbols in it
4454         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4455         when a variable's allocation has been optimized away
4456
4457
4458 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4459
4460         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4461         * src/hc08/main.c,
4462         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4463         * src/mcs51/main.c,
4464         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4465         * src/ds390/main.c,
4466         * src/z80/gen.c (z80_emitDebuggerSymbol),
4467         * src/z80/main.c,
4468         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4469         * src/pic/main.c,
4470         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4471         * src/pic16/main.c,
4472         * src/avr/gen.c (avr_emitDebuggerSymbol),
4473         * src/avr/main.c,
4474         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4475         * src/xa51/main.c,
4476         * src/SDCCdebug.c (emitDebuggerSymbol),
4477         * src/SDCCdebug.h,
4478         * src/port.h: added a debugger struct to the port struct. Added a
4479         callback for defining debugger symbols
4480
4481         * src/SDCCast.c (createLabel),
4482         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4483         with isitmp = 1
4484         * src/SDCCicode.h,
4485         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4486         iCode back to the ast for the function
4487
4488         * src/hc08/ralloc.c (hc08_assignRegisters),
4489         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4490         unneeded fields from the regs struct.
4491         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4492         pushReg() & pullReg() functions instead of emitcode()
4493
4494         * src/hc08/gen.c (genLabel, genhc08Code),
4495         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4496
4497         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4498         debugger hooks
4499
4500         * src/hc08/gen.c (genEndFunction, genhc08Code),
4501         * src/hc08/gen.h,
4502         * src/mcs51/gen.c (genEndFunction, gen51Code),
4503         * src/mcs51/gen.h,
4504         * src/ds390/gen.c (genEndFunction, gen390Code),
4505         * src/ds390/gen.h,
4506         * src/z80/gen.c (genEndFunction, genZ80Code),
4507         * src/z80/gen.h,
4508         * src/z80/z80.h,
4509         * src/pic/gen.c (genEndFunction, genpic14Code),
4510         * src/pic/gen.h,
4511         * src/pic16/gen.c (genEndFunction, genpic16Code),
4512         * src/pic16/gen.h,
4513         * src/avr/gen.c (genEndFunction, genAVRCode),
4514         * src/avr/gen.h,
4515         * src/xa51/gen.c (genEndFunction, genXA51Code),
4516         * src/xa51/gen.h,
4517         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4518         specific code to cdbFile.c and out of the backend code generators
4519
4520         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4521         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4522         starting address is now 0
4523
4524         * as/hc08/asm.h,
4525         * as/hc08/m08pst.c,
4526         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4527         assembler directive for DWARF support
4528         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4529
4530         * src/src.dsp,
4531         * src/Makefile.in,
4532         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4533
4534 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4535
4536         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4537         and inappropriate peephole optimization in jump tables
4538
4539 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4540
4541         * as/hc08/m08pst.c,
4542         * src/SDCCglue.c: sdccopt works for the hc08 port now
4543
4544 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4545
4546         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4547
4548 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4549
4550         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4551
4552 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4553
4554         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4555         rules
4556         * src/SDCCmain.c,
4557         * src/SDCCglobl.h,
4558         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4559         comments from the peephole optimizer replacement rules
4560         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4561         symbols
4562         * src/SDCCcse.c (updateSpillLocation),
4563         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4564         equivalents
4565         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4566         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4567         objects far pointers
4568
4569 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4570
4571         * src/SDCCsymt.h: a missing part of my last change
4572         * src/pic/ralloc.c (regTypeNum),
4573         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4574
4575 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4576
4577         * src/SDCCicode.h,
4578         * src/SDCCicode.c (aggrToPtrDclType),
4579         * src/SDCCptropt.h,
4580         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4581         ptrPseudoSymConvert),
4582         * src/pic/ralloc.c (regTypeNum),
4583         * src/pic16/ralloc.c (regTypeNum),
4584         * src/hc08/ralloc.c (regTypeNum),
4585         * src/ds390/ralloc.c (regTypeNum),
4586         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4587         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4588
4589 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4590
4591         * link/z80/lkmain.c (afile),
4592         * as/hc08/lkmain.c (afile),
4593         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4594         prevent a pointer problem when a filename has no directory and
4595         no extension specified.
4596
4597 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4598
4599         * link/z80/lkmain.c (afile): allow periods in directory names
4600         * link/z80/lkmain.c (afile),
4601         * as/mcs51/lkmain.c (afile),
4602         * as/hc08/lkmain.c (afile): allow linker script file to have an
4603         extension other than ".lnk"
4604         * link/z80/lklex.c (getfid),
4605         * link/z80/lkmain.c (parse),
4606         * as/mcs51/lklex.c (getfid),
4607         * as/mcs51/lkmain.c (parse),
4608         * as/hc08/lklex.c (getfid),
4609         * as/hc08/lkmain.c (parse): Support comments in the linker script
4610         file on lines by themselves and after filenames
4611
4612 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4613
4614         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4615
4616 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4617
4618         * src/z80/peeph-z80.def: removed some peephole rules that don't
4619         work with multibyte arithmetic (fixed bug #937126)
4620         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4621         to registers and not global variables
4622         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4623         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4624         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4625         checking for assignments not internally generated (fixed bug #931895)
4626         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4627         structure member (fixed bug #930072)
4628
4629 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4630
4631         * src/SDCCmain.c (linkEdit),
4632         * src/hc08/main.c (_hc08_parseOptions),
4633         * as/hc08/Makefile.in,
4634         * as/hc08/aslink.h,
4635         * as/hc08/asm.h,
4636         * as/hc08/m08pst.c,
4637         * as/hc08/lkrloc.c (relr, rele),
4638         * as/hc08/lkarea.c (lnkarea)
4639         * as/hc08/lkmain.c (afile, parse),
4640         * as/hc08/lkelf.c: support for ELF output
4641         * as/hc08/lks19.c (s19),
4642         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4643
4644 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4645
4646         * as/mcs51/lkihx.c: Fixed bug #899105.
4647
4648 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4649
4650         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4651         .dsp files from Unix to DOS.
4652
4653 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4654
4655         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4656         function pointers; we have been compliant for several months now.
4657         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4658         change that was accidently commented out
4659         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4660         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4661         bug #922319
4662
4663 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4664
4665         * src/hc08/gen.c: output of all of the internal debugging information
4666         is now controlled by the D() macro; it is disabled by default
4667
4668 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4669
4670         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4671         harder to keep the same registers during a CAST iCode
4672         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4673         long via int can be done in a single cast, if the signedness is
4674         correct.
4675         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4676         putchar() in tinibios.c in ds390's library
4677
4678 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4679
4680         * src/SDCCast.c (decorateType): fixed bug #898889,
4681         cast result of a literal complement too
4682         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4683         fixed check for bitfields
4684
4685 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4686
4687         * src/SDCCicode.c (geniCodeLogic): made it static,
4688         (geniCodeLogicAndOr): added in order to fix bug #905492,
4689         (ast2iCode): fixed bug #905492
4690         * support/regression/tests/bug-905492.c: added
4691         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4692         (processParms): fixed bug #927659: don't copy parms, this will clear
4693         decorated flag
4694         * support/regression/tests/bug-927659.c: added
4695
4696 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4697
4698         * src/SDCCast.c (addCast): don't cast float to char
4699         * device/lib/libsdcc.lib: added _memmove
4700
4701 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4702
4703         * device/lib/large/Makefile: fixed parallel execution by
4704         replacing `make` by `$(MAKE)`
4705
4706 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4707
4708         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4709         offsets (fixes bug #923936)
4710
4711 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4712
4713         * device/lib/small/Makefile: fixed parallel execution by
4714         replacing `make` by `$(MAKE)`
4715
4716 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4717
4718         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4719
4720 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4721
4722         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4723         * src/regression/Makefile: Regression test was not running.
4724
4725 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4726
4727         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4728         complement if possible
4729         * src/SDCCval.c (valComplement),
4730         * src/SDCCicode.c (operandOperation): fixed complement of literal
4731         * support/regression/tests/onebyte.c (testComplement): added
4732
4733 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4734
4735         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4736         return an optimized tree; actually replace actParm with the new tree
4737         * src/SDCCast.h: added some parantheses to remove side effects
4738         * support/regression/tests/bug-920866.c
4739
4740 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4741         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4742         Bit operands were not being handled properly in the pic14 port.
4743         (now src/regression/add.c passes again).
4744
4745 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4746
4747         * src/SDCC.y (labeled_statement): case and default no longer require
4748         a following statement (RFE #893037)
4749
4750 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4751
4752         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4753         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4754         disabled (fixes bug #916294)
4755         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4756         "mov a,acc"; patch provided by Lenny Story
4757         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4758
4759 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4760
4761         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4762         functions
4763         * src/ds390/gen.c (genFunction, genEndFunction),
4764         * src/ds390/ralloc.c (ds390_assignRegisters),
4765         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4766         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4767         pushed if there are parameters passed on the stack. Also, a cleaner
4768         way to decide if r0/r1 should be pushed/popped. (Together they fix
4769         bug #918693)
4770
4771 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4772
4773         * doc/sdccman.lyx,
4774         * device/lib/mcs51/crtpagesfr.asm,
4775         * device/lib/mcs51/crtxinit.asm,
4776         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4777         to avoid confusion with Si Lab's SFRPAGE register.
4778
4779 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4780
4781         * src/SDCCglue.c (emitMaps): allow public sfr variables
4782         * src/SDCCglue.c (initialComments): include compiler build date
4783         with compiler version and put the timestamp of the generated
4784         assembly file on a serperate line to be less confusing.
4785         * src/port.h: added genInitStartup hook
4786         * src/avr/main.c,
4787         * src/ds390/main.c,
4788         * src/hc08/main.c,
4789         * src/pic/main.c,
4790         * src/pic16/main.c,
4791         * src/xa51/main.c,
4792         * src/z80/main.c: genInitStartup initialize as NULL (default to
4793         historical behaviour)
4794         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4795         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4796         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4797         library instead of hard coding it into the compiler.
4798         * support/regression/ports/mcs51-stack-auto/spec.mk,
4799         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4800         * device/lib/mcs51/Makefile,
4801         * device/lib/small/Makefile,
4802         * device/lib/large/Makefile,
4803         * device/lib/mcs51/crtpagesfr.asm,
4804         * device/lib/mcs51/crtstart.asm,
4805         * device/lib/mcs51/crtxclear.asm,
4806         * device/lib/mcs51/crtxinit.asm,
4807         * device/lib/mcs51/crtclear.asm,
4808         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4809         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4810         and into user configurable files.
4811         * device/lib/clean.mk: clean mcs51 directory too
4812         * support/regression/tests/longlit.c: added static to T1 declaration
4813         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4814         accesses in the initialization code
4815
4816 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4817
4818         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4819         OSCTRIMVAL as noted in bug #916008
4820
4821 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4822
4823         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4824         in loops with multiple exits (reported as incorrect registers
4825         used by Martin Helmling in Sdcc-user list)
4826
4827 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4828
4829         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4830         made ds390 register extensions look less like error messages
4831
4832 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4833
4834         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4835         reported by Adam Wozniak in Sdcc-user list
4836
4837 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4838
4839         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4840         arithmetic optimizations, added debug output
4841
4842 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4843
4844         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4845         * sdcc.spec: updated and split sdcc into 3 rpms
4846         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4847         needed for literals of LEFT_OP and '+'
4848         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4849         introduced RESULT_TYPE_NOPROM
4850         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4851         left shift
4852         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4853         limited promotion to int only for '*'
4854         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4855
4856 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4857
4858         * src/pic16/gen.c (genSkip),
4859         (genc16bit2lit), (gencjneshort): commented out
4860         (is_LitOp): new helper function, checks operand type
4861         (genCmpEq): rewritten
4862
4863 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4864
4865         * support/regression/tests/bug-908454.c: added
4866
4867 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4868
4869         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4870         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4871         (geniCodeCast): cosmetic, don't preserve bit storage class
4872         (geniCodeLeftShift): added promotion
4873         (geniCodeLogic): fixed regression
4874         * src/SDCCsymt.c (computeTypeOr): accept bits too
4875         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4876
4877 2004-03-07  Borut Razem <borut.razem AT siol.net>
4878
4879         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4880
4881 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4882
4883         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4884         version of pic16_genPackRegisters which does not check if ic is a
4885         CAST operator,
4886         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4887         function cause string1.c regression test fails
4888
4889 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4890
4891         * sim/ucsim/configure.in,
4892         * sim/ucsim/configure,
4893         * sim/ucsim/doc/Makefile.in: use docdir
4894         * src/SDCC.y: fixed sbit atrributes
4895         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4896         * src/SDCCast.c (decorateType): |^& need special promotion handling
4897         * src/SDCCast.h,
4898         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4899         * src/SDCCsymt.h (computeType),
4900         * src/SDCCicode.c: computeType() needs op
4901         * src/SDCCsymt.c (checkTypeSanity),
4902         * doc/sddman.lyx: "plain" bitfields are unsigned
4903         * src/SDCCsymt.c (computeTypeOr): added
4904         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4905         |^& ops
4906         * src/SDCCval.c (val*): computeType() needs op
4907         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4908         * support/regression/tests/onebyte.c: added tests for |^&
4909
4910 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4911
4912         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4913         for writing icode into asm output.
4914
4915 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4916
4917         * src/pic16/device.c: added some debug lines enabled
4918         with macro DEBUG_CHECK,
4919         * src/pic16/genarith.c: more debug in genPlus,
4920         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4921         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4922         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4923         * (aopForSym): onStack symbols are re-placed in data memspace,
4924         and onStack flag is cleared,
4925         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4926         copy temporary pcodeop,
4927         * (genPcall): added warning for not updating PCLATU,
4928         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4929         always true for pic16 port,
4930         * (genMultOneWord): NEW, supports integer multiplication,
4931         * (genMult): modified to call genMultOneWord,
4932         * (ifxForOp): added warning when return NULL,
4933         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4934         flag is set before call to operandFromSymbol for implicit
4935         added structures,
4936         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4937         options.intlong_rent are set by default,
4938         * (_hasNativeMulFor): modified to allow port generation of integer
4939         multiplication,
4940         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4941         set regtype to REG_SFR for all registers, restricting seting the
4942         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4943
4944 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4945
4946         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4947         more than 500 times in the regression tests
4948
4949 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4950
4951         * support/Util/SDCCerr.h,
4952         * support/Util/SDCCerr.c,
4953         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4954         enumerator_list),
4955         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4956         for symbol conflicts.
4957         * support/valdiags/tests/enum.c,
4958         * support/valdiags/tests/tentdecl.c,
4959         * support/valdiags/tests/struct.c: expect possible error messages
4960         referring to original symbol definitions.
4961         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4962         * src/SDCCsymt.h,
4963         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4964
4965 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4966
4967         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4968
4969 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4970
4971         * src/pic16/ralloc.c (newReg): fixed bug #908929
4972
4973 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4974
4975         * src/ds390/gen.c: added missing #include "main.h"
4976
4977 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4978
4979         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4980         checking if symbol is already in set,
4981         * src/pic16/device.h: prototype for checkAddSym,
4982         * src/pic16/gen.c: (_G): added entry interruptvector,
4983         * (assignResultValue): removed some commented out lines,
4984         * (genFunction): check for ISR via sym->type, absolute section for
4985         interrupt code is created via a new pBlock, the goto instruction is
4986         placed now correctly at the interrupt vector position, changed all
4987         references from ivec to _G.interruptvector,
4988         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4989         is the interrupt is a high priority one, same for return from ISR,
4990         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4991         externs to calls of checkAddSym,
4992         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4993         pic16_pcode_verbose flag is set,
4994         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4995         * src/pic16/pcoderegs.c: message about how many registers are saved
4996         will only be emitted if pic16_pcode_verbose flag is set,
4997
4998 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4999
5000         * src/ds390/ralloc.h,
5001         * src/ds390/ralloc.c (ds390_regWithIdx),
5002         * src/ds390/gen.c (emitcode),
5003         * src/ds390/main.h,
5004         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5005         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5006         ds390operandCompare, getRegsRead, getRegsWritten,
5007         initializeAsmLineNode): customized instruction size calculation for
5008         ds390, started basis for some register optimizations
5009         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5010         corresponding assembly output
5011         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5012         missing push/pop of r0/r1. Optimized push/pops
5013
5014 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5015
5016         * src/mcs51/main.c (instructionSize): fixed ACALL size
5017         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5018
5019 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5020
5021         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5022         the sorting of rlist with NULL elements
5023         * (print_idataType, print_idata): NEW to create idata sections
5024         * src/pic16/device.h: idataSymSet new variable
5025         * src/pic16/gen.c (genFunction): fixed some bugs in string
5026         comparing, improved the absolute section creation for ISRs,
5027         added FSR0L/FSR0H in registers that are saved in an ISR,
5028         * (genInline): fixed the processing of inline snippets,
5029         now they undergo no process by the peephole optimizer
5030         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5031         are placed in idataSymSet,
5032         * (pic16emitStaticSeg): extern symbols are added in externs,
5033         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5034         switching when aboslute variables are placed in access bank memory
5035         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5036         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5037         commented out with #if,
5038         * (pic16_packRegisters): reintroduce the check for CAST because some
5039         symbols are not correctly handled,
5040         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5041         pCodeInstruction instead of pCode,
5042         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5043         pCodeAsmDir definition,
5044         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5045         directive, then the argument directive is emitted without the leading
5046         tab, hack for inline labels which must be in the first column,
5047         * (compareLabel,pic16_findNextInstruction),
5048         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5049         * (insertBankSwitch): modified for the new pCodeAsmDir,
5050
5051 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5052         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5053
5054         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5055         instance,
5056         * (pushSide): commented out with #if,
5057         * (assignResultValue): fixed some typos in saving
5058         registers,
5059         * (genPcall): FIXED and sync'ed with genCall,
5060         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5061         * (genNearPointerGet): fixed to handle some more cases,
5062         implementation scheme via table reads,
5063         * (genConstPointerGet): modified to access code memory correct,
5064         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5065         and improved to handle some cases
5066         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5067         instead of "RETLW" for init data
5068         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5069         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5070         variables are placed in access bank memory (<0x80 and >=0xf80),
5071         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5072         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5073         TBLWT_POSTDEC,TBLWT_PREINC
5074         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5075         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5076         directives
5077         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5078         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5079         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5080         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5081
5082 2004-02-29  Borut Razem <borut.razem AT siol.net>
5083
5084         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5085         support/Util/findme.h, support/Util/system.h: enhance binary relative
5086         search for lib and include by using findProgramPath()
5087
5088 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5089
5090         * src/SDCCpeeph.h,
5091         * src/SDCCpeeph.c (pcDistance),
5092         * src/port.h,
5093         * src/mcs51/ralloc.h,
5094         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5095         * src/mcs51/main.h,
5096         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5097         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5098         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5099         size calculation port specific, started basis for some register
5100         optimizations
5101         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5102         missing push/pop of r0/r1. Optimized push/pops
5103         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5104         * device/lib/_modsint.c (_modsint),
5105         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5106         and stack version so regression tests pass
5107
5108 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5109
5110         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5111         * src/SDCCast.c (decorateType): catch another small optimization
5112         with '?' operator
5113         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5114         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5115         modified to finally use computeType() all over SDCC,
5116         see Feature Request #877103
5117         * src/SDCCval.h: cosmetic
5118         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5119         valCompare(); regression tested in muldiv.c
5120         * support/regression/tests/muldiv.c (testMod): mod sign follows
5121         dividend only
5122
5123 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5124
5125         * src/SDCCast.c (decorateType): fixed bug #902362
5126         * doc/INSTALL.txt: fixed install instructions for win32
5127
5128 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5129
5130         * device/include/Makefile.in (install): fixed by replacing spaces
5131         by tabs
5132         * doc/README.txt,
5133         * doc/INSTALL.txt: updated for release
5134         * doc/sdccman.lyx: added warning for --xstack being buggy
5135
5136 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5137
5138         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5139         to eliminate build warnings.
5140         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5141
5142 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5143            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5144
5145         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5146         removed -penable-stack, added comment for stack pragma, added
5147         warning for not initializing the stack/frame registers, removed
5148         comment at interrupts section
5149
5150         Stack is made permanent, there is no ability to disable stack usage.
5151         * src/pic16/device.h,
5152         * src/pic16/device.c: removed all references to USE_STACK macro,
5153         * src/pic16/device.c (pic16_dump_section): when no elements in
5154         rlist, free rlist before return,
5155         * (pic16_dump_int_registers): NEW, internal registers are a new set
5156         of general purpose registers reused by each function,
5157         * (checkAddReg): returns 1 if registers is added to set,
5158         * (pic16_groupRegistersInSection): when a registers is of type
5159         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5160         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5161         SRCASECMP macro is moved here from device.c
5162         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5163         PO_PCLATU, PO_PRODL, PO_PRODH,
5164         * (pic16_pCodeOpType, genMinus,
5165         changed compares to "a" register, with AOP_ACC,
5166         * (pic16_genPlus): fixed some bugs and indented properly,
5167         * (pic16_addSign): changed size to size+offset in the MOVWF
5168         instruction,
5169         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5170         multiply 8-bit operand by literal, result is 8-bit,
5171         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5172         multiply 2 8-bit operand, result is 8-bit,
5173         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5174         genUMult8X*_16,
5175         * src/pic16/gen.c: changed accUse to contain WREG only,
5176         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5177         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5178         true, do not use immediate addressing any more unless sym is a
5179         pointer in codespace,
5180         * (aopForRemat): do not use immediate addressing when symbol not in
5181         codespace and when symbol's address is requested,
5182         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5183         accUse size (= 1),
5184         * (aopGet): added case for AOP_ACC and don't return "accumulator
5185         bug" but WREG instead,
5186         * (popGetTempReg): pushes contents of temporary register in stack,
5187         * (popReleaseTempReg): pops contents of temporary register from
5188         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5189         * (pic16_popGet): separated case AOP_ACC to return register WREG
5190         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5191         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5192         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5193         the use of immediate pointers to certain cases only.
5194
5195         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5196         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5197         * (assignResultValue, genCall, genRet): modified to use the new
5198         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5199         genPcall is still broken,
5200         * (genFunction): added code to create 'A' type pBlocks when
5201         interrupt functions are generated, code not extensively tested yet,
5202         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5203         * (genEndFunction): modified so ISRs pop stored registers from stack,
5204         * (genMultOneByte): cleanup,
5205         * (AccRsh): added flag andmask, to and result with appropriate mask,
5206         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5207         * (genDataPointerGet): fixed and reenabled its use,
5208         * (genNearDataPointerGet): bugs fixed,
5209         * (genDataPointerSet): bugs fixed,
5210         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5211         pic16_DumpSymbol, pic16_DumpOp,
5212         * src/pic16/genutils.h: function prototypes for the above functions,
5213         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5214         pointers,
5215         * (pic16emitRegularMap): many many many improvements, but needs a
5216         major cleanup,
5217         * src/pic16/main.c: enable_stack in pic16_options is removed,
5218         * (_pic16_parseOptions): removed command line options -penable-stack,
5219         * (_process_pragma): emit stack symbol only when stack pragma is
5220         processed,
5221         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5222         redirected to FSR0L/FSR0H pair,
5223         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5224         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5225         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5226         for immediates,
5227         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5228         * (dumpPicOptype): NEW,
5229         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5230         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5231         with movff instruction,
5232         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5233         added pic16_int_regs, some packRegsFor* functions are commented out,
5234         because produce errors,
5235         * src/pic16/NOTES: minor modifications
5236
5237 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5238
5239         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5240         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5241         --pack-iram.
5242         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5243         * as/mcs51/lkaomf51.c: fixed bug #895763
5244
5245 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5246
5247         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5248
5249 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5250
5251         * doc/sdccman.lyx: added details about the HC08 storage classes and
5252         interrupts, fixed the register usage info for z80 & gbz80
5253
5254 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5255
5256         * doc/sdccman.lyx: added more pic16 port documentation
5257         * device/include/pic16/: added header pic18fregs.h
5258
5259 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5260
5261         * doc/sdccman.lyx: added Vangelis' contribution
5262
5263 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5264
5265         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5266         extend to the next CALL or PCALL, not just to the next CALL.
5267
5268 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5269
5270         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5271
5272 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5273
5274         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5275         bug #895752 and a better fix for bug #716790
5276
5277 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5278
5279         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5280
5281 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5282
5283         * doc/sdccman.lyx: minor changes, minor changed
5284
5285 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5286
5287         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5288         which can't handle SDCC_NEWONEBYTEOPS,
5289         (geniCodeMultiply): removed conversion from mult to shift for pic14
5290         and pic16
5291
5292 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5293
5294         * src/hc08/gen.h,
5295         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5296         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5297         thus fixing bug #895406
5298
5299 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5300
5301         * device/lib/_modsint.c,
5302         * device/lib/_modslong.c: sign follows divisor only
5303         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5304         signs or signedness can be ignored
5305         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5306         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5307         added optimization for IFX,
5308         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5309         arguments;
5310         reenabled optimization for IFX, which was removed on 2004-01-11
5311         * src/SDCCast.h: added return type IFX
5312         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5313         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5314         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5315         SDCC_OLDONEBYTEOPS selects the old behaviour
5316         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5317         changed again and commented promotion rule
5318         * src/SDCCval.c (valDiv): promotion no longer necessary
5319         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5320         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5321         rewritten
5322         * support/regression/tests/onebyte.c: added
5323
5324 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5325
5326         * gen.c (genInline): reverted to old code for assemnling inline
5327         code because of bug reported James Chadd
5328
5329 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5330
5331         * ralloc.h: missing declarations from previous patch,
5332         seems that patch for ralloc.h was never applied, fixed
5333
5334 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5335            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5336
5337         * pcode.c,
5338         * pcode.h,
5339         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5340         indirect addressing. Marked FSR0 as deprecated
5341         * gen.c (pointerCode): commented out, not needed now
5342         (pic16_popGet2p): new MOVFF helper function
5343         (genGenPointerGet),
5344         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5345         (shiftRLong): removed duplicate debugging info
5346
5347 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5348
5349         * src/ds390/gen.c (genNearPointerGet),
5350         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5351         optimization with bits, but not bitfields.
5352         * src/ds390/ralloc.c (packRegisters),
5353         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5354
5355 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5356
5357         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5358
5359 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5360
5361         * src/SDCCsymt.h,
5362         * src/SDCCicode.c (operandFromSymbol),
5363         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5364         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5365         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5366         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5367         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5368         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5369         bug #892038
5370         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5371         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5372         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5373         * src/SDCCsymt.c (newSymbol),
5374         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5375         enumerator_list),
5376         * src/SDCCval.h,
5377         * src/SDCCval.c (newiList): fixed bug #885705
5378
5379 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5380
5381         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5382         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5383
5384 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5385
5386         * device/include/c8051f120.h,
5387         * device/include/c8051f300.h,
5388         * device/include/c8051f310.h: added/updated header files for Silicon
5389         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5390         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5391         in new section Submitting patches
5392
5393 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5394
5395         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5396         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5397         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5398         genGenPointerSet),
5399         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5400         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5401         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5402         genGenPointerSet),
5403         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5404         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5405         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5406         genGenPointerSet),
5407         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5408         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5409         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5410         genGenPointerSet): fixed bug #892400
5411         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5412         to eliminate build warnings.
5413         * src/SDCCast.c (processParms),
5414         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5415         fixed bug 751859
5416         * support/valdiag/valdiag.py: added GCC to the list of defines active
5417         when compiling with gcc
5418
5419 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5420
5421         * support/Util/SDCCerr.h,
5422         * support/Util/SDCCerr.c,
5423         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5424         with an incomplete type (fixed bug #883734)
5425         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5426
5427 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5428
5429         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5430
5431 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5432
5433         * src/SDCCast.c (decorateType),
5434         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5435         function pointer implementation
5436         * support/regression/tests/funptrs.c: added tests to verify both forms
5437         of function pointers work correctly. Added tests to verify parameters
5438         are passed in the correct order.
5439
5440 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5441
5442         * device.c (regCompare): registers are sorted by ascending
5443         address and increasing size,
5444         * main.c (_pic16_finaliseOptions): removed the declaration
5445         of compiler macro MCU. Now a macro of the format pic18fxxxx
5446         will be defined from the command line
5447
5448 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5449             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5450
5451         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5452         PCOP_RLCF was overwritten!
5453         * gen.c (genSkip): commented out calls to pic16_emitcode,
5454         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5455         * (genlshTwo),
5456         * (genRRC): added debugging info,
5457         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5458         overwritten while shifting,
5459         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5460         overwritten while shifting,
5461         * (AccLsh),
5462         * (AccRsh),
5463         * (shiftLLeftOrResult),
5464         * (shiftRLeftOrResult),
5465         * (shiftRLong),
5466         * (shiftLLong): Implemented with pic16_emitpcode
5467         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5468         * (genLeftShift): Fixed bug, operand for shift by variable always
5469         was "and"ed with 0x0f,
5470         * (genLeftShiftLiteral),
5471         * (genrshTwo),
5472         * (genRightShiftLiteral): added debugging info,
5473         * (genrshFour): added comment,
5474         * (genRightShift): determined signedness from operand "left"
5475         instead of "result"
5476
5477 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5478
5479         * src/SDCCicode.c (geniCodeParms),
5480         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5481         function pointers, fixed function pointer bugs #861242 and #861896
5482
5483 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5484
5485         * device/include/c8051f000.h,
5486         * device/include/c8051f120.h,
5487         * device/include/c8051f300.h: added header files for Silicon
5488         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5489
5490 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5491
5492         * src/SDCCast.c (processParams): added new type flow and restructured
5493         (gatherAutoInit): added new type flow
5494         (addCast): cosmetic changes
5495         (getLeftResultType): added new type flow for array indices, patch
5496         provided by Stas, see FR #877103
5497         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5498         array index patch by Stas
5499         * src/SDCCast.h: added prototype getResultTypeFromType()
5500         * src/SDCCval.h,
5501         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5502         * src/pic/glue.c (pic14emitStaticSeg),
5503         * src/pic16/glue.c (pic16emitStaticSeg),
5504         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5505         for initialization of symbols
5506         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5507         * support/Util/SDCCerr.h:
5508         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5509         * .version: bumped version number to 2.3.8
5510         * device/include/Makefile.in (install),
5511         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5512         avoid warnings
5513
5514 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5515
5516         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5517         Slade Rich fixed an optimization bug
5518         * src/pic/pcodepeep.c,
5519         * src/pic/pcoderegs.c
5520         * doc/Makefile (install): added test for directory
5521
5522 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5523
5524         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5525         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5526         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5527         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5528         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5529         * as/mcs51/asexpr.c (term),
5530         * as/hc08/asexpr.c (term): fixed bug #887146
5531
5532 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5533
5534         * src/z80/gen.c (genMult): handle single byte result product
5535         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5536         DUMMY_READ_VOLATILE (fixed bug #886367)
5537
5538 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5539
5540         * support/regression/tests/libmullong.c: fixed logic, on little endian
5541         hosts we ended without a mullong_wrapper()
5542
5543 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5544
5545         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5546         virus/worm forged address usage.
5547
5548 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5549
5550         Fixed promotion, it should be done on AST level:
5551         * src/SDCCast.c (addCast): added promotion to int
5552         (decorateType): updated call to upCast()
5553         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5554         usualUnaryConversions()
5555
5556 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5557
5558         * support/regression/tests/literalop.c (mulWrapper): Added a
5559         wrapper to remove integer overflow warnings.
5560
5561         * support/regression/tests/float_trans.c: Made work on host.
5562
5563         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5564         location of sz80.
5565
5566         * support/regression/generate-cases.py (main): Changed from inline
5567         to a main method.
5568
5569         * doc/Makefile (install): Changed to depth first to get rid of
5570         missing directory install warning.
5571
5572         * as/Makefile (install-doc): Made work on Mac.
5573
5574 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5575
5576         * src/SDCCast.c: added an additional type flow in decorateType() of
5577         opposite direction, see feature request #860006; it's enabled at runtime
5578         by setting the environment variable SDCC_NEWTYPEFLOW
5579         * src/SDCCast.h: changed prototype of decorateType()
5580         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5581         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5582         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5583         see feature request #877103
5584         * src/SDCCval.c: updated call of decorateType()
5585         (valBitwise): fixed bug #882876
5586         (valMinus): added promotion
5587         (valLogicAndOr): result is unsigned
5588         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5589         * src/SDCCsymt.c (computeType),
5590         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5591         must not cause an unsigned operation
5592         * src/pic/glue (pic14emitRegularMap),
5593         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5594
5595 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5596
5597         * src/pic/pcode.c (PCodeID): commented out left over debug code
5598
5599 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5600
5601         * support/valdiag/tests/overflow.c: added shift tests
5602         * src/pic/device.c,
5603         * src/pic/gen.c,
5604         * src/pic/gen.h,
5605         * src/pic/glue.c,
5606         * src/pic/main.c,
5607         * src/pic/pcode.c,
5608         * src/pic/pcode.h,
5609         * src/pic/pcodepeep.c,
5610         * src/pic/pcoderegs.c,
5611         * src/pic/ralloc.c,
5612         * src/pic/ralloc.h: applied patch from Slade Rich;
5613         added support for multiple code pages and multiple RAM banks on the
5614         PIC 14 port. The ASM files now no longer simply assume all the
5615         code / RAM are in the same page / bank. This means the linker can
5616         safely allocate code/RAM of separate ASM files to different pages/banks.
5617         * doc/sdccman.lyx: added Slade's tips
5618         * src/mcs51/peeph.def: fixed bug #880768
5619
5620 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5621
5622         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5623         * src/SDCCast.c (decorateType): fixed bug #880197
5624
5625 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5626
5627         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5628         getopt.h.
5629
5630         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5631         strtof is not part of C89 and isn't included with Mac OS X.
5632
5633 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5634
5635         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5636         shiftL2Left2Result): fixed bug #879326
5637         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5638         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5639         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5640         address fetch for clr instruction
5641         * device/lib/hc08/_mulint.c: created optimized assembly version
5642         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5643
5644 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5645
5646         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5647         proposed in FR #877103
5648
5649 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5650
5651         * src/SDCCval.c (cheapestVal): added missing checks
5652         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5653         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5654
5655 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5656
5657         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5658         equal operands
5659
5660 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5661
5662         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5663         loaded with the linker search paths (-L arguments) and the libraries
5664         to be linked with the current source (-l arguments). Changes
5665         currently will affect only the pic16 port.
5666         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5667         include path the port specific paths and port specific libraries,
5668         * gplink command now contains the $3 argument,
5669         * src/pic16/device.h,
5670         * src/pic16/device.c,: structure PIC_device is made public and
5671         renamed to PIC16_device, the same for variable Pics which is renamed
5672         to Pics16. Updated all references to them.
5673         * src/pic16/glue.c (pic16glue): corrected bug with code
5674         initialization which bypassed the variable initializations block.
5675
5676         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5677         COMPILE_FLAGS and added the --nostdinc option
5678
5679 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5680
5681         * device/include/mc68hc908jb8.h: Register defs for another member
5682         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5683
5684 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5685
5686         Documenting changes from previous commits.
5687         * configure.in (version 1.56),
5688         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5689         when generating output files to configure the pic16 library,
5690         but now I've commented it out, since gputils aren't installed in the
5691         SF compile farm, so library won't compile
5692
5693         * device/lib/Makefile.in (version 1.56): initially I've added in
5694         target 'all' the prerequestive 'model-pic16' so it compiled the
5695         pic16 library, but now I've commented it out for the same reasons
5696         above,
5697         * added targets 'model-pic16' and 'objects-pic16' to compile the
5698         library
5699         * added target 'port-specific-objects-pic16' to handle the
5700         generated libraries and copy them into the build/ directory
5701         * added target 'clean-intermediate-pic16' to clean intermediate
5702         files into pic16 directory
5703         * in target 'installdirs' added line to create directory pic16 in
5704         the installation path
5705
5706         * device/include/Makefile.in (version 1.11): in target 'install'
5707         added lines to copy all header files to installation path,
5708         * in target 'installdirs' added line create directory for pic16
5709         headers in the installation path
5710
5711 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5712
5713         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5714          a function call
5715
5716 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5717
5718         * configure,
5719         * device/lib/configure.in,
5720         * device/lib/configure: fixed for autoconf 2.57
5721
5722 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5723
5724         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5725         option so that it actually works. Made it specific to the z80, since
5726         the gbz80 doesn't have these kinds of I/O ports.
5727
5728 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5729
5730         * device/include/z180.h,
5731         * device/lib/_memcpy.c,
5732         * device/lib/_memmove.c,
5733         * device/lib/_mulint.c,
5734         * device/lib/ser_ir.c,
5735         * device/lib/ser_ir_cts_rts.c,
5736         * device/lib/_strcmp.c,
5737         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5738         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5739         portmode; added deprecation warning for bank= and protmode= forms.
5740         Also, guard against buffer overflow.
5741         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5742
5743 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5744
5745         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5746         changed interrupt vector table generation to only emit declared vectors.
5747         * device/include/Makefile.in: added missing backslash
5748         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5749
5750 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5751
5752         Mainly changes to support compilation of the device libraries
5753         * src/pic16/device.c: stack is allocated via symbol and not
5754         via literal number. The symbol is placed in the corresponding
5755         position of the data ram
5756         * (pic16_dump_section): relocatable and absolute uninitialized
5757         data are now emitted in sorted order to reduce section naming,
5758         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5759         weren't marked as being in the access bank,
5760
5761 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5762
5763         Added portion of GNU PIC Library under the directory
5764         device/include/pic16 and device/lib/pic16. These files
5765         contain the declarations of SFRs for the PIC18Fxx2 devices.
5766         The directory is initialized via configure from toplevel.
5767
5768 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5769
5770         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5771         the spilllocations to be compared correctly
5772
5773 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5774
5775         * src/SDCCast.c (decorateType): fixed bug introduced today
5776
5777 2004-01-12  Borut Razem <borut.razem AT siol.net>
5778
5779         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5780         doc/sdccman.lyx: upper case pragmas are deprecated
5781
5782 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5783
5784         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5785         in simpler and even better code
5786
5787 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5788
5789         * src/SDCCicode.c (operandOperation): fixed bug #874819
5790         * src/SDCCast.c (decorateType): fixed
5791         char foo (unsigned long ul) { return ul > 0; }
5792
5793 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5794
5795         * doc/sdccman.lyx: Moved and added some sections, small changes
5796         all over. Telling LaTeX to be less strict with word spacing
5797         to better keep the right margin. Changed some notes about
5798         maintainance of the ports in section 3.2.1 - is it OK like this?
5799
5800 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5801
5802         SDCC source changes:
5803         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5804         convilong): modified to inform the pic16 port that builtin functions
5805         are external
5806
5807         PIC16 PORT specific changes:
5808         * src/pic16/device.c pic16_dump_equates() added,
5809         processor registers declared internally by the port are emitted in
5810         the translation as equates,
5811         * src/pic16/gen.c: inline code is passed unprocessed to the
5812         translation,
5813         * (pic16_popGetLit2): fnuction modified to take second operand as
5814         pCodeOp pointer and not as literal,
5815         * (popRegFromIdx): prefixed with pic16_,
5816         * (pic16_popCombine2): modified to receive already allocated pCode
5817         operands,
5818         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5819         * (genFunction): initializes local stack frame and pushes on stack
5820         all the registers used by this function,
5821         * (genEndFunction): restores all registers from stack and restores
5822         stack frame,
5823         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5824         improvements,
5825         * (pic16glue): changed the program startup sequence,
5826         * added new dbName code 'A' for functions placed in absolute section
5827         * src/pic16/main.c: added function attribute _naked,
5828         * added pragma 'code' to place a fnuction at an absolute address,
5829         * added command line arguments --debug-ralloc and --pcode-verbose,
5830         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5831         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5832         * (pic16_newpCodeOpLit2): modified to take the second operand as
5833         pCodeOp pointer,
5834         * (pic16_printpBlock): modified to emit each function in a separate
5835         section,
5836         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5837         UPPER for immediate operands,
5838         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5839         instruction,
5840         * src/pic16/peeph.def: all peepholes with movff are commented out,
5841         because there is a problem in the pcode peep optimizer,
5842         * src/pic16/ralloc.c: the register allocator can now reuse local
5843         function symbols for another function. This saves register usage.
5844         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5845
5846         Added file src/pic16/NOTES with information about program writing on
5847         the current port version.
5848
5849 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5850
5851         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5852         and peephole 252 (array access)
5853
5854 2004-01-09  Borut Razem <borut.razem AT siol.net>
5855
5856         * src/SDCCmain.c : fixed #872250: -l command line defined library
5857           files are scanned before standard library files
5858
5859 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5860
5861         * src/SDCCast.c (decorateType): fixed bug #874046
5862
5863 2004-01-09  Borut Razem <borut.razem AT siol.net>
5864
5865         * support/scripts/sdcc.nsi: remove previous installation
5866
5867 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5868
5869         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5870         bytes for last interrupt vector (mcs51)
5871         * sdcc.spec: fixed typo
5872
5873 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5874
5875         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5876         gen51Code): more efficient parameter receive for --model-large
5877         ("bug" #845294)
5878
5879 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5880
5881         * src/ds390/main.c,
5882         * src/z80/main.c: added missed needLinkerScript flags (more than
5883         one port structure defined in these file)
5884         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5885         bug #795325
5886
5887 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5888
5889         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5890         * src/port.h: added flag needLinkerScript in port->linker
5891         structure to inform whether to create a .lnk file or not,
5892         * src/avr/main.c,
5893         * src/ds390/main.c,
5894         * src/hc08/main.c,
5895         * src/mcs51/main.c,
5896         * src/pic/main.c,
5897         * src/pic16/main.c,
5898         * src/xa51/main.c,
5899         * src/z80/main.c: changed appropriately to configure
5900         needLinkerScript flag
5901         * src/pic/gen.c,
5902         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5903         * src/pic/glue.c: added variable udata_section_name to
5904         override default uninitialized data segment definition for
5905         devices only with SHAREBANK memory (reported from Erik Epetrich)
5906         * (pic14emitOverlay): modified to emit a commented overlay segment
5907         directive when no overlay data exist
5908         * (picglue): modified to emit uninitialized data segment
5909         according to udata_section_name
5910         * src/pic/main.c (_pic14_parseOptions): added command line
5911         options --udata-section-name=[name] to override default
5912         udata definition name
5913         * modified _linkCmd and _asmCmd to include compiler passed
5914         arguments via -W option
5915         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5916         object file from '.rel' to '.o' in port->linker structure,
5917         changed size of fptr from 2 to 3 in port structure
5918
5919 2004-01-07  Borut Razem <borut.razem AT siol.net>
5920
5921         * support/scripts/sdcc.nsi: update PATH
5922         * support/scripts/sdcc.ico: craeted
5923
5924 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5925
5926         * device/include/Makefile.in: fix install
5927         * doc/Makefile: fix install
5928
5929 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5930
5931         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5932         in bug #860505
5933         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5934         how the function variable allocation summary is displayed; also
5935         include information about variables allocated to the overlay
5936         segment
5937
5938 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5939
5940         * as/mcs51/lkmain.c: Help about -Y option
5941         * as/mcs51/lkarea.c: Fixed gcc warnings
5942
5943 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5944
5945         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5946         fixed warning
5947         * support/valdiag/tests/overflow.c: added
5948         * src/SDCCast.c (decorateType),
5949         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5950         LEFT_OP (left shift)
5951
5952 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5953
5954         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5955         (default behaviour).
5956
5957 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5958
5959         A python script to validate compiler diagnostic messages. It can be
5960         used to verify that sdcc complains about bad c source code and
5961         gives a good location of the error.
5962         * support/valdiag/Makefile,
5963         * support/valdiag/valdiag.py,
5964         * support/valdiag/tests/*
5965
5966 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5967
5968         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5969         * src/SDCCsymt.c (newEnumType),
5970         * src/SDCCsymt.h
5971         * support/Util/SDCCerr.c,
5972         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5973         enum related bugs.
5974         * support/regression/tests/enum.c: added test for enum values that
5975         require at least 2 bytes of storage.
5976
5977 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5978
5979         * src/common.h: added ifndef/define/endif macros
5980         around the header file.
5981         Bug reported from Jesus Calvino-Fraga
5982
5983 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5984
5985         * sdcc.spec: updated
5986         * device/include/Makefile.in: don't install CVS directories
5987         * device/lib/Makefile.in: added removal of CVS directories after install
5988         * doc/Makefile: fixed install, added local_icons
5989         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5990         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5991         * src/ds390/gen.c (genRightShift): fixed bug #870788
5992         * src/SDCCast.c (decorateType): fixed bug #870781
5993
5994 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5995
5996         PIC16 port related changes:
5997         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5998         added variable stackPos,
5999
6000         * gen.c: genCall, assignResultValue: added support for
6001         pushing/retrieving function parameters to/from stack,
6002         genFunction,genEndFunction: setup stack frame for the
6003         generated function,
6004         genAddrOf: will be changed according to bug 863624
6005
6006         * added files genutils.c and genutils.h which contain gen*
6007         debugged and optimised functions extracted from gen.c
6008
6009         * glue.c: added variable 'externs' which holds extern symbols,
6010         pic16emitRegularMap: is modified to properly handle relocatable
6011          symbols under the new scheme,
6012         pic16createInterruptVect: is modified
6013         pic16printPublics: is modified to emit 'global' assembler directives,
6014         added pic16_printExterns to print extern symbols,
6015         pic16glue: initializes stack/frame pointer in the beginning of
6016         the assembly output. Temporary hack, will be corrected later,
6017         because gplink yet does not support stack and SDCC does not
6018         yet support a type of crt0.o object to create the final binary.
6019
6020         * Removed many lines that contain 8051 legacy code.
6021         * The code is finally placed under a 'code' directive.
6022         * Added port specific options.
6023
6024         * _process_pragma: simplified since now we do not need *special*
6025         include file to define SFR registers. But a separate header
6026         will be needed. This will be developed later.
6027         * _pic16_parseOptions: added, parses port specific options:
6028         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6029         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6030         --preplace-udata-with=
6031
6032         * _pic16_setDefaultOptions: modified to initialize section names,
6033         but hack is temporarly out of order since it needs improvement.
6034         * _pic16_genAssemblerPreamble: configuration words are emitted by
6035         their address instead of their name. This part is incomplete and
6036         supports only the 18Fxx2 devices. Other devices will emit an error
6037         during assembly since they do not contain the same set of config
6038         registers
6039         * _pic16_genIVT: is modified,
6040
6041         * pcode.c: added definitions for some hardware registers that are needed
6042         for stack support
6043         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6044         All PCI entries are updated. Now LFSR is supported.
6045         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6046         * added pic16_newpCodeOpLit2 to support instructions with
6047         two literal arguments
6048         * pic16_pCode2str: corrected code that emits assembler instructions
6049         with two literal operands and those that have an access bit modifier
6050         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6051         this fixes a bug which caused some labels to be lost, when an
6052         assembler directive was added, i.e. banksel,
6053         * pic16_FixRegisterBanking: improved logic that causes the insertion
6054         of bank switching,
6055         * InlineFunction: functions that are called once, are not any more
6056         inlined. This can be a port option in the future,
6057
6058         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6059
6060         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6061         hold the corresponding uninitialized symbols,
6062         * pic16_allocProcessorRegister: registers have explicit marked the
6063         accessBank field,
6064         * pic16_allocInternalRegister: registers are explicit marked as
6065         not used,
6066         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6067         processing list, so bit registers were lost,
6068         *
6069
6070         * ralloc.h: added field 'accessBank' and original symbol operand
6071         in register definition,
6072         * removed the field isMapped from register definition,
6073
6074         ** Several functions have been removed from various sources:
6075         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6076         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6077         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6078         pic16_assignRelocatableRegisters
6079
6080         ** others have been introduced:
6081         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6082         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6083
6084 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6085
6086         * support/scripts/inc2h.pl: changed definition of BIT_AT
6087         to emit 'sbit at' instead of 'bit at'. This was a request.
6088
6089         PIC16 port related preliminary changes:
6090         * gen.c: prefixed function popRegFromString with
6091         pic16_ and all references to it corrected
6092         * pcode.c: all pic16_pc_* hardware registers prefixed
6093         with underscore (_),
6094         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6095         * ralloc.c: newReg(): when register is REG_SFR then
6096         set address to rIdx,
6097         pic16_allocProcessorRegister(): marks register wasUsed=0
6098         pic16_writeUsedRegs(): added a call to assign processor
6099         registers via pic16_assignFixedRegisters
6100
6101 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6102
6103         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6104         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6105         variables in unused register banks.  Also the SSEG is placed
6106         wherever there is enough space for it, and IDATA can be anywhere
6107         in internal RAM.  For now compile using -Wl-Y[stack_size].
6108         The mem file is different for this option as well, since it
6109         makes no sense of talking about DSEG lenght.
6110
6111 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6112
6113         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6114         in certain cases, e.g. when ROM assignment, patch provided
6115         from Albert den Haan.
6116
6117 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6118
6119         Many signedness and type propagation fixes:
6120         * src/SDCCicode.c: made geniCodeCast() static
6121         replaced SPEC_ by IS_ (cosmetic)
6122         (operandOperation): fixed div and mod operation
6123         (usualBinaryConversions): added support for promotion of char
6124         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6125         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6126         (geniCodeAdd): an array index will stay unsigned, even if promoted
6127         from char to int
6128         (geniCodeArray): ditto
6129         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6130         * src/SDCCsymt.c (computeType): added more support for char;
6131         promotion of char is selectable by promoteCharToInt, fixed signedness
6132         for all cases
6133         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6134         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6135         * src/SDCCval (val*): replaced signedness calculation by
6136         computeType()
6137         rearranged if-branches (cosmetic)
6138         (valShift): added warning W_SHIFT_CHANGED
6139         (valCompare): fixed problem with different types
6140         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6141         * support/regression/tests/literalop.c: added many cases
6142         * support/regression/tests/ast_constant_folding.c: changed finally to
6143         'unsigned int'
6144         * .version: new year, new version: 2.3.7
6145         * src/SDCCmain.c (main): applied patch #866468
6146         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6147         provided by Scott Bronson
6148         * doc/sdccman.lyx: updated documentation for sdcdb
6149         updated and added chapter tips
6150
6151 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6152
6153         * src/SDCCsymt.h: missing from yesterday's commits
6154
6155 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6156
6157         * src/SDCC.y (struct_or_union_specifier),
6158         * support/Util/SDCCerr.c,
6159         * support/Util/SDCCerr.h: verify that struct & union tags are used
6160         as declared.
6161
6162 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6163
6164         * src/SDCCglobl.h: missing from yesterday's commits
6165
6166 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6167
6168         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6169         sft_attributes, struct_declaration, parameter_declaration,
6170         type_name, start_block, declaration_list),
6171         * src/SDCC.lex (check_type): support redefinition of typedef names
6172
6173 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6174
6175         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6176         aligned xdata arrays. Erik helped me with the if clause.
6177
6178 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6179
6180         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6181         warning
6182
6183 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6184
6185         * src/SDCCast.h,
6186         * src/SDCCast.c (newAst_),
6187         * src/SDCCicode.h,
6188         * src/SDCCicode.c (ast2iCode, newiCode),
6189         * src/SDCCglobl.h,
6190         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6191         expr, statement, expression_statement, selection_statement,
6192         iteration_statement, expr_opt, jump_statement): foundation for tracking
6193         sequence points
6194         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6195         point code too)
6196
6197 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6198
6199         * support/Util/SDCCerr.c,
6200         * src/SDCCast.h,
6201         * src/SDCCast.c (createCase, createDefault, decorateType),
6202         * src/SDCClabel.c (labelUnreach),
6203         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6204         to error messages.
6205         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6206         (with thanks to Stas Sergeev)
6207         * device/include/time.h,
6208         * device/lib/time.c (CheckTime): suppress unreachable code warning
6209
6210 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6211
6212         * src/SDCCast.c (createIvalCharPtr),
6213         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6214         bug #753752)
6215         * support/regression/tests/nullstring.c: tests for these two bugs
6216
6217 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6218
6219         * support/Util/SDCCerr.h,
6220         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6221         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6222         about storage class and 'at' used inside struct or union
6223         * src/SDCCBBlock.c (iCodeFromeBBlock),
6224         * src/SDCCcse.c (ifxOptimize),
6225         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6226         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6227         printIval, emitStaticSeg, emitOverlay),
6228         * src/SDCClabel.c (deleteIfx),
6229         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6230         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6231         gatherAutoInit, processParms),
6232         * support/Util/SDCCerr.h,
6233         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6234         reporting for post-parse errors.
6235
6236 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6237
6238         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6239         implicit casts via union; they don't work on big endian systems
6240         (possible fix for bug #861138)
6241
6242 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6243
6244         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6245         * src/mcs51/main.c: fixed the fix for bug #737001
6246
6247 2003-12-15  Borut Razem <borut.razem AT siol.net>
6248
6249         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6250
6251 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6252
6253         * support/makebin/makebin.c: put output in binary mode
6254
6255 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6256
6257         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6258         xdata and data memory on startup. Set the environment variable
6259         SDCC_NOGENRAMCLEAR to disable this.
6260         * src/mcs51/peephole.def,
6261         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6262         (allows non-interrupt and interrupt code to safely compete for a resource
6263         without the non-interrupt code having to disable interrupts)
6264
6265 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6266
6267         * src/SDCCicode.c (geniCodeAdd),
6268         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6269         with valFromType if type might be a pointer and host is big endian).
6270         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6271         types, not just integer types.
6272         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6273         multiply defined with mismatching "at" address.
6274
6275 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6276
6277         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6278         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6279         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6280         with embedded nulls (fixed bug #753752)
6281
6282 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6283
6284         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6285         Apparently this did not see much testing (endless loop)
6286
6287 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6288
6289         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6290
6291 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6292
6293         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6294         gracefully handle NULL memmap pointers
6295
6296 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6297
6298         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6299         instead of deleting the iCode when an operand is volatile
6300         * src/z80/gen.c (genDummyRead),
6301         * src/mcs51/gen.c (genDummyRead),
6302         * src/ds390/gen.c (genDummyRead),
6303         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6304         not just IC_RIGHT
6305         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6306         * src/SDCC.y: fixed bug #850420
6307
6308 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6309
6310         Applied z80 i/o port patch from Peter Townson and fixed some operators
6311         to better handle operands in A register.
6312         * device/include/z180.h
6313         * src/SDCC.y
6314         * src/SDCCglue.c
6315         * src/z80/gen.c
6316         * src/z80/gen.h
6317         * src/z80/main.c
6318         * src/z80/peeph-z80.def
6319         * src/z80/peeph.def
6320         * src/z80/z80.h
6321
6322 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6323
6324         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6325
6326 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6327
6328         * device/lib/hc08/_mullong.c: Removed extra #endif
6329
6330 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6331
6332         * sim/ucsim/hc08.src/inst.cc,
6333         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6334         carries from x to h
6335         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6336         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6337         * device/include/stdarg.h: fixed varargs for hc08
6338         * device/lib/Makefile.in,
6339         * device/lib/hc08/Makefile,
6340         * device/lib/hc08/_mulint.c,
6341         * device/lib/hc08/_mullong.c: fixed some endian problems
6342
6343 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6344
6345         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6346         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6347         * device/lib/_gptrget.c,
6348         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6349
6350 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6351
6352         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6353         * src/SDCCast.c (astErrors): fixed bug #846007
6354         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6355
6356 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6357
6358         * src/SDCCast.c (decorateType): disabled a transformation I added in
6359         revision 1.188 (access to fields of a structure at an absolute address);
6360         it breaks with bitfields, extern declarations, and gcse analysis.
6361         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6362         could be assigned through a pointer, so don't complain.
6363         * src/SDCCast.c (astErrors),
6364         * src/SDCCast.h,
6365         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6366
6367 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6368
6369         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6370         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6371         output of __config directives, since gpasm now supports them
6372         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6373         pre-processor macro, i.e. -DMCU=p18f452
6374         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6375         and modified to handle 'cast' icode similarly to '=' icode
6376         * src/pic16/device.h (typedef struct PIC_device): added field
6377         'extMIface' to indicate that chip has external memory interface
6378         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6379         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6380         18F8720
6381
6382 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6383
6384         * src/SDCC.y (pointer): fixed bug #846006
6385         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6386         * src/SDCCast.c (decorateType): fixed bug #846009
6387         * src/ds390/peeph.def,
6388         * src/ds390/gen.c (genAnd, genOr),
6389         * src/mcs51/peeph.def,
6390         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6391
6392 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6393
6394         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6395         * src/SDCCdflow.c
6396         * src/SDCCcse.c
6397         * src/SDCCcse.h
6398         * src/SDCCBBlock.h
6399         * src/SDCCBBlock.c
6400
6401 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6402
6403         fixed bug #845089
6404         * src/SDCCbitv.h,
6405         * src/SDCCbitv.c: added function to free a bitvector
6406         * src/SDCClrange.h,
6407         * src/SDCClrange.c: added function to recompute the liveranges
6408         * src/avr/ralloc.c,
6409         * src/ds390/ralloc.c,
6410         * src/hc08/ralloc.c,
6411         * src/mcs51/ralloc.c,
6412         * src/pic/ralloc.c,
6413         * src/pic16/ralloc.c,
6414         * src/xa51/ralloc.c,
6415         * src/z80/ralloc.c: recompute the liveranges after register packing
6416
6417 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6418
6419         * src/SDCCloop.c (newInduction): fixed bug #845630
6420
6421 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6422
6423         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6424         inadvertantly left behind from my 2003-11-12 change
6425
6426 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         Updated headers I neglected to commit yesterday.
6429         * src/SDCClrange.h,
6430         * src/SDCCicode.h
6431
6432 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6433
6434         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6435         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6436         * src/SDCCopt.c (eBBlockFromiCode),
6437         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6438         the creation of the key hash table from the sequencing so it can be used
6439         earlier (for some GCSE bug fixes still pending)
6440
6441 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6442
6443         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6444         * support/regression/tests/addsub.c: testing genPlus shortcut
6445
6446 2003-11-15  Borut Razem <borut.razem AT siol.net>
6447
6448         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6449
6450 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6451
6452         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6453         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6454         ordering is immaterial.
6455         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6456
6457 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6458
6459         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6460         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6461         (SIGSEV) of bug #840381
6462         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6463         unlink new file before rename if new and old filenames are the same)
6464
6465 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6466
6467         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6468         uninitialized variables) for the mcs51. Set environment variable
6469         SDCC_GENRAMCLEAR to test.
6470         xdata initialization slightly shorter
6471
6472 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6473
6474         * src/SDCCsymt.h,
6475         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6476         #838241 & 780691 (basicly the same bug)
6477         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6478         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6479
6480 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6481
6482         * src/SDCCmain.c (linkEdit): "fix" #834252
6483
6484 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6485
6486         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6487         * src/SDCCast.h,
6488         * src/SDCC.y: fixed bug #819403
6489
6490 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6491
6492         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6493         the reentrant attribute.
6494         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6495         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6496         simulation
6497         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6498         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6499         erroneously reduced to a literal.
6500         * src/hc08/ralloc.c (packRegisters, rematStr),
6501         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6502         some cases
6503
6504 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6505
6506         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6507         * doc/sdccman.lyx: changed from 'article' to 'book'
6508         * doc/Makefile: readded test_suite_spec and cdbfileformat
6509
6510 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6511
6512         * device/include/stdlib.h: include malloc.h to comply with ANSI
6513         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6514
6515 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6516
6517         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6518         * doc/clean.mk: also remove *.out files
6519         * doc/sdccman.lyx: some additions, larger top/bottom margins
6520
6521 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6522
6523         * src/SDCC.y: fixed bug #837365
6524         * support/regression/tests/bitopcse.c
6525         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6526         a symbol (might be valop instead)
6527         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6528         * device/lib/clean.mk: added hc08 to the cleaning list
6529
6530 2003-11-04  Borut Razem <borut.razem AT siol.net>
6531
6532         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6533           made 2003-11-04
6534         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6535           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6536           malloc is declared in standard stdlib.h
6537
6538 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6539
6540         * device/lib/hc08/Makefile: need to clean .rel not .o files
6541         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6542
6543 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6544
6545         * src/port.h,
6546         * src/hc08/main.c,
6547         * src/mcs51/main.c,
6548         * src/ds390/main.c,
6549         * src/z80/main.c,
6550         * src/avr/main.c,
6551         * src/pic/main.c,
6552         * src/pic16/main.c,
6553         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6554         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6555         tests (which uses the port's oclsExpense function)
6556         * src/SDCC.y,
6557         * src/SDCCast.c,
6558         * src/SDCCicode.c,
6559         * src/hc08/gen.c,
6560         * src/ds390/gen.c,
6561         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6562
6563 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6564
6565         * src/SDCCcse.c (ifxOptimize),
6566         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6567         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6568         deleting the IFX iCode.
6569         * src/hc08/ralloc.c: reduced unneeded slocs
6570         * src/hc08/gen.c: fixed bug in asmopToBoolean
6571
6572 2003-11-04  Borut Razem <borut.razem AT siol.net>
6573
6574         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6575           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6576           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6577           transferred to configure
6578
6579 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6580
6581         Use headers defined in the C[++] standards:
6582         * sim/ucsim/gui.src/serio.src/fileio.cc
6583         * sim/ucsim/gui.src/serio.src/frontend.cc
6584         * sim/ucsim/gui.src/serio.src/main.cc
6585         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6586         * support/Util/NewAlloc.c
6587         * as/hc08/lklibr.c
6588         * as/mcs51/lklibr.c
6589         * as/z80/aslist.c
6590         * as/z80/assym.c
6591
6592 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6593
6594         * Added MSVC projects for hc08 assembler and linker:
6595         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6596         /as/hc08/link_hc08.dsp
6597
6598 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6599
6600         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6601
6602 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6603
6604         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6605
6606 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6607
6608         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6609
6610 2003-10-31  Borut Razem <borut.razem AT siol.net>
6611
6612         * support/cpp2/cpplib.h,
6613           support/cpp2/cpplib.c,
6614           support/cpp2/cpplex.c,
6615           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6616           to switch _asm block preprocessing on / off. Default is
6617           #pragma preproc_asm +
6618
6619 2003-10-31  Borut Razem <borut.razem AT siol.net>
6620
6621         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6622           when outputting comment blocks (when executed with -C option) and
6623           _asm (SDCPP specific) blocks
6624
6625 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6626
6627         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6628
6629 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6630
6631         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6632
6633 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6634
6635         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6636         * src/SDCCast.c (decorateType): fixed bug #832664
6637
6638 2003-10-31  Borut Razem <borut.razem AT siol.net>
6639
6640         * support\cpp2\cpplex.c: fixed for SDCPP:
6641           comments(when executed with -C option) and _asm blocks
6642           were included even if they where in skipped #if block.
6643           Applied solution from GCC cpp 3.3.2
6644
6645 2003-10-31  Borut Razem <borut.razem AT siol.net>
6646
6647         * src/SDCC.lex: sdcc now understands both formats:
6648           '# <line_number> <file_name>' and
6649           '#line <line_number> <file_name>'
6650         * support/cpp2/cppmain.c: sdcpp now generates the standard
6651           '# <line_number> <file_name>' instead of former
6652           '#line <line_number> <file_name>'
6653
6654 2003-10-30  Borut Razem <borut.razem AT siol.net>
6655
6656         * support/cpp2/cpphash.h,
6657         * support/cpp2/cpplib.h
6658         * support/cpp2/cpplex.c,
6659         * support/cpp2/cppmain.c,
6660         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6661
6662 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6663
6664         Fixed a number of problems revealed by bug #827883.
6665         * src/SDCCloop.c (loopInvariants): Spill location of the
6666         result operand should be recomputed if extracted from
6667         a loop. Also, don't extract assignments of an iTemp
6668         from a literal.
6669         * src/SDCCast.c (isConformingBody): loop reversal should
6670         not occur if the control variable is involved with a
6671         relational operator.
6672
6673 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6674
6675         * .version: bumped to 2.3.6 to reflect the big improvements
6676         made by Erik and Klaus. Thanks!
6677
6678 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6679
6680         Replaced the livrange code.
6681         * src/SDCClrange.c: added new LR code
6682         * src/SDCCloop.c,
6683         * src/SDCCBBlock.h: removed remainig parts from old LR code
6684         * src/ds390/ralloc.c,
6685         * src/ds390/gen.c: minor fixes to make it work with new code
6686
6687 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6688
6689         * as/hc08/asm.h,
6690         * as/hc08/lkrloc.c,
6691         * src/hc08/gen.c,
6692         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6693         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6694         (tweaked fix for bug #818696)
6695
6696 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6697
6698         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6699
6700 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6701
6702         * src/SDCCmain.c,
6703         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6704         * src/mcs51/gen.c (gencjneshort),
6705         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6706         more efficient (per Scott Bronson's suggestion)
6707
6708 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6709
6710         Extended the semantics of the critical keyword to include
6711         individual statements. See RFE #827755 and #799831
6712         * src/SDCC.y
6713         * src/SDCCicode.c
6714         * src/SDCCopt.c
6715         * src/SDCCast.c
6716         * support/Util/SDCCerr.c
6717         * support/Util/SDCCerr.h
6718         * src/mcs51/gen.c
6719         * src/ds390/gen.c
6720         * src/hc08/gen.c
6721
6722 2003-10-19  Borut Razem <borut.razem AT siol.net>
6723
6724         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6725
6726 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6727
6728         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6729         Fixed bug #818696
6730         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6731         and predecrement operand is displayed
6732
6733 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6734
6735         * src/SDCCval.c (valMinus): fixed bug #826041
6736
6737 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6738
6739         Some hc08 related updates that I missed earlier
6740         * sim/ucsim/stypes.h
6741         * support/regression/ports/hc08/spec.mk
6742
6743 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6744
6745         New target "hc08" for the Motorola 68hc08 family of micros
6746
6747         * configure
6748         * configure.in
6749         * Makefile
6750         * src/hc08/*
6751         * src/SDCCmain.c
6752         * src/port.h
6753         * sim/ucsim/hc08.src/*
6754         * sim/ucsim/configure.in
6755         * src/ucsim/configure
6756         * sim/ucsim/packages_in.mk
6757         * as/hc08/*
6758         * as/Makefile
6759         * device/include/mc68hc908qy.h
6760         * device/lib/hc08/*
6761         * device/lib/Makefile.in
6762         * support/regression/ports/hc08/*
6763         * support/regression/Makefile
6764
6765 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6766
6767         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6768         regression test
6769         * src/ds390/gen.c (genCast): fixed bug #821957
6770
6771 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6772
6773         * device/lib/logf.c: "fixed" overlay bug
6774         * support/regression/ports/host/spec.mk: added m library
6775         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6776         * support/regression/tests/float_trans: added (for Eric)
6777
6778 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6779
6780         * src/mcs51/gen.c (genCpl): fixed bug
6781         http://sf.net/mailarchive/message.php?msg_id=6263915
6782
6783 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6784
6785         * src/SDCCast.c (decorateType): added extended constant folding
6786         * src/SDCCsymt.c (computeType): cleanup
6787         * src/SDCCval.c (valShift): minor optimization
6788         * support/regression/tests/ast_constant_folding.c: added
6789
6790 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6791
6792         * src/SDCCmain.c: removed some unintended changes
6793
6794 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6795
6796         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6797         * src/z80/gen.c: fixed part of bug #817589
6798         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6799
6800 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6801
6802         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6803         * src/SDCCcflow.c
6804         * src/SDCCcse.c
6805         * src/SDCCdflow.c
6806         * src/SDCClabel.c
6807         * src/SDCClrange.c
6808         * src/SDCCmem.c
6809         * src/SDCCopt.c
6810         * src/SDCCpeeph.c
6811         * src/SDCCset.c
6812         * src/avr/ralloc.c
6813         * src/ds390/ralloc.c
6814         * src/izt/ralloc.c
6815         * src/mcs51/ralloc.c
6816         * src/pic/ralloc.c
6817         * src/pic16/ralloc.c
6818         * src/xa51/ralloc.c
6819         * src/z80/ralloc.c
6820         * src/z80/gen.c: removed unused label "release:"
6821
6822 2003-10-06  Borut Razem <borut.razem AT siol.net>
6823
6824         * src/SDCC.lex: removed definition of unused variables
6825           save_optimize and save_options
6826
6827 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6828
6829         * clean.mk: removed '=' in "-maxdepth=1"
6830         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6831         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6832
6833 2003-10-06  Borut Razem <borut.razem AT siol.net>
6834
6835         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6836           my_unput() replaced by unput()
6837
6838 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6841         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6842         type-punned pointer will break strict-aliasing rules"
6843         Old LR behaviour is again default; Klaus' LR can be choosen by
6844         defining the environment variable LRKLAUS
6845         * src/SDCCBBlock.h
6846         * src/SDCCloop.c
6847         * src/SDCClrange.c
6848         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6849         * clean.mk: fixed removal of files in bin/CVS/
6850         * device/lib/clean.mk: fixed removal of directories small and large
6851         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6852         * src/SDCCicode.c,
6853         * src/SDCCval.c: removed superflous test for pedantic
6854
6855 2003-10-05  Borut Razem <borut.razem AT siol.net>
6856
6857         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6858           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6859           message "unmatched #pragma SAVE and #pragma RESTORE"
6860
6861 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6862
6863         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6864           assembly, critical functions, atomic, nojtbound)
6865
6866 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6867
6868         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6869         * src/SDCCBBlock.h
6870         * src/SDCCloop.c
6871         * src/SDCCloop.h
6872         * src/SDCClrange.c
6873
6874 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6875
6876         * src/z80/gen.h,
6877         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6878         * src/mcs51/gen.h
6879         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6880         * src/ds390/gen.h
6881         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6882         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6883         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6884
6885 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6886
6887         * src/z80/gen.c (genRet): fixed bug #524753
6888         * src/z80/gen.c (genCast): fixed internal error on cast from
6889         pointer to long
6890         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6891         fix for bug #477835 to the z80
6892         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6893         for tracking iCodes in the peephole optimizer for z80
6894
6895 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6896
6897         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6898         the other part of bug #814548
6899         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6900
6901 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6902
6903         * src/SDCCcse.c: fixed part of bug #814548
6904
6905 2003-09-28  Borut Razem <borut.razem AT siol.net>
6906
6907         * src/asm.c: rewrite of printILine() to use temporary file instead
6908           a pipe
6909         * src/xa51/main.c: commented out declaration of int rewinds
6910
6911 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6912
6913         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6914
6915 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6916
6917         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6918         * src/asm.c (printILine): Fixed bug #811015
6919
6920 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6921
6922         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6923         freeing.
6924
6925 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6926
6927         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6928         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6929         to correctly handle general case of AOP_PAIRPTR
6930         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6931
6932 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6933
6934         * src/mcs51/ralloc.c (fillGaps),
6935         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6936         register positioning bug)
6937
6938 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6939
6940         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6941
6942 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6943
6944         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6945         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6946         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6947         (ralloc doesn't intentionally do this now, but perhaps later)
6948         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6949         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6950         register positioning bugs (Fixed bug #762602 and #795325)
6951         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6952         (Fixed bug #808779)
6953         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6954         lines that --i-code-in-asm generates
6955
6956 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6957
6958         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6959         trying to fclose a FILE* that was already closed.
6960
6961 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6962
6963         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6964         of const struct should be treated as if const themselves)
6965
6966 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6967
6968         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6969
6970 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6971
6972         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6973         Unix (/n) and DOS (/r/n) line terminations.
6974
6975 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6976
6977         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6978         bug #613775
6979
6980 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6981
6982         * src/mcs51/gen.c (genFunction, genEndFunction),
6983         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6984         and restore of EA so that stack offsets to parameters are
6985         correct when using both critical and reentrant/stack-auto.
6986         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6987         size (can be triggered in error if sloc is shared between
6988         different sized objects)
6989         * device/include/float.h: fixed macros to explicitly use
6990         unsigned long where needed
6991
6992 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6993
6994         Feature req. 799831: added code to allow nesting of critical functions
6995         * src/mcs51/gen.c (genFunction, genEndFunction)
6996         * src/ds390/gen.c (genFunction, genEndFunction)
6997
6998 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6999
7000         * src/SDCCsymt.c (sclsFromPtr),
7001         * src/SDCCsymt.h,
7002         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7003         support for standard C idiom of memory mapped variables; for
7004         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7005         to xdata int at 0x1234 tempvar = 1.
7006         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7007         provided by Akiya ISHIDA
7008
7009 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7010
7011         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7012         * src/SDCCval.c (constVal): added reduction from int to char
7013         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7014         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7015         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7016         to ignore the sign
7017         * support/regression/tests/shifts.c: fixed
7018
7019 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7020
7021         * src/z80/gen.c (genXor): Fixed bug #805445
7022
7023 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7024
7025         Fixed bug #621531 (const & volatile confusion in the type chain).
7026         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7027         refer to the const or volatile state of the pointer itself.
7028
7029         * src/SDCCast.c
7030         * src/SDCCglue.c
7031         * src/SDCCicode.c
7032         * src/SDCCsymt.c
7033         * src/SDCCval.c
7034         * src/SDCC.y
7035         * src/SDCCsymt.h
7036         * src/pic/gen.c
7037         * src/pic/ralloc.c
7038         * src/pic16/gen.c
7039         * src/pic16/ralloc.c
7040         * support/regression/tests/const.c
7041
7042 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7043
7044         When checking for duplicated modules, use absolute paths
7045         instead of relative paths.  Files changed:
7046
7047         * as/mcs51/lklib.c
7048         * link/z80/lklib.c
7049
7050 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7051
7052         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7053
7054 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7055
7056         * device/include/string.h: added size_t typedef, changed
7057         prototypes to use size_t, eliminated separate reentrant and
7058         non-reentrant declarations, added _memmove declaration
7059         * device/lib/_memcpy.c: changed to use size_t instead of int,
7060         changed /4 to >>2 to avoid division library call
7061         * device/lib/_memcmp.c,
7062         * device/lib/_memset.c,
7063         * device/lib/_strncat.c,
7064         * device/lib/_strncpy.c,
7065         * device/lib/_strncmp.c: changed to use size_t instead of int
7066         * device/lib/_memmove.c: new file (fixed bug #772294)
7067         * device/lib/Makefile.in: added _memmove.c
7068         * device/lib/z80/asm_strings.s: fixed bug #772290
7069         * support/regression/tests/bitfields.c: attempt to fix host assertion
7070         failure on amd64-unknown-linux2.2
7071
7072 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7073
7074         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7075         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7076         * as/z80/asmain.c (main): fixed bug #801766
7077
7078 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7079
7080         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7081         compilers
7082
7083 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7084
7085         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7086         reported in bug #800609
7087
7088 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7089
7090         * Top header beautifications in src/pic16 directory:
7091           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7092           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7093           pcoderegs.h, ralloc.c, ralloc.h
7094         * main.c: added top header and GPL license notice
7095         * pcode.c: fixed the if-conditional warning
7096
7097 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7098
7099         * device/lib/_mullong.c: replaced int by short for gcc
7100
7101 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7102
7103         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7104         and JUMPTABLE iCodes properly now (worked by accident before)
7105         * src/mcs51/gen.c (leftRightUseAcc),
7106         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7107         iCode properly now. Use getSize instead of nRegs since a & b
7108         aren't part of the nRegs tally.
7109
7110 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7111
7112         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7113         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7114           before instructions that use the _STATUS register
7115
7116 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7117
7118         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7119         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7120         fetching of the pointer
7121         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7122         copied from genNearPointerSet()
7123         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7124         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7125         If they pop r0/r1 they must be called in the opposite order than aopOp().
7126         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7127         (resp. --stack-auto), prepared for --xstack
7128
7129 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7130
7131         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7132
7133 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7134
7135         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7136         these ports have their own __sdcc_external_start()
7137
7138 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7139
7140         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7141         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7142         type for bits was changed. It resulted in bit variables becoming
7143         global, which is not permitted in PIC 14 assembly output.
7144
7145 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7146
7147         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7148
7149 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7150
7151         Z80 and MCS51 linkers complaint if a public symbol is defined
7152         in more than one library module:
7153
7154         * as/mcs51/lklib.c
7155         * link/z80/lklib.c
7156         * as/mcs51/Makefile.in
7157
7158 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         A few small changes that speed up the peephole optimizer.
7161
7162         * src/SDCCpeeph.c
7163
7164 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7165
7166         Try to make the peephole optimizer smarter by maintaining
7167         an association between the assembly source code and the
7168         iCodes that originated them. Put this information to use
7169         with a new peephole rule condition "notVolatile" so that
7170         the rules can be aggressive yet still safe.
7171
7172         * src/SDCCpeeph.c
7173         * src/SDCCpeeph.h
7174         * src/mcs51/gen.c
7175         * src/mcs51/peeph.def
7176
7177 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7178
7179         Fixed bug #741761
7180
7181         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7182         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7183         if the left or right operand symbols have the accuse flag set.
7184
7185 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7186
7187         Changed the type of the result of the ! (NOT) operator to char;
7188         previously it returned the same type as the source. This allows
7189         us to eliminate all the genFloatNot functions (all of its target
7190         implementations were very buggy) since !float can use the same
7191         code as !long now.
7192
7193         * src/SDCCicode.c (ast2iCode): ! returns char
7194         * src/mcs51/gen.c (genNot, genNotFloat),
7195         * src/ds390/gen.c (genNot, genNotFloat),
7196         * src/z80/gen.c (genNot, genNotFloat),
7197         * src/pic/gen.c (genNot, genNotFloat),
7198         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7199
7200 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7201
7202         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7203         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7204            during interrupts. Ensure WSAVE is located at a shared bank address.
7205         2. Fixed page selection in some places
7206         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7207            the registers name strings.
7208         4. Fixed "signed / unsigned compare" compiler warnings.
7209         5. The PIC port manages its own allocation of the general purpose
7210            registers, but makes no attempt to reuse them. As a result when
7211            compiling it soon runs out of general purpose registers. Some
7212            additional code was added to the files pcode.c and device.c to walk
7213            through the function call tree and rename the registers so that they
7214            get reused.
7215
7216         * src/pic/device.c
7217         * src/pic/gen.c
7218         * src/pic/glue.c
7219         * src/pic/pcode.c
7220         * src/pic/pcode.h
7221         * src/pic/ralloc.c
7222         * src/pic/ralloc.h
7223         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7224         genPlus() & genMinus() when the result is the same as left or right
7225
7226 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7227
7228         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7229
7230 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7231
7232         Made bitfield a distinct type from bit so that bitfields
7233         convert as per ANSI C and bits retain their traditional
7234         boolean style behaviour. Implemented bitfield support in
7235         the z80 port.
7236
7237         * src/SDCCsymt.h,
7238         * src/SDCCsymt.c,
7239         * src/SDCCast.c,
7240         * src/cdbFile.c,
7241         * src/mcs51/gen.c,
7242         * src/ds390/gen.c: bit v bitfield split
7243         * src/z80/gen.c: New support for bitfields
7244         * support/regression/tests/bitfields.c: reenabled z80,
7245         added more tests
7246
7247 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7248
7249         Rules 246.x, 247.x relate to bitfields, the others speed up
7250         access to xdata mapped I/O devices.
7251
7252         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7253
7254 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7255
7256         Cleaned up genPackBits and genUnpackBits and added two helper
7257         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7258         for literal assignments in genPackBits (thanks to Frieder for
7259         reminding me).
7260
7261         * src/mcs51/gen.c
7262         * src/ds390/gen.c
7263
7264 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7265
7266         Fixed bug #748310 (pointer to function type mishandled when the
7267         function name is omitted). Also fixed a SIGSEGV when a function
7268         attribute (reentrant, etc) is used on a non-function or on a
7269         function but misplaced before the parameter list.
7270
7271         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7272         bug #748310
7273         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7274         * support/Util/SDCCerr.h,
7275         * support/Util/SDCCerr.c: Added func attr misuse error msg
7276
7277 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7278
7279         Fixed bug #787649 by anonymous
7280         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7281         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7282
7283 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7284
7285         Fixed numerous bitfield problems.
7286
7287         * src/SDCC.y: More bitfield related error checking
7288         * src/SDCCsymt.h,
7289         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7290         * support/Util/SDCCerr.h,
7291         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7292         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7293         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7294         * support/regression/tests/bitfields.c: tests added
7295
7296 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7297
7298         Made the constant following the "interrupt" keyword optional. If
7299         omitted, the function will not automatically be given an entry
7300         in the interrupt vector table (similar to #pragma NOIV, but
7301         less syntacticly kludgy). The interrupt number is also now
7302         range checked. Also fixed a bug in the high order bit example
7303         in the manual.
7304
7305         * src/SDCC.y
7306         * src/SDCCmem.c
7307         * src/SDCCglue.c
7308         * src/SDCCsymt.h
7309         * support/Util/SDCCerr.c
7310         * support/Util/SDCCerr.h
7311         * doc/sdccman.lyx
7312
7313 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7314
7315         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7316         * src/SDCCicode.c (operandOperation): rewritten some ops
7317         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7318         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7319         other type
7320         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7321         be re-activated by defining REDUCE_LITERALS)
7322         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7323         unsigned, but are signed by default
7324         * src/SDCCval.c (constVal): rearranged
7325         * src/SDCCval.c (valMod): preliminary fix
7326         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7327         * support/regression/literalop.c: added, work in progress
7328
7329 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7330
7331         Generate warnings for useless declarations like "char data;"
7332         that don't do what new users expect.
7333
7334         * src/SDCC.y
7335         * support/Util/SDCCerr.h
7336         * support/Util/SDCCerr.c
7337
7338 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7339
7340         * src/SDCCval.c (valMult): fix overflow detection of negative int
7341
7342 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7343
7344         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7345
7346         Changes to support big endian targets:
7347
7348         * src/ports.h
7349         * src/SDCCglue.c
7350         * src/avr/main.c
7351         * src/ds390/main.c
7352         * src/izt/i186.c
7353         * src/mcs51/main.c
7354         * src/pic/main.c
7355         * src/pic16/main.c
7356         * src/xa51/main.c
7357         * src/z80/main.c
7358
7359 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7360
7361         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7362         * device/lib/time.c: fixed warning "integer overflow in expression"
7363
7364 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7365
7366         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7367         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7368         constants are unsigned; added recognition of "u" flag for unsigned
7369         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7370         * src/SDCCval.c (valDiv, valMod): fixed signdness
7371         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7372         signedness of modulo, left and right shift
7373         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7374         * support/Util/SDCCerr.h: added warning W_INT_OVL
7375         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7376         * src/SDCCast.c (ast_print): improved output of constants
7377
7378 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7379
7380         Fixed some warnings when building with MSVC:
7381
7382         * as\mcs51\asdata.c
7383         * as\z80\asdata.c
7384         * as\mcs51\asm.h
7385         * as\z80\asm.h
7386         * link\z80\aslink.h
7387         * link\z80\lkdata.c
7388         * link\z80\lkeval.c
7389         * link\z80\lkgb.c
7390         * link\z80\lkihx.c
7391         * link\z80\lks19.c
7392         * link\z80\lksym.c
7393         * support\cpp2\cpplib.c
7394         * src\ds390\gen.c
7395         * src\mcs51\gen.c
7396
7397 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7398
7399         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7400
7401 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7402
7403         * support\librarian\clean.mk: Do not remove Makefile.
7404         * support\librarian\Makefile: added.
7405
7406 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7407
7408         Added librarian to MSVC build:
7409         * all.dsp
7410         * sdcc.dsw
7411         * support\librarian\librarian.dsp
7412
7413         'configure' not needed for librarian, removed:
7414         * support\librarian\configure
7415         * support\librarian\configure.in
7416         * support\librarian\config_in.h
7417         * support\librarian\Makefile.in
7418
7419         Hopefully these ones built the librarian and the rest of sdcc properly:
7420         * Makefile
7421         * Makefile.common.in
7422
7423         Messed up 'configure', so revert to previous version:
7424         * configure
7425         * configure.in
7426
7427 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7428
7429         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7430         there, while the mantissa of a double is "only" 53 bits wide.
7431
7432 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7433
7434         Adding sdcclib to the build.  MSVC project coming soon.
7435         Files added/changed:
7436
7437         * support\librarian\clean.mk
7438         * support\librarian\configure
7439         * support\librarian\configure.in
7440         * support\librarian\config_in.h
7441         * support\librarian\Makefile.bcc
7442         * support\librarian\Makefile.in
7443         * support\librarian\sdcclib.c
7444         * Makefile.bcc
7445         * Makefile
7446         * Makefile.common.in
7447         * configure
7448         * configure.in
7449
7450 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7451
7452         Linker now complaints if linked modules have conflicting options, for
7453         example, one compiled using --model-large and another one compiled with
7454         --model-small.  The following files were modified:
7455
7456         * as\mcs51\asdata.c
7457         * as\mcs51\aslink.h
7458         * as\mcs51\asm.h
7459         * as\mcs51\asmain.c
7460         * as\mcs51\asout.c
7461         * as\mcs51\i51pst.c
7462         * as\mcs51\lkdata.c
7463         * as\mcs51\lklibr.c
7464         * as\mcs51\lkmain.c
7465         * as\z80\asdata.c
7466         * as\z80\asm.h
7467         * as\z80\asmain.c
7468         * as\z80\asout.c
7469         * as\z80\z80pst.c
7470         * link\z80\aslink.h
7471         * link\z80\lkdata.c
7472         * link\z80\lklibr.c
7473         * link\z80\lkmain.c
7474         * src\SDCCglue.c
7475
7476 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7477
7478         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7479         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7480
7481 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7482
7483         * src/z80/mappings.i: fix _mul[us][int,long] entries
7484
7485 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7486
7487         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7488
7489 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7490
7491         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7492         * support/regression/tests/bitopcse.c: added
7493         fixed warning:
7494         * src/avr/gen.c:
7495         * src/pic/gen.c:
7496         * src/pic16/gen.c:
7497         * src/z80/gen.c:
7498         * src/xa51/gen.c:
7499
7500 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7501
7502         added support for new library format to z80, gbz80 linkers:
7503         *link/z80/aslink.h
7504         *link/z80/lklex.c
7505         *link/z80/lklib.c
7506         *link/z80/lklist.c
7507
7508 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7509
7510         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7511         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7512
7513 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7514
7515         added DUMMY_READ_VOLATILE:
7516         * src/SDCC.y:
7517         * src/avr/gen.c:
7518         * src/xa51/gen.c:
7519         * src/z80/gen.c:
7520         * src/pic/gen.c:
7521         * src/pic16/gen.c:
7522         * src/mcs51/gen.c:
7523         * src/ds390/gen.c:
7524         * src/SDCCcse.c (algebraicOpts): many improvements
7525         * src/SDCCcse.h: removed algebraicOpts()
7526         * src/SDCCicode.c (picDummyRead): added
7527
7528 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7529
7530         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7531         "Insufficient space in data memory".
7532
7533 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7534
7535         * src/mcs51/gen.c: fixed bug #771358
7536         * src/z80/gen.c: fixed bug #759087
7537
7538 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7539
7540         * src/pic16/glue.c: minor cleanup by Vangelis
7541
7542 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7543
7544         * device/include/regc515c.h: fixed #758477
7545         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7546         * device/lib/_gptrput.c: saved a few bytes
7547         * my tab spacing is 8, yours too?)
7548         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7549         * device/lib/serial.c: process RX bytes earlier than TX bytes
7550         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7551
7552 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7553
7554         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7555
7556 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7557
7558     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7559
7560 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7561
7562         * device/lib/Makefile.in: bad fix, reverted to 1.43
7563
7564 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7565
7566         * device/lib/Makefile.in: added missing z80 object files
7567
7568 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7569
7570         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7571         pic16 progress by Vangelis:
7572         * src/SDCCglobl.h:
7573         * src/SDCCmain.c:
7574         * src/pic/Makefile:
7575         * src/pic:
7576         * pic/Makefile:
7577         * pic16/device.c:
7578         * pic16/device.h:
7579         * pic16/gen.c:
7580         * pic16/gen.h:
7581         * pic16/genarith.c:
7582         * pic16/glue.c:
7583         * pic16/main.c:
7584         * pic16/pcode.c:
7585         * pic16/pcode.h:
7586         * pic16/pcodepeep.c:
7587         * pic16/peeph.def:
7588
7589 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7590
7591     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7592
7593 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7594
7595     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7596     added gbz80 build to MSVC project.
7597     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7598     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7599     from 8051 stuff and setup so it links using a .lnk file.
7600
7601 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7602
7603     * support/librarian/sdcclib.c: sdcc librarian.
7604     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7605     with sdcclib.
7606
7607 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7608
7609     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7610
7611 2003-07-02  Borut Razem <borut.razem AT siol.net>
7612
7613         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7614         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7615         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7616         src/xa51/main.c, src/z80/main.c:
7617         virtualization of glue() function: each port has it's own glue function,
7618         which is accessed by do_glue function pointer in PORT.general structure
7619
7620 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7621
7622         * DS800C400 fun, improved ROM interface and tinibios.
7623
7624 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7625
7626         * More support for DS80C400. Now includes beginning of interface to ROM.
7627
7628 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7629
7630         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7631
7632 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7633
7634         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7635
7636 2003-06-19  Borut Razem <borut.razem AT siol.net>
7637
7638         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7639
7640 2003-06-19  Borut Razem <borut.razem AT siol.net>
7641
7642         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7643         fixed Z80 port - crt0.o: cannot open.
7644
7645 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7646
7647         * support/Util/MySystem.c (merge_command): revert bad fix
7648
7649 2003-06-18  Borut Razem <borut.razem AT siol.net>
7650
7651         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7652
7653 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7654
7655         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7656         option --use-stdout sends errors to stdout instead of stderr.
7657
7658 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7659
7660         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7661
7662 2003-06-15  Borut Razem <borut.razem AT siol.net>
7663
7664         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7665         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7666         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7667         fixed width array of pointers replaced with sets;
7668         multiple include and lib paths ared transferred to preprocessor and linker
7669         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7670         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7671         fixed width array of pointers
7672         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7673         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7674         fixupPath(), getPathDifference()
7675         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7676         fixed width array of pointers
7677
7678 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7679
7680         * src/pic16/ralloc.c: fix warnings
7681         * src/pic16/pcode.c: fix warning
7682
7683 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7684
7685          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7686         know all the details, but essentially this set of changes enable
7687         the pic16 port to generate movff instructions and generate assembler
7688         directives,
7689         * src/SDCCmain.c:
7690         * src/pic16/gen.c:
7691         * src/pic16/glue.c:
7692         * src/pic16/pcode.c:
7693         * src/pic16/device.c:
7694         * src/pic16/main.c:
7695         * src/pic16/pcode.h:
7696         * src/pic16/pcoderegs.c:
7697         * src/pic16/ralloc.c:
7698         * src/pic16/ralloc.h:
7699
7700 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7701
7702         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7703         added option --vc, so sdcc errors and warnings are compatible with
7704         Microsoft Visual Studio.
7705
7706 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7707
7708         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7709           device/lib/libfloat.lib: added atof function.
7710
7711 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7712
7713         * doc/sdccman.lyx: updated to Lyx 1.3
7714         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7715         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7716         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7717
7718 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7719
7720         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7721
7722 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7723
7724         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7725           additions to the "related tools/documentation" section
7726
7727 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7728
7729         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7730
7731 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7732
7733         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7734         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7735
7736 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7737
7738         * doc/sdccman.lyx: fix double dash and other minor things
7739         * doc/Makefile: fix double dash
7740
7741 2003-05-28  Karl Bongers(patches from Martin Helmling)
7742         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7743           condition and ignore commands.
7744
7745 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7746
7747         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7748           is in parts still quite out of date, I did changes as far as I felt makes sense
7749           for a non-native english speaker.
7750           Please feel free to add to the manual or to correct my changes.
7751         * doc/Makefile: undid touching the date of intermediate tex files.
7752
7753 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7754
7755         * doc/sdccman.lyx: Manual has an index now
7756
7757 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7758
7759         Finalize muluint/mulsint and mululong/mulslong merging:
7760         * device/lib/_mulint.c
7761         * device/lib/_mullong.c
7762         * device/lib/gbz80/mul.s
7763         * device/lib/gbz80/stubs.s
7764         * device/lib/z80/mul.s
7765         * device/lib/z80/stubs.s
7766         * src/SDCCsymt.c (initCSupport)
7767
7768 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7769
7770         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7771         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7772           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7773           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7774           instead of /Zm500.
7775
7776 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7777
7778         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7779           the regression tests I'm not brave enough to enable 245.b, 245.c
7780         * doc/sdccman.lyx: added latex preamble for hyperref package.
7781           Using pdflatex this will give you a hyperlinked pdf file with
7782           bookmarks. (prepend '%' before /usepackage if this breaks something)
7783
7784 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7785
7786          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7787
7788 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7789
7790         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7791
7792 2003-05-21    <johan AT balder>
7793
7794         * src/SDCCglue.c (printIval): fixed bug #739934
7795
7796 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7797
7798         Applied patch from bug 737905 (renamed yylineo to mylineno):
7799         * src/altlex.c
7800         * src/SDCCast.c
7801         * src/SDCglobl.h
7802         * src/SDCC.lex
7803         * src/SDCCsymt.c
7804         * src/SDCCval.c
7805         * src/pic16/pcode.c: Cleaned warnings
7806         * src/pic16/pcodeflow.c: Cleaned warnings
7807         * src/pic16/pcoderegs.c: Cleaned warnings
7808
7809 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7810
7811         * src/pic16/pcode.c: Cleaned warnings
7812         * src/pic16/pcodepeep.c: Cleaned warnings
7813         * src/pic16/ralloc.c: Cleaned warnings
7814
7815 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7816
7817         * doc/sdccman.lyx: fixed bug 739745
7818         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7819
7820 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7821
7822         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7823         it can be defined with CFLAGS when running configure
7824         * src/SDCCmain.c: fixed compiling + linking with object files
7825
7826 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7827
7828         * configure.in: configure for pic16 port,
7829             added --disable-pic16-port
7830         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7831         * src/SDCCmain.c: linkOptions is changed to set *,
7832             added if/endif conditional macros to remove options help
7833             messages from optionsTable when a port is not configured, added
7834             support for the PIc16 port in the ports table, when executing
7835             the compiler with no port specified on command line, a default
7836             port is selected with the new macro DEFAULT_PORT which is
7837             defined in port.h, in setDefaultOptions() linkOptions is removed
7838             from initialization assignment, since now it is a set,
7839             parseCmdLine uses setParseWithComma for linkOptions, in
7840             linkEdit() linkOptions are accessed with new function indexSet()
7841             which returns the i'th item of a set variable. See SDCCset.c, in
7842             linkEdit() when calling buildCmdLine(), added linkOptions as
7843             last argument. Now users can pass arguments to gplink via the
7844             -Wl option, main() uses pic16glue() to glue up pic16 programs
7845         * src/SDCCpeeph.c: various changes to support pic16
7846         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7847             return the i'th item of the set
7848         * src/SDCCset.h: added function prototype for indexSet()
7849         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7850         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7851         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7852             added macro DEFAULT_PORT
7853         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7854         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7855             generated
7856         * src/pic16/glue.c: commented out some error producing lines
7857         * src/pic16/main.c: __config directives are commented out to stop
7858             gpasm complaining and test the linkage with gplink, _linkCmd and
7859             _asmCmd changed to be more gplink and gpasm friendly
7860         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7861             produced an error when parsed, peep rule 12 is added to utilize
7862             movff, but it is commented out since the pCode does not support
7863             yet a command with 2 address arguments
7864
7865 2003-05-18    <johan AT balder>
7866
7867         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7868         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7869 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7870
7871         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7872   Added feature to script commands from file.
7873
7874 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7875
7876         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7877         * src/SDCCutil.c: include ctype.h for win32
7878
7879 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7880
7881         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7882
7883 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7884
7885         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7886   Fixed so you can set breakpoints prior to run, run does not stop
7887   on entry now.  Add tbreak.  Other enhancements and fixes for use
7888   with ddd.
7889
7890 2003-05-12  Borut Razem <borut.razem AT siol.net>
7891
7892         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7893
7894 2003-05-11  Borut Razem <borut.razem AT siol.net>
7895
7896         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7897         the path of bin directory, so that PATH is the only env. variable, which has to be set
7898         in case of standard installation.
7899         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7900         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7901         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7902
7903 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7904
7905         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7906         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7907         temp files are in the port dir; clean the gen/test directory when
7908         generating new test.c
7909         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7910         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7911         * support/regression/tests/zeropad.c: added
7912
7913 2003-05-09    <johan AT balder>
7914
7915         * src/SDCCglue.c: fixed bug #597940
7916
7917 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7918
7919         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7920   cache sfr, optimize next,step, fix off by one sourceline,
7921   support ddd list function.
7922         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7923
7924 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7925
7926         * support/regression/HTMLgen.py: added compare_s2f()
7927         * support/regression/Makefile: redo 1.27
7928         * support/regression/generate-cases.py: redo 1.5
7929
7930 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7931
7932         * support/regression/tests/float.c: workaround 33 bit hex constant
7933         * support/regression/tests/simplefloat.c: fix division for host
7934
7935 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7936
7937         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7938         that tame's the PIC's over-aggressive optimizer.
7939
7940 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7941
7942          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7943          support for MSVC.
7944
7945 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7946
7947         Initial support for DS80C400. "Hello world" runs on TINIm400
7948         (with polled I/O).
7949
7950 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7951
7952          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7953          * Some notes on ddd usage added in debugger/README
7954          Martin Helmling adding more features and fixes for ddd GUI debugger.
7955          Code added for nexti, stepi, up, down, and other adjustments.
7956
7957 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7958
7959         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7960         * src/pic/peeph.def Added two rules to optimize carry manipulation
7961         * src/pic/* removed debug printfs
7962
7963 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7964
7965         * debugger/mcs51/cmd.c: added header newalloc.h
7966
7967 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7968
7969         * as/Makefile: new EXEEXT
7970         * as/z80/Makefile: remove trailing slash of BUILDIR
7971         * as/z80/clean.mk: new EXEEXT
7972         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7973         * support/cpp2/Makefile.in: new EXEEXT
7974         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7975
7976 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7977
7978         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7979         EXEEXT was introduced to fix all related problems with targets
7980         "clean", "install" and "uninstall"; a couple of further flaws
7981         especially with "clean" have been fixed too
7982         * as/mcs51/Makefile.in
7983         * as/mcs51/clean.mk
7984         * as/z80/Makefile
7985         * Makefile
7986         * clean.mk
7987         * debugger/mcs51/Makefile.in
7988         * debugger/mcs51/clean.mk
7989         * link/z80/Makefile
7990         * link/z80/Makefile.in
7991         * link/z80/clean.mk
7992         * link/Makefile
7993         * packihx/Makefile.in
7994         * packihx/clean.mk
7995         * sim/ucsim/Makefile
7996         * sim/ucsim/clean.mk
7997         * sim/ucsim/avr.src/Makefile.in
7998         * sim/ucsim/avr.src/clean.mk
7999         * sim/ucsim/s51.src/Makefile.in
8000         * sim/ucsim/s51.src/clean.mk
8001         * sim/ucsim/xa.src/Makefile.in
8002         * sim/ucsim/xa.src/clean.mk
8003         * sim/ucsim/z80.src/Makefile.in
8004         * sim/ucsim/z80.src/clean.mk
8005         * sim/ucsim/main_in.mk
8006         * sim/ucsim/packages_in.mk
8007         * sim/ucsim/gui.src/Makefile.in
8008         * sim/ucsim/gui.src/serio.src/Makefile.in
8009         * sim/ucsim/gui.src/serio.src/clean.mk
8010         * src/Makefile.in
8011         * src/clean.mk
8012         * support/cpp2/Makefile.in
8013         * support/cpp2/clean.mk
8014         * support/makebin/Makefile
8015         * support/makebin/clean.mk
8016         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8017         * doc/sdccman.lyx: --program-suffix no longer needed
8018
8019 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8020
8021          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8022          Martin Helmling added support for ddd GUI debugger.
8023          Code added to display assembly, set variables, and other commands
8024          to interface to ddd.
8025
8026 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8027
8028         * as/Makefile: fix target clean
8029         * as/clean.mk: fix target clean
8030         * as/z80/clean.mk: fix target clean
8031
8032 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8033
8034         * Makefile.common.in: added  AT EXEEXT AT
8035         * configure.in: removed all mingw32 stuff
8036         * configure: rebuilt from configure.in
8037         * doc/sdccman.lyx: updated section "installation"
8038         * support/scripts/sdcc_mingw32: adapted to configure
8039         * support/scripts/sdcc_cygwin_mingw32: added
8040
8041 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8042
8043         * src/pic Added object file support for the PIC port
8044         * src/pic Applied patch from Craig Franklin (this started the object file support)
8045         * src/regression Updated the PIC regression tests for object files
8046
8047 2003-04-20  Borut Razem <borut.razem AT siol.net>
8048
8049         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8050           lklex.c: In function `getfid':
8051           lklex.c:203: warning: array subscript has type `char'
8052         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8053           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8054         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8055           stack handling macros
8056
8057 2003-04-19  Borut Razem <borut.razem AT siol.net>
8058
8059         * "handling space characters in file path" task:
8060         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8061         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8062         * support/Util/MySystem.h: make it self-sufficient
8063         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8064           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8065           handling space characters in file path
8066         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8067           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8068         * support/Util/MySystem.c: handling space characters in executable's path
8069
8070 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8071
8072         * as/z80/Makefile: fix permanent rebuild of z80
8073         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8074         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8075
8076 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8077
8078         * src/SDCCopt.c: add special case optimization to replace modulo by
8079           a power of two with a bitwise AND.
8080
8081 2003-04-18    <johan AT balder>
8082
8083         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8084
8085 2003-04-17    <johan AT balder>
8086
8087         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8088         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8089
8090 2003-04-13  Borut Razem <borut.razem AT siol.net>
8091
8092         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8093         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8094           fixed mingw problem in adl_NORMALIZE_PATH
8095
8096 2003-04-12  Borut Razem <borut.razem AT siol.net>
8097
8098         * fixed "#pragma SAVE/RESTORE can not be nested":
8099         * src/SDCC.lex: reworked pragma handling functions
8100         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8101         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8102
8103 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8104
8105         * src/SDCCutil.c (pathEquivalent): defined but not used
8106         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8107         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8108         * configure: rebuilt from configure.in
8109         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8110         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8111         * device/include/Makefile.in: replace sdcc_datadir
8112         * device/lib/Makefile.in: replace sdcc_datadir
8113         * Makefile.common.in: add LDFLAGS from configure
8114         * packihx/Makefile.in: use LDFLAGS
8115         * src/Makefile.in: use LDFLAGS
8116         * support/cpp2/Makefile.in: add LDFLAGS from configure
8117         * support/makebin/Makefile: use LDFLAGS
8118         * .version: bumped version number to 2.3.5
8119
8120 2003-04-12  Borut Razem <borut.razem AT siol.net>
8121
8122         * completed "different paths" task:
8123         * src/SDCCmacro.c: fixed bug in handling quotes
8124         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8125         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8126
8127 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8128
8129         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8130
8131 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8132
8133         * ds390/gen.c ds390/peeph.def: fix bug 706781
8134
8135 2003-04-11  Borut Razem <borut.razem AT siol.net>
8136
8137         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8138
8139 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8140
8141         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8142         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8143          set - this bit used to not be set...).
8144         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8145           bad code in PIC Port
8146         * src/regression/and2.c added to test bug 609268
8147         * src/regression/Makefile added and2.c to regression test
8148
8149
8150 2003-04-08    <johan AT CP255758-A>
8151
8152         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8153         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8154         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8155
8156 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8157
8158         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8159         fix bug #487815
8160         * support/cpp2/Makefile.in: fix bug #487815
8161         * configure: rebuilt from configure.in
8162         * Makefile.common.in: docdir changed, new path suffixes
8163         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8164         * sdcc_vc_in.h: reflect changes from sdccconf.h
8165         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8166         * src/SDCCutil.h: remove BINDIR hack
8167         * doc/sdccman.lyx: update new path hierarchy
8168
8169 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8170
8171         * src/SDCCpeeph.c: added okToRemoveSLOC test
8172
8173 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8174
8175         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8176
8177 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8178
8179         * src/SDCCpeeph.c: added labelIsReturnOnly test
8180         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8181
8182 2003-04-05    <johan AT balder>
8183
8184         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8185         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8186         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8187         * src/SDCCast.c: fixed a warning
8188         * src/SDCCast.h: fixed a warning
8189         * src/SDCCicode.c (operandFromAst): fixed a warning
8190
8191 2003-04-04    <johan AT balder>
8192
8193         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8194         * src/SDCCast.c (decorateType): fixed bug #715076
8195         * src/SDCC.y: fixed bug #702907
8196
8197 2003-04-03    <johan AT balder>
8198
8199         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8200         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8201         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8202         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8203         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8204
8205 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8206
8207         * _decdptr.c: fix return values
8208         * _gptrget.c: fix return values
8209         * _gptrgetc.c: fix return values
8210         * _gptrput.c: fix return values
8211         * _mulint.c: fix return values
8212         * as/z80/Makefile: fix 'make -j' problem
8213
8214 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8215
8216         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8217         * configure.in: big cleanup, updated to autoconf 2.5x
8218         * configure: rebuilt from configure.in
8219         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8220         * sdcc_vc_in.h: reflect changes from sdccconf.h
8221         * doc/Makefile: fixed a flaw in "make install"
8222
8223 2003-04-02    <johan AT balder>
8224
8225         * src/ds390/gen.c (genCmp): no comments
8226         * src/mcs51/gen.c (genCmp): no comments
8227         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8228         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8229
8230 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8231
8232         * support/regression/generate-cases.py: place generated file in given sub directory
8233         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8234         * support/regression/Makefile: improvements for 'make -j';
8235         side effect: it's simpler and faster now
8236
8237 2003-03-31  Borut Razem <borut.razem AT siol.net>
8238
8239         * src/z80/main.c: link-{port} and as-{port} defined without path
8240         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8241
8242 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8243
8244         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8245
8246 2003-03-30  Borut Razem <borut.razem AT siol.net>
8247
8248         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8249           changed type of list parameter to set
8250         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8251         * src/port.h: changed type of do_assemble() parameter to set
8252         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8253           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8254           definition of "cppoutfilename" macro with NULL value in preProcess()
8255         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8256         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8257         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8258           replaced with set *binPathSet
8259         * shash_add() deallocates the item, if allready exsists, before adding the new one
8260         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8261
8262 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8263
8264         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8265           a nested for loop bug in the PIC port
8266         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8267           for loops
8268
8269 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8270
8271         * support/Util/dbuf.h: remove C++ stuff to make it portable
8272
8273 2003-03-28  Borut Razem <borut.razem AT siol.net>
8274
8275         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8276           literal strings in stringLiteral()
8277         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8278         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8279           to the project
8280
8281 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8282
8283         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8284
8285 2003-03-26    <johan AT balder>
8286
8287         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8288         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8289         * src/SDCCast.c (decorateType): fixed " -v < 3"
8290
8291 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8292
8293         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8294         Added Lenny Story's debug infrastructure changes:
8295         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8296         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8297         * src/cdbFile.c: added
8298         * src/SDCCdebug.c: added
8299         * src/SDCCdebug.h: added
8300         * src/SDCCast.c (createFunction)
8301         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8302         * src/SDCCmain.c (parseCmdLine, main)
8303         * src/SDCCmem.c (redoStackOffsets)
8304         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8305         * src/SDCCsymt.h
8306         * src/common.h
8307         * src/avr/gen.c (genAVRCode)
8308         * src/ds390/gen.c (gen390Code)
8309         * src/mcs51/gen.c (gen51Code)
8310         * src/pic/gen.c (genpic14Code)
8311         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8312         * src/xa51/gen.c (genXA51Code)
8313         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8314
8315 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8316
8317         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8318         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8319
8320 2003-03-22    <johan AT balder>
8321
8322         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8323
8324 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8325
8326         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8327         * doc/cdbfileformat.lyx: added, written by Lenny Story
8328         * doc/Makefile: added cdbfileformat.lyx
8329         * doc/clean.mk: added cdbfileformat.lyx
8330
8331 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8332
8333         * src/mcs51/peeph.def: fix bug #705773
8334
8335 2003-03-20    <johan AT balder>
8336
8337         An sfr/sbit can have an "at #" AND an initializer
8338         * src/SDCCsymt.c (checkSClass):
8339         * src/SDCCmem.c (allocGlobal):
8340         * src/SDCCmem.c (allocLocal):
8341         * src/SDCCast.c (createBlock):
8342
8343 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8344
8345         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8346
8347 2003-03-16    <johan AT balder>
8348
8349         Undid the hackup of const and volatile, the problem is much bigger
8350         * src/SDCC.y:1.65
8351         * src/SDCCast.c:1.171
8352         * src/SDCCglue.c:1.138
8353         * src/SDCCicode.c:1.146
8354         * src/SDCCsymt.c:1.150
8355         * src/SDCCval.c:1.65
8356
8357 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8358
8359         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8360         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8361
8362 2003-03-13    <johan AT balder>
8363
8364         Hackup const and volatile modifiers in type chains a bit:
8365         * src/SDCC.y:1.63
8366         * src/SDCCast.c:1.169
8367         * src/SDCCglue.c:1.136
8368         * src/SDCCicode.c:1.143
8369         * src/SDCCsymt.c1.146
8370         * src/SDCCsymt.h1.59
8371         * src/SDCCval.c:1.63
8372
8373 2003-03-12    <johan AT balder>
8374
8375         * src/SDCCBBlock.h: more LRH debugging junk
8376         * src/SDCCcflow.h: more LRH debugging junk
8377         * src/SDCCloop.c: more LRH debugging junk
8378         * src/SDCC.y (struct_declaration): fixed bug #697590
8379         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8380         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8381         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8382
8383 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8384         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8385         test function names must now match exactly).
8386         * src/SDCCcse.c: added special case in findCheaperOp to allow
8387         extending a short integer. Makes less awful code for bug 700121 test case.
8388
8389 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8390
8391         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8392         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8393
8394 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8395
8396         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8397         actually called (operandsNotEqual() was called for all
8398         operandsNotEqualX tests).
8399
8400 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8401
8402         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8403         with shorter literals. Fixes bug 700121.
8404
8405 2003-03-11    <johan AT balder>
8406
8407         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8408
8409 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8410
8411         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8412         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8413
8414 2003-03-10  Borut Razem <borut.razem AT siol.net>
8415
8416         * src/SDCCmain.c: pipe preprocessor's output
8417         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8418         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8419         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8420         which closes all pipes in pipeSet set
8421         * src/SDCCset.c: free deleted item in function deleteSetItem()
8422         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8423         moved from z80 to src subproject
8424         * .version: increased version number to 2.3.4
8425
8426 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8427
8428         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8429         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8430         * support/regression/ports/xa51/spec.mk: fix typo
8431
8432 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8433
8434         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8435
8436 2003-03-09  Borut Razem <borut.razem AT siol.net>
8437
8438         * src/SDCCmain.c: pipe preprocessor's output
8439         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8440         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8441         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8442         which closes all pipes in pipeSet set
8443         * src/SDCCset.c: free deleted item in function deleteSetItem()
8444         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8445         moved from z80 to src subproject
8446
8447 2003-03-09  Borut Razem <borut.razem AT siol.net>
8448
8449         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8450         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8451         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8452         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8453         * src/SDCCglobl.h: unification of WIN32 native definitions
8454
8455 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8456
8457         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8458
8459 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8460
8461         * src/configure.in:   check for endianess (even while cross-compiling)
8462         * src/configure:      check for endianess (even while cross-compiling)
8463         * src/configure_in.h: check for endianess (even while cross-compiling)
8464         * src/avr/gen.c:        remove old endianess stuff
8465         * src/mcs51/gen.c:      remove old endianess stuff
8466         * src/ds390/gen.c:      remove old endianess stuff
8467         * src/pic/gen.c:        remove old endianess stuff
8468         * src/pic/genarith.c:   remove old endianess stuff
8469         * src/pic/glue.c:       fix endianess check
8470         * src/pic16/gen.c:      remove old endianess stuff
8471         * src/pic16/genarith.c: remove old endianess stuff
8472         * src/pic16/glue.c:     fix endianess check
8473         * src/xa51/gen.c:       remove old endianess stuff
8474         * src/z80/gen.c:        fix endianess check
8475         * src/SDCCglue.c:       fix endianess check
8476         * src/ds390/peeph.def: fix bug 700036
8477
8478 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8479
8480         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8481         * src/configure: find appropriate data-types on host for SDCC's int and long
8482         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8483         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8484         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8485
8486 2003-03-07    <johan AT balder>
8487
8488         Just a big NOOP:
8489                 some minor cleanups before the big shot
8490                 OP_DEFS and OP_USES now use Kevin's protection
8491                 new option --nolabelopt
8492
8493         * src/SDCCBBlock.c:
8494         * src/SDCCast.c,:
8495         * src/SDCCcflow.c:
8496         * src/SDCCcse.c:
8497         * src/SDCCicode.c:
8498         * src/SDCCicode.h:
8499         * src/SDCClabel.c:
8500         * src/SDCCloop.c:
8501         * src/SDCCmain.c:
8502         * src/ds390/ralloc.c:
8503         * src/mcs51/ralloc.c:
8504         * src/pic/ralloc.c:
8505         * src/xa51/ralloc.c:
8506         * src/z80/ralloc.c:
8507
8508 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8509
8510         * src/pic/pcode.c (get_op): fix 64 bit warnings
8511         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8512         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8513         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8514         * support/regression/tests/malloc.c: fix 64 bit warnings
8515
8516 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8517
8518         * src/mcs51/gen.c (genMinus): fixed bug 696436
8519
8520 2003-03-02  Borut Razem <borut.razem AT siol.net>
8521
8522         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8523
8524 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8525
8526         * configure.in: test for mkstemp
8527         * sdccconf_in.h: add HAVE_MKSTEMP
8528
8529 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8530
8531         * device/include/ctype.h: removed warning while using --stack-auto
8532         * device/include/malloc.h: removed warning while using --stack-auto
8533         * device/include/string.h: removed warning while using --stack-auto
8534
8535 2003-02-23  Borut Razem <borut.razem AT siol.net>
8536
8537         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8538         because NDEBUG is defined (see man assert)
8539         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8540
8541 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8542
8543         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8544         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8545
8546 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8547
8548         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8549         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8550
8551 2003-02-18    <johan AT balder>
8552
8553         * as/mcs51/asmain.c (asmbl): module can start with a digit
8554         * as/z80/asmain.c (asmbl): module can start with a digit
8555
8556 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8557
8558         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8559         * src/asm.c: fix pipe() for Mingw32
8560
8561 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8562
8563         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8564         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8565         make -V work again; --c1mode reads now from stdin
8566         * doc/sdccman.lyx: added --c1mode
8567         * support/Util/SDCCerr.c: new messages for c1 mode
8568         * support/Util/SDCCerr.h: new messages for c1 mode
8569         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8570
8571 2003-02-15    <johan AT balder>
8572
8573         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8574
8575 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8576
8577         * doc/sdccman.lyx: Environment variables, -o and other minor things
8578
8579 2003-02-14    <johan AT balder>
8580
8581         * src/xa51/main.c: before anyone really tries to use it :)
8582
8583         * Install doc's in share/sdcc/doc
8584         * removed some obsolete files
8585         * Do a proper make distclean and uninstall
8586         M Makefile.common.in
8587         R sdccbuild.sh
8588         M as/Makefile
8589         M device/include/Makefile.in
8590         M device/lib/Makefile.in
8591         M doc/sdccman.lyx
8592         M link/Makefile
8593         M sim/ucsim/doc/Makefile.in
8594         M src/clean.mk
8595         R src/avr/peeph.rul
8596         R src/xa51/peeph.rul
8597         M support/cpp2/Makefile.in
8598         M support/makebin/Makefile
8599
8600
8601 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8602
8603         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8604
8605 2003-02-10  Borut Razem <borut.razem AT siol.net>
8606
8607         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8608         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8609         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8610         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8611         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8612         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8613         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8614         src/z80/Makefile.bcc: Borland Makefile cleanup
8615         * as/z80/Makefile.bcc: Added Borland Makefile
8616         * support/cpp2/borland.h: Removed
8617
8618 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8619
8620         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8621         * src/SDCC.lex: new pragma NOIV
8622         * src/SDCCglobl.h: new pragma NOIV
8623         * src/SDCCmem.c: new pragma NOIV
8624
8625 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8626
8627         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8628
8629 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8630
8631         * src/SDCCmain.c: signal handling is switched off by --debug
8632         * doc/Makefile: small fix for install; use clean.mk again
8633         * doc/clean.mk: clean *.pdf and *.html too
8634
8635 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8636
8637         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8638         * device/lib/printfl.c: fix a ds390 bug by making it portable
8639         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8640         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8641         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8642         * debugger/mcs51/cmd.c: converted multi-line string literals
8643         * sim/ucsim/globals.cc: converted multi-line string literals
8644         * src/SDCCmain.c: introduced signal handler to remove temp files
8645         * doc/Makefile: small tweaks, implement clean
8646         * doc: removed generated files
8647
8648 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8649
8650         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8651         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8652         Address Record is not correctly generated for DS390."
8653
8654 2003-02-02  Borut Razem <borut.razem AT siol.net>
8655
8656         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8657         * as/mcs51/asm.h: fixed compilation with Borland C
8658         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8659         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8660         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8661         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8662         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8663         src/z80/Makefile.bcc: delete $(LIB) only if exist
8664         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8665
8666 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8667
8668         * device/include/malloc.h: introduced NULL
8669         * device/include/string.h: introduced NULL
8670         * device/include/stdlib.h: introduced NULL
8671         * device/lib/_memcpy.c: removed NULL
8672         * device/lib/_strcat.c: removed NULL
8673         * device/lib/_strchr.c: removed NULL
8674         * device/lib/_strcmp.c: removed NULL
8675         * device/lib/_strcpy.c: removed NULL
8676         * device/lib/_strcspn.c: removed NULL
8677         * device/lib/_strlen.c: removed NULL
8678         * device/lib/_strncat.c: removed NULL
8679         * device/lib/_strncmp.c: removed NULL
8680         * device/lib/_strncpy.c: removed NULL
8681         * device/lib/_strpbrk.c: removed NULL
8682         * device/lib/_strrchr.c: removed NULL
8683         * device/lib/_strspn.c: removed NULL
8684         * device/lib/_strstr.c: removed NULL
8685         * device/lib/_strtok.c: removed NULL
8686         * device/lib/malloc.c: removed NULL, include own header
8687
8688 2003-02-02    <johan AT balder>
8689
8690         * 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
8691         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8692         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8693         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8694         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8695         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8696
8697 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8698
8699         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8700         area 'DATA'"
8701
8702 2003-02-01    <johan AT balder>
8703
8704         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8705
8706 2003-01-31    <johan AT CP255758-A>
8707
8708         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8709
8710 2003-01-30    <johan AT balder>
8711
8712         * src/SDCCBBlock.c: automatic bug detection
8713         * src/SDCCicode.c: automatic bug detection
8714
8715 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8716
8717         * src/SDCCglobl.h:   now --xram-size 0 works
8718         * src/SDCCmain.c:    now --xram-size 0 works
8719
8720 2003-01-29    <johan AT balder>
8721
8722         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8723
8724 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8725
8726         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8727         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8728         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8729         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8730         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8731         * src/SDCCmain.c:    Added options --xram-size and --code-size
8732
8733 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8734
8735         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8736         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8737
8738 2003-01-27    <johan AT balder>
8739
8740         * src/SDCC.y: fixed bug #613764
8741
8742 2003-01-26    <johan AT balder>
8743
8744         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8745         * src/SDCCsymt.h: fixed bug #673374
8746         * src/SDCCglue.c: fixed bug #661910
8747         * src/SDCCast.c: fixed bug #458099 and 673374
8748
8749 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8750
8751         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8752         * as/mcs51/strcmpi.h: added
8753         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8754         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8755         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8756         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8757         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8758         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8759         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8760         * as/mcs51/Makefile.aslink: new module strcmpi
8761         * as/mcs51/Makefile.asx8051: new module strcmpi
8762         * as/mcs51/Makefil.bcc: new module strcmpi
8763         * as/mcs51/Makefile.in: new module strcmpi
8764         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8765
8766 2003-01-26    <johan AT balder>
8767
8768         * src/SDCCglue.c: reverted back to 1.124
8769         * src/SDCCast.c: reverted back to 1.156
8770         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8771
8772 2003-01-25    <johan AT balder>
8773
8774         * src/SDCCglue.c: A better fix for bug #661910
8775         * src/SDCCast.c: A better fix for bug #661910
8776         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8777
8778 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8779
8780         * src/Makefile.in: remove spawn.o
8781         * src/SDCCmain.c: remove spawn.h
8782         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8783         * src/spawn.c: removed
8784         * src/spawn.h: removed
8785         * support/regression/ports/ds390/spec.mk: link with -r
8786
8787 2003-01-24    <johan AT CP255758-A>
8788
8789         * src/ds390/gen.c (aopOp): fixed bug #667458
8790         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8791         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8792         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8793
8794 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8795
8796         * src/mcs51/peeph.def: better assembler identation by Frieder
8797         * src/mcs51/gen.c: better assembler identation by Frieder
8798
8799 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8800
8801         * as/z80/string.h: removed for gcc 3.2
8802         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8803         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8804
8805 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8806
8807         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8808         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8809         * support/regression/Makefile: separate temp files for ports
8810         * support/regression/generate-cases.py: separate temp files for ports
8811         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8812         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8813
8814 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8815
8816         * moved tinitalk to device/examples/ds390
8817
8818 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8819
8820         * as/mcs51/lkmem.c: rflag is for DS390
8821         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8822         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8823                          (linkEdit): move mem- and map-files the same way as ihx-files
8824         * src/z80/main.c (_setDefaultOptions): removed --generic
8825         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8826         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8827         * src/pic/glue.c (picglue): --c1mode works again
8828         * src/pic16/glue.c (pic16glue): --c1mode works again
8829         * src/asm.c (printCLine): fix #660034
8830
8831 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8832
8833         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8834         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8835         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8836         * as/mcs51/lkmem (summary): better fix for sp problem
8837         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8838         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8839         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8840                                               remove --stack-after-data
8841
8842 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8843
8844         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8845         * src/SDCCutil.c (join): ugly bug: missing '\0'
8846         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8847
8848 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8849
8850         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8851         * src/port.h: typo
8852         * src/pic/main.c (_asmCmd): gpasm supports -o
8853         * src/z80/main.c: more general macros
8854         * device/lib/Makefile.in: remove intermediate files
8855
8856 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8857
8858         * .version: Bumped version number to 2.3.3
8859         * src/SDCCBBlock.c: new option -o
8860         * src/SDCCglobl.h: new option -o
8861         * src/SDCCglue.c: new option -o
8862         * src/SDCCmain.c: new option -o
8863         * src/asm.c: new option -o
8864         * src/ds390/main.c: new option -o
8865         * src/pic/glue.c: new option -o
8866         * src/pic/pcode.c: new option -o
8867         * src/pic/ralloc.c: new option -o
8868         * src/pic16/glue.c: new option -o
8869         * src/pic16/pcode.c: new option -o
8870         * src/pic16/ralloc.c: new option -o
8871         * src/z80/main.c: new option -o
8872         * device/lib/Makefile.in: use -o
8873         * support/regression/ports/ds390/spec.mk: use -o
8874         * support/regression/ports/gbz80/spec.mk: use -o
8875         * support/regression/ports/mcs51/spec.mk: use -o
8876         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8877         * support/regression/ports/z80/spec.mk: use -o
8878         * support/regression/ports/ucz80/spec.mk: use -o
8879         * support/regression/ports/xa51/spec.mk: use -o
8880         * support/regression/fwk/lib/timeout.c: fix usage string
8881
8882 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8883         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8884
8885 2003-01-07    <johan AT balder>
8886
8887         * src/SDCCast.c (decorateType): fixed bug #600035
8888
8889 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8890         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8891         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8892         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8893         * src/pic/pcode.c: outcommented unused variable to remove warnings
8894         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8895
8896 2003-01-06    <karl AT turbobit.com>
8897         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8898    regression tests.
8899
8900 2003-01-06    <johan AT balder>
8901
8902         * src/SDCCicode.c: fixed array add
8903
8904 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8905         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8906         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8907
8908 2003-01-04    <johan AT balder>
8909
8910         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8911
8912 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8913         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8914
8915 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8916         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8917         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8918
8919 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8920         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8921
8922 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8923         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8924
8925 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8926         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8927
8928 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8929
8930     * in \sdcc\as\mcs51\ changed these files in order to create an
8931     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8932     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8933     following files to include the previous two files: aslink.dsp,
8934     Makefile.aslink, Makefile.bcc, and Makefile.in.
8935
8936     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8937     .adb instead of .cdb
8938
8939 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8940
8941         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8942         value from option --iram-size.
8943
8944 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8945
8946         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8947         dram[] array.
8948
8949 2002-09-18    <wiml AT hhhh.org>
8950
8951         * SDCClrange.h: exposed setFromRange() and setToRange()
8952         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8953           packRegsForAccUse() (bug 542397)
8954         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8955           multiple times and emitting the fetch operations more than once
8956           added aopGetUsesAcc() function to allow binary operators to
8957           fetch their operands in the correct order; made genMinus() emit
8958           compact code for X = LITERAL - Y
8959
8960 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8961         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8962         sprintf() in line 1267.
8963
8964 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8965         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8966         like ports.
8967
8968 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8969         Changes to aslink (All the changes are marked with 'JCF'):
8970
8971         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8972         summary().
8973
8974         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8975         area BSEG.  Also moves, if possible, the DATA area down into the internal
8976         ram so more space is available.
8977
8978         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8979         sflag.
8980
8981         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8982         not bytes.  Function summary() which creates a memory usage summary
8983         file with extension .mem.  Reports of overlaping stack and small stack
8984         size.  If the space for the stack is less than 16 bytes aslink trows a
8985         warning.
8986
8987         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8988         the 8051.  Option 'y' for memory summary output file.
8989
8990         Changes to sdcc (All the changes are marked with 'JCF'):
8991
8992         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8993
8994         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8995         overlaying area for it (uses RegBankUsed[4]).
8996
8997         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8998         bank zero as used by default.  By default aslink locates the stack
8999         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9000         the creation of the .mem file.  Delegates the allocation of data area
9001         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9002         the begining of the stack area to aslink.
9003
9004         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9005         glue() in SDCCglue.c creates an area for it.
9006
9007 2002-09-03  Borut Razem <borut.razem AT siol.net>
9008         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9009         sdcc/src/pic/glue.c:
9010         introduced atexit() handler for teporay files removal in case of
9011         errors, assertions, ...
9012
9013 2002-08-29  Borut Razem <borut.razem AT siol.net>
9014         * sdcc/support/cpp2/auto-host_vc_in.h:
9015         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9016         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9017         Maybe there is a similar problem with BORLANDC? It should be checked!
9018
9019         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9020         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9021         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9022         was not executed, and the compiler (cl) launched a warning:
9023         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9024
9025 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9026         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9027
9028 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9029         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9030
9031         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9032           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9033           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9034           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9035           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9036           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9037           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9038         - added Release configuration in VS projects
9039         - review of compiler an linker options
9040         - VC .exe files are generated in bin_vc directory, not to interfere
9041           with binaries generated from other projects (cygwin, mingw, bcc ...)
9042
9043         * sdcc/src/yacc.dsp: added
9044
9045         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9046         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9047         and insert the version number definitions from .version
9048
9049         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9050
9051         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9052         added - genarate auto-host.h using auto-host_vc_in.h as template
9053
9054         * sdcc/sdcc_vc.h,
9055         removed from CVS, generated automatically
9056
9057 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9058         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9059
9060 2002-08-11  Borut Razem <borut.razem AT siol.net>
9061         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9062
9063 2002-08-10  Borut Razem <borut.razem AT siol.net>
9064         * src/SDCCmain.c (main):
9065         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9066         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9067         The consequence was that some temporary files were not removed.
9068
9069         * src/SDCCglue.c:
9070         unification of code in functions tempfilename() and tempfile():
9071         function tempnam() is defined in Visual Studio 6.0 and .NET
9072
9073         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9074
9075         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9076           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9077         - removed compiler command line option /WX: Treats all warnings as errors
9078         - update a list of source files, included into the project
9079
9080         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9081           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9082         changed project type to Generic Project so that can be correcly converted to VS.NET project
9083
9084         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9085
9086         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9087
9088         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9089
9090         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9091         added return 0 statements after assert() to make compiler happy
9092
9093         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9094         added newline in the def file to keep MSC compiler satisfied
9095
9096         * sdcc/src/z80/gen.c:
9097         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9098           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9099         - solved MSC error in function aopDump()
9100
9101         * sdcc_vc.h: define PREFIX as "\\sdcc"
9102
9103 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9104         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9105
9106 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9107         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9108         - Rewrote the register banking algorithm.
9109         - Added pCode live-range analysis to registers (for now, only non-used and
9110         singly-used registers optimized away)
9111
9112         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9113
9114         * 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.
9115
9116 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9117         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9118
9119 2002-04-22  Michael Hope  <michaelh AT vroom>
9120
9121         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9122
9123         * configure.in (DD_COPT): Added include support required for gbdk.
9124
9125         * .version: Bumped version number just to increase it.
9126
9127         * src/SDCCmain.c: Added -nostdinc to the default options.
9128
9129 2002-04-15  Michael Hope  <michaelh AT vroom>
9130
9131         * device/lib/z80/printf.c (sprintf): Added.
9132
9133         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9134
9135         * src/z80/peeph.def: Added transpose redundent load rule.
9136
9137         * src/z80/main.c: Added force callee saves for jaune.
9138
9139         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9140
9141         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9142
9143 2002-03-28  Johan Knol  <johan AT balder>
9144
9145         * src/SDCCval.c: fixed bug #532436
9146
9147 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9148         * /src/port.h:
9149         Added "char *Processor" field to the port structure.
9150
9151         * /src/SDCCmain.c:
9152         Added -p option. Allows port dependent processor to be specified.
9153
9154         * all ports:
9155         Initialized the new field char *Processor field to NULL in all ports
9156
9157         * /src/pic/*:
9158         Compiler generated registers for interrupt context saving
9159         were not getting allocated.
9160
9161 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9162
9163         * /src/SDCCast.c:
9164         Fixed left shift. Will promote the left side of a left shift
9165         if a) left shifting more than size of operand or b) when assigned
9166         to something size > size of left side
9167
9168 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9169         * src/pic/*
9170         tons of changes. Register allocation has been
9171         rewritten. Added customization for the various PICs. Flow
9172         analysis is restructured. ...
9173
9174         * src/pic/device.h:
9175         Added
9176
9177         * src/pic/device.c:
9178         Added. device.c is a PIC port hack to accomodate variations
9179         in PIC devices.
9180
9181 2002-03-13  Michael Hope  <michaelh AT vroom>
9182
9183         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9184
9185 2002-03-04  johanknol  <johanknol AT manik>
9186
9187         * /src/SDCCval.c: fixed
9188
9189         const unsigned char arr[][2] = { { 0, 1 } };
9190         t18.c:1: error: Initializer element is not constant
9191
9192 2002-03-04  bela  <bela AT manik>
9193
9194         * /device/include/mcs51reg.h:
9195         ds89c420 register definition update
9196
9197 2002-03-03    <johan AT FRIJA>
9198
9199         * support/Util/SDCCerr.c: did something, but don't no why anymore
9200
9201         * support/regression/tests/bug-524691.c: made it a little less shy
9202
9203         * src/SDCCast.c (decorateType): fixed bug #524697
9204
9205         * src/SDCCast.c: made some lineno improvements
9206
9207         * src/SDCCval.c (getNelements): changed warning to error
9208
9209         * src/SDCCglue.c (printIvalArray): changed warning to error
9210
9211         * src/SDCCicode.c: fixed a warning for mingw
9212
9213         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9214
9215         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9216
9217 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9218
9219         * src/ds390/peeph.def:
9220         Added some more peephole rules
9221
9222         * src/ds390/gen.c: Various fixes & enhancements
9223
9224         * src/SDCClrange.c, src/SDCClrange.h:
9225         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9226
9227         * src/ds390/ralloc.c:
9228         various fixes & enhancements (ds390) specific
9229
9230         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9231         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9232         from rallocs.
9233
9234         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9235
9236 2002-03-02    <johan AT FRIJA>
9237
9238         * src/SDCCast.c (decorateType): fixed bug #524708
9239
9240         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9241
9242         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9243
9244 2002-03-01  Michael Hope  <michaelh AT vroom>
9245
9246         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9247
9248         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9249
9250 2002-03-01    <johan AT FRIJA>
9251
9252         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9253
9254         * src/SDCCast.c (decorateType): fixed bug #524209
9255
9256         * src/SDCCval.c (valNot): fixed bug #524195
9257
9258 2002-02-26    <johan AT balder>
9259
9260         * src/xa51/gen.c: fixed a warning
9261
9262         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9263
9264         * src/SDCCast.c (decorateType): fixed bug #522534
9265
9266 2002-02-23    <johan AT balder>
9267
9268         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9269
9270 2002-02-22    <johan AT balder>
9271
9272         * src/SDCCast.c: fixed bug #514865
9273
9274         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9275
9276 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9277
9278         * sdcc/src/SDCCloop.c:
9279         Previous fix was not good. basic blocks that have "break" or "return" are
9280         not really partof a loop , but live ranges used in these blocks should
9281         be live thru the entire loop, so set partOfLoop but don't add them to
9282         loop region
9283
9284 2002-02-21    <johan AT FRIJA>
9285
9286         * src/SDCCcse.c: fixed bug #514308
9287
9288 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9289
9290         * src/SDCCloop.c:
9291         Fixed BUG #519583. If a conditional block ended in a return/break
9292         statement inside a loop, it was not being considered part of the loop.
9293
9294         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9295
9296 2002-02-10  Karl Bongers <karl AT turbobit.com>
9297
9298         * debugger/*:
9299         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9300         with lots of comments and notes.
9301
9302         * device/examples/test2.c:
9303         Fix bug, "red" variable not being initialized(compiler complained).
9304
9305         * device/examples/Makefile, examples/test3.c:
9306         Add Makefile in device/examples folder, compiles test3.c
9307         for use as a multiple module SDCDB test case.
9308
9309         * sim/ucsim/cmd.src/cmdset.cc:
9310         Took out debug printfs in ucsim "next" command.
9311
9312         * sim/ucsim/xa.src:
9313         Karl and Johan start ucsim XA support.  Most dissassembly working,
9314         about 75% emulation done(plenty of work remaining).
9315
9316         * sim/ucsim/z80.src:
9317         Add Z80 support to ucsim, add test-ucz80 regression test,
9318         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9319         Notice z80 compiler fails on examples/test3.c/crc code.
9320
9321 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9322
9323         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9324         Added support for --parms-in-bank1
9325
9326         * src/ds390/peeph.def:
9327         added a few more peephole optimzations
9328
9329         * src/ds390/main.c:
9330         1) added __builtin_inp & __builtin_outp used to read in data of given length
9331            from a memory mapped port
9332         2) added __builtin_memcmp
9333         3) added __builtin_swapw swap bytes of a short
9334
9335         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9336         1) handle multiple send & receives from register bank1
9337         2) ralloc can now allocate DPTR1 to some liveRanges
9338
9339         * src/SDCCsymt.c, src/SDCCsymt.h:
9340         changes to handle multiple sends & receives
9341
9342         * src/SDCCptropt.h:
9343         added some pointer arithmetic optimization
9344
9345         * src/SDCCptropt.c:
9346         added some pointer arithmetic optimizations but not stable yet so not
9347         called from anywhere (will get this working shortly)
9348
9349         * src/SDCCopt.c: fixed for multiple sends & receives
9350
9351         * src/SDCCmain.c:
9352         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9353         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9354            set preprocessor defines (depending on options)
9355
9356         * src/SDCCicode.c, src/SDCCicode.h:
9357         changes made to handle multiple sends & receives
9358
9359         * src/SDCCglobl.h:
9360         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9361
9362         * src/SDCCcse.c, src/SDCCcse.h:
9363         added function findbackward def (to be used in upcoming optimization)
9364
9365         * src/SDCCcflow.c, src/SDCCcflow.h:
9366         added function returnAtEnd - to determine if a basic block terminates with
9367         a RETURN iCode
9368
9369         * src/SDCCast.c, src/SDCCast.h:
9370         added option parms-in-bank1
9371
9372         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9373         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9374         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9375         adjusted for --parms-in-bank1 option
9376
9377         * device/include/string.h:
9378         donot redefine "reentrant" keyword
9379
9380         * device/include/ds80c390.h: Added some more SFRs
9381
9382 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9383
9384         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9385
9386 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9387
9388         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9389
9390 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9391
9392         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9393
9394 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9395
9396         * Added --xram-movc option
9397
9398 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9399
9400         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9401
9402 2002-01-11  Johan Knol
9403
9404         * Added math lib of Jesus Calvino-Fraga
9405
9406 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9407
9408         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9409         * support/regression/Makefile: new target test-mcs51-stack-auto
9410         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9411
9412 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9413
9414         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9415
9416 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9417
9418         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9419
9420 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9421
9422         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9423
9424         * src/SDCCglue.h: add definition for printIvalChar()
9425
9426 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9427
9428         * src/SDCCast.c: fix #498138 by Johan
9429
9430         * src/SDCCglue.c: fix #498138 by Johan
9431
9432 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9433
9434         * support/regression/Makefile: fix clean
9435
9436         * support/regression/ports/ds390/support.c: fix transmission of last character
9437
9438 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9439
9440         * /sdcc/src/ds390/gen.c:
9441         a) improved computing address of stack variable
9442         b) took out some #if 0 code
9443         c) improved parmBytes adjustment
9444         d) improved genPlusIncr & genMinusIncr
9445         e) genCmp could generate bad code (when left assigned to DPTR)
9446         f) Fixed bug in hasInc
9447
9448         * /sdcc/src/ds390/ralloc.c:
9449         a) packRegsForSupport could mess up live information (Fixed)
9450         b) packRegsDPTRuse could be incorrect for left & right shift
9451
9452         * /sdcc/src/mcs51/ralloc.c:
9453         packRegsForSupport could mess up the live information (Fixed)
9454
9455         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9456
9457         * /sdcc/src/SDCCast.c:
9458         can reverse a loop even if function call is present as long
9459         as the loop control variable is local & is not passed as parameter
9460
9461 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9462
9463         * /sdcc/ChangeLog: *** empty log message ***
9464
9465         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9466         More builtin function additions for TININative
9467
9468         * /sdcc/src/ds390/ralloc.c:
9469         Had broken the regression testsuite
9470
9471         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9472
9473         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9474         Added funcattr hasStackParms will be set for reentrant functions when there
9475         are paramteres on the stack, this helps in minimizing frame pointer generation
9476         typeFromStr can handle function pointers now
9477
9478         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9479         *** empty log message ***
9480
9481 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9482
9483         * /src/ds390/gen.c, /src/ds390/main.c:
9484         More builtin function additions for TININative
9485
9486         * /src/ds390/ralloc.c:
9487         Had broken the regression testsuite
9488
9489         * /src/SDCCast.c: Fixed a bug in dumptree
9490
9491         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9492         Added funcattr hasStackParms will be set for reentrant functions when there
9493         are paramteres on the stack, this helps in minimizing frame pointer generation
9494         typeFromStr can handle function pointers now
9495
9496         * /doc/builtins.txt, /doc/TININative.txt:
9497         *** empty log message ***
9498
9499
9500 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9501
9502         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9503         ALPHA version for -mTININative
9504
9505         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9506         updated to reflect changes in the port structure
9507
9508         * /src/port.h:
9509         added function do_assemble (similar to do_link) if non-null this function
9510         will be called to do assembly (-mTININative) requires a multi command
9511         assembly
9512         added function genAssemblerEnd will be called to generate assembler Epilogue
9513
9514         * /src/SDCCsymt.c:
9515         added _JavaNative to debug info printing
9516
9517         * /src/SDCCmain.c: added option --tini-libid
9518         added port->do_assemble function (-mTININative) has a multi command assemble
9519
9520         * /src/SDCCglue.c: Disabled "constExpr" check
9521         added port->genAssemblerEnd function
9522
9523         * /src/SDCCglobl.h: Added option --tini-libid value
9524
9525         * /src/SDCCast.h:
9526         tookout optimizeCompare from the header (has no external references)
9527
9528         * /src/SDCCast.c: made one more function "static"
9529
9530 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9531
9532         * src/z80/mappings.i: Added z80asm support.
9533
9534         * src/z80/main.c: Added z80asm support on --asm=z80asm
9535
9536         * src/z80/gen.c: Fixed asm portability issues.
9537
9538         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9539
9540         * src/SDCCglue.c (printExterns): Added global/extern split.
9541
9542 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9543
9544         * support/regression/Makefile: added test for mcs51 model large
9545
9546         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9547
9548         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9549
9550 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9551
9552         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9553
9554 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9555
9556         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9557
9558         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9559
9560 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9561
9562         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9563
9564         * support/regression/tests/simplefloat.c: Port to mcs51.
9565
9566 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9567         * support/regression/tests/bug-485362.c: Added.
9568
9569         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9570
9571         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9572
9573         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9574
9575         * src/z80/gen.c (aopDump): Added a dump function.
9576
9577 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9578         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9579
9580         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9581
9582         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9583
9584         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9585
9586         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9587
9588         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9589
9590         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9591
9592         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9593
9594         * support/regression/ports/ds390/support.c: Use tinibios.
9595
9596         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9597
9598 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9599
9600         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9601         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9602
9603         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9604
9605         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9606
9607 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9608
9609         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9610
9611         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9612         (packRegsForIYUse): Created and optimised.
9613
9614 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9615
9616         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9617 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9618
9619         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9620
9621         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9622
9623         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9624
9625 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9626
9627         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9628
9629         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9630
9631 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9632
9633         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9634
9635         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9636
9637         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9638
9639 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9640
9641         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9642         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9643         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9644
9645         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9646
9647         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9648         (genNotFloat): Added.
9649         (genUminusFloat): Added.
9650
9651         * device/lib/z80/Makefile: Added floating pt stubs.
9652
9653         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9654
9655         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9656
9657         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9658
9659 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9660
9661         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9662
9663         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9664
9665         * sdcc/support/regression/Makefile: Add port ds390.
9666
9667         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9668
9669         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9670
9671         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9672
9673         * sdcc/support/regression/ports/ds390/support.c: Added.
9674
9675         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9676
9677         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9678
9679         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9680
9681 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9682
9683         * device/include/malloc.h: Added z80 and gbz80 support.
9684
9685         * device/lib/gbz80/heap.s: Added.
9686
9687         * device/lib/z80/heap.s: Added.
9688
9689         * device/lib/malloc.c: Added z80 and gbz80 support.
9690
9691         * support/regression/tests/malloc.c (testMalloc): Added.
9692
9693         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9694
9695         * support/regression/tests/bug-478094.c: Added.
9696
9697         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9698
9699 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9700
9701         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9702
9703         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9704
9705         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9706
9707         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9708
9709         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9710
9711 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9712
9713         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9714
9715 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9716
9717         * support/regression/tests/bug-477927.c: Added.
9718
9719         * src/z80/peeph.def: Added minor rules.
9720
9721         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9722
9723         * src/z80/peeph.def: Added jump optimisation modification.
9724
9725 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9726
9727         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9728
9729 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9730
9731         * support/regression/tests/funptrs.c: Added.
9732
9733 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9734
9735         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9736
9737 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9738
9739         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9740
9741         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9742
9743         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9744         (movLeft2ResultLong): Created.
9745
9746         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9747         (joinPushes): Added.  Joins two char pushes into a word push.
9748
9749 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9750
9751         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9752
9753         * support/makebin/Makefile (install): Added creation of dest dir.
9754
9755 2001-10-24 Karl Bongers <karl AT turbobit.com>
9756
9757         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9758
9759 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9760
9761         * src/z80/ralloc.c: Turned off faulty pack for one use.
9762
9763         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9764
9765         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9766
9767 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9768
9769         * support/regression/Makefile: Improved clean
9770
9771         * support/regression/ports/gbz80/spec.mk: Added clean
9772
9773         * support/regression/ports/host/spec.mk: Added clean
9774
9775         * support/regression/ports/z80/spec.mk: Added clean
9776
9777         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9778
9779         * support/regression/ports/mcs51/timeout.c: little improvements
9780
9781 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9782
9783         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9784
9785         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9786
9787         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9788
9789 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9790
9791         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9792
9793         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9794
9795 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9796         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9797
9798         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9799
9800         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9801
9802         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9803
9804         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9805
9806         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9807
9808         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9809
9810         * support/regression/tests/longor.c: Added.
9811
9812 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9813
9814         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9815
9816         * as/mcs51/aslink.h: define PATH_MAX
9817
9818         * as/mcs51/asm.h: define PATH_MAX
9819
9820         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9821
9822         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9823
9824         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9825
9826         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9827
9828         * src/SDCCglobl.h: define PATH_MAX
9829
9830         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9831
9832         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9833
9834 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9835
9836         * src/z80/gen.c (gencjneshort): Fixed
9837
9838         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9839
9840 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9841
9842         * support/regression/tests/bug-469671.c: Added.
9843
9844         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9845
9846 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9847
9848         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9849
9850         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9851
9852 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9853
9854         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9855
9856         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9857
9858         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9859
9860         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9861
9862         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9863
9864         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9865
9866         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9867
9868 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9869
9870         * 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.
9871
9872         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9873
9874         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9875
9876 2001-10-07    <johan AT FRIJA>
9877
9878         * device/lib/gets.c (gets): fixed the return value.
9879
9880 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9881         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9882
9883         * 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.
9884
9885         * 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.
9886
9887         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9888
9889         * src/pic/gen.c: Removed Safe_strdup.
9890
9891         * configure.in: Added option to enable libgc support.
9892
9893         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9894         (bitVectUnion): Optimised.
9895         (bitVectIntersect): Optimised.
9896         (bitVectBitsInCommon): Optimised.
9897         (bitVectCplAnd): Optimised.
9898
9899         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9900
9901 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9902
9903         * src/SDCCmain.c: distinguish between assembler debug and plain options
9904
9905         * src/avr/main.c:   remove standard assembler options
9906
9907         * src/ds390/main.c: remove standard assembler options
9908
9909         * src/mcs51/main.c: remove standard assembler options
9910
9911         * src/port.h: removed "PENDING" comment
9912
9913 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9914
9915         * src/device/lib/_mulint.c  : new, with assember functions
9916
9917         * src/device/lib/_mullong.c : new, with assember functions
9918
9919         * src/device/lib/_divuint.c : with assember functions
9920
9921         * src/device/lib/_divsint.c : with assember functions
9922
9923         * src/device/lib/_divulong.c: with assember functions
9924
9925         * src/device/lib/_divslong.c: with assember functions
9926
9927         * src/device/lib/_moduint.c : with assember functions
9928
9929         * src/device/lib/_modsint.c : with assember functions
9930
9931         * src/device/lib/_modulong.c: with assember functions
9932
9933         * src/device/lib/_modslong.c: with assember functions
9934
9935         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9936
9937         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9938
9939         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9940                                       replaced _mululong.c and _mulslong.c by _mullong.c
9941
9942 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9943
9944         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9945
9946 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9947
9948         * src/SDCCglue.c: test, if win32api is available for MINGW
9949
9950 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9951
9952         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9953         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9954         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9955         * support/regression/ports/host/spec.mk: removed GENERIC
9956         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9957         * support/regression/ports/z80/spec.mk: removed GENERIC
9958
9959 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9960
9961         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9962
9963         * support/regression/tests/bug-467035.c: Created.
9964
9965 2001-10-01    <johan AT FRIJA>
9966
9967         * src/SDCC.y: fixed bug #466586 part 1
9968
9969 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9970
9971         * SDCCicode.c: z80 has no generic pointers
9972         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9973
9974 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9975
9976         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9977
9978 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9979
9980         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9981
9982         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9983
9984 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9985
9986         * configure.in: Fixed up so that ucsim is only configured once.
9987
9988         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9989
9990         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9991         (getPathDifference): As above.
9992
9993         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9994
9995         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9996
9997 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9998         * .version: Updated to 2.3.1
9999
10000         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10001         Added copyright header.
10002
10003         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10004         (assemble): Added support for macro based assembler commands.
10005         (linkEdit): Added support for macro based linker commands.
10006         (preProcess): Changed the pre-processor to use macros.
10007         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10008         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10009
10010         * device/lib/z80/crt0.s: Added module name for debugging.
10011
10012 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10013
10014         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10015
10016         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10017
10018         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10019
10020         * src/Makefile.in: Added SDCCmacro and SDCCutil
10021
10022 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10023
10024         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10025
10026 2001-09-16    <johan AT FRIJA>
10027
10028         * 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.
10029
10030 2001-09-15    <johan AT FRIJA>
10031
10032         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10033         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10034
10035 2001-09-11    <johan AT FRIJA>
10036
10037         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10038
10039 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10040
10041         * support/regression/tests/bug-460444.c: Added test case.
10042
10043         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10044         (genCast): Added justification for all of the asserts.
10045
10046 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10047
10048         * support/regression/support.c: _xdata replaced by xdata
10049
10050         * support/regression/spec.mk: removed _generic
10051
10052 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10053
10054         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10055
10056         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10057         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10058
10059         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10060
10061         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10062
10063         * support/regression/tests/bug-460010.c: Added test case.
10064
10065         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10066
10067 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10068
10069         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10070
10071         * support/regression/testfwk.c: removed workaround for bug #436344
10072
10073         * support/regression/tests/bp.c: use less memory with mcs51
10074
10075         * support/regression/tests/bug-441448.c: use less memory
10076
10077         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10078
10079         * support/regression/collate-results.py: typo
10080
10081 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10082
10083         * support/regression/tests/fetchoverlap.c: Added new test case.
10084
10085         * support/regression/tests/bp.c: Added new test case.
10086
10087         * support/regression/tests/bug-448984.c: Added new test case.
10088
10089         * support/regression/tests/pow2shifts.c: Added new test case.
10090
10091         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10092         (genlshTwo): Fixed right shift for count > 8.
10093
10094         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10095
10096 2001-09-08    <johan AT FRIJA>
10097
10098         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10099
10100 2001-09-07    <johan AT FRIJA>
10101
10102         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10103
10104         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10105
10106 2001-09-06    <johan AT FRIJA>
10107
10108         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10109         * bernhard noted me at this: "() equals to (void)" (1.38)
10110
10111 2001-09-05    <johan AT FRIJA>
10112
10113         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10114
10115 2001-09-04    <johan AT FRIJA>
10116
10117         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10118
10119
10120 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10121
10122         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10123
10124 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10125
10126         * link/z80/aslink.h: Fixed path for PATH_MAX
10127
10128 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10129
10130         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10131
10132         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10133
10134         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10135
10136         * 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.
10137
10138 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10139
10140         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10141         (genCmp): Fixed up genCmp for the GB with longs.
10142
10143         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10144
10145         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10146
10147         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10148
10149         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10150
10151 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10152
10153         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10154
10155 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10156
10157         * 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.
10158
10159         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10160
10161 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10162
10163         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10164
10165         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10166
10167 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10168
10169   * sim/ucsim/configure:    little improvement of Cygwin-detection
10170   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10171   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10172   * support/regression/tests/bug-221100.c: small changes for mcs51
10173   * support/regression/tests/bug-221168.c: small changes for mcs51
10174   * support/regression/tests/bug-227710.c: small changes for mcs51
10175   * support/regression/tests/staticinit.c: small changes for mcs51
10176   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10177   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10178   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10179
10180 $Revision$