Better handling of floats between -1.0 and 0.0
[fw/sdcc] / ChangeLog
1 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2
3         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
4           Better handling of floats between -1.0 and 0.0.
5
6 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7
8         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
9           (the missing "if"s prohibited removal of redundant labels)
10
11 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12
13         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
14           Properly convert floats between -1.0 and 0.0 to long, int, and char
15           types (max integer value of negative floats tends to zero).
16         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
17           Removed changes made so to work properly with floats between
18           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
19           and _fs2char.c
20
21 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
22
23         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
24         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
25         (genCast) cosmetic change
26         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
27         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
28         from mcs51
29         * support/regression/tests/bitfields (testSignedBitfields): added
30
31 2005-11-18 Borut Razem <borut.razem AT siol.net>
32
33         * sdcc/device/lib/Makefile.in: remove all unnecessary files
34         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
35           introduced SILENT option to make building of pic16 libraries less
36
37 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
38
39         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
40           Now they work properly with floats between -1.0 and 0.0
41         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
42
43 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
44
45         * src/SDCCicode.c (printOperand): added missing else
46
47 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
48
49         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
50         reformatted for better readability
51         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
52         signed bitfields
53
54 2005-11-17 Borut Razem <borut.razem AT siol.net>
55
56         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
57           introduced SILENT option to make building of pic16 libraries less
58           verbose - used for nightly snapshot build
59         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
60           available on Win32 platforms.
61         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
62           medium, large, pic and pic16
63
64 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
65
66         * device/lib/printf_large.c: Temporary patch for bug 1358192:
67           printf("%f"...) sets fraction to zero.
68
69 2005-11-16 Raphael Neider <rneider AT web.de>
70
71         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
72           fixes #1357221
73         * src/pic/gen.c (genIfx): implemented for CARRY bit
74         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
75           to generic pointers, fixes #1357332,
76           (pic16_movLit2f): NEW,
77           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
78
79 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
80
81         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
82
83 2005-11-11 Raphael Neider <rneider AT web.de>
84
85         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
86         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
87           compute pointer's type from operand,
88           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
89           improved single bit reads, fixes bug #1353379
90
91 2005-11-09 Borut Razem <borut.razem AT siol.net>
92
93         * support/scripts/sdcc.nsi: added lib/pic to the package
94
95 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
96
97         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
98
99 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
100
101         * support/regression/tests/bug1348008.c: added
102         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
103         * support/regression/tests/bug1337835.c: updated comment
104
105 2005-11-06 Borut Razem <borut.razem AT siol.net>
106
107         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
108           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
109           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
110           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
111           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
112           dynamic construction of cl_error_class and derivates - 2.nd try
113
114 2005-11-05 Borut Razem <borut.razem AT siol.net>
115
116         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
117           bug, which caused Bus Errors on sparc solaris
118
119 2005-11-04 Borut Razem <borut.razem AT siol.net>
120
121         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
122           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
123           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
124           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
125           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
126           and derivates to resolve the initialization problem on OSX
127
128 2005-11-02 Borut Razem <borut.razem AT siol.net>
129
130         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
131           corrected typo - #include <winsock2.h>
132
133 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
134
135         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
136           (_asxxxx_mapping): added org directive for future enhancements
137
138 2005-11-01 Borut Razem <borut.razem AT siol.net>
139
140         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
141           enabled sockets on WIN32
142         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
143
144 2005-10-31 Borut Razem <borut.razem AT siol.net>
145
146         * support/regression/generate-cases.py: escape backslashes in {testcase}:
147           WIN32 backslash path delimiters should be escaped when used in C strings
148         * support/regression/tests/bitfields.c: exclude failing assertions for
149           __CYGWIN32__ and __MINGW32__ hosts
150
151 2005-10-30 Borut Razem <borut.razem AT siol.net>
152
153         * src/SDCCutil.c: corrected double comparison typo
154
155 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
156
157         * device/lib/medium/Makefile: added for new memory model medium
158         * device/include/asm/mcs51/features.h: updated for medium/pdata
159         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
160           added Multiply & Accumulate sbit's and MAC0_PAGE define
161         * device/include/mcs51/c8051f300.h: added sfr16 definitions
162         * device/include/mcs51/c8051f310.h: added sfr16 definitions
163         * device/lib/_mullong.c: update for medium model
164         * device/lib/incl.mk: added medium model
165         * doc/sdccman.lyx: documented medium model
166         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
167         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
168         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
169         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
170           (allocParms): set SCLS and OCLS to pdata for medium model
171         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
172           for pdata,
173           (powof2): return <0 if not power of 2
174         * src/avr/gen.c (genBitWise): use updated powof2
175         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
176           (shiftR2Left2Result): small optimization in setup, save acc when storing,
177           (shiftLLeftOrResult): use B if necessary
178         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
179         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
180         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
181         * support/regression/Makefile.in: added test-mcs51-medium
182         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
183
184 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
185
186         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
187         specifier unsigned
188         * device/lib/time.c (mktime): fixed bug 1334315
189
190 2005-10-28 Raphael Neider <rneider AT web.de>
191
192         * device/include/pic/p16f_common.inc: added common declarations
193         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
194
195 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
196
197         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
198           (aopPutUsesAcc): added to predict accumulator use,
199           (assignResultValue): save acc if necessary,
200           (genMinusDec): store result if indirectly addressed,
201           (genDivOneByte):  save acc if necessary,
202           (movLeft2Result): bugfix if left already in acc,
203           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
204             attention to accumulator use (esp. pdata),
205           (genReceive): receive pdata correctly
206         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
207         * src/SDCCicode.h: added isOperandInPagedSpace prototype
208
209 2005-10-27 Raphael Neider <rneider AT web.de>
210
211         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
212
213 2005-10-27 Raphael Neider <rneider AT web.de>
214
215         * .version: changed version to 2.5.4
216         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
217         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
218           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
219             arithmetics support routines
220         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
221         * device/lib/Makefile.in: also create installdir for pic
222
223         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
224           pic14 port as well
225         * src/pic/device.c (dump_sfr): rewritten to delegate register
226           placement to the linker (use `extern sym' rather than sym EQU addr),
227           (validAddress): fixed to check last specified address
228         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
229           (popGetLit): truncate literal value to 8 bit,
230           (popGet): moved assert to more appropriate place
231           (popGetExternal): create pCode operand from and mark the according
232             symbol as being `extern'
233           (popGetAddr): added sanity check on immediate's offset, provide
234             GPOINTER tag on demand
235           (aopPut): fixed for immediates,
236           (mov2w_op): move operand's address or contents to WREG (depending on
237             operand type), safer variant of mov2w,
238           (movwf,call_libraryfunc): NEW, handy abbreviations,
239           (get_argument_pcop,get_return_val_pcop,pass_argument,
240           get_returnvalue): interface for accessing function parameters and
241             return values,
242           (assignResultValuei,genRet): use new parameter/return value interface
243           (pic14_getDataSize): back to old version handling generic pointers,
244           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
245             provided implementation and/or fixed old one,
246           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
247             calls, removed legacy 8051 reference code
248           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
249           (loadSignToC): NEW, move the operands sign bit to CARRY,
250           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
251             genRightShiftSigned, accepts negative shift counts,
252           (setup_fsr): load FSR and adjust IRP (indirect memory access),
253           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
254             generic pointers, __data pointers and __code pointers,
255           (genUnpackBits,genPackBits): rewritten to work with generic pointers
256             and signed bitfields, limit bitfields to 8 bit,
257           (genDataPointerGet): fixed number of bytes read,
258           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
259           (genPointerGet,genPointerSet): fixed handling of __code pointers,
260             pointers to constant data are no longer assumed to point to __code
261             space, removed invalid pointer types,
262           (bitpatternFromVal): retrieve the PICs representation of an integer
263             or float literal,
264           (genDataPointerSet): fixed assigning to po_immediate operands,
265           (genGenPointerSet): implemented as library call,
266           (genIfx): fixed incorrect condition,
267           (genAddrOf): limit generic pointers' addresses to 2 bytes,
268             provide GPOINTER tag according to destination's storage class,
269           (genCast): added code to handle casting to generic pointers, added
270             sign-/zero extension of the result
271           (aop_isLitLike,op_isLitLike): fixed handling of immediates
272         * src/pic/gen.h: added macros to access IRP bit in STATUS register
273         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
274           extend the result
275         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
276           address/register resides in the shared banks
277           (emitSymbolToFile): improved to handle global and `pinned' symbols,
278             put all variables into separate sections (have the linker arrange
279             them)
280           (picglue): put init code and interrupt handlers in separate sections
281         * src/pic/main.c: added port specific options table, modified to PORT
282           structure to make GPOINTERs 3 byte, added pic14_options
283           (_pic14_do_link): private linking routine (update paths to libraries,
284             add libsdcc.lib by default)
285         * src/pic/main.h: declare pic14_options
286         * src/pic/pcode.c: fixed instructions i/o relations,
287           (RegCond): reverted to correct version,
288           (newpCodeOpLit): truncate literals to 8 bit,
289           (genericPrint): added debug output,
290           (getRegFromInstruction): fixed for various operand types, simplified
291           (BuildFlow): fixed broken handling of isntructions with labels
292           (LinkFlow): start at last instruction in flow (skip trailing comments),
293             pass the flow on to the next instruction after CALL
294           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
295           (insertPCodeInstruction): fixed inserting after a skip instruction,
296           (DoBankSelect): fixed for labeled instructions
297           (OptimizepBlock): honor --nopeep switch
298           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
299         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
300         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
301           (pCodeOptime2pCodes): allow disabling this optimization via
302             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
303             but is still buggy), started implementation of a dataflow based
304             pCode optimization (CSE + dead code elimination)
305           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
306         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
307           names are independant of the stack location and therefore portable across
308           devices
309
310 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
311
312         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
313           (selectSpil): fixed bug 1337835 by not spilling bit variables
314         * support/regression/tests/bug1337835.c: added test for this bug
315         * src/mcs51/peeph.def: restart after rule 3.c,
316           addded rules 263.x to optimize loading constants
317
318 2005-10-26 Raphael Neider <rneider AT web.de>
319
320         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
321         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
322           (genAssign): emit warning when casting literals to generic pointer
323             type, also applies when taking the address of a fixed variable,
324           (genCast): improved casting to generic pointers
325         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
326           extern variables, added verbose error message
327         * device/include/pic16/{string.h,errno.h}: added #pragma library c
328
329 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
330
331         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
332         carry must be complemented too
333         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
334         could be emitted by genMinus
335         * src/SDCCval.c (constVal): fixed bug 1305065
336
337 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
338
339         * src/SDCCast.c (addCast): added promotion for bit variables
340         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
341         promotion casts + optimisation
342         (optimizeGetWord): fix warning 'i' might be used uninitialized
343         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
344         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
345
346 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
347
348         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
349         all chars are promoted to int; promotion should be handled in SDCCast.c
350
351 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
352
353         * device/lib/_strcmp.c: Fixed bug 1326457
354
355 2005-10-11 Raphael Neider <rneider AT web.de>
356
357         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
358         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
359
360 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
361
362         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
363         * support/regression/tests/sfr16.c: added test for the sfr32 bug
364
365 2005-10-04 Raphael Neider <rneider AT web.de>
366
367         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
368           device/lib/pic16/pics.all: added pic18f1320
369         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
370
371 2005-09-30 Raphael Neider <rneider AT web.de>
372
373         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
374         * src/pic16/devices.inc: NEW, provides device descriptions
375         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
376
377 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
378
379         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
380           GETHBIT
381
382 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
383
384         * doc/sdccman.lyx: updated Highest Order Bit documentation,
385           documented Any Order Bit, Higher Order Byte and Higher Order Word
386         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
387         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
388           (optimizeGetAbit): new, to get any bit, not only the high bit,
389           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
390           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
391           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
392           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
393             RIGHT_OP: also try GETBYTE, GETWORD optimization,
394             GETABIT, GETBYTE, GETWORD: decorate them,
395           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
396           (ast_print): added GETABIT, GETBYTE, GETWORD
397         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
398         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
399           (geniCodeBinary): new generic binary icode,
400           (ast2iCode): added GETABIT, GETBYTE, GETWORD
401         * src/port.h: updated comment for PORT.hasExtBitOp
402         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
403           (genGetByte): new, to get a single byte,
404           (genGetWord): new, to get a word from a long,
405           (gen51Code): added GETABIT, GETBYTE, GETWORD
406         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
407
408 2005-09-23 Raphael Neider <rneider AT web.de>
409
410         * configure.in, configure: have device/lib/pic configured
411         * device/lib/Makefile.in: added model-pic14
412         * device/lib/clean.mk: added pic/ to clean rule
413         * device/lib/pic: added rudimentary pic14 library providing support
414           functions for multiplication/division/generic pointer access
415         * src/SDCCopt.c (convilong): mark support functions as extern
416           for pic14 port as well
417         * src/pic/gen.c (genMult): added assertions,
418           (genpic14Code): emit warning on unhandled iCodes
419         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
420         * src/pic/pcode.c (pCodeOpCopy),
421         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
422           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
423           SFR_REGISTER}), made safe for future extensions
424         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
425           instructions even if preceeded by SKIP instructions (also remove
426           them); removed unused code
427         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
428           prevents leaving parts of the structure uninitialized after copying
429
430 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
431
432         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
433           ago by me
434         * support/regression/tests/addsub.c: added test for the bug
435
436 2005-09-21 Raphael Neider <rneider AT web.de>
437
438         * device/include/pic16/pic18f1220.h,
439           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
440         * device/lib/pic16/Makefile.rules: added missing opening paren
441         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
442           are provided in genutils.c,
443           (genUminusFloat,genUminus,genCmpEq): added asserts on different
444           operand/result sizes,
445           (genCmp): assert on NULL pointers first, then check deref'ed values
446         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
447           result size
448
449 2005-09-18 Raphael Neider <rneider AT web.de>
450
451         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
452           as these are now unused,
453           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
454         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
455           local, avoids uninitialized pointer dereference on r->name
456         * src/pic16/ralloc.c (newReg): fixed indentation
457
458 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
459
460         * src/SDCCval.c (constVal): fixed bug 730366
461         * support/Util/SDCCerr.c,
462         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
463
464 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
465
466         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
467
468 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
469
470         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
471
472 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
473
474         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
475           (hex2dec): made hex_digit unsigned char, removed ascii dependance
476         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
477           (hex2dec): made hex_digit unsigned char, removed ascii dependance
478         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
479         * packihx/packihx.c (hexDigit): made c unsigned char
480         * as/mcs51/lklibr.c (fndsym),
481         * link/z80/lkgb.c (gb),
482         * link/z80/lklibr.c (fndsym),
483         * link/z80/lkrloc.c (relr),
484         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
485         * src/SDCC.lex (checkCurrFile, process_pragma),
486         * src/SDCCglue.c (spacesToUnderscores),
487         * src/SDCCmain.c (setParseWithComma, processFile),
488         * src/asm.c (tvsprintf, printCLine),
489         * src/avr/gen.c (emitcode, aopPut),
490         * src/ds390/gen.c (emitcode),
491         * src/hc08/gen.c (emitcode, emitinline),
492         * src/mcs51/gen.c (emitcode, genInline),
493         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
494           tokenizeLineNode),
495         * src/pic/ralloc.c (debugLog),
496         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
497           tokenizeLineNode),
498         * src/pic16/ralloc.c (debugLog),
499         * src/z80/main.c (_process_pragma):
500            made all ctype.h function calls safe
501         * src/SDCCopt.c: include math.h for fabs
502         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
503           and used them throughout the code to make ctype.h function calls safe
504         * src/ds390/main.c (asmLineNodeFromLineNode),
505         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
506         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
507            unsigned char*
508         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
509           (newpCodeAsmDir): made ctype.h function calls safe
510         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
511           pic16_emitcode):  made lbp unsigned char*
512         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
513           (pic16_newpCodeAsmDir): made ctype.h function calls safe
514         * src/xa51/gen.c (emitcode),
515         * src/z80/gen.c (_emit2): made lbp unsigned char*
516         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
517            char*
518
519 2005-09-05 Raphael Neider <rneider AT web.de>
520
521         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
522           access bank splitpoint
523
524 2005-09-05 Raphael Neider <rneider AT web.de>
525
526         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
527
528 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
529
530         * .version: changed to version 2.5.3
531         * doc/sdccman.lyx: changed version to 2.5.3,
532           documented --codeseg and --constseg and pragma codeseg and constseg,
533           documented bit parameters (reentrant) and bit returning
534         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
535            currFunc->recvSize, but is this ok for all ports?
536           (ast2iCode): result of ~ on unsigned char must be cast to int for
537            bool to work
538         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
539           function pointers in bit space
540         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
541           (processFuncArgs): call port.reg_parm() with reentrancy info
542         * src/port.h,
543         * src/avr/main.c,
544         * src/ds390/main.c,
545         * src/hc08/main.c,
546         * src/pic/main.c,
547         * src/pic16/main.c,
548         * src/xa51/main.c,
549         * src/z80/main.c: port.reg_parm prototype extended with
550           "bool reentrant" parameter
551         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
552           options.stackAuto for allocating bit register parameters
553         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
554           (genSend): set BitBankUsed if it is,
555           (selectRegBank): factored out of genCall for use in genPcall,
556           (genCall): removed redundant dtype assignmen, use selectRegBank,
557           (genPcall): handle returning in Carry properly, save in F0 if needed,
558           (genReceive): handle bit register parameters
559         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
560           (mcs51_assignRegisters): enable bit registers for all reentrant
561            functions and don't set BitBankUsed unconditionally
562         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
563         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
564         * support/regression/tests/funptrs.c: added tests for BOOL and for return
565
566 2005-08-27 Borut Razem <borut.razem AT siol.net>
567
568         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
569         ppc-osx (Darwin) does not support -u option. It seems that it is
570         supported only on Linux - GNU cp
571
572 2005-08-25 Borut Razem <borut.razem AT siol.net>
573
574         * sim/ucsim/gui.src/serio.src/Makefile.in,
575           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
576           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
577           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
578           install and strip, since the strip at /usr/ccs/bin should be used
579           on solaris
580
581 2005-08-24 Borut Razem <borut.razem AT siol.net>
582
583         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
584
585 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
586
587         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
588         ffffffffu
589
590 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
591
592         * as/mcs51/aslink.h: completed lkrloc.c prototypes
593         * as/mcs51/lkmain.c (link_main): fixed warning
594         * device/include/stdbool.h: ds390 has no advanced bit support yet
595         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
596         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
597         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
598           and updated their macros
599         * src/SDCCval.c (constVal): updated comment for renamed b_long
600
601 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
602
603         * as/mcs51/asdata.c: changed ctype['['] to BINOP
604         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
605           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
606           (oprio): set priority for '['
607         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
608            and adb_24_bit
609         * as/mcs51/asm.h: added defines R_BIT and S_BIT
610         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
611         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
612         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
613           added overlayable BIT_BANK area
614         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
615           (summary2): explain 'T' in legenda
616         * as/mcs51/lkrloc.c: replaced old K&R style,
617           (relr): added R_BIT processing,
618           (errmsg): added "Bit-addressable relocation error",
619           (adb_bit): added for converting from byte- to bit-addressable space,
620           (adb_24_bit): added for converting from byte- to bit-addressable space
621         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
622            used in reentrant functions now even as return value
623         * device/lib/_gptrput.c (_gptrput): removed obsolete code
624         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
625           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
626         * src/SDCCglobl.h: added indicator BitBankUsed
627         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
628            the bit registers b0-b7
629         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
630           (geniCodeCast): fixed bug 1263853,
631           (geniCodeLogicAndOr): put result in bool or char,
632           (geniCodeReceive): added parameter func for accessing the return type,
633           (geniCodeFunctionBody): pass func to geniCodeReceive
634         * src/SDCCmain.c: added indicator BitBankUsed
635         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
636         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
637           (checkSClass): don't put automatic bool/bit on stack,
638           (checkFunction): removed check on function cannot return bit
639         * src/SDCCsymt.h: added newBoolLink prototype
640         * src/mcs51/gen.c (rb1regs): added bit registers,
641           (movc): created for assigning to carry,
642           (pushReg, popReg): created for pushing registers,
643           (sameRegs): check both AOP_REG and AOP_CRY types,
644           (aopOp): handle bit registers,
645           (aopPut): optimization no self-assign,
646           (saveRegisters): push reg->base (bits) only once for bit registers,
647            and use pushReg,
648           (unsaveRegisters): pop reg->base only once and use popReg,
649           (assignResultValue): added parameter func and return in carry for bits,
650           (genIpush): optimization no reload in A if not changed,
651           (genSend): bit parameters in reentrant functions are passed in bit
652            registers by first assigning to bits in B, then save registers and
653            copy B to bits,
654           (genCall): handle returning in Carry properly, save it in F0 if needed,
655           (genPcall): updated assignResultValue call, this is not safe yet for bit
656            returning function !!!
657           (genFunction): don't generate equ's for bit registers and use pushReg,
658           (genEndFunction): take care of bit returning functions and use popReg,
659           (genRet): return bit in Carry,
660           (genIfx): optimize bit registers and other directly addressable bits,
661           (genReceive): updated assignResultValue call
662         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
663           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
664            registers when using stack-auto
665         * src/mcs51/ralloc.c (_G): added allBitregs,
666           (regs8051): added the bit registers,
667           (createStackSpil): use macro IS_BIT,
668           (getRegBit): added to allocate a bit register, else spill,
669           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
670           (updateRegUsage): factored out to ease stepping while debugging,
671           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
672            also allocate bit registers,
673           (fillGaps): handle bit registers,
674           (findAllBitregs): added to create bit vector with all bit registers,
675           (mcs51_allBitregs): returns this bit vector,
676           (mcs51_assignRegisters): when using stack-auto use bit registers for
677            passing parameters and creating local variables
678         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
679
680 2005-08-22 Borut Razem <borut.razem AT siol.net>
681
682         * device/lib/Makefile.in: replaced find option -or with -o
683           to make it run on solaris
684
685 2005-08-22 Raphael Neider <rneider AT web.de>
686
687         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
688           fixes #1265442 (crash on Solaris)
689
690 2005-08-20 Borut Razem <borut.razem AT siol.net>
691
692         * configure, configure.in: added tests for libsocket and libnsl libraries,
693           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
694           from support/regression/Makefile.in
695         * support/regression/Makefile.in: added
696         * device/lib/pic16/Makefile.common.in: force make to use bash shell
697         * sim/ucsim/libtool: regenerated on sparc-solaris
698         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
699           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
700           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
701           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
702           sparc-solaris, which doesn't use GNU ld linker
703         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
704         * as/Makefile: find on sparc-solaris does not support -maxdepth option
705
706 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
707
708         * src/mcs51/peeph.def: updated comments
709
710 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
711
712         * device/lib/_gptrget.c,
713         * device/lib/_gptrput.c: slightly shorter
714         * doc/sdccman.lyx: incremented version
715         * src/mcs51/peeph.def: moved peephole comments to the line of first
716           change to better keep line correlation, reanimated 186.e
717         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
718
719 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
720
721         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
722           David Saxton with quotes around file name.
723
724 2005-08-15 Borut Razem <borut.razem AT siol.net>
725
726         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
727           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
728           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
729           make tests run on x86_64 platform
730
731 2005-08-13 Raphael Neider <rneider AT web.de>
732
733         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
734           as it might be executed DURING a build (parallel make is wonderful)
735
736 2005-08-13 Raphael Neider <rneider AT web.de>
737
738         * device/lib/Makefile.in (port-specific-objects-pic16):
739           revert to cp $(PORT)/bin/*.* $(PORTDIR)
740         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
741           dependency
742         * device/lib/pic16/Makefile.rules: build subdirs before creating
743           the library, removed builddir rule, create $(builddir) early in
744           recurse rule, use empty recurse rule for leaf directories
745         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
746           mkdir errors (race condition), removed duplicate suffix "hex"
747           from clean rules
748         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
749         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
750           prevents mkdir -p from aborting on Alpha
751
752 2005-08-12 Raphael Neider <rneider AT web.de>
753
754         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
755           db-statements in order to allow for arrays of pointers in code
756           sections to be placed without interspersed 0-padding, fixes
757           bug #1256215
758         * (emitStatistics): fixed division by zero for pic18f1220
759         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
760           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
761         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
762         * (pic16_pCodeConstString): keep track of already emitted string
763           literals to prevent "duplicate definitions of symbol _str_NR"
764         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
765           debug message
766         * device/lib/Makefile.in: ignore failing PIC16 library builds
767         * device/lib/pic16/Makefile: do not build if gputils are missing
768         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
769
770 2005-08-10 Raphael Neider <rneider AT web.de>
771
772         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
773           my last commit)
774
775 2005-08-10 Raphael Neider <rneider AT web.de>
776
777         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
778           Rokas' patch to add the new fixed point type "__fixed16x16"
779         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
780           functions for __fixed16x16 arithmetics
781         * device/lib/pic16: reimplemented the build system to support
782           a separate build directory, better handling of libio (create
783           the library in a separate subdir for each architecture) and
784           easier configuration (centralized in Makefile.common)
785
786 2005-08-07 Raphael Neider <rneider AT web.de>
787
788         * src/pic16/gen.c (genrshTwo): fixed sign extension
789         * src/pic16/device.c: added pic18f2320, 4220 and 4320
790         * device/include/pic16/pic18f2220.h: changed some bit definitions,
791           added T0CONbits
792         * device/include/pic16/pic18f4220.h: NEW, header for
793           pic18f4220 and pic18f4320
794         * device/include/pic16/pic18fregs.h: added new devices,
795           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
796         * device/include/pic16/signal.h: resolved name clashes
797           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
798           to also allow testing for interrupt enable bits, added
799           comments on how to use the macros
800         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
801         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
802           register definitions for the devices
803         * device/lib/pic16/pics.all: added new devices
804         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
805           allocated memory
806         * device/lib/pic16/libc/stdlib/memfree: do not count
807           the block header as free memory
808         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
809           simplified and added missing end-of-blocklist-marker
810           (reported by Peter Onion, fixes #1252814)
811         * (_mergeHeapBlock): fixed loop condition
812         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
813           len==0, restructured code
814         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
815           up a bit, reduced bitfield accesses, prevent endless loops
816           in case of heap corruption
817         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
818           "unreferenced arguments/must return a value" warnings
819         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
820           replaced BAUDREG with SPBRG
821         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
822           device/lib/pic16/debug/gstack/gstack.c: replaced
823           _naked, _asm, _endasm with __naked, __asm, __endasm
824
825 2005-08-05 Raphael Neider <rneider AT web.de>
826
827         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
828           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
829
830 2005-08-05 Borut Razem <borut.razem AT siol.net>
831
832         * device/lib/Makefile.in: added missing ';'
833         * configure: removed ^M characters
834
835 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
836
837         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
838           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
839           License
840
841 2005-08-04 Borut Razem <borut.razem AT siol.net>
842
843         * configure.in: pic16 libraries build 2nd try - enable running
844           configure in device/lib/pic16
845         * configure: regenerated from configure.in
846         * device/lib/Makefile.in: create $(PORT)/bin directory
847
848 2005-08-03 Raphael Neider <rneider AT web.de>
849
850         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
851           to get/set values via pointers
852         * (genUnpackBits,genPackBits): changed detection of
853           ptr->bitfield vs. sym.bitfield, fixed access via generic
854           pointers, removed dead (wrong) code for multibyte bitfields
855         * (genNearPointerGet, genGenPointerGet): removed useless code,
856           fixed bitfield detection, fixes #1250594
857         * (genNearPointerSet): removed useless code
858         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
859           and introduced macro pic16_emitpcode that conditionally emits
860           the origin of the following pCode (useful for debugging SDCC)
861         * src/pic16/pcode.c: changed (and disabled) some debug outputs
862         * (createDefmap): fixed handling of LFSR for --optimize-df
863
864 2005-08-02 Borut Razem <borut.razem AT siol.net>
865
866         * device/lib/Makefile.in: pic16 libraries build enabled since
867           gputils-0.13.2 are now localy installed at sourceforge's compile farm
868
869 2005-08-02 Raphael Neider <rneider AT web.de>
870
871         * src/pic16/gen.c (genPackBits): removed deprecated warning
872         * (genGenPointerSet): fixed bitfield detection
873
874 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
875
876         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
877
878 2005-07-31 Raphael Neider <rneider AT web.de>
879
880         * device/lib/pic16/libdev/pic18f458.c,
881           device/include/pic16/pic18f458.h: added missing T0CONbits
882
883 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
884
885         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
886
887 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
888
889         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
890
891 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
892
893         * device/include/mcs51/at89c51ed2.h: added.
894
895 2005-07-23 Raphael Neider <rneider AT web.de>
896
897         * src/pic/gen.h: added emitpcode macro for debugging
898         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
899           and replace by macro adding debug information on demand
900         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
901         * (gencjne): tried to fix; replaced with correct (slower) code
902         * (gen{Unp,P}ackBits): fixed single bit access
903         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
904         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
905           previous instruction
906         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
907           register has to be handled with care (forbidding movement
908           of assignments/uses, removing assignments completely, ...)
909         * (pCodeOptime2pCodes): make use of regIsSpecial
910         * added lots of debugging output (commented out)
911         * src/pic/rallloc.c (deassignLRs): prevent operand registers
912           from being reused as result UNLESS it is known to work
913
914 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
915
916         * support/Util/dbuf.h: include <stddef.h> for size_t
917         * .version: changed to version 2.5.2
918
919 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
920
921         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
922
923 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
924
925         * src/hc08/gen.c (genMinus): fixed bug #1241835,
926           (genModOneByte): removed needless psha/pula
927
928 2005-07-22 Raphael Neider <rneider AT web.de>
929
930         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
931           have PIC14 handled like PIC16, fixes broken pic14 linker calls
932         * src/pic/gen.c (resolveIfx): do not "invent" labels
933         * (genSkipc): changed to positive logic
934         * (genSkipCond): removed as no longer needed
935         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
936           backport from PIC16
937         * (genLeftShift): check operands are in different registers
938         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
939           INCF does not update CARRY...
940         * src/pic/main.c: fixed _linkCmd
941         * src/pic/pcode.c (unlinkpCode): added inactive code
942         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
943           alive (do not assign result and operand overlapping registers)
944
945 2005-07-22 Raphael Neider <rneider AT web.de>
946
947         * src/pic/device.c (dump_sfr): replaced register declaration with
948           call to emitSymbolToFile() to avoid duplicate symbols
949         * (assignRelocatableRegisters): do not declare external symbols
950         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
951           right (take size of type, not etype)
952         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
953         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
954         * (packRegsForAccUse): disabled assignment of WREG as
955           the result reg to prevent occurence of just fixed #1235003,
956           fixes #1242954
957         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
958           symbols (avoids duplicate symbols in .asm file)
959         * (pic14emitRegularMap): use emitSymbolToFile()
960         * src/pic/gen.c (aopOp): fixed spillLocation handling
961         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
962         * (genDataPointerSet): removed unneccessary variables/output
963
964 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
965
966         * as/mcs51/lkarea.c: enlarged codemap for banked memory
967         * device/lib/mcs51/crtbank.asm: added # to 0x0F
968
969 2005-07-21 Raphael Neider <rneider AT web.de>
970
971         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
972           architecture cannot handle them efficiently, fixes bug #1235003
973         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
974           check for empty sets before using them (fixes bug #1232190)
975
976 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
977
978         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
979           (lnksect2): generate warnings for memory overlap
980         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
981           constseg to set the name of these segments so you can instruct the linker
982           to place them in banks
983         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
984         * src/SDCCglobl.h: added MODEL_HUGE to enum,
985           added code_seg and const_seg to options
986         * src/SDCCglue.c (emitMaps): use options.const_seg,
987           (createInterruptVect): put interrupt vectors in segment HOME,
988           (glue): put HOME before static segment and put the main glue in HOME,
989           (glue): use options.code_seg
990         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
991         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
992           these segments so you can instruct the linker to place them in banks
993           (linkEdit): use code_loc for HOME segment which should be the first
994           segment in code memory now
995         * src/SDCCmem.c: fixed more stuff like bug 1238386
996         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
997           (changePointer): don't change function pointers to code pointers for
998           banked functions,
999           (compareType): added exceptional check for banked function pointers
1000         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1001         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1002           after static in code memory
1003         * src/mcs51/gen.c: added aopLiteralLong prototype,
1004           (aopForSym): use getSize for functions,
1005           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1006           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1007           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1008           the segment,
1009           (genPcall): use call for literal function pointers and generate banked
1010           calls over the one trampoline so there's only one place for the user to
1011           modify according to his/hers hardware,
1012           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1013           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1014         * src/mcs51/main.c: added keyword banked,
1015           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1016         * support/Util/SDCCerr.c,
1017         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1018           needed for passing the bank and address to the trampoline
1019         * device/lib/mcs51/crtbank.asm: added for bankswitching
1020         * device/lib/mcs51/Makefile: added crtbank
1021
1022 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1023
1024         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1025           for fields at offset 0 of a struct or union as reported
1026           on 2005-07-07 in the developer mailing list.
1027
1028 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1029
1030         * src/SDCCmem.c: fixed bug 1238386
1031
1032 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1033
1034         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1035           (patch #1144962), added peephole 300, enabled 259.x
1036         * doc/sdccman.lyx: removed screenshot and provided link instead
1037
1038 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1039
1040         * doc/sdccman.lyx: added section about debugging with ddd
1041         * doc/figures/ddd_example.eps: screenshot of debugging session
1042
1043 2005-07-04 Raphael Neider <rneider AT web.de>
1044
1045         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1046           like CODE pointers, fixes #1115683
1047         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1048           call, fixes bugs #1232211, #1228110,
1049           fixed wrong casts to pCodeFlow from pCodeInstructions
1050
1051 2005-07-04 Raphael Neider <rneider AT web.de>
1052
1053         * src/pic/gen.c (popGet): changed assert to allow for
1054           bit operands
1055         * (popGetAddr): changed signature to provide
1056           an additional index, patched all call sites
1057         * (genCmpEq): handle literal-like operands correctly
1058         * (genAddrOf): added sanity checks on __code/__data pointers
1059         * (genAssign): added handling of symbols from __code section
1060         * (gencjne): do not generate code for comparisons whose result
1061           is neither stored nor used, fixes bug #1171114
1062         * (AccLsh, AccRsh): operate on operand instead of WREG
1063         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1064           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1065           by known count
1066         * rewrote complete shift-by-literal logic, commented unused
1067           functions out
1068         * (genConstPointerGet): get multiple bytes (if result size > 1),
1069           fixed handling of non-immediate addresses
1070         * (genPointerGet): handle CODE pointers like CONST pointers
1071         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1072         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1073           operand is to be treated as a literal or not
1074         * (mov2w,genPcall,genCmpEq),
1075           src/pic/genarith.c: use aop_isLitLike() to decide between
1076           literal/register contents
1077         * (addSign): added missing offset
1078         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1079           only emit comment in debug-mode,
1080           use {aop,op}_isLitLike throughout the file
1081         * src/pic/glue.c: fix initializers for pointers (work in progress)
1082         * src/pic/pcode.c (get_op): honor index on _const symbols
1083         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1084         * (dumppBlock): added pCode size estimation
1085         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1086           check for IS_SYMOP before OP_SYMBOL'ing
1087         * fixed indentation, compacted switch-statements
1088         * (allocReg): find free register and allocate it instead of
1089           allocating new registers all the time
1090         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1091           registers as its operands (necessary only for multibyte GETs)
1092
1093 2005-07-01 Raphael Neider <rneider AT web.de>
1094
1095         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1096           debugging .asm-output macros FENTRY + FEXIT
1097         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1098           way... I wonder...
1099         * (emitpComment): NEW, printf to pCode
1100         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1101           offset handling
1102         * (popGetAddr): NEW, variant of popGet to access an immediates
1103           high(er) bytes instead of the n'th byte of memory they reference,
1104           replaced popGet with popGetAddr where neccessary
1105         * (genDataPointerGet): reactivated and fixed implementation
1106         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1107           accesses
1108         * (genDataPointerSet): fixed multibyte assignments
1109         * (genpic14Code): fixed --i-code-in-asm handling
1110         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1111         * (genPlus): fixed index-out-of-bounds error
1112         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1113         * src/pic/ralloc.c: added debugging output macro FENTRY2
1114         * (spillThis): fixed indentation, enbraced for-body for clarity
1115         * (rematStr): commented out as now unused
1116         * (regTypeNum): commented out special spill case (overwrites
1117           arbitrary values)
1118         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1119
1120 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1121
1122         * doc/sdccman.lyx: documented sfr16/sfr32,
1123           added example for using storage class with function pointers
1124         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1125
1126 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1127
1128         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1129         * device/lib/_itoa.c,
1130         * device/lib/_ltoa.c: optimized codesize
1131         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1132           but don't know how to suppress the double warning.
1133         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1134         * support/Util/SDCCerr.c,
1135         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1136
1137 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1138
1139         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1140           fixed old K&R prototypes
1141         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1142         * device/lib/_gptrget.c,
1143         * device/lib/_gptrgetc.c,
1144         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1145           also new versions for small generic pointers and banked generic pointers
1146         * src/port.h: added const_name
1147         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1148         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1149         * src/SDCCcse.c (findPrevIc): check all associative operators
1150         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1151         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1152         * src/SDCCmem.c: updated comments,
1153           set far-space to 0 for pdata, results in optimized code
1154         * src/SDCCmem.h: added macro CONST_NAME
1155         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1156           moving the info into the highest bits, see also gptrget/gptrput
1157         * src/src.dsp: added sdcc.ico to project files
1158         * src/avr/gen.c (genCast): fixed bug 0x%d
1159         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1160         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1161           relation between ptr_type and DCL_TYPE,
1162           (genCast): fixed bug 0x%d
1163         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1164           (CODE)" for const_name
1165         * src/hc08/gen.c (genCast): fixed bug 0x%d
1166         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1167           (hc08_port): added "CONST (CODE)" for const_name
1168         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1169           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1170           between ptr_type and DCL_TYPE,
1171           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1172           operand* and took AOP() inside function so sfr-ness can be checked,
1173           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1174           new prototype,
1175           (genFunction, genEndFunction): optimized stack setup,
1176           (genMinus): optimized for literals with ending zeroes (in bytes),
1177           (genCast): fixed bug 0x%d
1178         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1179           (mcs51_port): added "CONST (CODE)" for const_name
1180         * src/mcs51/peeph.def: made rule 226 more generic
1181         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1182         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1183         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1184         * src/z80/main.c (z80_port): added NULL for const_name,
1185           (gbz80_port): added NULL for const_name
1186         * support/regression/tests/bug663539.c,
1187         * support/regression/tests/sfr16.c: new tests
1188
1189 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1190
1191         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1192
1193 2005-06-24 Raphael Neider <rneider AT web.de>
1194
1195         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1196           corrected typos...
1197         * device/include/pic16/signal.h: added USBIF
1198           and SIG_USB
1199
1200 2005-06-24 Raphael Neider <rneider AT web.de>
1201
1202         * device/lib/pic16/libdev/pic18f2455.c,
1203           device/include/pic16/pic18f2455.h: NEW
1204         * device/include/pic16/pic18fregs.h,
1205           device/lib/pic16/pics.all,
1206           src/pic16/device.c: added 18f2455
1207         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1208           device/include/pic16/{pic18f[68][567].h,usart.h}:
1209           replaced MULTIPLE_USARTS define with more relaible
1210           compatibility sfrs (for USART access)
1211
1212 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1213
1214         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1215           and the output asm file line is printed on two lines.
1216
1217 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1218
1219         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1220           BGT, BLE, BHI, and BLS instructions
1221         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1222           genCmpEq): removed
1223         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1224           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1225           fixes bug #1216342
1226         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1227
1228 2005-06-15 Raphael Neider <rneider AT web.de>
1229
1230         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1231         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1232         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1233           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1234           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1235
1236 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1237
1238         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1239           Marcel Telka in bug #1215704
1240
1241 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1242
1243         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1244           located in shared memory bank.
1245
1246 2005-05-31 Raphael Neider <rneider AT web.de>
1247
1248         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1249           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1250           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1251
1252 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1253
1254         * device/lib/_strncpy.c: fixed the fix
1255
1256 2005-05-26 Raphael Neider <rneider AT web.de>
1257
1258         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1259           initializers with \0, bug #1208187
1260         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1261           intializers with \0, bug #1208187
1262
1263 2005-05-26 Raphael Neider <rneider AT web.de>
1264
1265         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1266           initializers with \0, bug #1208187
1267         * src/pic16/main.c (_process_pragma): added sanity checks
1268           for stack position and size, emit warnings when appropriate
1269
1270 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1271
1272         * device/lib/_strncpy.c: fixed not filling with \0
1273
1274 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1275
1276         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1277           createFunction),
1278         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1279           compound_statement),
1280         * src/SDCCsymt.h,
1281         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1282
1283 2005-05-24 Raphael Neider <rneider AT web.de>
1284
1285         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1286
1287 2005-05-24 Raphael Neider <rneider AT web.de>
1288
1289         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1290           TRISE definitions, closes bug #1162453
1291
1292 2005-05-22 Raphael Neider <rneider AT web.de>
1293
1294         * src/pic16/main.c (_process_pragma): check for missing
1295           arguments to pragmas code and udata
1296         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1297           consistency fixes to match other headers (thanks to Jim Paris)
1298         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1299
1300 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1301
1302         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1303
1304 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1305
1306         * support/regression/tests/bug1198642.c: new test
1307         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1308         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1309         * support/scripts/resource.h,
1310         * support/scripts/resource.rc,
1311         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1312         * support/scripts/sdcc.ico: added 32x32 icon
1313
1314 2005-05-18 Raphael Neider <rneider AT web.de>
1315
1316         * device/lib/pic16/libdev/pic18f*.c,
1317         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1318           keywords to "__sfr" and "__at (X)"
1319         * device/include/pic16/pic18fregs.h: added pic18f4520
1320         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1321           #1203088 (MPLAB compatibility)
1322
1323 2005-05-17 Raphael Neider <rneider AT web.de>
1324
1325         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1326         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1327         * device/lib/pic16/pics.all: added new devices
1328         * src/pic16/device.c: added support for pic18f4520
1329
1330 2005-05-16 Raphael Neider <rneider AT web.de>
1331         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1332         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1333         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1334           convenience function for bit access
1335
1336 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1337
1338         * device/lib/printf_large.c: fixed bug 1193299
1339         * support/regression/tests/bug1057979.c: added test %3.3s
1340
1341 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1342
1343         * device/include/mcs51/8051.h,
1344         * device/include/mcs51/8052.h: made parseable with lint
1345         * device/include/mcs51/lint.h: added include file for (sp)lint
1346         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1347         * doc/cdbfileformat.lyx,
1348         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1349
1350 2005-05-14 Raphael Neider <rneider AT web.de>
1351
1352         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1353         * device/lib/pic16/libc/stdlib/itoa.c (new)
1354         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1355         * device/lib/pic16/libio/Makefile: exclude subdir according to
1356           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1357         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1358         * src/pic16/gen.c (genFunction): prevent annoying warning
1359         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1360           nameclashes on BeOS
1361         * support/cpp2/cppmain.c (cpp_output_string): new
1362         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1363           fixes bug 1116802
1364
1365 2005-05-13 Borut Razem <borut.razem AT siol.net>
1366
1367         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1368
1369 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1370
1371         * .version: changed to version 2.5.1; back to bleeding edge development
1372
1373 2005-05-11 Borut Razem <borut.razem AT siol.net>
1374
1375         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1376           generate PDF version 1.3 documents
1377
1378 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1379
1380         * .version: changed to version 2.5.0
1381
1382 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1383
1384         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1385
1386 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1387
1388         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1389         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1390         well as many smaller updates.
1391         * .version: changed to version 2.5.0-pre1
1392
1393 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1394
1395         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1396
1397 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1398
1399         * support/regression/tests/bug1185672.c: added
1400         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1401           bug 1185672
1402         * src/mcs51/gen.c (genCall): added comments, made it look safer
1403         * src/mcs51/gen.c (genEndFunction): simplified
1404
1405 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1406
1407         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1408
1409 2005-04-14 Borut Razem <borut.razem AT siol.net>
1410
1411         * fixed bug 1045046 - SIGSEGV with really simple code?:
1412           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1413           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1414
1415 2005-04-14 Borut Razem <borut.razem AT siol.net>
1416
1417         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1418           src/pic16/device.h: temporarily disabled experimental #inline pragma
1419           for 2.5.0 release
1420
1421 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1422
1423         * device/include/z80/stdio.h,
1424         * device/include/z80/string.h: removed these highly incomplete files so
1425           SDCC can use the default ones in device/include/
1426
1427 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1428
1429         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1430         gcc warning.
1431         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1432         fix sdcpp warnings.
1433
1434 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1435
1436         * device/include/malloc.h: removed redundant __reentrant prototypes
1437         * device/lib/_mullong.c: added working xstack variant in asm (C version
1438           doesn't pass regression tests)
1439         * device/lib/bpx.c: used __data and made bpx char for mcs51
1440         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1441           (createFunction): fixed bug with xstackPtr
1442         * src/SDCCcse.c: corrected comments
1443         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1444           (killDeadCode, eBBlockFromiCode): removed unused code
1445         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1446           corrected comments
1447         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1448           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1449           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1450           (genModOneByte): fixed warning in MSVC
1451         * src/mcs51/main.c (): added comments
1452         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1453
1454 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1455
1456         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1457
1458 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1459
1460         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1461
1462 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1463
1464         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1465         characters arrays of larger size than the declared one.
1466
1467 2005-04-10 Borut Razem <borut.razem AT siol.net>
1468
1469         * src/pic/gen.c (genInline),
1470           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1471           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1472           (findNextInstruction), (findPrevInstruction),
1473           (findInstructionUsingLabel),
1474           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1475         * src/pic/pcode.c (findLabel): added missing '\n'
1476         * src/src.dsp: added SDCCdwarf2.c to the project
1477
1478 2005-04-09 Borut Razem <borut.razem AT siol.net>
1479
1480         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1481
1482 2005-04-08 Raphael Neider <rneider AT web.de>
1483
1484         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1485           into the chain after a given one) and mergeDefmapSymbols (combine
1486           defmap entries for each symbol per pcode)
1487         * (createDefmap): have defmap entries merged in the end
1488         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1489           a symbol before replacing one access type's symbol, merge symbols in
1490           the end (replacement symbol might already have an entry)
1491         * (assignValnums): keep reference to written WREG intact
1492
1493 2005-04-08 Raphael Neider <rneider AT web.de>
1494
1495         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1496           Alpha)
1497
1498 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1499
1500         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1501         bytes
1502
1503 2005-04-07 Raphael Neider <rneider AT web.de>
1504
1505         * device/include/pic16/usart.h: added compatibility defines for
1506           devices with more than one USART
1507         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1508
1509 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1510
1511         * device/lib/Makefile.in: updated for port specific include
1512
1513 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1514
1515         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1516
1517 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1518
1519         * device/include/8051.h,
1520         * device/include/8052.h,
1521         * device/include/at89S8252.h,
1522         * device/include/at89c55.h,
1523         * device/include/at89x051.h,
1524         * device/include/at89x51.h,
1525         * device/include/at89x52.h,
1526         * device/include/mcs51reg.h,
1527         * device/include/reg51.h,
1528         * device/include/reg764.h,
1529         * device/include/regc515c.h,
1530         * device/include/sab80515.h: (re)moved these 12 files
1531         * device/include/mcs51/8051.h,
1532         * device/include/mcs51/8052.h,
1533         * device/include/mcs51/at89S8252.h,
1534         * device/include/mcs51/at89c55.h,
1535         * device/include/mcs51/at89x051.h,
1536         * device/include/mcs51/at89x51.h,
1537         * device/include/mcs51/at89x52.h,
1538         * device/include/mcs51/mcs51reg.h,
1539         * device/include/mcs51/reg51.h,
1540         * device/include/mcs51/reg764.h,
1541         * device/include/mcs51/regc515c.h,
1542         * device/include/mcs51/sab80515.h: and added them here
1543
1544 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1545
1546         * device/include/stdarg.h: changed SDCC specific keywords to double
1547           underlined form.
1548         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1549           mcs51 and ds390.
1550         * device/include/hc08/mc68hc908gp32.h,
1551         * device/include/hc08/mc68hc908jb8.h,
1552         * device/include/hc08/mc68hc908jkjl.h,
1553         * device/include/hc08/mc68hc908qy.h: fixed comments
1554         * device/include/mcs51/README: updated
1555         * device/include/mcs51/c8051f120.h: added PINRSF
1556         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1557         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1558           amidst code. Also inline is not supported.
1559
1560 2005-04-06 Raphael Neider <rneider AT web.de>
1561
1562         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1563         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1564           callers stack/frame pointers
1565
1566 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1567
1568         * device/include/pic16/usart.h: added, missing in previous commit,
1569         * device/include/pic16/adc.h: fixed typo,
1570         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1571         commit,
1572         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1573         <p18fxxx.inc>
1574         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1575         uninitialized because a bug appears with gplink
1576         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1577         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1578         complains for unrecognised option
1579
1580 2005-04-05 Raphael Neider <rneider AT web.de>
1581
1582         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1583           structs as well (using memcpy)
1584         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1585           on ISRs (GOTO has no label)
1586         * src/pic16/device.h: added OF_OPTIMIZE_DF
1587         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1588           new data flow analysis/optimization
1589         * src/pic16/pcode.c: added (prototypes for and implementation of)
1590           dataflow analysis functions, fixed pCodeInstructions' inCond and
1591           outCond values, made RCALL a branch instruction
1592         * (pic16_unlinkpCode): keep C line if possible
1593         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1594           C line moved if possible
1595         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1596         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1597           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1598         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1599           new flow)
1600         * (pic16_getJumptabpCode): NEW, needed in...
1601         * (LinkFlow): fixed handling of jumptables, calls and conditional
1602           branches
1603         * (pic16_InsertCommentAfter): NEW
1604         * (pic16_pCodeReplace): made verbose and flow preserving
1605         * (AnalyzeFlow): added call to data flow analysis
1606         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1607         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1608         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1609
1610 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1611
1612         * src/SDCCast.c (decorateType): fixed bug #1105626
1613
1614 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1615
1616         * device/include/asm/pic16/features.h,
1617         * pic18f*.h headers,
1618         * device/include/pic16/adc.h,
1619         * device/include/pic16/delay.h,
1620         * device/include/pic16/i2c.h,
1621         * device/include/pic16/malloc.h,
1622         * device/include/pic16/stdio.h,
1623         * device/include/pic16/stdlib.h,
1624         * device/include/pic16/string.h,
1625         * device/lib/pic16/libc/stdio/printf_tiny.c,
1626         * device/lib/pic16/libc/stdio/printf_small.c,
1627         * device/lib/pic16/libc/stdio/strmgpsim.c,
1628         * device/lib/pic16/libc/stdio/strmmssp.c,
1629         * device/lib/pic16/libc/stdio/strmusart.c,
1630         * device/lib/pic16/libc/stdio/vfprintf.c,
1631         * device/lib/pic16/libc/stdlib/ltoa.c,
1632         * device/lib/pic16/libc/stdlib/putchar.c,
1633         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1634         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1635         * device/lib/pic16/libc/stdlib/memchrram.c,
1636         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1637         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1638         * device/lib/pic16/libio/adc/adcbusy.c,
1639         * device/lib/pic16/libio/adc/adcread.c,
1640         * device/lib/pic16/libio/adc/adcsetch.c,
1641         * device/lib/pic16/libio/usart/ubaud.c,
1642         * device/lib/pic16/libio/usart/ubusy.c,
1643         * device/lib/pic16/libio/usart/udrdy.c,
1644         * device/lib/pic16/libio/usart/uopen.c,
1645         * device/lib/pic16/libio/usart/uputc.c,
1646         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1647         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1648         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1649         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1650         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1651         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1652         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1653         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1654         specific keywords to double underlined form,
1655         * device/lib/pic16/libc/Makefile.rules,
1656         * device/lib/pic16/libsdcc/Makefile.rules,
1657         * device/lib/pic16/libm/Makefile,
1658         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1659         to compile with C standard set in Makefile.common
1660         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1661         rand.c and crc.c in compilation process,
1662         * device/lib/pic16/libsdcc/int/divuint.c,
1663         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1664         `c' from signed to unsigned,
1665         * device/lib/pic16/startup/crt0.c,
1666         * device/lib/pic16/startup/crt0i.c,
1667         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1668         keywords to double underlined form, bug fixes in _do_cinit function
1669         which prevented the correct initialization of the .idata segment,
1670         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1671         core to enter a infinite loop
1672         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1673
1674 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1675
1676         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1677
1678 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1679
1680         * device/include/Makefile.in: add support for hc08 subdirectory
1681         * device/include/hc08/: new subdirectory
1682         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1683         Lucas Loizaga, thanks!
1684         * device/include/hc08/mc68hc908qy.h,
1685         * device/include/hc08/mc68hc908gp32.h,
1686         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1687         their own directory. Changed internal macro names to use the compiler
1688         reserved namespace. Changed SDCC specific keywords to double
1689         underlined form.
1690         * device/include/math.h,
1691         * device/include/malloc.h,
1692         * device/include/stdarg.h,
1693         * device/include/stdbool.h
1694         * device/include/string.h,
1695         * device/include/tinibios.h,
1696         * device/include/ds400rom.h,
1697         * device/include/8051.h,
1698         * device/include/8052.h,
1699         * device/include/80c51xa.h,
1700         * device/include/at89c55.h,
1701         * device/include/at89S8252.h,
1702         * device/include/at89x51.h,
1703         * device/include/at89x52.h,
1704         * device/include/ds80c390.h,
1705         * device/include/reg764.h,
1706         * device/include/regc515c.h,
1707         * device/include/sab80515.h,
1708         * device/include/mcs51/c8051f000.h,
1709         * device/include/mcs51/c8051f018.h,
1710         * device/include/mcs51/c8051f020.h,
1711         * device/include/mcs51/c8051f040.h,
1712         * device/include/mcs51/c8051f060.h,
1713         * device/include/mcs51/c8051f120.h,
1714         * device/include/mcs51/c8051f300.h,
1715         * device/include/mcs51/c8051f310.h,
1716         * device/include/mcs51/c8051f320.h,
1717         * device/include/mcs51/c8051f330.h,
1718         * device/include/mcs51/c8051f350.h,
1719         * device/include/z180.h: Changed SDCC specific keywords to double
1720         underlined form.
1721
1722 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1723
1724         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1725         18F4455,
1726         * (pic16_assignConfigWordValue): disable testing of configuration
1727         register value with config mask,
1728         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1729         function with port->fun_prefix,
1730         * (genFunction): when generating a naked interrupt function never
1731         create an absolute segment placed in interrupt vector address, place
1732         the actual interrupt function at IVA instead, when an interrupt
1733         function is generated with unspecified interrupt then do not create
1734         the absolute section,
1735         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1736         code for generating a call to generic pointer get/put function with
1737         a call to function pic16_callGenericPointer(),
1738         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1739         the call to the generic pointer get/put functions with prefixing the
1740         function name with port->fun_prefix,
1741         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1742         * src/pic16/main.c (_process_pragma): prefix function with
1743         port->fun_prefix,
1744         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1745         calling assembler, old 18Fxxxx macro is deprecated,
1746         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1747         PC_ASMDIR in while condition,
1748         * (findInstruction): add PC_ASMDIR in while condition,
1749         * (buildCallTree): prefix main with port->fun_prefix,
1750         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1751         identifier for variable with banked access in instructions BTFSS,
1752         BTFSC, BCF, BSF, BTG
1753         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1754         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1755         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1756         perform optimization when enviroment variable NO_REG_OPT is set,
1757         * (insideLRBlock): NEW, return 1 if register is inside an
1758         INF_LOCALREGS block,
1759         * (RemoveRegFromLRBlock): remove a register that is completely
1760         eliminated by register optimization, but it is still left in local
1761         register store/restore in/from stack block,
1762         * (Remove2pcodes): after removing register, check to see if it
1763         should be removed from local register store/restore in/from stack
1764         block,
1765         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1766         DUMMY_READ_VOLATILE,
1767
1768         * device/include/pic16/adc.h: minor prototype modifications and
1769         update,
1770         * device/include/pic16/malloc.h: added GPL notice various
1771         modifications,
1772         * device/include/pic16/stdint.h: NEW, standard header for ints
1773         * device/include/pic16/delay.h: NEW, header for delay functions,
1774         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1775         delay1mtcy,
1776         * device/include/pic16/signal.h: NEW, header providing helper macros
1777         for implementing signal handlers,
1778         * device/include/pic16/stdio.h: added prototypes for functions,
1779         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1780         prototypes for stdin and stdout, added macro PUTCHAR to
1781         automatically implement putchar function prototype,
1782         * device/include/pic16/usart.h: modified and updated USART library,
1783         * device/lib/pic16/libio/adc/,
1784         * device/lib/pic16/libio/i2c: some modifications to improve library
1785         performance,
1786         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1787         family of functions,
1788         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1789         family of functions and other sources,
1790         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1791         of the PIC18Fxx[28] devices,
1792         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1793         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1794         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1795         _do_cinit function, because the previous failed when local variables
1796         where not placed in the same memory bank,
1797         * device/lib/pic16/libsdcc/char/: various modifications to improve
1798         library performance,
1799         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1800         information on the new functions of the c library and more...
1801
1802 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1803
1804         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1805
1806 2005-03-26 Raphael Neider <rneider AT web.de>
1807
1808         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1809           if condition == CARRY)
1810         * (genCmp): adapted to new genSkipc semantics
1811         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1812           on rIfx (genCmp was broken)
1813
1814 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1815
1816         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1817         * src/z80/main.c (_keywords[]),
1818         * src/SDCCglobal.h (struct options),
1819         * src/SDCC.y,
1820         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1821         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1822         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1823         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1824         always available in leading double underscore form. The C99 support is
1825         mostly missing, but it's a start.
1826         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1827         reserved identifier "__data".
1828
1829 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1830
1831         * src/mcs51/peeph.def: fixed bug 1170013
1832
1833 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1834
1835         * device/include/mcs51reg.h: fixed bug 842007
1836
1837 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1838
1839         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1840         last time.
1841
1842 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1843
1844         * src/port.h (struct PORT),
1845         * src/avr/ralloc.c (avr_assignRegisters),
1846         * src/avr/main.c,
1847         * src/ds390/ralloc.c (ds390_assignRegisters),
1848         * src/ds390/main.c,
1849         * src/hc08/ralloc.c (hc08_assignRegisters),
1850         * src/hc08/main.c,
1851         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1852         * src/mcs51/main.c,
1853         * src/pic/ralloc.c (pic14_assignRegisters),
1854         * src/pic/main.c,
1855         * src/pic16/ralloc.c (pic16_assignRegisters),
1856         * src/pic16/main.c,
1857         * src/xa51/ralloc.c (xa51_assignRegisters),
1858         * src/xa51/main.c,
1859         * src/z80/ralloc.c (z80_assignRegisters),
1860         * src/z80/ralloc.h,
1861         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1862         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1863         * src/SDCCcse.h,
1864         * src/SDCCdflow.c (computeDataFlow),
1865         * src/SDCCdflow.h,
1866         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1867         * src/SDCCloop.h,
1868         * src/SDCCcflow.c (*),
1869         * src/SDCCcflow.h,
1870         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1871         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1872         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1873         immedDom() returning wrong block; probably fixes bug #1160833)
1874
1875 2005-03-20 Borut Razem <borut.razem AT siol.net>
1876
1877         * support/scripts/inc2h.pl: WIN32 port
1878
1879 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1880
1881         * device/lib/makefile.in: added abs.c and labs.c
1882
1883 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1884
1885         * device/include/stdint.h: added
1886         * device/lib/abs.c: added
1887         * device/lib/labs.c: added
1888         * device/include/stdlib.h: added abs() and labs() prototypes
1889         * device/lib/libsdcc.lib: added abs and labs
1890         * device/include/float.h,
1891         * device/lib/_fsmul.c,
1892         * device/lib/printf_fast.c,
1893         * device/lib/printf_tiny.c: updated comments
1894
1895 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1896
1897         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1898         bug #1164313
1899
1900 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1901
1902         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1903         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1904
1905 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1906
1907         * device/lib/printf_large.c: removed inline assembly for portability and
1908           readability. Use printf_fast if speed or size are more important.
1909         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1910         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1911
1912 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1913
1914         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1915         prevent compiler warning
1916
1917 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1918
1919         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1920         moved to level 0 and declared as static. Also they are explicit
1921         placed in access bank. This was necessery because some times they
1922         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1923         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1924         optimizations. Currently only compare to unsigned char is implemented,
1925         * src/pic16/gen.c: added fReturnIdx array,
1926         * (struct resolvedIfx) is moved to gen.h and made public,
1927         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1928         * (aopForSym): added an optimization to directly store in stack of
1929         the operand of a SEND iCode,
1930         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1931         but as registers instead (AOP_REG) using the fReturnIdx array,
1932         * (pic16_freeAsmop): remove the freed register from the
1933         _G.sregsAlloc field,
1934         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1935         a compare of 'WREG',
1936         * (pic16_popGetTempRegCond): changed function prototype, now
1937         function takes also a bitVector argument v which holds the current
1938         set of registers that are allocated for stack access by aopForSym,
1939         registers allocated in aopForSym for accessing stack symbols are not
1940         any more part of the functions usedRegs field,
1941         * (genCall): some times aopOp is called for a stack variable to be
1942         send, aopForSym might perform the push, if this is true make sure
1943         that genCall doesn't push the variable twice by testing _G.resDirect,
1944         * (genFunction): changed testing for unspecified interrupt number
1945         from 256 to INTNO_UNSPEC,
1946         * modified selection scheme of frame pointer generation. Previously
1947         if function did use local registers a frame pointer was generated,
1948         now a frame pointer is generated only if function has arguments
1949         (that need PLUSW2 register access), or has stack arguments, or the
1950         compiler is not instructed to omit the frame pointer,
1951         * (genEndFunction): before restoring local registers that were saved
1952         in the function preamble, also restore the registers that *might*
1953         have been allocated for stack access,
1954         * (genRet): removed some old comments,
1955         * (genCmp, the active (RN's) version): added a call to the
1956         pic16_genCmp_special function to perform the compare with a more
1957         robust and optimized way,
1958         * (genInline): a feature has been added in inline code generation,
1959         which allows a wildcard variable substitution when writing inline
1960         assembly. Code is incomplete and experimental therefore undocumented,
1961         * (genCast): changed order of aopOp for result and right to allow
1962         aopForSym to directly load the result if possible,
1963         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1964         perform an optimized compare on some selected special occasions,
1965         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1966         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1967         generate an IVT any more,
1968         * src/pic16/main.c (pic16_optionsTable): added command line option
1969         --optimize-cmp,
1970         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1971         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1972         macros,
1973         * src/pic16/NOTES: Raphael Neider added in list of active developers
1974         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1975         jumptable_end to prevent bug #,
1976         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1977         inCond and outCond fields,
1978         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1979         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1980         turn off register spilling,
1981         * (packRegsForOneUse): synced with other ports' versions although it
1982         is not used currently,
1983         * (pic16_packRegisters): added an optimization while reading
1984         structure bitfields, some registers may be saved (malloc code is
1985         decreased by 80 bytes)
1986
1987 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1988
1989         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1990         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1991         this can be optimized more?
1992
1993 2005-03-10 Raphael Neider <rneider AT web.de>
1994
1995         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1996           genNearPointerGet): (hopefully) fixed access to bitfields via
1997           pointers (p->bitN = x; and x = p->bitN; failed)
1998
1999 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2000
2001         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2002
2003 2005-03-09 Raphael Neider <rneider AT web.de>
2004
2005         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2006
2007 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2008
2009         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2010         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2011           (regTypeNum): set REG_BIT type if necessary
2012         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2013         * support/regression/tests/critical.c: check bug 1144613
2014
2015 2005-03-02 Raphael Neider <rneider AT web.de>
2016
2017         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2018
2019 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2020
2021         * src/avr/ralloc.c (serialRegAssign),
2022         * src/ds390/ralloc.c (serialRegAssign),
2023         * src/hc08/ralloc.c (serialRegAssign),
2024         * src/mcs51/ralloc.c (serialRegAssign),
2025         * src/pic/ralloc.c (serialRegAssign),
2026         * src/pic16/ralloc.c (serialRegAssign),
2027         * src/xa51/ralloc.c (serialRegAssign),
2028         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2029
2030 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2031
2032         * src/SDCCast.c (decorateType): fixed bug 1124787
2033
2034 2005-02-20 Hubert Sack <sack AT digiplan.de>
2035         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2036
2037         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2038         patch #1121755
2039
2040 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2041
2042         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2043         to keep the correct label reference count when adding/removing references
2044         to labels. A peephole file using this is appended to patch #1144962.
2045
2046 2005-02-14 Raphael Neider <rneider AT web.de>
2047
2048         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2049         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2050         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2051           retrievals of result operand's value on assignment
2052
2053 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2054
2055         * device/include/pic16/string.h: modified prototype for memccpy()
2056         to memccpy(void *, void *, char, size_t)
2057         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2058         check whether to omit frame pointer or not,
2059         * (genInline): convert all occurences of "\n" to LF in inline
2060         assembler blocks, this helps formatting the inline text,
2061         * (pic16_loadFSR0): modified prototype,
2062         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2063         removed some 8051 legacy code,
2064         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2065         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2066         before allocating temporary registers in functions,
2067
2068 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2069
2070         * support/regression/tests/bitvars.c: corrected the "fix"
2071
2072 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2073
2074         * support/regression/tests/bitvars.c,
2075         * support/regression/tests/bitwise.c,
2076         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2077
2078 2005-02-10 Raphael Neider <rneider AT web.de>
2079
2080         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2081           different size for Alpha
2082         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2083
2084 2005-02-09 Raphael Neider <rneider AT web.de>
2085
2086         * src/SDCC.lex(doPragma) : save and restore warning options as well
2087           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2088         * have #pragma less_pedantic set the errorlevel to WARNING
2089           (fixes #1117001)
2090         * (cloneOptimize) : fixed wrong malloc's size
2091         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2092           facilitate correct handling of #pragma (save|restore)
2093
2094 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2095
2096         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2097
2098 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2099
2100         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2101
2102 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2103
2104         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2105
2106 2005-02-02 Raphael Neider <rneider AT web.de>
2107
2108         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2109         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2110         * (pic16_storeForReturn): fixed to allow returning function pointers
2111         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2112         * device/include/pic16/{stddef.h,stdbool.h}: added
2113
2114 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2115
2116         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2117
2118 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2119
2120         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2121         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2122          appeared to be required
2123
2124 2005-01-31 Borut Razem <borut.razem AT siol.net>
2125
2126         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2127           include/mcs51 and include/z80 directories to the package
2128
2129 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2130
2131         * src/hc08/gen.c (genFunction): fixed bug #1112752
2132
2133 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2134
2135         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2136
2137 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2138
2139         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2140
2141 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2142
2143         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2144
2145 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2146
2147         * device/include/c8051fxxx.h: removed these 6 files
2148         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2149
2150 2005-01-26 Raphael Neider <rneider AT web.de>
2151
2152         * src/pic16/gen.c (genAssign): fixed assignment from longs
2153           in codespace (were cut to three bytes)
2154         * (genDummyRead): implemented (except for CODESPACE...),
2155           fixed bug #1108575
2156         * src/pic16/glue.c (emitStatistics): beautified
2157         * device/lib/pic16/libm/Makefile: added include path
2158
2159 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2160
2161         * src/z80/gen.c (aopPut): fixed bug #1103902
2162
2163 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2164
2165         * device/lib/expf.c: fixed bug #1095792
2166
2167 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2168
2169         * device/lib/pic16/libm: added Math library sources
2170
2171 2005-01-24 Raphael Neider <rneider AT web.de>
2172
2173         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2174           to enable upcast to pCodeOpReg2 (there is no type tag to
2175           differenciate the two and pic16_popGet2p cast into PCOR2)
2176         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2177           (sizeof(sectNames) changed to sizeof(sectName))
2178           Both patches fix segfaults under MinGW.
2179
2180 2005-01-23 Raphael Neider <rneider AT web.de>
2181
2182         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2183           Safe_[mc]?alloc()'ed variables
2184         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2185           of (byte sized) temporaries (assign them to WREG for now)
2186         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2187           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2188           this might fix SIGSEGVs on MinGW...
2189         * src/SDCCopt.c (killDeadCode): restored original behaviour
2190           (volatile operands might get thrown away though)
2191
2192 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2193
2194         * src/pic16/gen.c: fixed bug #1106975,
2195         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2196         pointer update, INTCON is saved, global interrupts are disabled and
2197         restored after updateing TOS.
2198         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2199         * added function attribute 'shadowregs' to take advantage of shadow
2200         registers,
2201         * added function attribute 'wparam' as an alternative to the wparam
2202         pragma,
2203         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2204         user declares a non-ISR function as 'shadowregs',
2205         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2206
2207 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2208
2209         * .version: bumped version number to 2.4.8
2210         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2211         pic16 port,
2212         * device/lib/pic16/libio/i2c/: I2C module support library,
2213         * device/include/pic16/i2c.h: I2C support library header,
2214         * device/lib/pic16/libc/stdio/: standard IO support sources,
2215         * (printf_small.c): printf_small() source, supports float print,
2216         * (printf_tiny.c): printf_tiny() source, does not support floats,
2217         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2218         enable global optimizations for entire library source, other
2219         Makefiles in the source tree are also modified to reflect this,
2220         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2221         function,
2222         * doc/sdccman.lyx: updated to reflect new changes,
2223         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2224         sym->onStack if-case,
2225         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2226         sbit, idata, _idata, xdata, _xdata,
2227         * added pragma library, to link an external library, (see doc),
2228         * removed command line options, --pomit-config-words, --pomit-ivt,
2229         --pleave-reset-vector,
2230         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2231         when calling assembler to reflect memory model used, also define
2232         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2233         reflect stack model used,
2234         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2235         on stack return NULL,
2236
2237 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2238
2239         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2240           of the operands is volatile. Fixes #1020220
2241
2242 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2243
2244         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2245         * (OptimizeRegUsage): make sure that there is really no other flow where
2246           the first pCode is used
2247
2248 2005-01-22 Raphael Neider <rneider AT web.de>
2249
2250         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2251           to fix #1106967 (pCode->seq are not set up correctly)
2252
2253 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2254
2255         * src/SDCCglue.c (glue): make sure code area is declared before the
2256         static initialization area.
2257
2258 2005-01-21 Raphael Neider <rneider AT web.de>
2259
2260         * device/lib/Makefile.in: fixed test for pic16 install dir
2261         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2262           optimizations
2263         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2264           added --optimize-goto compiler switch and pragma wparam documentation
2265         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2266         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2267           and PRODH closing bug #1071770 (peephole optimizer)
2268
2269 2005-01-19 Raphael Neider <rneider AT web.de>
2270
2271         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2272           cmdLine buffers (used when calling sdcpp...) are large enough
2273           (MAX_PATH=256 truncates arguments leading to system halts when
2274           used in MinGW...)
2275         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2276         * (genUminus): rewritten to for efficiency
2277         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2278           used uninitialized in some cases)
2279         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2280           copy the third byte from the int -- now assumes 0x80 (data memory)
2281         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2282           operands (genAddLit expects the iCode's operands to swapped as
2283           well), fixed leftover bytes (crashed for short left operands)
2284         * (pic16_genMinusDec): performance improvements, removed false
2285           PIC14 emitSKPNCs
2286         * (pic16_genMinus): fixed to cope with differently sized operands
2287         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2288           for --obanksel > 1
2289         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2290         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2291           new banksel optimization
2292         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2293           analysis for temporary registers (segfaults...)
2294         * src/pic16/peeph.def: added rule
2295
2296 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2297
2298         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2299         which converts a float number to its ASCII representation
2300         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2301         functions to convert the fractional and integer part of a float to ASCII,
2302         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2303         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2304         ram
2305         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2306         _STATMEM macros,
2307         * device/include/pic16/adc.h: added GPL info,
2308         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2309         a pCodeOp as tested operand,
2310         * (genNearPointerGet): optimized bit testing, does not use
2311         intermediate register for bit value, test directly instead with
2312         BTFSS, BTFSC, works only for single bits,
2313         * (genpic16Code): dump the name of the iCode in the asm,
2314         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2315         renamed to pic16_decodeOp,
2316         * (serialRegAssign): do not allocate a temporary register for iCode
2317         sequences that test a single bit for 1/0
2318
2319 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2320
2321         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2322         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2323         access stack and frame pointers. They are initially assigned to
2324         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2325         accessing SFRs. Updated all occurences of modification of stack or
2326         frame pointer in gen.c and pcode.c,
2327         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2328         assigning of a literal value to pointers,
2329         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2330         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2331         selected
2332
2333 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2334
2335         * doc/sdccman.lyx: update documentation about stack pragma, added
2336         some info for stack memory models
2337
2338 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2339
2340         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2341
2342 2005-01-08 Raphael Neider <rneider AT web.de>
2343
2344         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2345           udata sections to fix bug #1097823
2346
2347 2005-01-05 Raphael Neider <rneider AT web.de>
2348
2349         * src/pic16/gen.c (genGenericShift): added handling of differently
2350           sized left operand and result
2351
2352 2005-01-04 Raphael Neider <rneider AT web.de>
2353
2354         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2355         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2356           to hold the condition bit)
2357         * added new version of genCmp (old code available via #define)
2358         * added new version of genShiftLeft/genShiftRight in a generic
2359           way, now supports shifting by negative values
2360         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2361           shiftCount (expected by genGenericShift)
2362         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2363         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2364           dump
2365         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2366           is an invalid literal too...)
2367
2368 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2369
2370         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2371         from Raphael Neider,
2372         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2373         for 8-bit literals. This fixes some literal operands which are sign
2374         extended to 16-bits ints when instruction needs only 8-bits.
2375
2376 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2377
2378         * device/lib/logf.c: added mcs51 assembly version
2379         * device/lib/expf.c: added mcs51 assembly version
2380         * device/lib/_logexpf.c: new shared asm code for expf and logf
2381         * device/include/math.h: add defines for assembly math library
2382         * device/lib/Makefile.in: build new _logexpf.c
2383         * device/lib/libfloat.lib: use new _logexpf.c
2384
2385 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2386
2387         * src/pic/device.c
2388         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2389           device types which have less than 0x7f registers.
2390
2391 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2392
2393         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2394
2395 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2396
2397         * device/lib/printf_fast.c: only build on supported arch.
2398         * device/lib/printf_tiny.c: only build on supported arch.
2399         * device/lib/printf_fast_f.c: only build if asm float lib
2400         * device/lib/_fsget1arg.c: only build if asm float lib
2401         * device/lib/_fsget2args.c: only build if asm float lib
2402         * device/lib/_fsnormalize.c: only build if asm float lib
2403         * device/lib/_fsreturnval.c: only build if asm float lib
2404         * device/lib/_fsrshift.c: only build if asm float lib
2405         * device/lib/_fsswapargs.c: only build if asm float lib
2406         * device/include/stdio.h: don't provide print_fast,
2407           print_fast_f, print_tiny prototypes if --xstack used
2408
2409 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2410
2411         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2412         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2413           to the SOURCES
2414
2415 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2416
2417         * device/lib/printf_fast_f.c: same as printf_fast, but
2418           with floating point enabled
2419         * device/lib/printf_fast.c: minor tweaks
2420         * device/include/stdio.h: add printf_fast_f
2421
2422 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2423
2424         * src/SDCCmain.c: make --float-reent default for mcs51
2425         * device/lib/_fsadd.c: added mcs51 assembly version
2426         * device/lib/_fssub.c: added mcs51 assembly version
2427         * device/lib/_fsmul.c: added mcs51 assembly version
2428         * device/lib/_fsdiv.c: added mcs51 assembly version
2429         * device/lib/_fseq.c: added mcs51 assembly version
2430         * device/lib/_fsneq.c: added mcs51 assembly version
2431         * device/lib/_fsgt.c: added mcs51 assembly version
2432         * device/lib/_fslt.c: added mcs51 assembly version
2433         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2434         * device/lib/Makefile.in: add _fscmp to build
2435         * device/lib/libfloat.lib: add _fscmp to build
2436
2437 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2438
2439         * device/lib/_fs2slong.c: added mcs51 assembly version
2440         * device/lib/_fs2sint.c: added mcs51 assembly version
2441         * device/lib/_fs2schar.c: added mcs51 assembly version
2442         * device/lib/_fs2ulong.c: added mcs51 assembly version
2443         * device/lib/_fs2uint.c: added mcs51 assembly version
2444         * device/lib/_fs2uchar.c: added mcs51 assembly version
2445         * device/lib/_slong2fs.c: added mcs51 assembly version
2446         * device/lib/_sint2fs.c: added mcs51 assembly version
2447         * device/lib/_schar2fs.c: added mcs51 assembly version
2448         * device/lib/_ulong2fs.c: added mcs51 assembly version
2449         * device/lib/_uint2fs.c: added mcs51 assembly version
2450         * device/lib/_uchar2fs.c: added mcs51 assembly version
2451         * device/include/float.h: added #define to select asm vs c
2452
2453 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2454
2455         * device/lib/printf_fast.c: improvements to float output
2456         * device/include/float.h: add defines for assembly float library
2457         * device/lib/_fsget1arg.c: receive 1 float arg
2458         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2459         * device/lib/_fsnormalize.c: normalize a float
2460         * device/lib/_fsreturnval.c: return float, various helper routines
2461         * device/lib/_fsrshift.c: right shift a float's mantissa
2462         * device/lib/_fsswapargs.c: swap 2 floats
2463         * device/lib/Makefile.in: build these 6 new files for mcs51
2464         * device/lib/libfloat.lib: add these 6 files to the library
2465
2466 2004-12-26 Borut Razem <borut.razem AT siol.net>
2467
2468         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2469           built by gcc 3.4.2
2470
2471 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2472
2473         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2474           and fully reentrant and register bank neutral.
2475         * device/lib/printf_fast.c: added float (not enabled by default),
2476           added compact/slower integer (also not enabled by default),
2477           improved size/speed of fast integer code, other minor changes
2478         * device/include/stdio.h, device/lib/Makefile.in,
2479           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2480
2481 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2482
2483         * src/pic16/pcode.c: declaring variables other than at the start of a
2484           block is not supported in C by VC6.
2485
2486 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2487
2488         * applied a previous patch from Raphael Neider that wasn't included
2489         in the previous commits, which fixes infinite loops within jumptable
2490         improvements,
2491         * made some fixes that previous patches introduced
2492
2493 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2494
2495         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2496         that fixes an issue with AOP_PCODE asmop's offset,
2497         * (pic16_popCopyReg): update instance field too,
2498         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2499         function of pic port,
2500         * (genCmp, genAnd, genAssign),
2501         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2502
2503 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2504
2505         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2506         variables initial values to idata section,
2507         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2508         variables in some functions. This utilizes parmBytes field of iCode
2509         structure to hold the offset of the variable in stack. (might be
2510         able to use the stack field too?)
2511         * applied patch from Raphael Neider # ### , # ###
2512         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2513         variable initial values in idata section,
2514         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2515         for static variables with initial value
2516         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2517         applied fix in while loop from Raphael Neider.
2518
2519 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2520
2521         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2522         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2523         * src/ds390/ralloc.c (serialRegAssign): spill bits
2524         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2525         * support/Util/SDCCerr.c,
2526         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2527         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2528         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2529
2530 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2531
2532         * device/include/sdcc-lib.h: inserted LGPL, added includes
2533           asm/ds390/features.h and asm/mcs51/features.h
2534         * device/include/asm/default/features.h,
2535         * device/include/asm/gbz80/features.h,
2536         * device/include/asm/z80/features.h: added empty _AUTOMEM
2537           and _STATMEM
2538         * device/include/asm/ds390/features.h,
2539         * device/include/asm/mcs51/features.h: added files with defines for
2540           _AUTOMEM and _STATMEM indicating automatic and static storage class
2541         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2542         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2543         * src/SDCCicode.c (geniCodeCast),
2544         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2545         * src/SDCCloop.c (loopInduction): removed unused variable lr
2546         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2547           to convertToFcall to include char modulo (RFE 1065037), added check
2548           if left operand is unsigned and use abs of literal value
2549         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2550           as it doesn't work after conversion from peephole.def to peephole.rul
2551         * src/mcs51/gen.c (toBoolean): added check for size,
2552           (genModOneByte): optimized code for signed char modulo a literal
2553           power of 2 (thanks to Hubert Sack),
2554           (genRRC): removed unnecessary "clr c",
2555           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2556         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2557           jump optimization,
2558           swapped rules 256.c and 256.d,
2559           extended 256.d by using new multiple checks (thanks Erik),
2560           added rules 256.e and 256.f,
2561           updated rule 261.a and 261.b to new generated code
2562         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2563
2564 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2565
2566         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2567           induction related bugs, including first part of bug #1074377
2568
2569 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2570
2571         * applied patch from bug-report #1076292,
2572         * applied patches for genAnd and Goto-optimizations for Raphael
2573         Neider,
2574         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2575         dump a less iCode information,
2576         * src/pic16/device.h (pic16_options_t): added field debgen,
2577         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2578         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2579         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2580         puclic,
2581         * (various functions): added macros FENTRY and FENTRY2 to functions,
2582         to emit function prologue,
2583         * (various functions): fixed indentation,
2584         * (genNearPointerGet): fixed loading of FSR0,
2585         * (genPackBits): applied patch from Raphael Neider to fix updating
2586         of FSR0 and touching only the modified bits,
2587         * src/pic16/genarith.c (various functions): added macros FENTRY to
2588         emit function prologue in comments,
2589         * src/pic16/pcode.h: added functions debugf2, debugf3,
2590         * src/pic16/ralloc.c: partial fix for packForPush caused
2591         segmentation fault,
2592
2593 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2594
2595         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2596           <stsp AT users.sourceforge.net> with reversed byte order
2597         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2598
2599 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2600
2601         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2602           bug #1074377
2603         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2604         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2605
2606 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2607
2608         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2609
2610 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2611
2612         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2613           conditions,
2614           (setFromConditionArgs): friendly operand parser for peephole rules,
2615           (operandBaseName, operandsNotRelated): new peephole condition
2616           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2617           architecture specific register naming into account, handles n-way
2618           comparisons, and supports quoted literals
2619         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2620
2621 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2622
2623         * src/mcs51/peeph.def: fixed bug #1076940
2624
2625 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2626
2627         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2628
2629 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2630
2631         Adding support for replacing ljmps with sjmps in jumptables
2632         generated for switch statements. For now you need to set the
2633         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2634         Now 4 algorithms for mcs51 jumptable generation are used:
2635         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2636         addresses loaded pc-relative for up to 112 cases and stack-pushing
2637         target addresses loaded with offset from dptr for up to 256 cases.
2638
2639         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2640         * src/mcs51/main.c: adapted constants for switch table generation
2641         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2642
2643 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2644
2645         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2646         * support/regression/tests/bug1057979.c: added test for bug 1073386
2647
2648 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2649
2650         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2651         compilers
2652
2653 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2654
2655         * src/pic16/device.h,
2656         * src/pic16/genarith.c,
2657         * src/pic16/glue.c,
2658         * src/pic16/main.c,
2659         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2660
2661 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2662
2663         Large cummulative patch for pic16 port.
2664         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2665         to call when a stack overflow occurs,
2666         * (malloc.h): added CVS Id tag,
2667         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2668         variable,
2669         * added libc directory. The current version of LibC contains string
2670         functions, ctype functions and macros and some functions of the
2671         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2672         be extensively tested in the future. Standard disclaimer here.
2673         Library is not automatically build yet. But one can build it by
2674         invoking 'make' inside the libc directory.
2675         * added ADC library under libio. Preliminary version yet.
2676
2677         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2678         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2679         aopForRemat() now and not by pic16_aopOp(),
2680         * (pic16_popGetTempReg): removed warning messgae when allocating
2681         temporary registers, its a buggy feature and will be removed,
2682         * (pic16_popGet): set register instance field in AOP_CRY,
2683         * (pic16_outBitC): fixed for results in size greater than 1,
2684         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2685         * (pic16_storeForReturn): optimized return of 0,
2686         * (genCmp): experimental code for new genCmp which uses PIC18's
2687         special compare&skip instructions. Initial tests fail some times
2688         with variables grater than 1 byte in size, so new code is disabled,
2689         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2690         a single bit,
2691         * (genCast): began a fix to optimize the casting of a bit to another
2692         bit, now assigning a bitfield to another bitfield will fail, sorry,
2693         * src/pic16/main.c: disabled the use of lr-support feature,
2694         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2695         * added some function prototypes, added function _debugf prototype,
2696         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2697         bits with offset (case PO_GPR_BIT),
2698         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2699         command line,
2700         * (isBankInstruction): modified to return 0 for no banking instruction,
2701         and 1 for banking instruction,
2702         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2703         caused stop processing pCodes after a inline assembly block,
2704         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2705         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2706         registers when it shouldn't,
2707         * src/pic16/ralloc.c (allocReg): add preliminary support for
2708         supporting a limited set of temporary registers,
2709
2710 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2711
2712         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2713           genDataPointerSet): ensure assignments always copy in MSB to LSB
2714           order,
2715           (loadRegFromAop): recognize CLRH optimization,
2716           (genFunction): optimize RECEIVE iCodes in reentrant functions
2717
2718 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2719
2720         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2721           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2722           selected.
2723         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2724         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2725           contiguous with data
2726
2727 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2728
2729         * device/lib/_gptrget.c (_gptrget),
2730         * device/lib/_gptrgetc.c (_gptrgetc),
2731         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2732           instead of sjmp to ret
2733         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2734           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2735
2736 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2737
2738         * .version: bumped version to 2.4.7
2739         * device/lib/_gptrget.c (_gptrget): is now _naked
2740         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2741         * device/lib/_gptrput.c (_gptrput): is now _naked
2742         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2743           (createFunction): fixed xstack
2744         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2745         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2746           or bit either,
2747           (geniCodeCritical): store original interrupt state in an iTemp bit
2748           var unless stack-auto
2749         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2750         * src/SDCCmain.c (setIncludePath): added include/target to search path
2751         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2752         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2753           prototype,
2754           (processFuncArgs): put bit vars in bit area
2755         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2756           unsaveRBank): fixed xstack,
2757           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2758           (genFunction, genEndFunction): fixed xstack,
2759           (genAssign): optimization don't walk backwards through mem
2760         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2761         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2762         * support/regression/Makefile: also make library (for stack-auto) when
2763           making "all" and added "test-mcs51-xstack-auto"
2764         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2765         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2766         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2767         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2768         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2769           make-library by MAKE_LIBRARY
2770         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2771           regression tests for xstack
2772         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2773         * support/regression/tests/critical.c: test for critical on mcs51
2774
2775 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2776
2777         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2778           built version of sdcc instead of installed version
2779
2780 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2781
2782         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2783         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2784           vprintf.c now
2785         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2786         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2787           WARNING: remove device/lib/build/z80/printf.o by hand when
2788           updating from previous build!
2789         * device/lib/z80/printf.c: updated comment
2790         * support/regression/tests/bug1057979.c: test all ports now
2791         * support/regression/tests/bug1065458.c: file added
2792
2793 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2794
2795         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2796           *_start and *_end symbols for static functions
2797
2798 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2799
2800         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2801           and search crt0.o in all library paths,
2802           (setIncludePath): proper handling of --nostdinc,
2803           (setLibPath): proper handling of --nostdlib
2804         * support/regression/Makefile,
2805         * support/regression/ports/ds390/spec.mk,
2806         * support/regression/ports/gbz80/spec.mk,
2807         * support/regression/ports/hc08/spec.mk,
2808         * support/regression/ports/mcs51/spec.mk,
2809         * support/regression/ports/mcs51-large/spec.mk,
2810         * support/regression/ports/mcs51-stack-auto/spec.mk,
2811         * support/regression/ports/z80/spec.mk: use include and lib files from
2812           built version of sdcc instead of installed version
2813         * doc/sdccman.lyx: fixed typo in --nostdinc
2814
2815 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2816
2817         * src/pic/pcode.c,
2818         * src/pic/device.c,
2819         * src/pic/ralloc.c,
2820         * src/pic/gen.c : added support to generate code for struct bit fields.
2821
2822 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2823
2824         * as/xa51/xa_version.h,
2825         * device/include/errno.h,
2826         * device/include/regc515c.h,
2827         * device/lib/_itoa.c,
2828         * device/lib/_ltoa.c,
2829         * device/lib/ser_ir_cts_rts.c,
2830         * sim/ucsim/xa.src/glob.cc,
2831         * sim/ucsim/xa.src/inst_gen.cc,
2832         * sim/ucsim/xa.src/xa_bit.cc,
2833         * sim/ucsim/xa.src/xa_sfr.cc,
2834         * sim/ucsim/z80.src/inst_dd.cc,
2835         * sim/ucsim/z80.src/inst_fdcb.cc,
2836         * support/scripts/keil2sdcc.pl,
2837         * src/pic16/pic16.dsp,
2838         * src/pic16/pic16a.dsp: corrected cvs line endings
2839         * device/lib/printf_large.c: fixed bug 1057979
2840         * src/pic16/gen.c: fixed non-C standard code
2841         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2842         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2843         * support/regression/ports/mcs51/support.c: reload T1 asap
2844         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2845           pdata use and clear idata startup behaviour
2846         * support/regression/tests/bug1057979.c: added
2847
2848 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2849
2850         * device/examples/ds390/ow390/ad26.h,
2851         * device/examples/ds390/ow390/cnt1d.h,
2852         * device/examples/ds390/ow390/crcutil.c,
2853         * device/examples/ds390/ow390/ownet.h,
2854         * device/examples/ds390/ow390/owsesu.c,
2855         * device/examples/ds390/ow390/swt12.h,
2856         * device/examples/ds390/ow390/swtoper.c,
2857         * device/examples/ds390/ow390/temp10.h,
2858         * device/examples/ds390/ow390/thermodl.c,
2859         * device/examples/ds390/tinitalk/tinitalk.dsp,
2860         * device/examples/ds390/tinitalk/tinitalk.dsw,
2861         * device/examples/mcs51/clock/hw.h,
2862         * device/examples/mcs51/simple2/go.bat,
2863         * device/examples/serialcomm/windows/serial.h,
2864         * device/examples/xa51/dummy.c,
2865         * device/examples/xa51/hello.c,
2866         * device/include/80c51xa.h,
2867         * device/include/at89x051.h: corrected cvs line endings
2868
2869 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2870
2871         * src/pic16/main.c (options): added command line --gstack, to trace
2872         stack over/under flows,
2873         * added pragma 'wparam' to allow passing first byte of function
2874         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2875         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2876         call to __gstack_test function and sets up the symbol as extern,
2877         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2878         * popaop): added call to pic16_testStackOverflow,
2879         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2880         wparamList list,
2881         * (genCall, genPcall): now all parameters are passed via stack
2882         except in functions that are pass to wparam pragma in which WREG is
2883         used too,
2884         * (genPcall): REENTRANT flag is checked to see if variable prototype
2885         contains reentrant keyword, don't call a non-reentrant function, via
2886         a reentrant function pointer or vice versa, functions are never
2887         passed via WREG,
2888         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2889         D.Winkler,
2890         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2891         SIGSEGV when accessing a NULL register stucture,
2892         * (pic16_printGPointerType): modified to handle UPPER modifier for
2893         function initializers, changed prototype of function to simpler one,
2894         * (pic16_printIvalFuncPtr): check to see if function is already
2895         added in externs list,
2896         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2897         optimized a move from W to SFR with a move to the same register
2898         later after a CALL,
2899         * device/lib/pic16/debug: NEW directory, contains debug features
2900         which are enabled when linking with libdebug.lib, currently command
2901         line option --gstack enables stack pointer tracing for over/under
2902         flow, corresponding sources are in debug/gstack
2903
2904 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2905
2906         * doc/sdccman.lyx: updated SDCC version,
2907         * (PIC16 port): update list of command line options,
2908         * src/pic16/device.h (structure pic16_options_t): added field gstack
2909         to enable stack overflow tracing on push/pops,
2910         * src/pic16/device.c (statistics structure): added statistics
2911         structure,
2912         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2913         pic16_dump_int_registers): increase statistics counters for each
2914         * variable which is encountered
2915         * (pic16_dump_usection): emit each .udata variable to its own udata
2916         section,
2917         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2918         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2919         parameters via stack, otherwise use old scheme,
2920         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2921         assembler output file,
2922         * src/pic16/main.c: added command line options --gstack to enable
2923         push/pop tracing for stack overflow,
2924         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2925         instructions): added size of each instruction,
2926         * (pic16_countInstruction): estimate size of instructions in
2927         the_pFile list, inline assembly blocks are not counted,
2928         * (pic16_FixRegisterBanking): trace previous register usage, when
2929         banksel optimizations is greater than 0, don't emit a redudant
2930         banksel directive,
2931
2932 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2933
2934         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2935         * src/pic16/ralloc.c : applied same fix for pic16.
2936         * src/pic/gen.c : tidied it up a little.
2937
2938 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2939
2940         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2941         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2942
2943 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2944
2945         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2946
2947 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2948
2949         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2950         non-reentrant function __modsint in the interrupt function (thus
2951         corrupting math operations during serial I/O)
2952         * device/lib/ser_ir.c: as above, changed buffersize
2953         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2954         256.c,d for zeroing
2955         * doc/Makefile: added option -t for rsync
2956
2957 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2958
2959         * src/SDCCast.h (struct ast),
2960         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2961
2962 2004-10-20 Borut Razem <borut.razem AT siol.net>
2963
2964         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2965         package
2966
2967 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2968
2969         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2970         makefile targets,
2971         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2972         support functions to replace long sequences of MOVFF's from access
2973         bank registers to stack and vice versa,
2974         * src/pic16/device.h: added new field opt_flags, where optimization
2975         flags can be set to enable certain features,
2976         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2977         * pBlock, (genFunction, genEndFunction): surroung loop for
2978         saving/loading used registers in stack with PC_INFO pCodes,
2979         INF_LREGS. Code in between can then be optimized by pCode optimizer
2980         to support function calls,
2981         * (genDataPointerSet): fixed bug which loaded float fields in
2982         structures with corrupt data,
2983         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2984         in a standard way debug info on stderr. Feature used for developing
2985         and debugging only,
2986         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2987         obsolete chunks of code,
2988         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2989         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2990         * pic16/src/pcode.c (pic16_newpCodeInfo,
2991         * (pic16_newpCodeOpLocalRegs),
2992         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2993         feature,
2994         * (pic16_pCodeConstString): printing of the initial value of a
2995         symbol as a comment is inhibited since parsing was already done by
2996         copyStr and output is corrupt,
2997         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2998
2999 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3000
3001         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3002
3003 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3004
3005         * as/mcs51/lkarea.c: removed old K&R style,
3006           (lnksect): changed check on boundary error,
3007           (lnksect2): changed check on boundary error,
3008           (lnksect2): extend XSTK to end of page if size = 1
3009         * as/mcs51/lkmain.c: removed old K&R style,
3010           (Areas51): create l_IRAM symbol
3011         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3012         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3013           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3014         * device/lib/_mullong.c: added version to be compiled with xstack
3015         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3016         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3017         * device/lib/mcs51/crtxstack.asm: fixed comment
3018         * src/SDCCglue.c: maxInterrupts defaults to 0,
3019           (emitMaps): added pdata,
3020           (createInterruptVect): (re)moved default,
3021           (glue): added pdata,
3022           (glue): moved __start__xstack to XSTK with default size 1
3023         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3024           and options.float_rent when options.stackAuto is set,
3025           (linkEdit): only write XDATA_NAME if provided on command line
3026         * src/SDCCmem.h,
3027         * src/SDCCmem.c: added pdata
3028         * src/port.h: added pdata_name to PORT
3029         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3030           (saveRegisters, unsaveRegisters): removed usage of B,
3031           (genMinus): fixed accumulator clash,
3032           (genJumpTab): added comment, this needs another look
3033         * src/mcs51/gen.c: added check for "B in use" paranoia,
3034           added pushB() and popB()
3035         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3036           chance
3037         * src/avr/main.c,
3038         * src/ds390/main.c,
3039         * src/hc08/main.c,
3040         * src/mcs51/main.c,
3041         * src/pic/main.c,
3042         * src/pic16/main.c,
3043         * src/xa51/main.c,
3044         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3045           added PSEG (PAG,XDATA) or NULL to port specifier
3046         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3047         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3048           (_mcs51_genInitStartup): removed __start__xstack equ,
3049           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3050         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3051         * src/z80/gen.c (_rleAppend): fixed warnings
3052         * support/regression/tests/zeropad.c: added pdata test
3053         * .version: bumped to 2.4.6
3054
3055 2004-10-17 Borut Razem <borut.razem AT siol.net>
3056
3057         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3058         as a part of nightly build
3059
3060 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3061
3062         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3063         WREG holds the first byte function parameters,
3064         * (aopForSym): take special case for symbols which are in FARSPACE
3065         but in CODESPACE too,
3066         * (assignResultValue): modified to take into account _G.useWreg,
3067         * (genCall): don't use wreg for parameter passing when function is
3068         declared as reentrant, too, added optimization INCF to stack
3069         pointer when stack parameter count is 1,
3070         * (genFunction, genEndFunction): refurnished and fixed to not using
3071         wreg for passing parameters when function has varargs or is
3072         reentrant, fixed bug with symbol name compare for generating
3073         functions in absolute address,
3074         * (pic16_storeForReturn): refurnished,
3075         * (genCmp): began writing a new version of the function, not ready
3076         yet, therefore it is disabled,
3077         * (genAssign): do not read code memory when assigning a function to
3078         a pointer function,
3079         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3080         array of characters, not pointer,
3081         * (pic16initialComments): in debug mode emit an .ident directive for
3082         the assembler,
3083         * (_process_pragma): emit a new warning type (internal to pic16)
3084         when setting stack to default length, emit a similar warning when
3085         placing a function at absolute address and address is not word aligned
3086         * (_pic16_parseOptions): added 'return TRUE' statement,
3087         * (_pic16_linkEdit): if compiling a source, then add the source's
3088         file object, first in the list of objects to link,
3089
3090 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3091
3092         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3093         * src/pic/main.c : removed VC warning.
3094         * src/pic/gen.c : changed comment.
3095
3096 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3097
3098         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3099         reference to a deprecated symbol _GPTRREG was causing failure to
3100         link. Thanks G. M. Gallant for the info.
3101
3102 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3103
3104         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3105         comments for Bugs item #954788.
3106
3107 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3108
3109         * src/pic16/device.c (pic16_dump_gsection,
3110         * pic16_groupRegistersInSection): handle symbols declared to be in
3111         access bank differently,
3112         * src/pic16/gen.c (struct _G): added field resDirect,
3113         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3114         send values read from stack directly to result and don't allocate
3115         temporary values,
3116         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3117         same registers,
3118         * (pic16_sameRegsOfs): NEW,
3119         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3120         free because they were not allocated from temporary pool,
3121         * pic16_popRegFromString): workaround to fix a problem with
3122         allocating variables twice or never,
3123         * (genGenPointerGet): using PRODL instead of FSR0H,
3124         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3125         instead of FSR0H,
3126         * (genAssign): take advantage of the _G.resDirect flag,
3127         * (genCast): around line 11844, use mov2f instead of directly
3128         MOVFF'ing between operands to account for literal values,
3129         * src/pic16/genutils.c: some new debug functions for gpsim have been
3130         added,
3131         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3132         float with integer part only,
3133         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3134         place variables in access bank
3135         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3136         updated sources to reflect recent changes in gen.c
3137
3138 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3139
3140         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3141         sources that searched for headers in installation path, now the
3142         device/include/pic16 is used,
3143         * src/pic16/glue.c (pic16glue),
3144         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3145         .line directives if not in debug mode, this suppresses assembler's
3146         warnings for ignored directives
3147
3148 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3149
3150         * src/port.h: made reset_regparms prototype void parameter explicit.
3151         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3152         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3153         * doc/sdccman.lyx: documented warning disabling and how to use
3154           printf_large to make it print floats.
3155         * device/include/stdbool.h: NEW
3156         * device/lib/_atof.c,
3157         * device/lib/_divuint.c,
3158         * device/lib/_divulong.c,
3159         * device/lib/expf.c,
3160         * device/lib/printf_large.c,
3161         * device/lib/sincosf.c,
3162         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3163         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3164           a completely reentrant lib.
3165
3166 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3167
3168         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3169         * device/include/pic16/stdio.h: fixed bug with colon
3170
3171 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3172
3173         * device/include/pic16/stdio.h,
3174         * device/include/pic16/stdlib.h,
3175         * device/include/pic16/math.h: NEW
3176         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3177         declared as _naked to reduce overhead
3178         * device/lib/Makefile.in (target port-specific-objects-pic16):
3179         changed * to *.* so to ignore the CVS directory,
3180         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3181         stacked variables back in stack,
3182         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3183         corruption
3184
3185 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3186
3187         * .version: bumped version number to 2.4.5
3188         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3189         * support/Util/SDCCerr.c (messages structure): added entry for
3190         W_POSSBUG2
3191
3192         Large cumulative patch for pic16 port and libraries.
3193         * device/include/pic16/sdcc-lib.h,
3194         * device/include/pic16/stdarg.h,
3195         * device/include/asm/pic16/features.h,
3196         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3197         * device/include/pic16/float.h: changes reentrant keyword with
3198         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3199         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3200         updated target build-libraries to include objects from gptr,
3201         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3202         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3203         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3204         all function headings,
3205         * src/SDCCmain.c: added global parameter userIncDirsSet,
3206         * (parseCmdLine): when option -I is encountered add directory to
3207         userIncDirsSet too,
3208         * src/version.awk: added space between control and long,
3209         * src/pic16/NOTES: added some notes for the port,
3210         * src/pic16/gen.c: added prototype for mov2fp function,
3211         * (fReturnpic16[]): properly named return value registers,
3212         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3213         * (aopForSym): added code to handle symbols with onStack flag set,
3214         symbols onStack are allocated PTRSIZE bytes,
3215         * (aopFreeAsmop): handles special case where asmops are stack objects,
3216         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3217         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3218         added argument lock to trace flaws in allocating temporary registers
3219         when developing port,
3220         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3221         * (pic16_popRegFromString): reenabled allocating a direct register
3222         from string,
3223         * (assignResultValue): various beautifications,
3224         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3225         referenced function argument,
3226         * (genIpush): reenabled to allow stacked arguments, handles only
3227         ic->parmPush iCodes,
3228         * (genCall, genPcall): major changes to allow for variable argument
3229         functions, fixed a bug with falsely restoring stack pointer after
3230         returning from call,
3231         * (genFunction): pending code for critical function,
3232         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3233         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3234         * (genNearPointerGet): fixed bug with indirect reading, was always
3235         reading from INDF0
3236         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3237         pointers,
3238         * (genAddrOf): rewrote code to take address of a stacked function parameter
3239         * (genCast): fixed casting to generic pointer type,
3240         * src/pic16/gen.h: added AOP_STA,
3241         * (struct asmop): added field stk,
3242         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3243         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3244         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3245         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3246         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3247         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3248         generic pointers,
3249         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3250         and library paths,
3251         * (pic16_port structure): generic pointer size is set to 3,
3252         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3253         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3254         compiler warning,
3255         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3256         operand is an iTemp,
3257
3258 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3259
3260         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3261         * debugger/mcs51/simi.c: addapt new syntax of s51
3262
3263 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3264
3265         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3266         * src/pic16/pcode.c: commented out some calls to free() in order to
3267         fix bug #989576,
3268
3269 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3270
3271         * src/SDCCicode.h,
3272         * src/SDCCicode.c (isiCodeInFunctionCall),
3273         * src/avr/ralloc.c (selectSpil),
3274         * src/pic/ralloc.c (selectSpil),
3275         * src/pic16/ralloc.c (selectSpil),
3276         * src/ds390/ralloc.c (selectSpil),
3277         * src/hc08/ralloc.c (selectSpil),
3278         * src/xa51/ralloc.c (selectSpil),
3279         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3280         stack in the middle of a function call sequence (fixes bug #1020268)
3281         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3282         costs associated with the minimum switch case.
3283
3284 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3285
3286         * src/SDCC.lex: fixed bug #1030549
3287
3288 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3289
3290         * src/SDCCcse.h (struct cseDef),
3291         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3292         over a function call if the CSE is derived from a symbol whose
3293         address has been taken (fixes bug #1029883)
3294         * support/regression/tests/bug-1029883: a new regression test for
3295         this bug
3296
3297 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3298
3299         * src/hc08/gen.c (emitinline): fixed bug #1029778
3300         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3301         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3302         and starts toward RFE #905167)
3303
3304 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3305
3306         * src/pic16/gen.c (mov2f): New function to move an operand to
3307         another without considering if it is a literal or a register,
3308         * (pic16_sameRegs): don't check if they are both AOP_REG,
3309         * (AccRsh): removed andmask=0 lines,
3310         * (genLeftShift): duplicated to be improved in future versions,
3311         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3312         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3313         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3314         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3315         * (insertBankSwitch): fixed inserting banksel directives algorithm
3316         for instructions that follow a skip instruction, this fixes a report
3317         for broken subtraction code generation,
3318         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3319         iCode is a left op, just in case result and right share the same
3320         registers
3321
3322 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3323
3324         * src/hc08/main.c,
3325         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3326         preservation of HX
3327         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3328         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3329         on 2004-09-12; it was buggy
3330
3331 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3332
3333         * src/SDCCsymt.h: removed RESULT_CHECK
3334         * src/SDCCast.c,
3335         * src/SDCCglue.c,
3336         * src/SDCCval.c,
3337         * src/pic/glue.c,
3338         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3339
3340 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3341
3342         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3343         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3344         configuration values no more rejected by compiler, they are assigned
3345         to configuration registers with a warning message instead,
3346         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3347         the for-loop so last conf register is emitted too,
3348         * (_pic16_initPaths): link library libsdcc.lib by default,
3349         * (_hasNativeMulFor): modified test for multiplication according to
3350         Raphael Neider's remarks. Integer multiplication is also done with
3351         support functions,
3352         * device/include/pic16/pic18fregs.h: corrected type error in while
3353         testing and including 18f6720 header file
3354
3355 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3356
3357         * src/pic16/device.h (pic16_options): removed field use_crt,
3358         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3359         until an optimization to handle single bits is added,
3360         * (pic16_loadFSR0): moved before genUnpackBits,
3361         * (genAnd): some white lines removed,
3362         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3363         leave_reset flags in pic16_options when using crt modules,
3364
3365 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3366
3367         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3368           for bugs 898889 & 979599. Also used some safer print instructions.
3369
3370 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3371
3372         * src/pic16/device.h (pic16_options_t): added field use_crt,
3373         crt_name, no_crt,
3374         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3375         catch a probable future bug,
3376         * src/pic16/gen.c: aopIdx function commented out,
3377         * (genAssign): commented out old code which used aopIdx,
3378         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3379         code, added if conditionals to take into account the --use-crt
3380         command line options,
3381         * src/pic16/main.c (pic16_optionsTable): added new command line
3382         options, --use-crt= and --no-crt,
3383         * (_pic16_linkEdit): now the proper crt object is added in the
3384         linker command line except than when --no-crt is specified,
3385         * src/pic16/pcode.c,
3386         * src/pic16/pcode.h: added some structures and functions for a new
3387         optimization scheme to compansate for instruction overhead between
3388         same iCodes, this scheme is currently under development and is not
3389         working in any way,
3390         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3391         to && operator,
3392         * device/lib/pic16/startup/crt0i.c,
3393         * device/lib/pic16/startup/crt0iz.c: added global char variable
3394         __uflags to force the generation of an idata section
3395
3396 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3397
3398         * doc/Makefile,
3399         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3400         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3401
3402 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3403
3404         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3405         Frieder) and clarified the default code optimization mode
3406
3407 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3408
3409         * src/SDCC.lex (doPragma, process_pragma),
3410         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3411         "opt_code_size", and "opt_code_balanced"
3412         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3413         regrouped options by category, added support for category headers
3414         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3415         and "--opt-code-size"
3416         * doc/sdccman.lyx: documented these new options and pragmas
3417         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3418         preference into account
3419
3420 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3421
3422         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3423           geniCodePreDec): Fixed bug 904237 by generating a warning
3424         * src/SDCCerr.h,
3425         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3426
3427 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3428
3429         * src/pic/device.c : When no max ram set validate full memory range.
3430         * src/pic/pcode.c,
3431         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3432
3433 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3434
3435         * device/lib/_gptrget.c,
3436         * device/lib/_gptrput.c: updated comment
3437         * device/lib/calloc.c,
3438         * device/lib/free.c,
3439         * device/lib/malloc.c,
3440         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3441         * src/SDCCcse.c (cseBBlock),
3442         * src/SDCCicode.c (printOperand, geniCodeArray),
3443         * src/SDCCicode.h (struct operand): fixed bug 868103
3444         * support/regression/tests/bug-868103.c: added
3445         * src/SDCCast.c (searchLitOp),
3446         * src/SDCCcse.h (struct cseDef),
3447         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3448         * src/SDCCicode.h (struct operand),
3449         * src/SDCCsymt.h (struct sym_link),
3450         * src/avr/gen.c (hasInc),
3451         * src/ds390/gen.c (hasInc),
3452         * src/hc08/gen.c (genPlusIncr, hasInc),
3453         * src/mcs51/gen.c (hasInc),
3454         * src/pic16/glue.c (pic16_printIvalChar),
3455         * src/pic16/ralloc.c (regWithIdx),
3456         * src/xa51/gen.c (hasInc) : removed warnings
3457         * src/SDCCast.c (createBlock): added comment ???
3458         * src/hc08/ralloc.c: updated comments
3459
3460 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3461
3462         * doc/sdccman.lyx: updated section on switch statements, added
3463         section about semaphore locking
3464         * doc/Makefile: added option -info for latex2html
3465         * device/lib/_gptrget.c,
3466         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3467
3468 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3469
3470         * src/pic/device.h,
3471         * src/pic/device.c,
3472         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3473          maxram is less than 0x100.
3474
3475 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3476
3477         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3478
3479 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3480
3481         * src/port.h,
3482         * src/mcs51/main.c,
3483         * src/ds390/main.c,
3484         * src/z80/main.c,
3485         * src/hc08/main.c,
3486         * src/pic/main.c,
3487         * src/pic16/main.c,
3488         * src/avr/main.c,
3489         * src/xa51/main.c
3490         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3491         a jump table is the best form for a switch statement, including
3492         automatic insertion of missing cases to make the case range
3493         continuous. Developed in collaboration with Frieder Ferlemann.
3494
3495 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3496
3497         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3498         accumulator result if it needs sign extension
3499
3500 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3501
3502         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3503
3504 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3505
3506         * device/lib/gbz80/printf.c,
3507         * device/lib/z80/printf.c: removed define for NULL
3508
3509 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3510
3511         * as/xa51/xa_link.c,
3512         * device/examples/ds390/ow390/ad26.c,
3513         * device/examples/ds390/ow390/cnt1d.c,
3514         * device/examples/ds390/ow390/counter.c,
3515         * device/examples/ds390/ow390/ds2480.h,
3516         * device/examples/ds390/ow390/ds2480ut.c,
3517         * device/examples/ds390/ow390/findtype.c,
3518         * device/examples/ds390/ow390/gethumd.c,
3519         * device/examples/ds390/ow390/owllu.c,
3520         * device/examples/ds390/ow390/ownetu.c,
3521         * device/examples/ds390/ow390/swt12.c,
3522         * device/examples/ds390/ow390/swtloop.c,
3523         * device/examples/ds390/ow390/temp.c,
3524         * device/examples/ds390/ow390/temp10.c,
3525         * device/examples/ds390/ow390/thermo21.c,
3526         * device/examples/ds390/ow390/tinilnk.c,
3527         * device/examples/ds390/ow390/tstfind.c,
3528         * device/examples/serialcomm/windows/serial.cpp,
3529         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3530         * device/include/reg51.h: fixed line endings for cvs
3531
3532 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3533
3534         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3535         packRegsForAccUse, packRegisters): new accumulator register
3536         packing algorithm
3537         * support/regression/ports/hc08/support.c (_putchar): suppress
3538         warning of unused variable
3539         * src/SDCCicode.c: added SWAP entry to codeTable
3540
3541 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3542
3543         * device/lib/sprintf.c: forgot to add this file before previous commit
3544
3545 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3546
3547         * src/pic16/gen.c (genPackBits): added operand right in function
3548         parameters, load result directly if p_type is POINTER (that is
3549         called by genNearPointerSet)
3550         * (genUnPackBits): added operand left in function parameters,
3551         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3552         FSR0 if accessing bitfields,
3553
3554 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3555
3556         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3557           _print_format; updated printf, sprintf, vsprintf
3558         * device/include/asm/default/features.h: corrected comment/define
3559         * device/lib/Makefile.in: added sprintf.c
3560         * device/lib/libsdcc.lib: added sprintf module
3561         * device/lib/printf_large.c,
3562         * device/lib/vprintf.c,
3563         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3564           into these 3 files
3565         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3566         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3567         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3568           hc08 test
3569         * support/regression/tests/zeropad.c: define idata as data for hc08
3570
3571 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3572
3573         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3574         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3575         labels are referenced at least once (even if a reference is not found)
3576         * src/hc08/gen.c (emitcode): set isComment flag for comments
3577         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3578         loads), rules 6a..6b (optimize jumps to return)
3579
3580 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3581
3582         * device/lib/acosf.c (acosf),
3583         * device/lib/asinf.c (asinf),
3584         * device/lib/atanf.c (atanf),
3585         * device/lib/ceilf.c (ceilf),
3586         * device/lib/cosf.c (cosf),
3587         * device/lib/coshf.c (coshf),
3588         * device/lib/cotf.c (cotf),
3589         * device/lib/fabsf.c (fabsf),
3590         * device/lib/floorf.c (floorf),
3591         * device/lib/log10f.c (log10f),
3592         * device/lib/logf.c (logf),
3593         * device/lib/sinf.c (sinf),
3594         * device/lib/sinhf.c (sinhf),
3595         * device/lib/sqrtf.c (sqrtf),
3596         * device/lib/tanf.c (tanf),
3597         * device/lib/tanhf.c (tanhf),
3598         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3599         replaced all instances of "reentrant" in the library functions
3600         defined in math.h with this macro.
3601         * support/regression/tests/float_trans.c: reenabled test for hc08
3602
3603 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3604
3605         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3606         erroneously deleted
3607
3608 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3609
3610         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3611         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3612         multi-byte volatile operands are used
3613         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3614         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3615         initialization to area GSINIT0 so that it would always precede
3616         any static initializers in GSINIT
3617         * support/regression/tests/zeropad.c: fixed idata define for hc08
3618         * support/regression/tests/bug-927659.c,
3619         * support/regression/tests/float_trans.c: disabled tests for hc08
3620         pending missing library routines
3621         * .version: increased version number to 2.4.4 - hc08 port now passes
3622         regression tests
3623
3624
3625 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3626
3627         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3628         * Makefile.common.in,
3629         * as/Makefile,
3630         * as/hc08/Makefile.in,
3631         * as/mcs51/Makefile.in,
3632         * as/z80/Makefile.in,
3633         * debugger/mcs51/Makefile.in,
3634         * device/include/Makefile.in,
3635         * device/lib/Makefile.in,
3636         * doc/Makefile,
3637         * link/Makefile,
3638         * link/z80/Makefile.in,
3639         * packihx/Makefile.in,
3640         * sim/ucsim/main_in.mk,
3641         * sim/ucsim/avr.src/Makefile.in,
3642         * sim/ucsim/doc/Makefile.in,
3643         * sim/ucsim/gui.src/serio.src/Makefile.in,
3644         * sim/ucsim/hc08.src/Makefile.in,
3645         * sim/ucsim/s51.src/Makefile.in,
3646         * sim/ucsim/xa.src/Makefile.in,
3647         * sim/ucsim/z80.src/Makefile.in,
3648         * src/Makefile.in,
3649         * support/cpp2/Makefile.in,
3650         * support/librarian/Makefile,
3651         * support/makebin/Makefile: added DESTDIR to the install path proposed
3652         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3653         * doc/sdccman.lyx: added DESTDIR documentation
3654
3655 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3656
3657         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3658         instruction for interrupt handlers, use fast returns when returning
3659         from high priority interrupts
3660
3661 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3662
3663         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3664         code generation
3665         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3666         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3667         bugs, ported much of Bernhard's code from mcs51
3668         * src/mcs51/gen.c (genSend),
3669         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3670         than one when calling a reentrant function
3671         * device/lib/_mullong.c: defined an alternate struct layout for big
3672         endian ports (hc08)
3673
3674 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3675
3676         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3677         test
3678
3679 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3680
3681         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3682         are sane and complete before asking the port its prefered parameter
3683         passing method (fixes bug #1017633)
3684         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3685         and _ret3
3686
3687 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3688
3689         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3690         problem in bitfields >= 8 bits.
3691
3692 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3693
3694         * src/SDCCsymt.c: undid changes that were not meant to be committed
3695
3696 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3697
3698         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3699
3700 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3701
3702         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3703           copied and wrong bit got inverted
3704
3705 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3706
3707         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3708         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3709         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3710         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3711         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3712         assignments to bitfields at known addresses
3713         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3714         reads from bitfields at known addresses
3715         * src/hc08/ralloc.c (packRegisters),
3716         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3717         genhc08Code): optimize pointer get values used as conditionals
3718         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3719         and branch
3720
3721 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3722
3723         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3724         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3725         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3726         as conditionals
3727
3728 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3729
3730         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3731
3732 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3733
3734         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3735         related problems
3736
3737 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3738
3739         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3740
3741 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3742
3743         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3744         mcs51 port
3745
3746 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3747
3748         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3749
3750 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3751
3752         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3753         cases use more compact code.
3754
3755 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3756
3757         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3758
3759 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3760
3761         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3762
3763 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3764
3765         * src/SDCCsymt.h,
3766         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3767         parameter of changePointer() from symbol* to sym_link*
3768         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3769         * src/SDCCsymt.c (compareType): void* type is castable to other
3770         pointers, but not necesarily an exact match.
3771         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3772         is no longer blindly treated as an exact match.
3773         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3774
3775 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3776
3777         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3778
3779 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3780
3781         * src/pic/gen.c,
3782         * src/pic/pcode.c,
3783         * src/pic/ralloc.h,
3784         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3785
3786 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3787
3788         * src/pic/device.c,
3789         * src/pic/device.h,
3790         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3791
3792 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3793
3794         * src/mcs51/gen.c (emitcode): fixed bug #992819
3795
3796 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3797
3798         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3799           there's no need to make it worse
3800
3801 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3802
3803         * src/mcs51/ralloc.c (deassignLR),
3804         * src/ds390/ralloc.c (deassignLR),
3805         * src/hc08/ralloc.c (deassignLR),
3806         * src/z80/ralloc.c (deassignLR),
3807         * src/pic/ralloc.c (deassignLR),
3808         * src/pic16/ralloc.c (deassignLR),
3809         * src/avr/ralloc.c (deassignLR),
3810         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3811         rlivePoint): fixed another part of bug #971834
3812
3813 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3814
3815         * src/z80/main.c: enabled "critical" keyword
3816         * src/z80/mappings.i,
3817         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3818         functions (fixes bug #979646)
3819         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3820
3821 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3822
3823         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3824           such as c:\mydir.
3825
3826 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3827
3828         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3829           doesn't disable too much optimizations
3830
3831 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3832
3833         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3834
3835 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3836
3837         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3838
3839 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3840
3841         * src/pic/gen.c tidied up tabs
3842         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3843         * src/pic/main.c tidied up tabs
3844         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3845         * src/pic/pcoderegs.c tidied up tabs
3846         * src/pic/ralloc.c tidied up tabs
3847
3848 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3849
3850         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3851         to S_FIXED for pic16 port and when symbol is not in level 0,
3852         allocate for S_REGISTER storage class and pic16 port, too,
3853         * src/pic16/device.h: prototype for checkSym,
3854         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3855         * (pic16_assignConfigWordValue): test the value and the mask to
3856         validate that the value is suitable for the configuration word,
3857         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3858         collect extern declared symbols, don't emit symbol twice, check
3859         first if symbol is in publics set first,
3860         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3861         * added command line '--fstack' which enables an experimental
3862         feature for stack access, too buggy to be used yet...
3863         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3864         * (pic16_allocDirReg): when register has storage class S_REGISTER
3865         allocate in pic16_dynAccessRegs,
3866         * device/include/pic16/pic18f????.h: modified configuration word
3867         naming convention, words started as CONFIG0H but should be CONFIG1H
3868
3869 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3870
3871         * device/include/mcs51reg.h: fixed bug 970993
3872
3873 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3874
3875         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3876         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3877         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3878         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3879         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3880         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3881           error/warning numbers,
3882           added function setWarningDisabled()
3883         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3884         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3885           _memcmp.c _memmove.c calloc.c realloc.c free.c
3886         * support/regression/tests/malloc.c: added tests for new functionality
3887         * support/regression/tests/zeropad.c: added tests for truncated initializers
3888           and initialized char arrays starting with '\x0'
3889         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3890
3891 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3892
3893         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3894
3895 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3896
3897         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3898         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3899         peephole 177.e. Thanks to anonymous
3900
3901 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3902
3903         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3904         function isn't used in the source but referenced as a
3905         variable initializer then declare it as extern in .asm file
3906
3907 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3908
3909         * .version: increased version number to 2.4.3
3910
3911         Adding version extension according to ChangeLog CVS revision
3912         * src/Makefile.in (target all): added dependency 'version.h'
3913         * (rule version.h): added rule to create version.h from ChangeLog,
3914         * (rule dep): added dependency version.h,
3915         * src/version.awk: AWK script to create version.h
3916         * src/SDCCdwarf2.c (dwWriteModule),
3917         * src/SDCCglue.c (initialComments),
3918         * src/SDCCmain.c (printVersionInfo): modified to write after
3919         version string the version extension number,
3920         * src/SDCCutil.c: included "version.h"
3921         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3922         number,
3923         * src/SDCCutil.h: added prototype for getBuildNumber
3924
3925         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3926         includeDirsSet, too,
3927         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3928         const char [] is found in function prototype...
3929
3930         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3931         moving to WREG with source is already in WREG,
3932         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3933         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3934         * (aopForSym): stack'ed symbols are partially supported, added
3935         if-clause to support symbols in FARSPACE,
3936         * (sameRegs): added test for AOP_ACC to see if registers are same,
3937         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3938         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3939         * (pic16_popRegFromString): will not allocate a new register if it
3940         doesn't find one by name, bug may have introduced...
3941         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3942         * (genIpush): revived to use pic16 port's stack,
3943         * (genAddrOf): added incomplete case for stack'ed operand,
3944         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3945         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3946         can handle multibyte operands,
3947         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3948         * (pic16initialComments): added message for MPLAB compatibility
3949         mode enabled,
3950         * src/pic16/main.h: prototype for pic16_mplab_comp,
3951         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3952         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3953         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3954         because of increased complexity of procedure,
3955         * (_process_pragma): stack pragma changed to format 'stack pos len',
3956         emit symbol '_stack_end' to conform with gplink,
3957         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3958         to search for register,
3959         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3960         PO_GPR_REGISTER,
3961         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3962         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3963         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3964         case for PO_GPR_REGISTER,
3965         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3966         dies, the new era is ahead !...
3967         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3968         pic16_dynInternalRegs,
3969         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3970         * (pic16_allocDirReg): minor optimizations and bug fixes,
3971         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3972
3973         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3974         load stack and frame pointer with address of 'stack_end' symbol
3975
3976 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3977
3978         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3979         without source code but only variable initializers
3980
3981 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3982
3983         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3984         external are not declared as extern to reduce overhead while linking
3985
3986 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3987
3988         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3989
3990 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3991
3992         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3993           Yee Keat for the patch
3994         * src/SDCCast.c (decorateType): fixed bug #979599
3995         * src/ds390/gen.h: removed local fReturnSizeDS390
3996         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3997         * src/ds390/gen.c (genAnd, genOr, genXor),
3998         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3999
4000 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4001
4002         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4003         add relFilesSet to $3, manipulate $2 to handle linking of object
4004         files without source files in command line,
4005         * device/include/pic16 (all headers): added ID location macros,
4006         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4007         entries for ID location bytes,
4008         * (pic16_assignIdByteValue): NEW,
4009         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4010         added field dumpcalltree to pic16_options_t,
4011         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4012         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4013         emitting rFalseIfx label after check_carry label,
4014         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4015         pic16_emitDIRegs), NEW
4016         * (pic16glue): dump .calltree file when option --calltree found,
4017         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4018         * (_pic16_genAssemblerPreamble): emit ID locations after
4019         configuration registers,
4020         * (pic16_linkCmd): modifications of the link command,
4021         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4022         * (pic16_pCodeInitRegisters): don't init stack registers,
4023         * (pic16_findPrevInstruction): fixed bug,
4024         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4025         bug with immediate registers,
4026         * (buildCallTree): traces stack push and pop,
4027         * (pct2): dump also stack usage for each function,
4028         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4029         * (pic16_allocDirReg): various modifications,
4030         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4031         fixed to 1,
4032
4033 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4034
4035         * src/pic16/pcode.c: removed buggy double colon
4036
4037 2004-07-01 Borut Razem <borut.razem AT siol.net>
4038
4039         * support/scripts/sdcc.nsi: added include/pic16 to setup
4040
4041 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4042
4043         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4044         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4045         target 'clean',
4046         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4047         specific command line arguments. Also added sample lkr script
4048         for placing a variable at a specific memory bank.
4049         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4050         at a specific memory bank,
4051         * (pic16_dump_isection): fixed bug which caused string literals to
4052         be omitted when dumping idata section,
4053         * (pic16_groupRegistersInSection): added code to handle registers
4054         in specific memory banks,
4055         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4056         public, all references are renamed too,
4057         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4058         AOP_DPTR2,
4059         * (pic16_storeForReturn): added case to handle when dest is WREG,
4060         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4061         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4062         pic16_rel_udata, check to see if that register is marked as being
4063         a member of a specific memory bank,
4064         * (pic16_printIvalCharPtr): added code to add string literals either
4065         to code or the idata sections,
4066         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4067         also accept the 'udata' pragma,
4068         * src/pic16/main.h: new structure types sectName and sectSym
4069         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4070         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4071         * (pic16_findPrevInstruction): fixed, it returned nothing,
4072         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4073         instruction combinations,
4074         * (pic16_FixRegisterBanking): heavily reorganised,
4075         * (pic16_AnalyzeBanking): if generating banksel directives is
4076         disabled, then don't call FixRegisterBanking at all,
4077         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4078         completely removed,
4079         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4080
4081 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4082
4083         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4084         Phuah Yee Keat <yk.phuah AT nestac.com>
4085
4086 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4087
4088         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4089         correctly the IVT even if it is relocated to some other location
4090
4091 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4092
4093         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4094         * device/include/pic16/pic18f2220.h: NEW,
4095         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4096         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4097         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4098         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4099         nodefaultlibs, ivt_loc is the location of the interrupt vector
4100         table, and nodefaultlibs signs that default libraries should not be
4101         linked in link stage,
4102         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4103         according to --ivt-loc argument,
4104         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4105         when pragma stack is found,
4106
4107 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4108
4109         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4110         256 (range check), 257 (do while), 258.a-f (bit banging
4111         f.e. on 3-wire SPI bus)
4112
4113 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4114
4115         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4116         variables used exclusively within a loop
4117
4118 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4119
4120         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4121
4122 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4123
4124         * src/SDCClrange.c (computeClash): fixed bug #971834
4125
4126 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4127
4128         * src/mcs51/gen.c (genCmp): fixed bug #975903
4129         * src/hc08/gen.c (operandsEqu),
4130         * src/ds390/gen.c (operandsEqu),
4131         * src/z80/gen.c (operandsEqu),
4132         * src/pic/gen.c (operandsEqu),
4133         * src/pic16/gen.c (operandsEqu),
4134         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4135         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4136
4137 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4138
4139         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4140
4141 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4142
4143         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4144         default case in switch statement,
4145         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4146         to eliminate problem with initialisation of pointers, but problem
4147         still exists,
4148         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4149         * (emitStaticSegment): removed various lines emitting debug info,
4150         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4151         added processor registers for utilizing EEPROM,
4152         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4153         configurable and set 8
4154
4155 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4156
4157         * .version: increased version number to 2.4.2,
4158
4159         Cumulative patch for pic16 port
4160         * src/pic16/device.c: changed scheme to dump initial values for
4161         variables in idata segment, all print_idata* functions were removed,
4162         now the pic16_printIval* will be called,
4163         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4164         * _pic16_printPointerType, pic16_printPointerType,
4165         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4166         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4167         NEW, similar to the respective functions in SDCCglue.c,
4168         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4169         way, emitting hex bytes,
4170         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4171
4172 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4173
4174         * src/avr/ralloc.c (serialRegAssign),
4175         * src/xa51/ralloc.c (serialRegAssign),
4176         * src/pic/ralloc.c (serialRegAssign),
4177         * src/pic16/ralloc.c (serialRegAssign),
4178         * src/hc08/ralloc.c (serialRegAssign),
4179         * src/z80/ralloc.c (serialRegAssign),
4180         * src/ds390/ralloc.c (serialRegAssign),
4181         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4182
4183 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4184
4185         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4186         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4187
4188 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4189
4190         Cumulative patch for pic16 port:
4191         * src/pic16/device.h (typedef PIC16_device) modified fields for
4192         defining microcontrollers,
4193         * src/pic16/device.c: added new info for all devices in Pics16 array,
4194         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4195         to be optimised out by the pCode optimiser,
4196         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4197         specially, bug reported by G.M. Gallant,
4198         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4199         as force'd so that cannot be optimised out by pCode optimiser,
4200         * src/pic16/pcode.c,
4201         * src/pic16/pcodepeeph.c,
4202         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4203         they are disabled by default, but can be enabled explicit with
4204         command argument --denable-peeps, for testing,
4205         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4206         --pomit-ivt in COMPILE_FLAGS
4207
4208 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4209
4210         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4211           compilation on MSVC
4212
4213 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4214
4215         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4216
4217 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4218
4219         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4220         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4221
4222 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4223
4224         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4225         would only assign 0x300001 register.
4226
4227 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4228
4229         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4230         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4231
4232 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4233
4234         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4235         for ds80c400
4236         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4237         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4238         added peephole 254 (left shift), 255 (jump table)
4239
4240 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4241
4242         * device/lib/Makefile.in: removed comment line with model-pic16,
4243         * (target port-specific-objects-pic16): the libraries and objects
4244         are copied to the build directory form the device/lib/pic16/bin
4245         directory
4246
4247         Cumulative patch concerning pic16 port:
4248         * library directory has been re-organized,
4249         * added support for PIC18F1220,
4250         * added headers and library sources for chips 18f1220,18f6520,
4251         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4252
4253         * configuration registers setting has changed, now each supported
4254         device has a complete description of the registers it uses,
4255         * all initialisations are moved to idata sections, these section
4256         can be absolute or relocatable,
4257         * fixed initialisation of codespace variables,
4258         * fixed warning about PCLATU and gpsim,
4259         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4260         * (genAssign): use table reads when assigning from variables in codespace,
4261         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4262         char/int variables placed in codespace,
4263         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4264         registers set in .asm file, no need for --pomit-config-words anymore,
4265         * (pic16glue): some 8051 legacy segments are commented out
4266         (to be removed completely),
4267         * added support for alternative assembler and linker with --asm=
4268         and --link= command line arguments,
4269         * peepholes are disabled automatically in the port, no need to
4270         specify on command line,
4271         * port supports natively char/int/long multiplication, but converts
4272         all divisions to support functions,
4273         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4274         to the file set in variable $2,
4275         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4276         strings in ASCII format and not in hex,
4277         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4278         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4279         allocate proper register if iCodes aren't temporary,
4280
4281 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4282
4283         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4284
4285 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4286
4287         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4288         is commented out
4289
4290 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4291
4292         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4293         computed address is reused
4294         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4295         multi-byte bitfields
4296
4297 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4298
4299         * src/z80/gen.c: (genArrayInit): must check for pointers too
4300
4301 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4302
4303         * support/regression/tests/zeropad.c: never meant to commit the
4304           nestedstruct test: removed, added check for GCC version
4305
4306 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4307
4308         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4309         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4310         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4311           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4312           bugs 928906 and 954082 half-empty initializers
4313         * src/SDCCsymt.h,
4314         * src/SDCCsymt.c (getAllocSize): added for above fix
4315         * src/z80/gen.c (genArrayInit): fixed bug 741044
4316         * support/regression/tests/zeropad.c: added tests
4317
4318 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4319
4320         * src/pic16/device.c (pic16_dump_section): corrected bug which
4321         caused some symbols of the libraries to be misplaced
4322
4323 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4324
4325         * src/pic16/glue.c,
4326         * src/pic16/ralloc.h,
4327         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4328         to fix conflict with pic port
4329
4330 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4331
4332         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4333         externs configuration variables,
4334         * src/pic16/ralloc.h,
4335         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4336         prototype in header, commented out some debug messages
4337
4338 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4339
4340         * src/pic16/glue.c,
4341         * src/pic16/main.c,
4342         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4343         for gpasm COFF object generation. Thanks to D. Hawkins for
4344         his patch info
4345
4346 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4347
4348         * src/ds390/main.c,
4349         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4350         Brock for spotting this)
4351         * src/ds390/gen.c (genEndFunction),
4352         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4353         interrupt handler and critical. Disable push/pop optimizations when
4354         peephole optimizations disabled.
4355
4356 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4357
4358         Updated pic16 library sources and headers.
4359         * device/lib/pic16/pic18f*/ ,
4360         * device/include/pic16/*.h: modified to handle structured SFR
4361         definitions
4362
4363 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4364
4365         * src/port.h (PORT structure): added hook initPaths, now each
4366         port can declare its own default search paths,
4367         which can been seen with the --print-search-dirs option,
4368         see pic16 port for example,
4369         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4370         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4371         * (doPrintSearchDirs): NEW, replaces in a central manner the
4372         printing of search dirs which was split in set*Paths functions,
4373         * (main): added call to port->initPaths and doPrintSearchDirs,
4374         * src/avr/main.c,
4375         * src/ds390/main.c,
4376         * src/hc08/main.c,
4377         * src/izt/i186.c,
4378         * src/izt/tlcs900h.c,
4379         * src/mcs51/main.c,
4380         * src/pic/main.c,
4381         * src/pic16/main.c: modified port structures to reflect addition of
4382         initPaths hook,
4383
4384         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4385         * (pic16_dump_section): for registers in same address reserve memory once,
4386         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4387         to no_banksel,
4388         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4389         result is greater in size than right or left,
4390         * (pic16_genUMult8X8_8): there are some cases where the result can
4391         be 16 bits size, so handle these,
4392         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4393         * (pic16_outBitC): modified to emit pcodes,
4394         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4395         or not,
4396         * (genDivOneByte): implemented algorithm to divide 8-bits,
4397         * (genCmp): uncommented goto, but issues still exist,
4398         * (genAnd): fixed a bug with variables >8bits,
4399         * (genPackBits): optimization added that uses BCF/BSF to change a
4400         single bit,
4401         * (genAssign): fixed bug when assigning floating point literals,
4402         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4403         __sdcc_gsinit_startup label,
4404         * src/pic16/main.c (_pic16_init): removed search directory
4405         initialisations,
4406         * (_pic16_initPaths): NEW, used to initialise search directories,
4407         * (_hasNativeMulFor): support functions for all except char/int
4408         multiplication, and char division,
4409         * (PIC16_port struct): modified entry for native mul support,
4410         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4411         no_banksel option,
4412         * (buildCallTree): call to register_usage is ifdef'ed out,
4413
4414 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4415
4416         * device/include/string.h: applied Stas Sergeev's patch to make this
4417         header file compatible with the preprocessor -Wundef option
4418         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4419         failure (fixes bug #941458)
4420
4421 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4422
4423         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4424         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4425         that the variable, not the function, should be static
4426         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4427         to be consistent with non-literal case
4428
4429 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4430
4431         * src/SDCCast.c (isConformingBody): fixed bug #949967
4432         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4433         convilong): fixed bug #952086
4434
4435 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4436
4437         * src/SDCCmem.c (allocVariables): fixed bug #955321
4438
4439 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4440
4441         * src/hc08/main.c (_hc08_genAssemblerEnd),
4442         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4443         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4444         completely eliminated the use of a temporary file
4445         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4446         when more than one file linked
4447         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4448
4449 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4450
4451         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4452         which fixes bug #543481
4453         * support/regression/tests/bug-751703.c: fixed comments left from a
4454         cut and paste error
4455         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4456         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4457         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4458         scopes
4459         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4460         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4461         are now changed to underscores in moduleName
4462
4463 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4464
4465         * as/mcs51/lkmem.c: better fix for bug #954173
4466
4467 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4468         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4469
4470         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4471         * device/include/c8051f000.h,
4472         * device/include/c8051f120.h,
4473         * device/include/c8051f300.h,
4474         * device/include/c8051f310.h,
4475         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4476         PWM16) and detab'ed
4477
4478 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4479
4480         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4481         and mailing lists, doc'ed --no-peep-comments, removed reference
4482         to knoppix (newest version has no LyX/LaTeX), other minor changes
4483         * src/SDCCglue.c (glue): save 2 bytes stack space with
4484         option --main-return. The ljmp could probably be avoided too
4485
4486 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4487
4488         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4489
4490 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4491
4492         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4493         * src/SDCCopt.c (isLocalWithoutDef),
4494         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4495         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4496         (credit to Maarten Brock for patch #949363, on which this is based)
4497         * support/regression/tests/bug-751703.c: some test cases of extern used
4498         within inner scopes.
4499
4500 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4501
4502         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4503         SPEC_STRUCT
4504         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4505         struct definitions
4506         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4507         dwWriteLabel): fix to create valid debugger symbols even when
4508         the module name has non-alphanumeric symbols in it
4509         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4510         when a variable's allocation has been optimized away
4511
4512
4513 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4514
4515         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4516         * src/hc08/main.c,
4517         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4518         * src/mcs51/main.c,
4519         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4520         * src/ds390/main.c,
4521         * src/z80/gen.c (z80_emitDebuggerSymbol),
4522         * src/z80/main.c,
4523         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4524         * src/pic/main.c,
4525         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4526         * src/pic16/main.c,
4527         * src/avr/gen.c (avr_emitDebuggerSymbol),
4528         * src/avr/main.c,
4529         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4530         * src/xa51/main.c,
4531         * src/SDCCdebug.c (emitDebuggerSymbol),
4532         * src/SDCCdebug.h,
4533         * src/port.h: added a debugger struct to the port struct. Added a
4534         callback for defining debugger symbols
4535
4536         * src/SDCCast.c (createLabel),
4537         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4538         with isitmp = 1
4539         * src/SDCCicode.h,
4540         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4541         iCode back to the ast for the function
4542
4543         * src/hc08/ralloc.c (hc08_assignRegisters),
4544         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4545         unneeded fields from the regs struct.
4546         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4547         pushReg() & pullReg() functions instead of emitcode()
4548
4549         * src/hc08/gen.c (genLabel, genhc08Code),
4550         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4551
4552         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4553         debugger hooks
4554
4555         * src/hc08/gen.c (genEndFunction, genhc08Code),
4556         * src/hc08/gen.h,
4557         * src/mcs51/gen.c (genEndFunction, gen51Code),
4558         * src/mcs51/gen.h,
4559         * src/ds390/gen.c (genEndFunction, gen390Code),
4560         * src/ds390/gen.h,
4561         * src/z80/gen.c (genEndFunction, genZ80Code),
4562         * src/z80/gen.h,
4563         * src/z80/z80.h,
4564         * src/pic/gen.c (genEndFunction, genpic14Code),
4565         * src/pic/gen.h,
4566         * src/pic16/gen.c (genEndFunction, genpic16Code),
4567         * src/pic16/gen.h,
4568         * src/avr/gen.c (genEndFunction, genAVRCode),
4569         * src/avr/gen.h,
4570         * src/xa51/gen.c (genEndFunction, genXA51Code),
4571         * src/xa51/gen.h,
4572         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4573         specific code to cdbFile.c and out of the backend code generators
4574
4575         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4576         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4577         starting address is now 0
4578
4579         * as/hc08/asm.h,
4580         * as/hc08/m08pst.c,
4581         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4582         assembler directive for DWARF support
4583         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4584
4585         * src/src.dsp,
4586         * src/Makefile.in,
4587         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4588
4589 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4590
4591         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4592         and inappropriate peephole optimization in jump tables
4593
4594 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4595
4596         * as/hc08/m08pst.c,
4597         * src/SDCCglue.c: sdccopt works for the hc08 port now
4598
4599 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4600
4601         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4602
4603 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4604
4605         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4606
4607 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4608
4609         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4610         rules
4611         * src/SDCCmain.c,
4612         * src/SDCCglobl.h,
4613         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4614         comments from the peephole optimizer replacement rules
4615         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4616         symbols
4617         * src/SDCCcse.c (updateSpillLocation),
4618         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4619         equivalents
4620         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4621         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4622         objects far pointers
4623
4624 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4625
4626         * src/SDCCsymt.h: a missing part of my last change
4627         * src/pic/ralloc.c (regTypeNum),
4628         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4629
4630 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4631
4632         * src/SDCCicode.h,
4633         * src/SDCCicode.c (aggrToPtrDclType),
4634         * src/SDCCptropt.h,
4635         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4636         ptrPseudoSymConvert),
4637         * src/pic/ralloc.c (regTypeNum),
4638         * src/pic16/ralloc.c (regTypeNum),
4639         * src/hc08/ralloc.c (regTypeNum),
4640         * src/ds390/ralloc.c (regTypeNum),
4641         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4642         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4643
4644 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4645
4646         * link/z80/lkmain.c (afile),
4647         * as/hc08/lkmain.c (afile),
4648         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4649         prevent a pointer problem when a filename has no directory and
4650         no extension specified.
4651
4652 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4653
4654         * link/z80/lkmain.c (afile): allow periods in directory names
4655         * link/z80/lkmain.c (afile),
4656         * as/mcs51/lkmain.c (afile),
4657         * as/hc08/lkmain.c (afile): allow linker script file to have an
4658         extension other than ".lnk"
4659         * link/z80/lklex.c (getfid),
4660         * link/z80/lkmain.c (parse),
4661         * as/mcs51/lklex.c (getfid),
4662         * as/mcs51/lkmain.c (parse),
4663         * as/hc08/lklex.c (getfid),
4664         * as/hc08/lkmain.c (parse): Support comments in the linker script
4665         file on lines by themselves and after filenames
4666
4667 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4668
4669         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4670
4671 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4672
4673         * src/z80/peeph-z80.def: removed some peephole rules that don't
4674         work with multibyte arithmetic (fixed bug #937126)
4675         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4676         to registers and not global variables
4677         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4678         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4679         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4680         checking for assignments not internally generated (fixed bug #931895)
4681         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4682         structure member (fixed bug #930072)
4683
4684 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4685
4686         * src/SDCCmain.c (linkEdit),
4687         * src/hc08/main.c (_hc08_parseOptions),
4688         * as/hc08/Makefile.in,
4689         * as/hc08/aslink.h,
4690         * as/hc08/asm.h,
4691         * as/hc08/m08pst.c,
4692         * as/hc08/lkrloc.c (relr, rele),
4693         * as/hc08/lkarea.c (lnkarea)
4694         * as/hc08/lkmain.c (afile, parse),
4695         * as/hc08/lkelf.c: support for ELF output
4696         * as/hc08/lks19.c (s19),
4697         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4698
4699 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4700
4701         * as/mcs51/lkihx.c: Fixed bug #899105.
4702
4703 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4704
4705         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4706         .dsp files from Unix to DOS.
4707
4708 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4709
4710         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4711         function pointers; we have been compliant for several months now.
4712         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4713         change that was accidently commented out
4714         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4715         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4716         bug #922319
4717
4718 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4719
4720         * src/hc08/gen.c: output of all of the internal debugging information
4721         is now controlled by the D() macro; it is disabled by default
4722
4723 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4724
4725         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4726         harder to keep the same registers during a CAST iCode
4727         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4728         long via int can be done in a single cast, if the signedness is
4729         correct.
4730         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4731         putchar() in tinibios.c in ds390's library
4732
4733 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4734
4735         * src/SDCCast.c (decorateType): fixed bug #898889,
4736         cast result of a literal complement too
4737         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4738         fixed check for bitfields
4739
4740 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4741
4742         * src/SDCCicode.c (geniCodeLogic): made it static,
4743         (geniCodeLogicAndOr): added in order to fix bug #905492,
4744         (ast2iCode): fixed bug #905492
4745         * support/regression/tests/bug-905492.c: added
4746         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4747         (processParms): fixed bug #927659: don't copy parms, this will clear
4748         decorated flag
4749         * support/regression/tests/bug-927659.c: added
4750
4751 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4752
4753         * src/SDCCast.c (addCast): don't cast float to char
4754         * device/lib/libsdcc.lib: added _memmove
4755
4756 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4757
4758         * device/lib/large/Makefile: fixed parallel execution by
4759         replacing `make` by `$(MAKE)`
4760
4761 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4762
4763         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4764         offsets (fixes bug #923936)
4765
4766 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4767
4768         * device/lib/small/Makefile: fixed parallel execution by
4769         replacing `make` by `$(MAKE)`
4770
4771 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4772
4773         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4774
4775 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4776
4777         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4778         * src/regression/Makefile: Regression test was not running.
4779
4780 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4781
4782         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4783         complement if possible
4784         * src/SDCCval.c (valComplement),
4785         * src/SDCCicode.c (operandOperation): fixed complement of literal
4786         * support/regression/tests/onebyte.c (testComplement): added
4787
4788 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4789
4790         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4791         return an optimized tree; actually replace actParm with the new tree
4792         * src/SDCCast.h: added some parantheses to remove side effects
4793         * support/regression/tests/bug-920866.c
4794
4795 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4796         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4797         Bit operands were not being handled properly in the pic14 port.
4798         (now src/regression/add.c passes again).
4799
4800 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4801
4802         * src/SDCC.y (labeled_statement): case and default no longer require
4803         a following statement (RFE #893037)
4804
4805 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4806
4807         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4808         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4809         disabled (fixes bug #916294)
4810         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4811         "mov a,acc"; patch provided by Lenny Story
4812         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4813
4814 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4815
4816         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4817         functions
4818         * src/ds390/gen.c (genFunction, genEndFunction),
4819         * src/ds390/ralloc.c (ds390_assignRegisters),
4820         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4821         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4822         pushed if there are parameters passed on the stack. Also, a cleaner
4823         way to decide if r0/r1 should be pushed/popped. (Together they fix
4824         bug #918693)
4825
4826 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4827
4828         * doc/sdccman.lyx,
4829         * device/lib/mcs51/crtpagesfr.asm,
4830         * device/lib/mcs51/crtxinit.asm,
4831         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4832         to avoid confusion with Si Lab's SFRPAGE register.
4833
4834 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4835
4836         * src/SDCCglue.c (emitMaps): allow public sfr variables
4837         * src/SDCCglue.c (initialComments): include compiler build date
4838         with compiler version and put the timestamp of the generated
4839         assembly file on a serperate line to be less confusing.
4840         * src/port.h: added genInitStartup hook
4841         * src/avr/main.c,
4842         * src/ds390/main.c,
4843         * src/hc08/main.c,
4844         * src/pic/main.c,
4845         * src/pic16/main.c,
4846         * src/xa51/main.c,
4847         * src/z80/main.c: genInitStartup initialize as NULL (default to
4848         historical behaviour)
4849         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4850         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4851         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4852         library instead of hard coding it into the compiler.
4853         * support/regression/ports/mcs51-stack-auto/spec.mk,
4854         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4855         * device/lib/mcs51/Makefile,
4856         * device/lib/small/Makefile,
4857         * device/lib/large/Makefile,
4858         * device/lib/mcs51/crtpagesfr.asm,
4859         * device/lib/mcs51/crtstart.asm,
4860         * device/lib/mcs51/crtxclear.asm,
4861         * device/lib/mcs51/crtxinit.asm,
4862         * device/lib/mcs51/crtclear.asm,
4863         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4864         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4865         and into user configurable files.
4866         * device/lib/clean.mk: clean mcs51 directory too
4867         * support/regression/tests/longlit.c: added static to T1 declaration
4868         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4869         accesses in the initialization code
4870
4871 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4872
4873         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4874         OSCTRIMVAL as noted in bug #916008
4875
4876 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4877
4878         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4879         in loops with multiple exits (reported as incorrect registers
4880         used by Martin Helmling in Sdcc-user list)
4881
4882 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4883
4884         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4885         made ds390 register extensions look less like error messages
4886
4887 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4888
4889         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4890         reported by Adam Wozniak in Sdcc-user list
4891
4892 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4893
4894         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4895         arithmetic optimizations, added debug output
4896
4897 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4898
4899         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4900         * sdcc.spec: updated and split sdcc into 3 rpms
4901         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4902         needed for literals of LEFT_OP and '+'
4903         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4904         introduced RESULT_TYPE_NOPROM
4905         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4906         left shift
4907         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4908         limited promotion to int only for '*'
4909         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4910
4911 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4912
4913         * src/pic16/gen.c (genSkip),
4914         (genc16bit2lit), (gencjneshort): commented out
4915         (is_LitOp): new helper function, checks operand type
4916         (genCmpEq): rewritten
4917
4918 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4919
4920         * support/regression/tests/bug-908454.c: added
4921
4922 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4923
4924         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4925         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4926         (geniCodeCast): cosmetic, don't preserve bit storage class
4927         (geniCodeLeftShift): added promotion
4928         (geniCodeLogic): fixed regression
4929         * src/SDCCsymt.c (computeTypeOr): accept bits too
4930         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4931
4932 2004-03-07  Borut Razem <borut.razem AT siol.net>
4933
4934         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4935
4936 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4937
4938         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4939         version of pic16_genPackRegisters which does not check if ic is a
4940         CAST operator,
4941         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4942         function cause string1.c regression test fails
4943
4944 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4945
4946         * sim/ucsim/configure.in,
4947         * sim/ucsim/configure,
4948         * sim/ucsim/doc/Makefile.in: use docdir
4949         * src/SDCC.y: fixed sbit atrributes
4950         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4951         * src/SDCCast.c (decorateType): |^& need special promotion handling
4952         * src/SDCCast.h,
4953         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4954         * src/SDCCsymt.h (computeType),
4955         * src/SDCCicode.c: computeType() needs op
4956         * src/SDCCsymt.c (checkTypeSanity),
4957         * doc/sddman.lyx: "plain" bitfields are unsigned
4958         * src/SDCCsymt.c (computeTypeOr): added
4959         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4960         |^& ops
4961         * src/SDCCval.c (val*): computeType() needs op
4962         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4963         * support/regression/tests/onebyte.c: added tests for |^&
4964
4965 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4966
4967         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4968         for writing icode into asm output.
4969
4970 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4971
4972         * src/pic16/device.c: added some debug lines enabled
4973         with macro DEBUG_CHECK,
4974         * src/pic16/genarith.c: more debug in genPlus,
4975         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4976         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4977         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4978         * (aopForSym): onStack symbols are re-placed in data memspace,
4979         and onStack flag is cleared,
4980         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4981         copy temporary pcodeop,
4982         * (genPcall): added warning for not updating PCLATU,
4983         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4984         always true for pic16 port,
4985         * (genMultOneWord): NEW, supports integer multiplication,
4986         * (genMult): modified to call genMultOneWord,
4987         * (ifxForOp): added warning when return NULL,
4988         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4989         flag is set before call to operandFromSymbol for implicit
4990         added structures,
4991         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4992         options.intlong_rent are set by default,
4993         * (_hasNativeMulFor): modified to allow port generation of integer
4994         multiplication,
4995         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4996         set regtype to REG_SFR for all registers, restricting seting the
4997         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4998
4999 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5000
5001         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5002         more than 500 times in the regression tests
5003
5004 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5005
5006         * support/Util/SDCCerr.h,
5007         * support/Util/SDCCerr.c,
5008         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5009         enumerator_list),
5010         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5011         for symbol conflicts.
5012         * support/valdiags/tests/enum.c,
5013         * support/valdiags/tests/tentdecl.c,
5014         * support/valdiags/tests/struct.c: expect possible error messages
5015         referring to original symbol definitions.
5016         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5017         * src/SDCCsymt.h,
5018         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5019
5020 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5021
5022         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5023
5024 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5025
5026         * src/pic16/ralloc.c (newReg): fixed bug #908929
5027
5028 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5029
5030         * src/ds390/gen.c: added missing #include "main.h"
5031
5032 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5033
5034         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5035         checking if symbol is already in set,
5036         * src/pic16/device.h: prototype for checkAddSym,
5037         * src/pic16/gen.c: (_G): added entry interruptvector,
5038         * (assignResultValue): removed some commented out lines,
5039         * (genFunction): check for ISR via sym->type, absolute section for
5040         interrupt code is created via a new pBlock, the goto instruction is
5041         placed now correctly at the interrupt vector position, changed all
5042         references from ivec to _G.interruptvector,
5043         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5044         is the interrupt is a high priority one, same for return from ISR,
5045         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5046         externs to calls of checkAddSym,
5047         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5048         pic16_pcode_verbose flag is set,
5049         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5050         * src/pic16/pcoderegs.c: message about how many registers are saved
5051         will only be emitted if pic16_pcode_verbose flag is set,
5052
5053 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5054
5055         * src/ds390/ralloc.h,
5056         * src/ds390/ralloc.c (ds390_regWithIdx),
5057         * src/ds390/gen.c (emitcode),
5058         * src/ds390/main.h,
5059         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5060         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5061         ds390operandCompare, getRegsRead, getRegsWritten,
5062         initializeAsmLineNode): customized instruction size calculation for
5063         ds390, started basis for some register optimizations
5064         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5065         corresponding assembly output
5066         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5067         missing push/pop of r0/r1. Optimized push/pops
5068
5069 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5070
5071         * src/mcs51/main.c (instructionSize): fixed ACALL size
5072         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5073
5074 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5075
5076         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5077         the sorting of rlist with NULL elements
5078         * (print_idataType, print_idata): NEW to create idata sections
5079         * src/pic16/device.h: idataSymSet new variable
5080         * src/pic16/gen.c (genFunction): fixed some bugs in string
5081         comparing, improved the absolute section creation for ISRs,
5082         added FSR0L/FSR0H in registers that are saved in an ISR,
5083         * (genInline): fixed the processing of inline snippets,
5084         now they undergo no process by the peephole optimizer
5085         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5086         are placed in idataSymSet,
5087         * (pic16emitStaticSeg): extern symbols are added in externs,
5088         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5089         switching when aboslute variables are placed in access bank memory
5090         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5091         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5092         commented out with #if,
5093         * (pic16_packRegisters): reintroduce the check for CAST because some
5094         symbols are not correctly handled,
5095         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5096         pCodeInstruction instead of pCode,
5097         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5098         pCodeAsmDir definition,
5099         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5100         directive, then the argument directive is emitted without the leading
5101         tab, hack for inline labels which must be in the first column,
5102         * (compareLabel,pic16_findNextInstruction),
5103         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5104         * (insertBankSwitch): modified for the new pCodeAsmDir,
5105
5106 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5107         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5108
5109         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5110         instance,
5111         * (pushSide): commented out with #if,
5112         * (assignResultValue): fixed some typos in saving
5113         registers,
5114         * (genPcall): FIXED and sync'ed with genCall,
5115         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5116         * (genNearPointerGet): fixed to handle some more cases,
5117         implementation scheme via table reads,
5118         * (genConstPointerGet): modified to access code memory correct,
5119         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5120         and improved to handle some cases
5121         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5122         instead of "RETLW" for init data
5123         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5124         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5125         variables are placed in access bank memory (<0x80 and >=0xf80),
5126         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5127         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5128         TBLWT_POSTDEC,TBLWT_PREINC
5129         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5130         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5131         directives
5132         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5133         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5134         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5135         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5136
5137 2004-02-29  Borut Razem <borut.razem AT siol.net>
5138
5139         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5140         support/Util/findme.h, support/Util/system.h: enhance binary relative
5141         search for lib and include by using findProgramPath()
5142
5143 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5144
5145         * src/SDCCpeeph.h,
5146         * src/SDCCpeeph.c (pcDistance),
5147         * src/port.h,
5148         * src/mcs51/ralloc.h,
5149         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5150         * src/mcs51/main.h,
5151         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5152         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5153         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5154         size calculation port specific, started basis for some register
5155         optimizations
5156         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5157         missing push/pop of r0/r1. Optimized push/pops
5158         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5159         * device/lib/_modsint.c (_modsint),
5160         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5161         and stack version so regression tests pass
5162
5163 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5164
5165         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5166         * src/SDCCast.c (decorateType): catch another small optimization
5167         with '?' operator
5168         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5169         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5170         modified to finally use computeType() all over SDCC,
5171         see Feature Request #877103
5172         * src/SDCCval.h: cosmetic
5173         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5174         valCompare(); regression tested in muldiv.c
5175         * support/regression/tests/muldiv.c (testMod): mod sign follows
5176         dividend only
5177
5178 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5179
5180         * src/SDCCast.c (decorateType): fixed bug #902362
5181         * doc/INSTALL.txt: fixed install instructions for win32
5182
5183 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5184
5185         * device/include/Makefile.in (install): fixed by replacing spaces
5186         by tabs
5187         * doc/README.txt,
5188         * doc/INSTALL.txt: updated for release
5189         * doc/sdccman.lyx: added warning for --xstack being buggy
5190
5191 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5192
5193         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5194         to eliminate build warnings.
5195         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5196
5197 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5198            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5199
5200         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5201         removed -penable-stack, added comment for stack pragma, added
5202         warning for not initializing the stack/frame registers, removed
5203         comment at interrupts section
5204
5205         Stack is made permanent, there is no ability to disable stack usage.
5206         * src/pic16/device.h,
5207         * src/pic16/device.c: removed all references to USE_STACK macro,
5208         * src/pic16/device.c (pic16_dump_section): when no elements in
5209         rlist, free rlist before return,
5210         * (pic16_dump_int_registers): NEW, internal registers are a new set
5211         of general purpose registers reused by each function,
5212         * (checkAddReg): returns 1 if registers is added to set,
5213         * (pic16_groupRegistersInSection): when a registers is of type
5214         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5215         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5216         SRCASECMP macro is moved here from device.c
5217         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5218         PO_PCLATU, PO_PRODL, PO_PRODH,
5219         * (pic16_pCodeOpType, genMinus,
5220         changed compares to "a" register, with AOP_ACC,
5221         * (pic16_genPlus): fixed some bugs and indented properly,
5222         * (pic16_addSign): changed size to size+offset in the MOVWF
5223         instruction,
5224         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5225         multiply 8-bit operand by literal, result is 8-bit,
5226         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5227         multiply 2 8-bit operand, result is 8-bit,
5228         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5229         genUMult8X*_16,
5230         * src/pic16/gen.c: changed accUse to contain WREG only,
5231         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5232         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5233         true, do not use immediate addressing any more unless sym is a
5234         pointer in codespace,
5235         * (aopForRemat): do not use immediate addressing when symbol not in
5236         codespace and when symbol's address is requested,
5237         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5238         accUse size (= 1),
5239         * (aopGet): added case for AOP_ACC and don't return "accumulator
5240         bug" but WREG instead,
5241         * (popGetTempReg): pushes contents of temporary register in stack,
5242         * (popReleaseTempReg): pops contents of temporary register from
5243         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5244         * (pic16_popGet): separated case AOP_ACC to return register WREG
5245         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5246         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5247         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5248         the use of immediate pointers to certain cases only.
5249
5250         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5251         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5252         * (assignResultValue, genCall, genRet): modified to use the new
5253         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5254         genPcall is still broken,
5255         * (genFunction): added code to create 'A' type pBlocks when
5256         interrupt functions are generated, code not extensively tested yet,
5257         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5258         * (genEndFunction): modified so ISRs pop stored registers from stack,
5259         * (genMultOneByte): cleanup,
5260         * (AccRsh): added flag andmask, to and result with appropriate mask,
5261         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5262         * (genDataPointerGet): fixed and reenabled its use,
5263         * (genNearDataPointerGet): bugs fixed,
5264         * (genDataPointerSet): bugs fixed,
5265         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5266         pic16_DumpSymbol, pic16_DumpOp,
5267         * src/pic16/genutils.h: function prototypes for the above functions,
5268         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5269         pointers,
5270         * (pic16emitRegularMap): many many many improvements, but needs a
5271         major cleanup,
5272         * src/pic16/main.c: enable_stack in pic16_options is removed,
5273         * (_pic16_parseOptions): removed command line options -penable-stack,
5274         * (_process_pragma): emit stack symbol only when stack pragma is
5275         processed,
5276         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5277         redirected to FSR0L/FSR0H pair,
5278         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5279         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5280         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5281         for immediates,
5282         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5283         * (dumpPicOptype): NEW,
5284         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5285         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5286         with movff instruction,
5287         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5288         added pic16_int_regs, some packRegsFor* functions are commented out,
5289         because produce errors,
5290         * src/pic16/NOTES: minor modifications
5291
5292 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5293
5294         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5295         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5296         --pack-iram.
5297         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5298         * as/mcs51/lkaomf51.c: fixed bug #895763
5299
5300 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5301
5302         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5303
5304 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5305
5306         * doc/sdccman.lyx: added details about the HC08 storage classes and
5307         interrupts, fixed the register usage info for z80 & gbz80
5308
5309 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5310
5311         * doc/sdccman.lyx: added more pic16 port documentation
5312         * device/include/pic16/: added header pic18fregs.h
5313
5314 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5315
5316         * doc/sdccman.lyx: added Vangelis' contribution
5317
5318 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5319
5320         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5321         extend to the next CALL or PCALL, not just to the next CALL.
5322
5323 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5324
5325         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5326
5327 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5328
5329         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5330         bug #895752 and a better fix for bug #716790
5331
5332 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5335
5336 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5337
5338         * doc/sdccman.lyx: minor changes, minor changed
5339
5340 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5341
5342         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5343         which can't handle SDCC_NEWONEBYTEOPS,
5344         (geniCodeMultiply): removed conversion from mult to shift for pic14
5345         and pic16
5346
5347 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5348
5349         * src/hc08/gen.h,
5350         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5351         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5352         thus fixing bug #895406
5353
5354 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5355
5356         * device/lib/_modsint.c,
5357         * device/lib/_modslong.c: sign follows divisor only
5358         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5359         signs or signedness can be ignored
5360         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5361         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5362         added optimization for IFX,
5363         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5364         arguments;
5365         reenabled optimization for IFX, which was removed on 2004-01-11
5366         * src/SDCCast.h: added return type IFX
5367         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5368         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5369         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5370         SDCC_OLDONEBYTEOPS selects the old behaviour
5371         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5372         changed again and commented promotion rule
5373         * src/SDCCval.c (valDiv): promotion no longer necessary
5374         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5375         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5376         rewritten
5377         * support/regression/tests/onebyte.c: added
5378
5379 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5380
5381         * gen.c (genInline): reverted to old code for assemnling inline
5382         code because of bug reported James Chadd
5383
5384 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5385
5386         * ralloc.h: missing declarations from previous patch,
5387         seems that patch for ralloc.h was never applied, fixed
5388
5389 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5390            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5391
5392         * pcode.c,
5393         * pcode.h,
5394         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5395         indirect addressing. Marked FSR0 as deprecated
5396         * gen.c (pointerCode): commented out, not needed now
5397         (pic16_popGet2p): new MOVFF helper function
5398         (genGenPointerGet),
5399         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5400         (shiftRLong): removed duplicate debugging info
5401
5402 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5403
5404         * src/ds390/gen.c (genNearPointerGet),
5405         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5406         optimization with bits, but not bitfields.
5407         * src/ds390/ralloc.c (packRegisters),
5408         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5409
5410 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5411
5412         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5413
5414 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5415
5416         * src/SDCCsymt.h,
5417         * src/SDCCicode.c (operandFromSymbol),
5418         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5419         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5420         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5421         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5422         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5423         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5424         bug #892038
5425         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5426         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5427         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5428         * src/SDCCsymt.c (newSymbol),
5429         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5430         enumerator_list),
5431         * src/SDCCval.h,
5432         * src/SDCCval.c (newiList): fixed bug #885705
5433
5434 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5435
5436         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5437         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5438
5439 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5440
5441         * device/include/c8051f120.h,
5442         * device/include/c8051f300.h,
5443         * device/include/c8051f310.h: added/updated header files for Silicon
5444         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5445         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5446         in new section Submitting patches
5447
5448 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5449
5450         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5451         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5452         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5453         genGenPointerSet),
5454         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5455         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5456         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5457         genGenPointerSet),
5458         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5459         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5460         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5461         genGenPointerSet),
5462         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5463         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5464         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5465         genGenPointerSet): fixed bug #892400
5466         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5467         to eliminate build warnings.
5468         * src/SDCCast.c (processParms),
5469         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5470         fixed bug 751859
5471         * support/valdiag/valdiag.py: added GCC to the list of defines active
5472         when compiling with gcc
5473
5474 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5475
5476         * support/Util/SDCCerr.h,
5477         * support/Util/SDCCerr.c,
5478         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5479         with an incomplete type (fixed bug #883734)
5480         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5481
5482 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5483
5484         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5485
5486 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5487
5488         * src/SDCCast.c (decorateType),
5489         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5490         function pointer implementation
5491         * support/regression/tests/funptrs.c: added tests to verify both forms
5492         of function pointers work correctly. Added tests to verify parameters
5493         are passed in the correct order.
5494
5495 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5496
5497         * device.c (regCompare): registers are sorted by ascending
5498         address and increasing size,
5499         * main.c (_pic16_finaliseOptions): removed the declaration
5500         of compiler macro MCU. Now a macro of the format pic18fxxxx
5501         will be defined from the command line
5502
5503 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5504             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5505
5506         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5507         PCOP_RLCF was overwritten!
5508         * gen.c (genSkip): commented out calls to pic16_emitcode,
5509         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5510         * (genlshTwo),
5511         * (genRRC): added debugging info,
5512         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5513         overwritten while shifting,
5514         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5515         overwritten while shifting,
5516         * (AccLsh),
5517         * (AccRsh),
5518         * (shiftLLeftOrResult),
5519         * (shiftRLeftOrResult),
5520         * (shiftRLong),
5521         * (shiftLLong): Implemented with pic16_emitpcode
5522         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5523         * (genLeftShift): Fixed bug, operand for shift by variable always
5524         was "and"ed with 0x0f,
5525         * (genLeftShiftLiteral),
5526         * (genrshTwo),
5527         * (genRightShiftLiteral): added debugging info,
5528         * (genrshFour): added comment,
5529         * (genRightShift): determined signedness from operand "left"
5530         instead of "result"
5531
5532 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5533
5534         * src/SDCCicode.c (geniCodeParms),
5535         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5536         function pointers, fixed function pointer bugs #861242 and #861896
5537
5538 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5539
5540         * device/include/c8051f000.h,
5541         * device/include/c8051f120.h,
5542         * device/include/c8051f300.h: added header files for Silicon
5543         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5544
5545 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5546
5547         * src/SDCCast.c (processParams): added new type flow and restructured
5548         (gatherAutoInit): added new type flow
5549         (addCast): cosmetic changes
5550         (getLeftResultType): added new type flow for array indices, patch
5551         provided by Stas, see FR #877103
5552         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5553         array index patch by Stas
5554         * src/SDCCast.h: added prototype getResultTypeFromType()
5555         * src/SDCCval.h,
5556         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5557         * src/pic/glue.c (pic14emitStaticSeg),
5558         * src/pic16/glue.c (pic16emitStaticSeg),
5559         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5560         for initialization of symbols
5561         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5562         * support/Util/SDCCerr.h:
5563         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5564         * .version: bumped version number to 2.3.8
5565         * device/include/Makefile.in (install),
5566         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5567         avoid warnings
5568
5569 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5570
5571         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5572         Slade Rich fixed an optimization bug
5573         * src/pic/pcodepeep.c,
5574         * src/pic/pcoderegs.c
5575         * doc/Makefile (install): added test for directory
5576
5577 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5578
5579         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5580         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5581         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5582         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5583         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5584         * as/mcs51/asexpr.c (term),
5585         * as/hc08/asexpr.c (term): fixed bug #887146
5586
5587 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5588
5589         * src/z80/gen.c (genMult): handle single byte result product
5590         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5591         DUMMY_READ_VOLATILE (fixed bug #886367)
5592
5593 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5594
5595         * support/regression/tests/libmullong.c: fixed logic, on little endian
5596         hosts we ended without a mullong_wrapper()
5597
5598 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5599
5600         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5601         virus/worm forged address usage.
5602
5603 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5604
5605         Fixed promotion, it should be done on AST level:
5606         * src/SDCCast.c (addCast): added promotion to int
5607         (decorateType): updated call to upCast()
5608         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5609         usualUnaryConversions()
5610
5611 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5612
5613         * support/regression/tests/literalop.c (mulWrapper): Added a
5614         wrapper to remove integer overflow warnings.
5615
5616         * support/regression/tests/float_trans.c: Made work on host.
5617
5618         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5619         location of sz80.
5620
5621         * support/regression/generate-cases.py (main): Changed from inline
5622         to a main method.
5623
5624         * doc/Makefile (install): Changed to depth first to get rid of
5625         missing directory install warning.
5626
5627         * as/Makefile (install-doc): Made work on Mac.
5628
5629 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5630
5631         * src/SDCCast.c: added an additional type flow in decorateType() of
5632         opposite direction, see feature request #860006; it's enabled at runtime
5633         by setting the environment variable SDCC_NEWTYPEFLOW
5634         * src/SDCCast.h: changed prototype of decorateType()
5635         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5636         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5637         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5638         see feature request #877103
5639         * src/SDCCval.c: updated call of decorateType()
5640         (valBitwise): fixed bug #882876
5641         (valMinus): added promotion
5642         (valLogicAndOr): result is unsigned
5643         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5644         * src/SDCCsymt.c (computeType),
5645         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5646         must not cause an unsigned operation
5647         * src/pic/glue (pic14emitRegularMap),
5648         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5649
5650 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5651
5652         * src/pic/pcode.c (PCodeID): commented out left over debug code
5653
5654 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5655
5656         * support/valdiag/tests/overflow.c: added shift tests
5657         * src/pic/device.c,
5658         * src/pic/gen.c,
5659         * src/pic/gen.h,
5660         * src/pic/glue.c,
5661         * src/pic/main.c,
5662         * src/pic/pcode.c,
5663         * src/pic/pcode.h,
5664         * src/pic/pcodepeep.c,
5665         * src/pic/pcoderegs.c,
5666         * src/pic/ralloc.c,
5667         * src/pic/ralloc.h: applied patch from Slade Rich;
5668         added support for multiple code pages and multiple RAM banks on the
5669         PIC 14 port. The ASM files now no longer simply assume all the
5670         code / RAM are in the same page / bank. This means the linker can
5671         safely allocate code/RAM of separate ASM files to different pages/banks.
5672         * doc/sdccman.lyx: added Slade's tips
5673         * src/mcs51/peeph.def: fixed bug #880768
5674
5675 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5676
5677         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5678         * src/SDCCast.c (decorateType): fixed bug #880197
5679
5680 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5681
5682         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5683         getopt.h.
5684
5685         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5686         strtof is not part of C89 and isn't included with Mac OS X.
5687
5688 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5689
5690         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5691         shiftL2Left2Result): fixed bug #879326
5692         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5693         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5694         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5695         address fetch for clr instruction
5696         * device/lib/hc08/_mulint.c: created optimized assembly version
5697         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5698
5699 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5700
5701         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5702         proposed in FR #877103
5703
5704 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5705
5706         * src/SDCCval.c (cheapestVal): added missing checks
5707         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5708         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5709
5710 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5711
5712         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5713         equal operands
5714
5715 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5716
5717         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5718         loaded with the linker search paths (-L arguments) and the libraries
5719         to be linked with the current source (-l arguments). Changes
5720         currently will affect only the pic16 port.
5721         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5722         include path the port specific paths and port specific libraries,
5723         * gplink command now contains the $3 argument,
5724         * src/pic16/device.h,
5725         * src/pic16/device.c,: structure PIC_device is made public and
5726         renamed to PIC16_device, the same for variable Pics which is renamed
5727         to Pics16. Updated all references to them.
5728         * src/pic16/glue.c (pic16glue): corrected bug with code
5729         initialization which bypassed the variable initializations block.
5730
5731         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5732         COMPILE_FLAGS and added the --nostdinc option
5733
5734 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5735
5736         * device/include/mc68hc908jb8.h: Register defs for another member
5737         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5738
5739 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5740
5741         Documenting changes from previous commits.
5742         * configure.in (version 1.56),
5743         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5744         when generating output files to configure the pic16 library,
5745         but now I've commented it out, since gputils aren't installed in the
5746         SF compile farm, so library won't compile
5747
5748         * device/lib/Makefile.in (version 1.56): initially I've added in
5749         target 'all' the prerequestive 'model-pic16' so it compiled the
5750         pic16 library, but now I've commented it out for the same reasons
5751         above,
5752         * added targets 'model-pic16' and 'objects-pic16' to compile the
5753         library
5754         * added target 'port-specific-objects-pic16' to handle the
5755         generated libraries and copy them into the build/ directory
5756         * added target 'clean-intermediate-pic16' to clean intermediate
5757         files into pic16 directory
5758         * in target 'installdirs' added line to create directory pic16 in
5759         the installation path
5760
5761         * device/include/Makefile.in (version 1.11): in target 'install'
5762         added lines to copy all header files to installation path,
5763         * in target 'installdirs' added line create directory for pic16
5764         headers in the installation path
5765
5766 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5767
5768         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5769          a function call
5770
5771 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5772
5773         * configure,
5774         * device/lib/configure.in,
5775         * device/lib/configure: fixed for autoconf 2.57
5776
5777 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5778
5779         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5780         option so that it actually works. Made it specific to the z80, since
5781         the gbz80 doesn't have these kinds of I/O ports.
5782
5783 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5784
5785         * device/include/z180.h,
5786         * device/lib/_memcpy.c,
5787         * device/lib/_memmove.c,
5788         * device/lib/_mulint.c,
5789         * device/lib/ser_ir.c,
5790         * device/lib/ser_ir_cts_rts.c,
5791         * device/lib/_strcmp.c,
5792         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5793         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5794         portmode; added deprecation warning for bank= and protmode= forms.
5795         Also, guard against buffer overflow.
5796         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5797
5798 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5799
5800         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5801         changed interrupt vector table generation to only emit declared vectors.
5802         * device/include/Makefile.in: added missing backslash
5803         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5804
5805 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5806
5807         Mainly changes to support compilation of the device libraries
5808         * src/pic16/device.c: stack is allocated via symbol and not
5809         via literal number. The symbol is placed in the corresponding
5810         position of the data ram
5811         * (pic16_dump_section): relocatable and absolute uninitialized
5812         data are now emitted in sorted order to reduce section naming,
5813         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5814         weren't marked as being in the access bank,
5815
5816 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5817
5818         Added portion of GNU PIC Library under the directory
5819         device/include/pic16 and device/lib/pic16. These files
5820         contain the declarations of SFRs for the PIC18Fxx2 devices.
5821         The directory is initialized via configure from toplevel.
5822
5823 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5824
5825         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5826         the spilllocations to be compared correctly
5827
5828 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5829
5830         * src/SDCCast.c (decorateType): fixed bug introduced today
5831
5832 2004-01-12  Borut Razem <borut.razem AT siol.net>
5833
5834         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5835         doc/sdccman.lyx: upper case pragmas are deprecated
5836
5837 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5838
5839         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5840         in simpler and even better code
5841
5842 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5843
5844         * src/SDCCicode.c (operandOperation): fixed bug #874819
5845         * src/SDCCast.c (decorateType): fixed
5846         char foo (unsigned long ul) { return ul > 0; }
5847
5848 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5849
5850         * doc/sdccman.lyx: Moved and added some sections, small changes
5851         all over. Telling LaTeX to be less strict with word spacing
5852         to better keep the right margin. Changed some notes about
5853         maintainance of the ports in section 3.2.1 - is it OK like this?
5854
5855 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5856
5857         SDCC source changes:
5858         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5859         convilong): modified to inform the pic16 port that builtin functions
5860         are external
5861
5862         PIC16 PORT specific changes:
5863         * src/pic16/device.c pic16_dump_equates() added,
5864         processor registers declared internally by the port are emitted in
5865         the translation as equates,
5866         * src/pic16/gen.c: inline code is passed unprocessed to the
5867         translation,
5868         * (pic16_popGetLit2): fnuction modified to take second operand as
5869         pCodeOp pointer and not as literal,
5870         * (popRegFromIdx): prefixed with pic16_,
5871         * (pic16_popCombine2): modified to receive already allocated pCode
5872         operands,
5873         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5874         * (genFunction): initializes local stack frame and pushes on stack
5875         all the registers used by this function,
5876         * (genEndFunction): restores all registers from stack and restores
5877         stack frame,
5878         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5879         improvements,
5880         * (pic16glue): changed the program startup sequence,
5881         * added new dbName code 'A' for functions placed in absolute section
5882         * src/pic16/main.c: added function attribute _naked,
5883         * added pragma 'code' to place a fnuction at an absolute address,
5884         * added command line arguments --debug-ralloc and --pcode-verbose,
5885         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5886         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5887         * (pic16_newpCodeOpLit2): modified to take the second operand as
5888         pCodeOp pointer,
5889         * (pic16_printpBlock): modified to emit each function in a separate
5890         section,
5891         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5892         UPPER for immediate operands,
5893         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5894         instruction,
5895         * src/pic16/peeph.def: all peepholes with movff are commented out,
5896         because there is a problem in the pcode peep optimizer,
5897         * src/pic16/ralloc.c: the register allocator can now reuse local
5898         function symbols for another function. This saves register usage.
5899         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5900
5901         Added file src/pic16/NOTES with information about program writing on
5902         the current port version.
5903
5904 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5905
5906         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5907         and peephole 252 (array access)
5908
5909 2004-01-09  Borut Razem <borut.razem AT siol.net>
5910
5911         * src/SDCCmain.c : fixed #872250: -l command line defined library
5912           files are scanned before standard library files
5913
5914 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5915
5916         * src/SDCCast.c (decorateType): fixed bug #874046
5917
5918 2004-01-09  Borut Razem <borut.razem AT siol.net>
5919
5920         * support/scripts/sdcc.nsi: remove previous installation
5921
5922 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5923
5924         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5925         bytes for last interrupt vector (mcs51)
5926         * sdcc.spec: fixed typo
5927
5928 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5929
5930         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5931         gen51Code): more efficient parameter receive for --model-large
5932         ("bug" #845294)
5933
5934 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5935
5936         * src/ds390/main.c,
5937         * src/z80/main.c: added missed needLinkerScript flags (more than
5938         one port structure defined in these file)
5939         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5940         bug #795325
5941
5942 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5943
5944         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5945         * src/port.h: added flag needLinkerScript in port->linker
5946         structure to inform whether to create a .lnk file or not,
5947         * src/avr/main.c,
5948         * src/ds390/main.c,
5949         * src/hc08/main.c,
5950         * src/mcs51/main.c,
5951         * src/pic/main.c,
5952         * src/pic16/main.c,
5953         * src/xa51/main.c,
5954         * src/z80/main.c: changed appropriately to configure
5955         needLinkerScript flag
5956         * src/pic/gen.c,
5957         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5958         * src/pic/glue.c: added variable udata_section_name to
5959         override default uninitialized data segment definition for
5960         devices only with SHAREBANK memory (reported from Erik Epetrich)
5961         * (pic14emitOverlay): modified to emit a commented overlay segment
5962         directive when no overlay data exist
5963         * (picglue): modified to emit uninitialized data segment
5964         according to udata_section_name
5965         * src/pic/main.c (_pic14_parseOptions): added command line
5966         options --udata-section-name=[name] to override default
5967         udata definition name
5968         * modified _linkCmd and _asmCmd to include compiler passed
5969         arguments via -W option
5970         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5971         object file from '.rel' to '.o' in port->linker structure,
5972         changed size of fptr from 2 to 3 in port structure
5973
5974 2004-01-07  Borut Razem <borut.razem AT siol.net>
5975
5976         * support/scripts/sdcc.nsi: update PATH
5977         * support/scripts/sdcc.ico: craeted
5978
5979 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5980
5981         * device/include/Makefile.in: fix install
5982         * doc/Makefile: fix install
5983
5984 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5985
5986         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5987         in bug #860505
5988         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5989         how the function variable allocation summary is displayed; also
5990         include information about variables allocated to the overlay
5991         segment
5992
5993 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5994
5995         * as/mcs51/lkmain.c: Help about -Y option
5996         * as/mcs51/lkarea.c: Fixed gcc warnings
5997
5998 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5999
6000         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6001         fixed warning
6002         * support/valdiag/tests/overflow.c: added
6003         * src/SDCCast.c (decorateType),
6004         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6005         LEFT_OP (left shift)
6006
6007 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6008
6009         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6010         (default behaviour).
6011
6012 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6013
6014         A python script to validate compiler diagnostic messages. It can be
6015         used to verify that sdcc complains about bad c source code and
6016         gives a good location of the error.
6017         * support/valdiag/Makefile,
6018         * support/valdiag/valdiag.py,
6019         * support/valdiag/tests/*
6020
6021 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6022
6023         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6024         * src/SDCCsymt.c (newEnumType),
6025         * src/SDCCsymt.h
6026         * support/Util/SDCCerr.c,
6027         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6028         enum related bugs.
6029         * support/regression/tests/enum.c: added test for enum values that
6030         require at least 2 bytes of storage.
6031
6032 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6033
6034         * src/common.h: added ifndef/define/endif macros
6035         around the header file.
6036         Bug reported from Jesus Calvino-Fraga
6037
6038 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6039
6040         * sdcc.spec: updated
6041         * device/include/Makefile.in: don't install CVS directories
6042         * device/lib/Makefile.in: added removal of CVS directories after install
6043         * doc/Makefile: fixed install, added local_icons
6044         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6045         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6046         * src/ds390/gen.c (genRightShift): fixed bug #870788
6047         * src/SDCCast.c (decorateType): fixed bug #870781
6048
6049 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6050
6051         PIC16 port related changes:
6052         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6053         added variable stackPos,
6054
6055         * gen.c: genCall, assignResultValue: added support for
6056         pushing/retrieving function parameters to/from stack,
6057         genFunction,genEndFunction: setup stack frame for the
6058         generated function,
6059         genAddrOf: will be changed according to bug 863624
6060
6061         * added files genutils.c and genutils.h which contain gen*
6062         debugged and optimised functions extracted from gen.c
6063
6064         * glue.c: added variable 'externs' which holds extern symbols,
6065         pic16emitRegularMap: is modified to properly handle relocatable
6066          symbols under the new scheme,
6067         pic16createInterruptVect: is modified
6068         pic16printPublics: is modified to emit 'global' assembler directives,
6069         added pic16_printExterns to print extern symbols,
6070         pic16glue: initializes stack/frame pointer in the beginning of
6071         the assembly output. Temporary hack, will be corrected later,
6072         because gplink yet does not support stack and SDCC does not
6073         yet support a type of crt0.o object to create the final binary.
6074
6075         * Removed many lines that contain 8051 legacy code.
6076         * The code is finally placed under a 'code' directive.
6077         * Added port specific options.
6078
6079         * _process_pragma: simplified since now we do not need *special*
6080         include file to define SFR registers. But a separate header
6081         will be needed. This will be developed later.
6082         * _pic16_parseOptions: added, parses port specific options:
6083         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6084         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6085         --preplace-udata-with=
6086
6087         * _pic16_setDefaultOptions: modified to initialize section names,
6088         but hack is temporarly out of order since it needs improvement.
6089         * _pic16_genAssemblerPreamble: configuration words are emitted by
6090         their address instead of their name. This part is incomplete and
6091         supports only the 18Fxx2 devices. Other devices will emit an error
6092         during assembly since they do not contain the same set of config
6093         registers
6094         * _pic16_genIVT: is modified,
6095
6096         * pcode.c: added definitions for some hardware registers that are needed
6097         for stack support
6098         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6099         All PCI entries are updated. Now LFSR is supported.
6100         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6101         * added pic16_newpCodeOpLit2 to support instructions with
6102         two literal arguments
6103         * pic16_pCode2str: corrected code that emits assembler instructions
6104         with two literal operands and those that have an access bit modifier
6105         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6106         this fixes a bug which caused some labels to be lost, when an
6107         assembler directive was added, i.e. banksel,
6108         * pic16_FixRegisterBanking: improved logic that causes the insertion
6109         of bank switching,
6110         * InlineFunction: functions that are called once, are not any more
6111         inlined. This can be a port option in the future,
6112
6113         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6114
6115         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6116         hold the corresponding uninitialized symbols,
6117         * pic16_allocProcessorRegister: registers have explicit marked the
6118         accessBank field,
6119         * pic16_allocInternalRegister: registers are explicit marked as
6120         not used,
6121         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6122         processing list, so bit registers were lost,
6123         *
6124
6125         * ralloc.h: added field 'accessBank' and original symbol operand
6126         in register definition,
6127         * removed the field isMapped from register definition,
6128
6129         ** Several functions have been removed from various sources:
6130         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6131         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6132         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6133         pic16_assignRelocatableRegisters
6134
6135         ** others have been introduced:
6136         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6137         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6138
6139 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6140
6141         * support/scripts/inc2h.pl: changed definition of BIT_AT
6142         to emit 'sbit at' instead of 'bit at'. This was a request.
6143
6144         PIC16 port related preliminary changes:
6145         * gen.c: prefixed function popRegFromString with
6146         pic16_ and all references to it corrected
6147         * pcode.c: all pic16_pc_* hardware registers prefixed
6148         with underscore (_),
6149         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6150         * ralloc.c: newReg(): when register is REG_SFR then
6151         set address to rIdx,
6152         pic16_allocProcessorRegister(): marks register wasUsed=0
6153         pic16_writeUsedRegs(): added a call to assign processor
6154         registers via pic16_assignFixedRegisters
6155
6156 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6157
6158         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6159         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6160         variables in unused register banks.  Also the SSEG is placed
6161         wherever there is enough space for it, and IDATA can be anywhere
6162         in internal RAM.  For now compile using -Wl-Y[stack_size].
6163         The mem file is different for this option as well, since it
6164         makes no sense of talking about DSEG lenght.
6165
6166 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6167
6168         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6169         in certain cases, e.g. when ROM assignment, patch provided
6170         from Albert den Haan.
6171
6172 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6173
6174         Many signedness and type propagation fixes:
6175         * src/SDCCicode.c: made geniCodeCast() static
6176         replaced SPEC_ by IS_ (cosmetic)
6177         (operandOperation): fixed div and mod operation
6178         (usualBinaryConversions): added support for promotion of char
6179         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6180         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6181         (geniCodeAdd): an array index will stay unsigned, even if promoted
6182         from char to int
6183         (geniCodeArray): ditto
6184         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6185         * src/SDCCsymt.c (computeType): added more support for char;
6186         promotion of char is selectable by promoteCharToInt, fixed signedness
6187         for all cases
6188         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6189         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6190         * src/SDCCval (val*): replaced signedness calculation by
6191         computeType()
6192         rearranged if-branches (cosmetic)
6193         (valShift): added warning W_SHIFT_CHANGED
6194         (valCompare): fixed problem with different types
6195         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6196         * support/regression/tests/literalop.c: added many cases
6197         * support/regression/tests/ast_constant_folding.c: changed finally to
6198         'unsigned int'
6199         * .version: new year, new version: 2.3.7
6200         * src/SDCCmain.c (main): applied patch #866468
6201         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6202         provided by Scott Bronson
6203         * doc/sdccman.lyx: updated documentation for sdcdb
6204         updated and added chapter tips
6205
6206 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6207
6208         * src/SDCCsymt.h: missing from yesterday's commits
6209
6210 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6211
6212         * src/SDCC.y (struct_or_union_specifier),
6213         * support/Util/SDCCerr.c,
6214         * support/Util/SDCCerr.h: verify that struct & union tags are used
6215         as declared.
6216
6217 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6218
6219         * src/SDCCglobl.h: missing from yesterday's commits
6220
6221 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6222
6223         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6224         sft_attributes, struct_declaration, parameter_declaration,
6225         type_name, start_block, declaration_list),
6226         * src/SDCC.lex (check_type): support redefinition of typedef names
6227
6228 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6229
6230         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6231         aligned xdata arrays. Erik helped me with the if clause.
6232
6233 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6234
6235         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6236         warning
6237
6238 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6239
6240         * src/SDCCast.h,
6241         * src/SDCCast.c (newAst_),
6242         * src/SDCCicode.h,
6243         * src/SDCCicode.c (ast2iCode, newiCode),
6244         * src/SDCCglobl.h,
6245         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6246         expr, statement, expression_statement, selection_statement,
6247         iteration_statement, expr_opt, jump_statement): foundation for tracking
6248         sequence points
6249         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6250         point code too)
6251
6252 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6253
6254         * support/Util/SDCCerr.c,
6255         * src/SDCCast.h,
6256         * src/SDCCast.c (createCase, createDefault, decorateType),
6257         * src/SDCClabel.c (labelUnreach),
6258         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6259         to error messages.
6260         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6261         (with thanks to Stas Sergeev)
6262         * device/include/time.h,
6263         * device/lib/time.c (CheckTime): suppress unreachable code warning
6264
6265 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6266
6267         * src/SDCCast.c (createIvalCharPtr),
6268         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6269         bug #753752)
6270         * support/regression/tests/nullstring.c: tests for these two bugs
6271
6272 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6273
6274         * support/Util/SDCCerr.h,
6275         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6276         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6277         about storage class and 'at' used inside struct or union
6278         * src/SDCCBBlock.c (iCodeFromeBBlock),
6279         * src/SDCCcse.c (ifxOptimize),
6280         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6281         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6282         printIval, emitStaticSeg, emitOverlay),
6283         * src/SDCClabel.c (deleteIfx),
6284         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6285         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6286         gatherAutoInit, processParms),
6287         * support/Util/SDCCerr.h,
6288         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6289         reporting for post-parse errors.
6290
6291 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6292
6293         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6294         implicit casts via union; they don't work on big endian systems
6295         (possible fix for bug #861138)
6296
6297 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6298
6299         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6300         * src/mcs51/main.c: fixed the fix for bug #737001
6301
6302 2003-12-15  Borut Razem <borut.razem AT siol.net>
6303
6304         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6305
6306 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6307
6308         * support/makebin/makebin.c: put output in binary mode
6309
6310 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6311
6312         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6313         xdata and data memory on startup. Set the environment variable
6314         SDCC_NOGENRAMCLEAR to disable this.
6315         * src/mcs51/peephole.def,
6316         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6317         (allows non-interrupt and interrupt code to safely compete for a resource
6318         without the non-interrupt code having to disable interrupts)
6319
6320 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6321
6322         * src/SDCCicode.c (geniCodeAdd),
6323         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6324         with valFromType if type might be a pointer and host is big endian).
6325         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6326         types, not just integer types.
6327         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6328         multiply defined with mismatching "at" address.
6329
6330 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6331
6332         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6333         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6334         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6335         with embedded nulls (fixed bug #753752)
6336
6337 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6338
6339         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6340         Apparently this did not see much testing (endless loop)
6341
6342 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6343
6344         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6345
6346 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6347
6348         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6349         gracefully handle NULL memmap pointers
6350
6351 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6352
6353         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6354         instead of deleting the iCode when an operand is volatile
6355         * src/z80/gen.c (genDummyRead),
6356         * src/mcs51/gen.c (genDummyRead),
6357         * src/ds390/gen.c (genDummyRead),
6358         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6359         not just IC_RIGHT
6360         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6361         * src/SDCC.y: fixed bug #850420
6362
6363 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6364
6365         Applied z80 i/o port patch from Peter Townson and fixed some operators
6366         to better handle operands in A register.
6367         * device/include/z180.h
6368         * src/SDCC.y
6369         * src/SDCCglue.c
6370         * src/z80/gen.c
6371         * src/z80/gen.h
6372         * src/z80/main.c
6373         * src/z80/peeph-z80.def
6374         * src/z80/peeph.def
6375         * src/z80/z80.h
6376
6377 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6378
6379         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6380
6381 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6382
6383         * device/lib/hc08/_mullong.c: Removed extra #endif
6384
6385 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6386
6387         * sim/ucsim/hc08.src/inst.cc,
6388         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6389         carries from x to h
6390         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6391         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6392         * device/include/stdarg.h: fixed varargs for hc08
6393         * device/lib/Makefile.in,
6394         * device/lib/hc08/Makefile,
6395         * device/lib/hc08/_mulint.c,
6396         * device/lib/hc08/_mullong.c: fixed some endian problems
6397
6398 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6399
6400         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6401         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6402         * device/lib/_gptrget.c,
6403         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6404
6405 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6406
6407         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6408         * src/SDCCast.c (astErrors): fixed bug #846007
6409         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6410
6411 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6412
6413         * src/SDCCast.c (decorateType): disabled a transformation I added in
6414         revision 1.188 (access to fields of a structure at an absolute address);
6415         it breaks with bitfields, extern declarations, and gcse analysis.
6416         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6417         could be assigned through a pointer, so don't complain.
6418         * src/SDCCast.c (astErrors),
6419         * src/SDCCast.h,
6420         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6421
6422 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6423
6424         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6425         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6426         output of __config directives, since gpasm now supports them
6427         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6428         pre-processor macro, i.e. -DMCU=p18f452
6429         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6430         and modified to handle 'cast' icode similarly to '=' icode
6431         * src/pic16/device.h (typedef struct PIC_device): added field
6432         'extMIface' to indicate that chip has external memory interface
6433         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6434         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6435         18F8720
6436
6437 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6438
6439         * src/SDCC.y (pointer): fixed bug #846006
6440         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6441         * src/SDCCast.c (decorateType): fixed bug #846009
6442         * src/ds390/peeph.def,
6443         * src/ds390/gen.c (genAnd, genOr),
6444         * src/mcs51/peeph.def,
6445         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6446
6447 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6448
6449         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6450         * src/SDCCdflow.c
6451         * src/SDCCcse.c
6452         * src/SDCCcse.h
6453         * src/SDCCBBlock.h
6454         * src/SDCCBBlock.c
6455
6456 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6457
6458         fixed bug #845089
6459         * src/SDCCbitv.h,
6460         * src/SDCCbitv.c: added function to free a bitvector
6461         * src/SDCClrange.h,
6462         * src/SDCClrange.c: added function to recompute the liveranges
6463         * src/avr/ralloc.c,
6464         * src/ds390/ralloc.c,
6465         * src/hc08/ralloc.c,
6466         * src/mcs51/ralloc.c,
6467         * src/pic/ralloc.c,
6468         * src/pic16/ralloc.c,
6469         * src/xa51/ralloc.c,
6470         * src/z80/ralloc.c: recompute the liveranges after register packing
6471
6472 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6473
6474         * src/SDCCloop.c (newInduction): fixed bug #845630
6475
6476 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6477
6478         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6479         inadvertantly left behind from my 2003-11-12 change
6480
6481 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6482
6483         Updated headers I neglected to commit yesterday.
6484         * src/SDCClrange.h,
6485         * src/SDCCicode.h
6486
6487 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6488
6489         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6490         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6491         * src/SDCCopt.c (eBBlockFromiCode),
6492         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6493         the creation of the key hash table from the sequencing so it can be used
6494         earlier (for some GCSE bug fixes still pending)
6495
6496 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6497
6498         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6499         * support/regression/tests/addsub.c: testing genPlus shortcut
6500
6501 2003-11-15  Borut Razem <borut.razem AT siol.net>
6502
6503         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6504
6505 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6506
6507         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6508         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6509         ordering is immaterial.
6510         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6511
6512 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6513
6514         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6515         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6516         (SIGSEV) of bug #840381
6517         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6518         unlink new file before rename if new and old filenames are the same)
6519
6520 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6521
6522         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6523         uninitialized variables) for the mcs51. Set environment variable
6524         SDCC_GENRAMCLEAR to test.
6525         xdata initialization slightly shorter
6526
6527 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6528
6529         * src/SDCCsymt.h,
6530         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6531         #838241 & 780691 (basicly the same bug)
6532         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6533         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6534
6535 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6536
6537         * src/SDCCmain.c (linkEdit): "fix" #834252
6538
6539 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6540
6541         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6542         * src/SDCCast.h,
6543         * src/SDCC.y: fixed bug #819403
6544
6545 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6546
6547         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6548         the reentrant attribute.
6549         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6550         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6551         simulation
6552         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6553         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6554         erroneously reduced to a literal.
6555         * src/hc08/ralloc.c (packRegisters, rematStr),
6556         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6557         some cases
6558
6559 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6560
6561         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6562         * doc/sdccman.lyx: changed from 'article' to 'book'
6563         * doc/Makefile: readded test_suite_spec and cdbfileformat
6564
6565 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6566
6567         * device/include/stdlib.h: include malloc.h to comply with ANSI
6568         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6569
6570 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6571
6572         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6573         * doc/clean.mk: also remove *.out files
6574         * doc/sdccman.lyx: some additions, larger top/bottom margins
6575
6576 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6577
6578         * src/SDCC.y: fixed bug #837365
6579         * support/regression/tests/bitopcse.c
6580         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6581         a symbol (might be valop instead)
6582         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6583         * device/lib/clean.mk: added hc08 to the cleaning list
6584
6585 2003-11-04  Borut Razem <borut.razem AT siol.net>
6586
6587         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6588           made 2003-11-04
6589         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6590           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6591           malloc is declared in standard stdlib.h
6592
6593 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6594
6595         * device/lib/hc08/Makefile: need to clean .rel not .o files
6596         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6597
6598 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6599
6600         * src/port.h,
6601         * src/hc08/main.c,
6602         * src/mcs51/main.c,
6603         * src/ds390/main.c,
6604         * src/z80/main.c,
6605         * src/avr/main.c,
6606         * src/pic/main.c,
6607         * src/pic16/main.c,
6608         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6609         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6610         tests (which uses the port's oclsExpense function)
6611         * src/SDCC.y,
6612         * src/SDCCast.c,
6613         * src/SDCCicode.c,
6614         * src/hc08/gen.c,
6615         * src/ds390/gen.c,
6616         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6617
6618 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6619
6620         * src/SDCCcse.c (ifxOptimize),
6621         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6622         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6623         deleting the IFX iCode.
6624         * src/hc08/ralloc.c: reduced unneeded slocs
6625         * src/hc08/gen.c: fixed bug in asmopToBoolean
6626
6627 2003-11-04  Borut Razem <borut.razem AT siol.net>
6628
6629         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6630           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6631           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6632           transferred to configure
6633
6634 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6635
6636         Use headers defined in the C[++] standards:
6637         * sim/ucsim/gui.src/serio.src/fileio.cc
6638         * sim/ucsim/gui.src/serio.src/frontend.cc
6639         * sim/ucsim/gui.src/serio.src/main.cc
6640         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6641         * support/Util/NewAlloc.c
6642         * as/hc08/lklibr.c
6643         * as/mcs51/lklibr.c
6644         * as/z80/aslist.c
6645         * as/z80/assym.c
6646
6647 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6648
6649         * Added MSVC projects for hc08 assembler and linker:
6650         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6651         /as/hc08/link_hc08.dsp
6652
6653 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6654
6655         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6656
6657 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6658
6659         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6660
6661 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6662
6663         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6664
6665 2003-10-31  Borut Razem <borut.razem AT siol.net>
6666
6667         * support/cpp2/cpplib.h,
6668           support/cpp2/cpplib.c,
6669           support/cpp2/cpplex.c,
6670           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6671           to switch _asm block preprocessing on / off. Default is
6672           #pragma preproc_asm +
6673
6674 2003-10-31  Borut Razem <borut.razem AT siol.net>
6675
6676         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6677           when outputting comment blocks (when executed with -C option) and
6678           _asm (SDCPP specific) blocks
6679
6680 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6681
6682         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6683
6684 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6685
6686         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6687
6688 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6689
6690         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6691         * src/SDCCast.c (decorateType): fixed bug #832664
6692
6693 2003-10-31  Borut Razem <borut.razem AT siol.net>
6694
6695         * support\cpp2\cpplex.c: fixed for SDCPP:
6696           comments(when executed with -C option) and _asm blocks
6697           were included even if they where in skipped #if block.
6698           Applied solution from GCC cpp 3.3.2
6699
6700 2003-10-31  Borut Razem <borut.razem AT siol.net>
6701
6702         * src/SDCC.lex: sdcc now understands both formats:
6703           '# <line_number> <file_name>' and
6704           '#line <line_number> <file_name>'
6705         * support/cpp2/cppmain.c: sdcpp now generates the standard
6706           '# <line_number> <file_name>' instead of former
6707           '#line <line_number> <file_name>'
6708
6709 2003-10-30  Borut Razem <borut.razem AT siol.net>
6710
6711         * support/cpp2/cpphash.h,
6712         * support/cpp2/cpplib.h
6713         * support/cpp2/cpplex.c,
6714         * support/cpp2/cppmain.c,
6715         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6716
6717 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6718
6719         Fixed a number of problems revealed by bug #827883.
6720         * src/SDCCloop.c (loopInvariants): Spill location of the
6721         result operand should be recomputed if extracted from
6722         a loop. Also, don't extract assignments of an iTemp
6723         from a literal.
6724         * src/SDCCast.c (isConformingBody): loop reversal should
6725         not occur if the control variable is involved with a
6726         relational operator.
6727
6728 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6729
6730         * .version: bumped to 2.3.6 to reflect the big improvements
6731         made by Erik and Klaus. Thanks!
6732
6733 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6734
6735         Replaced the livrange code.
6736         * src/SDCClrange.c: added new LR code
6737         * src/SDCCloop.c,
6738         * src/SDCCBBlock.h: removed remainig parts from old LR code
6739         * src/ds390/ralloc.c,
6740         * src/ds390/gen.c: minor fixes to make it work with new code
6741
6742 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6743
6744         * as/hc08/asm.h,
6745         * as/hc08/lkrloc.c,
6746         * src/hc08/gen.c,
6747         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6748         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6749         (tweaked fix for bug #818696)
6750
6751 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6752
6753         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6754
6755 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6756
6757         * src/SDCCmain.c,
6758         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6759         * src/mcs51/gen.c (gencjneshort),
6760         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6761         more efficient (per Scott Bronson's suggestion)
6762
6763 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6764
6765         Extended the semantics of the critical keyword to include
6766         individual statements. See RFE #827755 and #799831
6767         * src/SDCC.y
6768         * src/SDCCicode.c
6769         * src/SDCCopt.c
6770         * src/SDCCast.c
6771         * support/Util/SDCCerr.c
6772         * support/Util/SDCCerr.h
6773         * src/mcs51/gen.c
6774         * src/ds390/gen.c
6775         * src/hc08/gen.c
6776
6777 2003-10-19  Borut Razem <borut.razem AT siol.net>
6778
6779         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6780
6781 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6782
6783         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6784         Fixed bug #818696
6785         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6786         and predecrement operand is displayed
6787
6788 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6789
6790         * src/SDCCval.c (valMinus): fixed bug #826041
6791
6792 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6793
6794         Some hc08 related updates that I missed earlier
6795         * sim/ucsim/stypes.h
6796         * support/regression/ports/hc08/spec.mk
6797
6798 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6799
6800         New target "hc08" for the Motorola 68hc08 family of micros
6801
6802         * configure
6803         * configure.in
6804         * Makefile
6805         * src/hc08/*
6806         * src/SDCCmain.c
6807         * src/port.h
6808         * sim/ucsim/hc08.src/*
6809         * sim/ucsim/configure.in
6810         * src/ucsim/configure
6811         * sim/ucsim/packages_in.mk
6812         * as/hc08/*
6813         * as/Makefile
6814         * device/include/mc68hc908qy.h
6815         * device/lib/hc08/*
6816         * device/lib/Makefile.in
6817         * support/regression/ports/hc08/*
6818         * support/regression/Makefile
6819
6820 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6821
6822         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6823         regression test
6824         * src/ds390/gen.c (genCast): fixed bug #821957
6825
6826 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6827
6828         * device/lib/logf.c: "fixed" overlay bug
6829         * support/regression/ports/host/spec.mk: added m library
6830         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6831         * support/regression/tests/float_trans: added (for Eric)
6832
6833 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6834
6835         * src/mcs51/gen.c (genCpl): fixed bug
6836         http://sf.net/mailarchive/message.php?msg_id=6263915
6837
6838 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * src/SDCCast.c (decorateType): added extended constant folding
6841         * src/SDCCsymt.c (computeType): cleanup
6842         * src/SDCCval.c (valShift): minor optimization
6843         * support/regression/tests/ast_constant_folding.c: added
6844
6845 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6846
6847         * src/SDCCmain.c: removed some unintended changes
6848
6849 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6850
6851         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6852         * src/z80/gen.c: fixed part of bug #817589
6853         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6854
6855 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6856
6857         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6858         * src/SDCCcflow.c
6859         * src/SDCCcse.c
6860         * src/SDCCdflow.c
6861         * src/SDCClabel.c
6862         * src/SDCClrange.c
6863         * src/SDCCmem.c
6864         * src/SDCCopt.c
6865         * src/SDCCpeeph.c
6866         * src/SDCCset.c
6867         * src/avr/ralloc.c
6868         * src/ds390/ralloc.c
6869         * src/izt/ralloc.c
6870         * src/mcs51/ralloc.c
6871         * src/pic/ralloc.c
6872         * src/pic16/ralloc.c
6873         * src/xa51/ralloc.c
6874         * src/z80/ralloc.c
6875         * src/z80/gen.c: removed unused label "release:"
6876
6877 2003-10-06  Borut Razem <borut.razem AT siol.net>
6878
6879         * src/SDCC.lex: removed definition of unused variables
6880           save_optimize and save_options
6881
6882 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6883
6884         * clean.mk: removed '=' in "-maxdepth=1"
6885         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6886         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6887
6888 2003-10-06  Borut Razem <borut.razem AT siol.net>
6889
6890         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6891           my_unput() replaced by unput()
6892
6893 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6894
6895         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6896         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6897         type-punned pointer will break strict-aliasing rules"
6898         Old LR behaviour is again default; Klaus' LR can be choosen by
6899         defining the environment variable LRKLAUS
6900         * src/SDCCBBlock.h
6901         * src/SDCCloop.c
6902         * src/SDCClrange.c
6903         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6904         * clean.mk: fixed removal of files in bin/CVS/
6905         * device/lib/clean.mk: fixed removal of directories small and large
6906         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6907         * src/SDCCicode.c,
6908         * src/SDCCval.c: removed superflous test for pedantic
6909
6910 2003-10-05  Borut Razem <borut.razem AT siol.net>
6911
6912         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6913           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6914           message "unmatched #pragma SAVE and #pragma RESTORE"
6915
6916 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6917
6918         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6919           assembly, critical functions, atomic, nojtbound)
6920
6921 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6922
6923         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6924         * src/SDCCBBlock.h
6925         * src/SDCCloop.c
6926         * src/SDCCloop.h
6927         * src/SDCClrange.c
6928
6929 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6930
6931         * src/z80/gen.h,
6932         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6933         * src/mcs51/gen.h
6934         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6935         * src/ds390/gen.h
6936         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6937         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6938         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6939
6940 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6941
6942         * src/z80/gen.c (genRet): fixed bug #524753
6943         * src/z80/gen.c (genCast): fixed internal error on cast from
6944         pointer to long
6945         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6946         fix for bug #477835 to the z80
6947         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6948         for tracking iCodes in the peephole optimizer for z80
6949
6950 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6951
6952         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6953         the other part of bug #814548
6954         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6955
6956 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6957
6958         * src/SDCCcse.c: fixed part of bug #814548
6959
6960 2003-09-28  Borut Razem <borut.razem AT siol.net>
6961
6962         * src/asm.c: rewrite of printILine() to use temporary file instead
6963           a pipe
6964         * src/xa51/main.c: commented out declaration of int rewinds
6965
6966 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6967
6968         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6969
6970 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6971
6972         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6973         * src/asm.c (printILine): Fixed bug #811015
6974
6975 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6976
6977         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6978         freeing.
6979
6980 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6981
6982         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6983         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6984         to correctly handle general case of AOP_PAIRPTR
6985         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6986
6987 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6988
6989         * src/mcs51/ralloc.c (fillGaps),
6990         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6991         register positioning bug)
6992
6993 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6994
6995         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6996
6997 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6998
6999         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7000         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7001         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7002         (ralloc doesn't intentionally do this now, but perhaps later)
7003         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7004         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7005         register positioning bugs (Fixed bug #762602 and #795325)
7006         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7007         (Fixed bug #808779)
7008         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7009         lines that --i-code-in-asm generates
7010
7011 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7012
7013         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7014         trying to fclose a FILE* that was already closed.
7015
7016 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7017
7018         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7019         of const struct should be treated as if const themselves)
7020
7021 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7022
7023         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7024
7025 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7026
7027         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7028         Unix (/n) and DOS (/r/n) line terminations.
7029
7030 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7031
7032         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7033         bug #613775
7034
7035 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7036
7037         * src/mcs51/gen.c (genFunction, genEndFunction),
7038         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7039         and restore of EA so that stack offsets to parameters are
7040         correct when using both critical and reentrant/stack-auto.
7041         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7042         size (can be triggered in error if sloc is shared between
7043         different sized objects)
7044         * device/include/float.h: fixed macros to explicitly use
7045         unsigned long where needed
7046
7047 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7048
7049         Feature req. 799831: added code to allow nesting of critical functions
7050         * src/mcs51/gen.c (genFunction, genEndFunction)
7051         * src/ds390/gen.c (genFunction, genEndFunction)
7052
7053 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7054
7055         * src/SDCCsymt.c (sclsFromPtr),
7056         * src/SDCCsymt.h,
7057         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7058         support for standard C idiom of memory mapped variables; for
7059         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7060         to xdata int at 0x1234 tempvar = 1.
7061         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7062         provided by Akiya ISHIDA
7063
7064 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7065
7066         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7067         * src/SDCCval.c (constVal): added reduction from int to char
7068         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7069         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7070         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7071         to ignore the sign
7072         * support/regression/tests/shifts.c: fixed
7073
7074 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7075
7076         * src/z80/gen.c (genXor): Fixed bug #805445
7077
7078 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7079
7080         Fixed bug #621531 (const & volatile confusion in the type chain).
7081         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7082         refer to the const or volatile state of the pointer itself.
7083
7084         * src/SDCCast.c
7085         * src/SDCCglue.c
7086         * src/SDCCicode.c
7087         * src/SDCCsymt.c
7088         * src/SDCCval.c
7089         * src/SDCC.y
7090         * src/SDCCsymt.h
7091         * src/pic/gen.c
7092         * src/pic/ralloc.c
7093         * src/pic16/gen.c
7094         * src/pic16/ralloc.c
7095         * support/regression/tests/const.c
7096
7097 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7098
7099         When checking for duplicated modules, use absolute paths
7100         instead of relative paths.  Files changed:
7101
7102         * as/mcs51/lklib.c
7103         * link/z80/lklib.c
7104
7105 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7106
7107         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7108
7109 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7110
7111         * device/include/string.h: added size_t typedef, changed
7112         prototypes to use size_t, eliminated separate reentrant and
7113         non-reentrant declarations, added _memmove declaration
7114         * device/lib/_memcpy.c: changed to use size_t instead of int,
7115         changed /4 to >>2 to avoid division library call
7116         * device/lib/_memcmp.c,
7117         * device/lib/_memset.c,
7118         * device/lib/_strncat.c,
7119         * device/lib/_strncpy.c,
7120         * device/lib/_strncmp.c: changed to use size_t instead of int
7121         * device/lib/_memmove.c: new file (fixed bug #772294)
7122         * device/lib/Makefile.in: added _memmove.c
7123         * device/lib/z80/asm_strings.s: fixed bug #772290
7124         * support/regression/tests/bitfields.c: attempt to fix host assertion
7125         failure on amd64-unknown-linux2.2
7126
7127 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7128
7129         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7130         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7131         * as/z80/asmain.c (main): fixed bug #801766
7132
7133 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7134
7135         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7136         compilers
7137
7138 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7139
7140         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7141         reported in bug #800609
7142
7143 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7144
7145         * Top header beautifications in src/pic16 directory:
7146           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7147           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7148           pcoderegs.h, ralloc.c, ralloc.h
7149         * main.c: added top header and GPL license notice
7150         * pcode.c: fixed the if-conditional warning
7151
7152 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7153
7154         * device/lib/_mullong.c: replaced int by short for gcc
7155
7156 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7157
7158         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7159         and JUMPTABLE iCodes properly now (worked by accident before)
7160         * src/mcs51/gen.c (leftRightUseAcc),
7161         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7162         iCode properly now. Use getSize instead of nRegs since a & b
7163         aren't part of the nRegs tally.
7164
7165 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7166
7167         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7168         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7169           before instructions that use the _STATUS register
7170
7171 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7172
7173         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7174         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7175         fetching of the pointer
7176         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7177         copied from genNearPointerSet()
7178         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7179         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7180         If they pop r0/r1 they must be called in the opposite order than aopOp().
7181         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7182         (resp. --stack-auto), prepared for --xstack
7183
7184 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7185
7186         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7187
7188 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7189
7190         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7191         these ports have their own __sdcc_external_start()
7192
7193 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7194
7195         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7196         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7197         type for bits was changed. It resulted in bit variables becoming
7198         global, which is not permitted in PIC 14 assembly output.
7199
7200 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7201
7202         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7203
7204 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7205
7206         Z80 and MCS51 linkers complaint if a public symbol is defined
7207         in more than one library module:
7208
7209         * as/mcs51/lklib.c
7210         * link/z80/lklib.c
7211         * as/mcs51/Makefile.in
7212
7213 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7214
7215         A few small changes that speed up the peephole optimizer.
7216
7217         * src/SDCCpeeph.c
7218
7219 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7220
7221         Try to make the peephole optimizer smarter by maintaining
7222         an association between the assembly source code and the
7223         iCodes that originated them. Put this information to use
7224         with a new peephole rule condition "notVolatile" so that
7225         the rules can be aggressive yet still safe.
7226
7227         * src/SDCCpeeph.c
7228         * src/SDCCpeeph.h
7229         * src/mcs51/gen.c
7230         * src/mcs51/peeph.def
7231
7232 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7233
7234         Fixed bug #741761
7235
7236         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7237         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7238         if the left or right operand symbols have the accuse flag set.
7239
7240 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7241
7242         Changed the type of the result of the ! (NOT) operator to char;
7243         previously it returned the same type as the source. This allows
7244         us to eliminate all the genFloatNot functions (all of its target
7245         implementations were very buggy) since !float can use the same
7246         code as !long now.
7247
7248         * src/SDCCicode.c (ast2iCode): ! returns char
7249         * src/mcs51/gen.c (genNot, genNotFloat),
7250         * src/ds390/gen.c (genNot, genNotFloat),
7251         * src/z80/gen.c (genNot, genNotFloat),
7252         * src/pic/gen.c (genNot, genNotFloat),
7253         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7254
7255 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7256
7257         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7258         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7259            during interrupts. Ensure WSAVE is located at a shared bank address.
7260         2. Fixed page selection in some places
7261         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7262            the registers name strings.
7263         4. Fixed "signed / unsigned compare" compiler warnings.
7264         5. The PIC port manages its own allocation of the general purpose
7265            registers, but makes no attempt to reuse them. As a result when
7266            compiling it soon runs out of general purpose registers. Some
7267            additional code was added to the files pcode.c and device.c to walk
7268            through the function call tree and rename the registers so that they
7269            get reused.
7270
7271         * src/pic/device.c
7272         * src/pic/gen.c
7273         * src/pic/glue.c
7274         * src/pic/pcode.c
7275         * src/pic/pcode.h
7276         * src/pic/ralloc.c
7277         * src/pic/ralloc.h
7278         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7279         genPlus() & genMinus() when the result is the same as left or right
7280
7281 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7282
7283         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7284
7285 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7286
7287         Made bitfield a distinct type from bit so that bitfields
7288         convert as per ANSI C and bits retain their traditional
7289         boolean style behaviour. Implemented bitfield support in
7290         the z80 port.
7291
7292         * src/SDCCsymt.h,
7293         * src/SDCCsymt.c,
7294         * src/SDCCast.c,
7295         * src/cdbFile.c,
7296         * src/mcs51/gen.c,
7297         * src/ds390/gen.c: bit v bitfield split
7298         * src/z80/gen.c: New support for bitfields
7299         * support/regression/tests/bitfields.c: reenabled z80,
7300         added more tests
7301
7302 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7303
7304         Rules 246.x, 247.x relate to bitfields, the others speed up
7305         access to xdata mapped I/O devices.
7306
7307         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7308
7309 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7310
7311         Cleaned up genPackBits and genUnpackBits and added two helper
7312         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7313         for literal assignments in genPackBits (thanks to Frieder for
7314         reminding me).
7315
7316         * src/mcs51/gen.c
7317         * src/ds390/gen.c
7318
7319 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7320
7321         Fixed bug #748310 (pointer to function type mishandled when the
7322         function name is omitted). Also fixed a SIGSEGV when a function
7323         attribute (reentrant, etc) is used on a non-function or on a
7324         function but misplaced before the parameter list.
7325
7326         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7327         bug #748310
7328         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7329         * support/Util/SDCCerr.h,
7330         * support/Util/SDCCerr.c: Added func attr misuse error msg
7331
7332 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7333
7334         Fixed bug #787649 by anonymous
7335         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7336         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7337
7338 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7339
7340         Fixed numerous bitfield problems.
7341
7342         * src/SDCC.y: More bitfield related error checking
7343         * src/SDCCsymt.h,
7344         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7345         * support/Util/SDCCerr.h,
7346         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7347         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7348         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7349         * support/regression/tests/bitfields.c: tests added
7350
7351 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7352
7353         Made the constant following the "interrupt" keyword optional. If
7354         omitted, the function will not automatically be given an entry
7355         in the interrupt vector table (similar to #pragma NOIV, but
7356         less syntacticly kludgy). The interrupt number is also now
7357         range checked. Also fixed a bug in the high order bit example
7358         in the manual.
7359
7360         * src/SDCC.y
7361         * src/SDCCmem.c
7362         * src/SDCCglue.c
7363         * src/SDCCsymt.h
7364         * support/Util/SDCCerr.c
7365         * support/Util/SDCCerr.h
7366         * doc/sdccman.lyx
7367
7368 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7369
7370         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7371         * src/SDCCicode.c (operandOperation): rewritten some ops
7372         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7373         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7374         other type
7375         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7376         be re-activated by defining REDUCE_LITERALS)
7377         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7378         unsigned, but are signed by default
7379         * src/SDCCval.c (constVal): rearranged
7380         * src/SDCCval.c (valMod): preliminary fix
7381         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7382         * support/regression/literalop.c: added, work in progress
7383
7384 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7385
7386         Generate warnings for useless declarations like "char data;"
7387         that don't do what new users expect.
7388
7389         * src/SDCC.y
7390         * support/Util/SDCCerr.h
7391         * support/Util/SDCCerr.c
7392
7393 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7394
7395         * src/SDCCval.c (valMult): fix overflow detection of negative int
7396
7397 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7398
7399         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7400
7401         Changes to support big endian targets:
7402
7403         * src/ports.h
7404         * src/SDCCglue.c
7405         * src/avr/main.c
7406         * src/ds390/main.c
7407         * src/izt/i186.c
7408         * src/mcs51/main.c
7409         * src/pic/main.c
7410         * src/pic16/main.c
7411         * src/xa51/main.c
7412         * src/z80/main.c
7413
7414 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7415
7416         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7417         * device/lib/time.c: fixed warning "integer overflow in expression"
7418
7419 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7420
7421         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7422         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7423         constants are unsigned; added recognition of "u" flag for unsigned
7424         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7425         * src/SDCCval.c (valDiv, valMod): fixed signdness
7426         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7427         signedness of modulo, left and right shift
7428         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7429         * support/Util/SDCCerr.h: added warning W_INT_OVL
7430         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7431         * src/SDCCast.c (ast_print): improved output of constants
7432
7433 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7434
7435         Fixed some warnings when building with MSVC:
7436
7437         * as\mcs51\asdata.c
7438         * as\z80\asdata.c
7439         * as\mcs51\asm.h
7440         * as\z80\asm.h
7441         * link\z80\aslink.h
7442         * link\z80\lkdata.c
7443         * link\z80\lkeval.c
7444         * link\z80\lkgb.c
7445         * link\z80\lkihx.c
7446         * link\z80\lks19.c
7447         * link\z80\lksym.c
7448         * support\cpp2\cpplib.c
7449         * src\ds390\gen.c
7450         * src\mcs51\gen.c
7451
7452 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7453
7454         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7455
7456 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7457
7458         * support\librarian\clean.mk: Do not remove Makefile.
7459         * support\librarian\Makefile: added.
7460
7461 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7462
7463         Added librarian to MSVC build:
7464         * all.dsp
7465         * sdcc.dsw
7466         * support\librarian\librarian.dsp
7467
7468         'configure' not needed for librarian, removed:
7469         * support\librarian\configure
7470         * support\librarian\configure.in
7471         * support\librarian\config_in.h
7472         * support\librarian\Makefile.in
7473
7474         Hopefully these ones built the librarian and the rest of sdcc properly:
7475         * Makefile
7476         * Makefile.common.in
7477
7478         Messed up 'configure', so revert to previous version:
7479         * configure
7480         * configure.in
7481
7482 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7483
7484         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7485         there, while the mantissa of a double is "only" 53 bits wide.
7486
7487 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7488
7489         Adding sdcclib to the build.  MSVC project coming soon.
7490         Files added/changed:
7491
7492         * support\librarian\clean.mk
7493         * support\librarian\configure
7494         * support\librarian\configure.in
7495         * support\librarian\config_in.h
7496         * support\librarian\Makefile.bcc
7497         * support\librarian\Makefile.in
7498         * support\librarian\sdcclib.c
7499         * Makefile.bcc
7500         * Makefile
7501         * Makefile.common.in
7502         * configure
7503         * configure.in
7504
7505 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7506
7507         Linker now complaints if linked modules have conflicting options, for
7508         example, one compiled using --model-large and another one compiled with
7509         --model-small.  The following files were modified:
7510
7511         * as\mcs51\asdata.c
7512         * as\mcs51\aslink.h
7513         * as\mcs51\asm.h
7514         * as\mcs51\asmain.c
7515         * as\mcs51\asout.c
7516         * as\mcs51\i51pst.c
7517         * as\mcs51\lkdata.c
7518         * as\mcs51\lklibr.c
7519         * as\mcs51\lkmain.c
7520         * as\z80\asdata.c
7521         * as\z80\asm.h
7522         * as\z80\asmain.c
7523         * as\z80\asout.c
7524         * as\z80\z80pst.c
7525         * link\z80\aslink.h
7526         * link\z80\lkdata.c
7527         * link\z80\lklibr.c
7528         * link\z80\lkmain.c
7529         * src\SDCCglue.c
7530
7531 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7532
7533         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7534         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7535
7536 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7537
7538         * src/z80/mappings.i: fix _mul[us][int,long] entries
7539
7540 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7541
7542         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7543
7544 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7545
7546         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7547         * support/regression/tests/bitopcse.c: added
7548         fixed warning:
7549         * src/avr/gen.c:
7550         * src/pic/gen.c:
7551         * src/pic16/gen.c:
7552         * src/z80/gen.c:
7553         * src/xa51/gen.c:
7554
7555 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7556
7557         added support for new library format to z80, gbz80 linkers:
7558         *link/z80/aslink.h
7559         *link/z80/lklex.c
7560         *link/z80/lklib.c
7561         *link/z80/lklist.c
7562
7563 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7564
7565         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7566         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7567
7568 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7569
7570         added DUMMY_READ_VOLATILE:
7571         * src/SDCC.y:
7572         * src/avr/gen.c:
7573         * src/xa51/gen.c:
7574         * src/z80/gen.c:
7575         * src/pic/gen.c:
7576         * src/pic16/gen.c:
7577         * src/mcs51/gen.c:
7578         * src/ds390/gen.c:
7579         * src/SDCCcse.c (algebraicOpts): many improvements
7580         * src/SDCCcse.h: removed algebraicOpts()
7581         * src/SDCCicode.c (picDummyRead): added
7582
7583 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7584
7585         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7586         "Insufficient space in data memory".
7587
7588 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7589
7590         * src/mcs51/gen.c: fixed bug #771358
7591         * src/z80/gen.c: fixed bug #759087
7592
7593 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7594
7595         * src/pic16/glue.c: minor cleanup by Vangelis
7596
7597 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7598
7599         * device/include/regc515c.h: fixed #758477
7600         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7601         * device/lib/_gptrput.c: saved a few bytes
7602         * my tab spacing is 8, yours too?)
7603         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7604         * device/lib/serial.c: process RX bytes earlier than TX bytes
7605         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7606
7607 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7608
7609         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7610
7611 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7612
7613     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7614
7615 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7616
7617         * device/lib/Makefile.in: bad fix, reverted to 1.43
7618
7619 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7620
7621         * device/lib/Makefile.in: added missing z80 object files
7622
7623 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7624
7625         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7626         pic16 progress by Vangelis:
7627         * src/SDCCglobl.h:
7628         * src/SDCCmain.c:
7629         * src/pic/Makefile:
7630         * src/pic:
7631         * pic/Makefile:
7632         * pic16/device.c:
7633         * pic16/device.h:
7634         * pic16/gen.c:
7635         * pic16/gen.h:
7636         * pic16/genarith.c:
7637         * pic16/glue.c:
7638         * pic16/main.c:
7639         * pic16/pcode.c:
7640         * pic16/pcode.h:
7641         * pic16/pcodepeep.c:
7642         * pic16/peeph.def:
7643
7644 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7645
7646     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7647
7648 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7649
7650     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7651     added gbz80 build to MSVC project.
7652     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7653     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7654     from 8051 stuff and setup so it links using a .lnk file.
7655
7656 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7657
7658     * support/librarian/sdcclib.c: sdcc librarian.
7659     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7660     with sdcclib.
7661
7662 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7663
7664     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7665
7666 2003-07-02  Borut Razem <borut.razem AT siol.net>
7667
7668         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7669         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7670         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7671         src/xa51/main.c, src/z80/main.c:
7672         virtualization of glue() function: each port has it's own glue function,
7673         which is accessed by do_glue function pointer in PORT.general structure
7674
7675 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7676
7677         * DS800C400 fun, improved ROM interface and tinibios.
7678
7679 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7680
7681         * More support for DS80C400. Now includes beginning of interface to ROM.
7682
7683 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7684
7685         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7686
7687 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7688
7689         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7690
7691 2003-06-19  Borut Razem <borut.razem AT siol.net>
7692
7693         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7694
7695 2003-06-19  Borut Razem <borut.razem AT siol.net>
7696
7697         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7698         fixed Z80 port - crt0.o: cannot open.
7699
7700 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7701
7702         * support/Util/MySystem.c (merge_command): revert bad fix
7703
7704 2003-06-18  Borut Razem <borut.razem AT siol.net>
7705
7706         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7707
7708 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7709
7710         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7711         option --use-stdout sends errors to stdout instead of stderr.
7712
7713 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7714
7715         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7716
7717 2003-06-15  Borut Razem <borut.razem AT siol.net>
7718
7719         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7720         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7721         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7722         fixed width array of pointers replaced with sets;
7723         multiple include and lib paths ared transferred to preprocessor and linker
7724         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7725         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7726         fixed width array of pointers
7727         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7728         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7729         fixupPath(), getPathDifference()
7730         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7731         fixed width array of pointers
7732
7733 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7734
7735         * src/pic16/ralloc.c: fix warnings
7736         * src/pic16/pcode.c: fix warning
7737
7738 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7739
7740          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7741         know all the details, but essentially this set of changes enable
7742         the pic16 port to generate movff instructions and generate assembler
7743         directives,
7744         * src/SDCCmain.c:
7745         * src/pic16/gen.c:
7746         * src/pic16/glue.c:
7747         * src/pic16/pcode.c:
7748         * src/pic16/device.c:
7749         * src/pic16/main.c:
7750         * src/pic16/pcode.h:
7751         * src/pic16/pcoderegs.c:
7752         * src/pic16/ralloc.c:
7753         * src/pic16/ralloc.h:
7754
7755 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7756
7757         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7758         added option --vc, so sdcc errors and warnings are compatible with
7759         Microsoft Visual Studio.
7760
7761 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7762
7763         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7764           device/lib/libfloat.lib: added atof function.
7765
7766 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7767
7768         * doc/sdccman.lyx: updated to Lyx 1.3
7769         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7770         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7771         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7772
7773 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7774
7775         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7776
7777 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7778
7779         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7780           additions to the "related tools/documentation" section
7781
7782 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7783
7784         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7785
7786 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7787
7788         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7789         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7790
7791 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7792
7793         * doc/sdccman.lyx: fix double dash and other minor things
7794         * doc/Makefile: fix double dash
7795
7796 2003-05-28  Karl Bongers(patches from Martin Helmling)
7797         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7798           condition and ignore commands.
7799
7800 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7801
7802         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7803           is in parts still quite out of date, I did changes as far as I felt makes sense
7804           for a non-native english speaker.
7805           Please feel free to add to the manual or to correct my changes.
7806         * doc/Makefile: undid touching the date of intermediate tex files.
7807
7808 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7809
7810         * doc/sdccman.lyx: Manual has an index now
7811
7812 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         Finalize muluint/mulsint and mululong/mulslong merging:
7815         * device/lib/_mulint.c
7816         * device/lib/_mullong.c
7817         * device/lib/gbz80/mul.s
7818         * device/lib/gbz80/stubs.s
7819         * device/lib/z80/mul.s
7820         * device/lib/z80/stubs.s
7821         * src/SDCCsymt.c (initCSupport)
7822
7823 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7824
7825         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7826         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7827           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7828           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7829           instead of /Zm500.
7830
7831 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7832
7833         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7834           the regression tests I'm not brave enough to enable 245.b, 245.c
7835         * doc/sdccman.lyx: added latex preamble for hyperref package.
7836           Using pdflatex this will give you a hyperlinked pdf file with
7837           bookmarks. (prepend '%' before /usepackage if this breaks something)
7838
7839 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7840
7841          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7842
7843 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7844
7845         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7846
7847 2003-05-21    <johan AT balder>
7848
7849         * src/SDCCglue.c (printIval): fixed bug #739934
7850
7851 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7852
7853         Applied patch from bug 737905 (renamed yylineo to mylineno):
7854         * src/altlex.c
7855         * src/SDCCast.c
7856         * src/SDCglobl.h
7857         * src/SDCC.lex
7858         * src/SDCCsymt.c
7859         * src/SDCCval.c
7860         * src/pic16/pcode.c: Cleaned warnings
7861         * src/pic16/pcodeflow.c: Cleaned warnings
7862         * src/pic16/pcoderegs.c: Cleaned warnings
7863
7864 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7865
7866         * src/pic16/pcode.c: Cleaned warnings
7867         * src/pic16/pcodepeep.c: Cleaned warnings
7868         * src/pic16/ralloc.c: Cleaned warnings
7869
7870 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7871
7872         * doc/sdccman.lyx: fixed bug 739745
7873         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7874
7875 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7876
7877         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7878         it can be defined with CFLAGS when running configure
7879         * src/SDCCmain.c: fixed compiling + linking with object files
7880
7881 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7882
7883         * configure.in: configure for pic16 port,
7884             added --disable-pic16-port
7885         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7886         * src/SDCCmain.c: linkOptions is changed to set *,
7887             added if/endif conditional macros to remove options help
7888             messages from optionsTable when a port is not configured, added
7889             support for the PIc16 port in the ports table, when executing
7890             the compiler with no port specified on command line, a default
7891             port is selected with the new macro DEFAULT_PORT which is
7892             defined in port.h, in setDefaultOptions() linkOptions is removed
7893             from initialization assignment, since now it is a set,
7894             parseCmdLine uses setParseWithComma for linkOptions, in
7895             linkEdit() linkOptions are accessed with new function indexSet()
7896             which returns the i'th item of a set variable. See SDCCset.c, in
7897             linkEdit() when calling buildCmdLine(), added linkOptions as
7898             last argument. Now users can pass arguments to gplink via the
7899             -Wl option, main() uses pic16glue() to glue up pic16 programs
7900         * src/SDCCpeeph.c: various changes to support pic16
7901         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7902             return the i'th item of the set
7903         * src/SDCCset.h: added function prototype for indexSet()
7904         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7905         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7906         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7907             added macro DEFAULT_PORT
7908         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7909         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7910             generated
7911         * src/pic16/glue.c: commented out some error producing lines
7912         * src/pic16/main.c: __config directives are commented out to stop
7913             gpasm complaining and test the linkage with gplink, _linkCmd and
7914             _asmCmd changed to be more gplink and gpasm friendly
7915         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7916             produced an error when parsed, peep rule 12 is added to utilize
7917             movff, but it is commented out since the pCode does not support
7918             yet a command with 2 address arguments
7919
7920 2003-05-18    <johan AT balder>
7921
7922         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7923         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7924 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7925
7926         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7927   Added feature to script commands from file.
7928
7929 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7930
7931         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7932         * src/SDCCutil.c: include ctype.h for win32
7933
7934 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7935
7936         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7937
7938 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7939
7940         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7941   Fixed so you can set breakpoints prior to run, run does not stop
7942   on entry now.  Add tbreak.  Other enhancements and fixes for use
7943   with ddd.
7944
7945 2003-05-12  Borut Razem <borut.razem AT siol.net>
7946
7947         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7948
7949 2003-05-11  Borut Razem <borut.razem AT siol.net>
7950
7951         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7952         the path of bin directory, so that PATH is the only env. variable, which has to be set
7953         in case of standard installation.
7954         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7955         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7956         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7957
7958 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7959
7960         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7961         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7962         temp files are in the port dir; clean the gen/test directory when
7963         generating new test.c
7964         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7965         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7966         * support/regression/tests/zeropad.c: added
7967
7968 2003-05-09    <johan AT balder>
7969
7970         * src/SDCCglue.c: fixed bug #597940
7971
7972 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7973
7974         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7975   cache sfr, optimize next,step, fix off by one sourceline,
7976   support ddd list function.
7977         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7978
7979 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7980
7981         * support/regression/HTMLgen.py: added compare_s2f()
7982         * support/regression/Makefile: redo 1.27
7983         * support/regression/generate-cases.py: redo 1.5
7984
7985 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7986
7987         * support/regression/tests/float.c: workaround 33 bit hex constant
7988         * support/regression/tests/simplefloat.c: fix division for host
7989
7990 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7991
7992         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7993         that tame's the PIC's over-aggressive optimizer.
7994
7995 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7996
7997          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7998          support for MSVC.
7999
8000 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8001
8002         Initial support for DS80C400. "Hello world" runs on TINIm400
8003         (with polled I/O).
8004
8005 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8006
8007          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8008          * Some notes on ddd usage added in debugger/README
8009          Martin Helmling adding more features and fixes for ddd GUI debugger.
8010          Code added for nexti, stepi, up, down, and other adjustments.
8011
8012 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8013
8014         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8015         * src/pic/peeph.def Added two rules to optimize carry manipulation
8016         * src/pic/* removed debug printfs
8017
8018 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8019
8020         * debugger/mcs51/cmd.c: added header newalloc.h
8021
8022 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8023
8024         * as/Makefile: new EXEEXT
8025         * as/z80/Makefile: remove trailing slash of BUILDIR
8026         * as/z80/clean.mk: new EXEEXT
8027         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8028         * support/cpp2/Makefile.in: new EXEEXT
8029         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8030
8031 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8032
8033         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8034         EXEEXT was introduced to fix all related problems with targets
8035         "clean", "install" and "uninstall"; a couple of further flaws
8036         especially with "clean" have been fixed too
8037         * as/mcs51/Makefile.in
8038         * as/mcs51/clean.mk
8039         * as/z80/Makefile
8040         * Makefile
8041         * clean.mk
8042         * debugger/mcs51/Makefile.in
8043         * debugger/mcs51/clean.mk
8044         * link/z80/Makefile
8045         * link/z80/Makefile.in
8046         * link/z80/clean.mk
8047         * link/Makefile
8048         * packihx/Makefile.in
8049         * packihx/clean.mk
8050         * sim/ucsim/Makefile
8051         * sim/ucsim/clean.mk
8052         * sim/ucsim/avr.src/Makefile.in
8053         * sim/ucsim/avr.src/clean.mk
8054         * sim/ucsim/s51.src/Makefile.in
8055         * sim/ucsim/s51.src/clean.mk
8056         * sim/ucsim/xa.src/Makefile.in
8057         * sim/ucsim/xa.src/clean.mk
8058         * sim/ucsim/z80.src/Makefile.in
8059         * sim/ucsim/z80.src/clean.mk
8060         * sim/ucsim/main_in.mk
8061         * sim/ucsim/packages_in.mk
8062         * sim/ucsim/gui.src/Makefile.in
8063         * sim/ucsim/gui.src/serio.src/Makefile.in
8064         * sim/ucsim/gui.src/serio.src/clean.mk
8065         * src/Makefile.in
8066         * src/clean.mk
8067         * support/cpp2/Makefile.in
8068         * support/cpp2/clean.mk
8069         * support/makebin/Makefile
8070         * support/makebin/clean.mk
8071         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8072         * doc/sdccman.lyx: --program-suffix no longer needed
8073
8074 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8075
8076          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8077          Martin Helmling added support for ddd GUI debugger.
8078          Code added to display assembly, set variables, and other commands
8079          to interface to ddd.
8080
8081 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8082
8083         * as/Makefile: fix target clean
8084         * as/clean.mk: fix target clean
8085         * as/z80/clean.mk: fix target clean
8086
8087 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8088
8089         * Makefile.common.in: added  AT EXEEXT AT
8090         * configure.in: removed all mingw32 stuff
8091         * configure: rebuilt from configure.in
8092         * doc/sdccman.lyx: updated section "installation"
8093         * support/scripts/sdcc_mingw32: adapted to configure
8094         * support/scripts/sdcc_cygwin_mingw32: added
8095
8096 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8097
8098         * src/pic Added object file support for the PIC port
8099         * src/pic Applied patch from Craig Franklin (this started the object file support)
8100         * src/regression Updated the PIC regression tests for object files
8101
8102 2003-04-20  Borut Razem <borut.razem AT siol.net>
8103
8104         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8105           lklex.c: In function `getfid':
8106           lklex.c:203: warning: array subscript has type `char'
8107         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8108           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8109         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8110           stack handling macros
8111
8112 2003-04-19  Borut Razem <borut.razem AT siol.net>
8113
8114         * "handling space characters in file path" task:
8115         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8116         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8117         * support/Util/MySystem.h: make it self-sufficient
8118         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8119           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8120           handling space characters in file path
8121         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8122           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8123         * support/Util/MySystem.c: handling space characters in executable's path
8124
8125 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8126
8127         * as/z80/Makefile: fix permanent rebuild of z80
8128         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8129         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8130
8131 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8132
8133         * src/SDCCopt.c: add special case optimization to replace modulo by
8134           a power of two with a bitwise AND.
8135
8136 2003-04-18    <johan AT balder>
8137
8138         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8139
8140 2003-04-17    <johan AT balder>
8141
8142         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8143         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8144
8145 2003-04-13  Borut Razem <borut.razem AT siol.net>
8146
8147         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8148         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8149           fixed mingw problem in adl_NORMALIZE_PATH
8150
8151 2003-04-12  Borut Razem <borut.razem AT siol.net>
8152
8153         * fixed "#pragma SAVE/RESTORE can not be nested":
8154         * src/SDCC.lex: reworked pragma handling functions
8155         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8156         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8157
8158 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8159
8160         * src/SDCCutil.c (pathEquivalent): defined but not used
8161         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8162         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8163         * configure: rebuilt from configure.in
8164         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8165         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8166         * device/include/Makefile.in: replace sdcc_datadir
8167         * device/lib/Makefile.in: replace sdcc_datadir
8168         * Makefile.common.in: add LDFLAGS from configure
8169         * packihx/Makefile.in: use LDFLAGS
8170         * src/Makefile.in: use LDFLAGS
8171         * support/cpp2/Makefile.in: add LDFLAGS from configure
8172         * support/makebin/Makefile: use LDFLAGS
8173         * .version: bumped version number to 2.3.5
8174
8175 2003-04-12  Borut Razem <borut.razem AT siol.net>
8176
8177         * completed "different paths" task:
8178         * src/SDCCmacro.c: fixed bug in handling quotes
8179         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8180         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8181
8182 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8183
8184         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8185
8186 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8187
8188         * ds390/gen.c ds390/peeph.def: fix bug 706781
8189
8190 2003-04-11  Borut Razem <borut.razem AT siol.net>
8191
8192         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8193
8194 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8195
8196         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8197         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8198          set - this bit used to not be set...).
8199         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8200           bad code in PIC Port
8201         * src/regression/and2.c added to test bug 609268
8202         * src/regression/Makefile added and2.c to regression test
8203
8204
8205 2003-04-08    <johan AT CP255758-A>
8206
8207         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8208         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8209         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8210
8211 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8212
8213         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8214         fix bug #487815
8215         * support/cpp2/Makefile.in: fix bug #487815
8216         * configure: rebuilt from configure.in
8217         * Makefile.common.in: docdir changed, new path suffixes
8218         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8219         * sdcc_vc_in.h: reflect changes from sdccconf.h
8220         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8221         * src/SDCCutil.h: remove BINDIR hack
8222         * doc/sdccman.lyx: update new path hierarchy
8223
8224 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8225
8226         * src/SDCCpeeph.c: added okToRemoveSLOC test
8227
8228 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8229
8230         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8231
8232 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8233
8234         * src/SDCCpeeph.c: added labelIsReturnOnly test
8235         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8236
8237 2003-04-05    <johan AT balder>
8238
8239         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8240         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8241         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8242         * src/SDCCast.c: fixed a warning
8243         * src/SDCCast.h: fixed a warning
8244         * src/SDCCicode.c (operandFromAst): fixed a warning
8245
8246 2003-04-04    <johan AT balder>
8247
8248         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8249         * src/SDCCast.c (decorateType): fixed bug #715076
8250         * src/SDCC.y: fixed bug #702907
8251
8252 2003-04-03    <johan AT balder>
8253
8254         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8255         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8256         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8257         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8258         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8259
8260 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8261
8262         * _decdptr.c: fix return values
8263         * _gptrget.c: fix return values
8264         * _gptrgetc.c: fix return values
8265         * _gptrput.c: fix return values
8266         * _mulint.c: fix return values
8267         * as/z80/Makefile: fix 'make -j' problem
8268
8269 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8270
8271         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8272         * configure.in: big cleanup, updated to autoconf 2.5x
8273         * configure: rebuilt from configure.in
8274         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8275         * sdcc_vc_in.h: reflect changes from sdccconf.h
8276         * doc/Makefile: fixed a flaw in "make install"
8277
8278 2003-04-02    <johan AT balder>
8279
8280         * src/ds390/gen.c (genCmp): no comments
8281         * src/mcs51/gen.c (genCmp): no comments
8282         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8283         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8284
8285 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8286
8287         * support/regression/generate-cases.py: place generated file in given sub directory
8288         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8289         * support/regression/Makefile: improvements for 'make -j';
8290         side effect: it's simpler and faster now
8291
8292 2003-03-31  Borut Razem <borut.razem AT siol.net>
8293
8294         * src/z80/main.c: link-{port} and as-{port} defined without path
8295         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8296
8297 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8298
8299         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8300
8301 2003-03-30  Borut Razem <borut.razem AT siol.net>
8302
8303         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8304           changed type of list parameter to set
8305         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8306         * src/port.h: changed type of do_assemble() parameter to set
8307         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8308           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8309           definition of "cppoutfilename" macro with NULL value in preProcess()
8310         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8311         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8312         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8313           replaced with set *binPathSet
8314         * shash_add() deallocates the item, if allready exsists, before adding the new one
8315         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8316
8317 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8318
8319         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8320           a nested for loop bug in the PIC port
8321         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8322           for loops
8323
8324 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8325
8326         * support/Util/dbuf.h: remove C++ stuff to make it portable
8327
8328 2003-03-28  Borut Razem <borut.razem AT siol.net>
8329
8330         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8331           literal strings in stringLiteral()
8332         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8333         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8334           to the project
8335
8336 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8337
8338         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8339
8340 2003-03-26    <johan AT balder>
8341
8342         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8343         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8344         * src/SDCCast.c (decorateType): fixed " -v < 3"
8345
8346 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8347
8348         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8349         Added Lenny Story's debug infrastructure changes:
8350         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8351         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8352         * src/cdbFile.c: added
8353         * src/SDCCdebug.c: added
8354         * src/SDCCdebug.h: added
8355         * src/SDCCast.c (createFunction)
8356         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8357         * src/SDCCmain.c (parseCmdLine, main)
8358         * src/SDCCmem.c (redoStackOffsets)
8359         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8360         * src/SDCCsymt.h
8361         * src/common.h
8362         * src/avr/gen.c (genAVRCode)
8363         * src/ds390/gen.c (gen390Code)
8364         * src/mcs51/gen.c (gen51Code)
8365         * src/pic/gen.c (genpic14Code)
8366         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8367         * src/xa51/gen.c (genXA51Code)
8368         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8369
8370 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8371
8372         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8373         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8374
8375 2003-03-22    <johan AT balder>
8376
8377         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8378
8379 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8380
8381         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8382         * doc/cdbfileformat.lyx: added, written by Lenny Story
8383         * doc/Makefile: added cdbfileformat.lyx
8384         * doc/clean.mk: added cdbfileformat.lyx
8385
8386 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8387
8388         * src/mcs51/peeph.def: fix bug #705773
8389
8390 2003-03-20    <johan AT balder>
8391
8392         An sfr/sbit can have an "at #" AND an initializer
8393         * src/SDCCsymt.c (checkSClass):
8394         * src/SDCCmem.c (allocGlobal):
8395         * src/SDCCmem.c (allocLocal):
8396         * src/SDCCast.c (createBlock):
8397
8398 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8399
8400         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8401
8402 2003-03-16    <johan AT balder>
8403
8404         Undid the hackup of const and volatile, the problem is much bigger
8405         * src/SDCC.y:1.65
8406         * src/SDCCast.c:1.171
8407         * src/SDCCglue.c:1.138
8408         * src/SDCCicode.c:1.146
8409         * src/SDCCsymt.c:1.150
8410         * src/SDCCval.c:1.65
8411
8412 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8413
8414         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8415         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8416
8417 2003-03-13    <johan AT balder>
8418
8419         Hackup const and volatile modifiers in type chains a bit:
8420         * src/SDCC.y:1.63
8421         * src/SDCCast.c:1.169
8422         * src/SDCCglue.c:1.136
8423         * src/SDCCicode.c:1.143
8424         * src/SDCCsymt.c1.146
8425         * src/SDCCsymt.h1.59
8426         * src/SDCCval.c:1.63
8427
8428 2003-03-12    <johan AT balder>
8429
8430         * src/SDCCBBlock.h: more LRH debugging junk
8431         * src/SDCCcflow.h: more LRH debugging junk
8432         * src/SDCCloop.c: more LRH debugging junk
8433         * src/SDCC.y (struct_declaration): fixed bug #697590
8434         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8435         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8436         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8437
8438 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8439         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8440         test function names must now match exactly).
8441         * src/SDCCcse.c: added special case in findCheaperOp to allow
8442         extending a short integer. Makes less awful code for bug 700121 test case.
8443
8444 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8445
8446         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8447         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8448
8449 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8450
8451         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8452         actually called (operandsNotEqual() was called for all
8453         operandsNotEqualX tests).
8454
8455 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8456
8457         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8458         with shorter literals. Fixes bug 700121.
8459
8460 2003-03-11    <johan AT balder>
8461
8462         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8463
8464 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8465
8466         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8467         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8468
8469 2003-03-10  Borut Razem <borut.razem AT siol.net>
8470
8471         * src/SDCCmain.c: pipe preprocessor's output
8472         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8473         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8474         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8475         which closes all pipes in pipeSet set
8476         * src/SDCCset.c: free deleted item in function deleteSetItem()
8477         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8478         moved from z80 to src subproject
8479         * .version: increased version number to 2.3.4
8480
8481 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8482
8483         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8484         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8485         * support/regression/ports/xa51/spec.mk: fix typo
8486
8487 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8488
8489         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8490
8491 2003-03-09  Borut Razem <borut.razem AT siol.net>
8492
8493         * src/SDCCmain.c: pipe preprocessor's output
8494         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8495         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8496         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8497         which closes all pipes in pipeSet set
8498         * src/SDCCset.c: free deleted item in function deleteSetItem()
8499         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8500         moved from z80 to src subproject
8501
8502 2003-03-09  Borut Razem <borut.razem AT siol.net>
8503
8504         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8505         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8506         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8507         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8508         * src/SDCCglobl.h: unification of WIN32 native definitions
8509
8510 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8511
8512         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8513
8514 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8515
8516         * src/configure.in:   check for endianess (even while cross-compiling)
8517         * src/configure:      check for endianess (even while cross-compiling)
8518         * src/configure_in.h: check for endianess (even while cross-compiling)
8519         * src/avr/gen.c:        remove old endianess stuff
8520         * src/mcs51/gen.c:      remove old endianess stuff
8521         * src/ds390/gen.c:      remove old endianess stuff
8522         * src/pic/gen.c:        remove old endianess stuff
8523         * src/pic/genarith.c:   remove old endianess stuff
8524         * src/pic/glue.c:       fix endianess check
8525         * src/pic16/gen.c:      remove old endianess stuff
8526         * src/pic16/genarith.c: remove old endianess stuff
8527         * src/pic16/glue.c:     fix endianess check
8528         * src/xa51/gen.c:       remove old endianess stuff
8529         * src/z80/gen.c:        fix endianess check
8530         * src/SDCCglue.c:       fix endianess check
8531         * src/ds390/peeph.def: fix bug 700036
8532
8533 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8534
8535         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8536         * src/configure: find appropriate data-types on host for SDCC's int and long
8537         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8538         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8539         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8540
8541 2003-03-07    <johan AT balder>
8542
8543         Just a big NOOP:
8544                 some minor cleanups before the big shot
8545                 OP_DEFS and OP_USES now use Kevin's protection
8546                 new option --nolabelopt
8547
8548         * src/SDCCBBlock.c:
8549         * src/SDCCast.c,:
8550         * src/SDCCcflow.c:
8551         * src/SDCCcse.c:
8552         * src/SDCCicode.c:
8553         * src/SDCCicode.h:
8554         * src/SDCClabel.c:
8555         * src/SDCCloop.c:
8556         * src/SDCCmain.c:
8557         * src/ds390/ralloc.c:
8558         * src/mcs51/ralloc.c:
8559         * src/pic/ralloc.c:
8560         * src/xa51/ralloc.c:
8561         * src/z80/ralloc.c:
8562
8563 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8564
8565         * src/pic/pcode.c (get_op): fix 64 bit warnings
8566         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8567         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8568         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8569         * support/regression/tests/malloc.c: fix 64 bit warnings
8570
8571 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8572
8573         * src/mcs51/gen.c (genMinus): fixed bug 696436
8574
8575 2003-03-02  Borut Razem <borut.razem AT siol.net>
8576
8577         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8578
8579 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8580
8581         * configure.in: test for mkstemp
8582         * sdccconf_in.h: add HAVE_MKSTEMP
8583
8584 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8585
8586         * device/include/ctype.h: removed warning while using --stack-auto
8587         * device/include/malloc.h: removed warning while using --stack-auto
8588         * device/include/string.h: removed warning while using --stack-auto
8589
8590 2003-02-23  Borut Razem <borut.razem AT siol.net>
8591
8592         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8593         because NDEBUG is defined (see man assert)
8594         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8595
8596 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8597
8598         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8599         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8600
8601 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8602
8603         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8604         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8605
8606 2003-02-18    <johan AT balder>
8607
8608         * as/mcs51/asmain.c (asmbl): module can start with a digit
8609         * as/z80/asmain.c (asmbl): module can start with a digit
8610
8611 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8612
8613         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8614         * src/asm.c: fix pipe() for Mingw32
8615
8616 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8617
8618         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8619         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8620         make -V work again; --c1mode reads now from stdin
8621         * doc/sdccman.lyx: added --c1mode
8622         * support/Util/SDCCerr.c: new messages for c1 mode
8623         * support/Util/SDCCerr.h: new messages for c1 mode
8624         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8625
8626 2003-02-15    <johan AT balder>
8627
8628         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8629
8630 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8631
8632         * doc/sdccman.lyx: Environment variables, -o and other minor things
8633
8634 2003-02-14    <johan AT balder>
8635
8636         * src/xa51/main.c: before anyone really tries to use it :)
8637
8638         * Install doc's in share/sdcc/doc
8639         * removed some obsolete files
8640         * Do a proper make distclean and uninstall
8641         M Makefile.common.in
8642         R sdccbuild.sh
8643         M as/Makefile
8644         M device/include/Makefile.in
8645         M device/lib/Makefile.in
8646         M doc/sdccman.lyx
8647         M link/Makefile
8648         M sim/ucsim/doc/Makefile.in
8649         M src/clean.mk
8650         R src/avr/peeph.rul
8651         R src/xa51/peeph.rul
8652         M support/cpp2/Makefile.in
8653         M support/makebin/Makefile
8654
8655
8656 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8657
8658         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8659
8660 2003-02-10  Borut Razem <borut.razem AT siol.net>
8661
8662         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8663         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8664         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8665         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8666         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8667         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8668         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8669         src/z80/Makefile.bcc: Borland Makefile cleanup
8670         * as/z80/Makefile.bcc: Added Borland Makefile
8671         * support/cpp2/borland.h: Removed
8672
8673 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8674
8675         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8676         * src/SDCC.lex: new pragma NOIV
8677         * src/SDCCglobl.h: new pragma NOIV
8678         * src/SDCCmem.c: new pragma NOIV
8679
8680 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8681
8682         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8683
8684 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8685
8686         * src/SDCCmain.c: signal handling is switched off by --debug
8687         * doc/Makefile: small fix for install; use clean.mk again
8688         * doc/clean.mk: clean *.pdf and *.html too
8689
8690 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8691
8692         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8693         * device/lib/printfl.c: fix a ds390 bug by making it portable
8694         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8695         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8696         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8697         * debugger/mcs51/cmd.c: converted multi-line string literals
8698         * sim/ucsim/globals.cc: converted multi-line string literals
8699         * src/SDCCmain.c: introduced signal handler to remove temp files
8700         * doc/Makefile: small tweaks, implement clean
8701         * doc: removed generated files
8702
8703 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8704
8705         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8706         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8707         Address Record is not correctly generated for DS390."
8708
8709 2003-02-02  Borut Razem <borut.razem AT siol.net>
8710
8711         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8712         * as/mcs51/asm.h: fixed compilation with Borland C
8713         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8714         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8715         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8716         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8717         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8718         src/z80/Makefile.bcc: delete $(LIB) only if exist
8719         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8720
8721 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8722
8723         * device/include/malloc.h: introduced NULL
8724         * device/include/string.h: introduced NULL
8725         * device/include/stdlib.h: introduced NULL
8726         * device/lib/_memcpy.c: removed NULL
8727         * device/lib/_strcat.c: removed NULL
8728         * device/lib/_strchr.c: removed NULL
8729         * device/lib/_strcmp.c: removed NULL
8730         * device/lib/_strcpy.c: removed NULL
8731         * device/lib/_strcspn.c: removed NULL
8732         * device/lib/_strlen.c: removed NULL
8733         * device/lib/_strncat.c: removed NULL
8734         * device/lib/_strncmp.c: removed NULL
8735         * device/lib/_strncpy.c: removed NULL
8736         * device/lib/_strpbrk.c: removed NULL
8737         * device/lib/_strrchr.c: removed NULL
8738         * device/lib/_strspn.c: removed NULL
8739         * device/lib/_strstr.c: removed NULL
8740         * device/lib/_strtok.c: removed NULL
8741         * device/lib/malloc.c: removed NULL, include own header
8742
8743 2003-02-02    <johan AT balder>
8744
8745         * 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
8746         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8747         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8748         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8749         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8750         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8751
8752 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8753
8754         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8755         area 'DATA'"
8756
8757 2003-02-01    <johan AT balder>
8758
8759         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8760
8761 2003-01-31    <johan AT CP255758-A>
8762
8763         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8764
8765 2003-01-30    <johan AT balder>
8766
8767         * src/SDCCBBlock.c: automatic bug detection
8768         * src/SDCCicode.c: automatic bug detection
8769
8770 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8771
8772         * src/SDCCglobl.h:   now --xram-size 0 works
8773         * src/SDCCmain.c:    now --xram-size 0 works
8774
8775 2003-01-29    <johan AT balder>
8776
8777         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8778
8779 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8780
8781         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8782         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8783         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8784         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8785         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8786         * src/SDCCmain.c:    Added options --xram-size and --code-size
8787
8788 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8789
8790         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8791         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8792
8793 2003-01-27    <johan AT balder>
8794
8795         * src/SDCC.y: fixed bug #613764
8796
8797 2003-01-26    <johan AT balder>
8798
8799         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8800         * src/SDCCsymt.h: fixed bug #673374
8801         * src/SDCCglue.c: fixed bug #661910
8802         * src/SDCCast.c: fixed bug #458099 and 673374
8803
8804 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8805
8806         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8807         * as/mcs51/strcmpi.h: added
8808         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8809         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8810         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8811         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8812         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8813         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8814         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8815         * as/mcs51/Makefile.aslink: new module strcmpi
8816         * as/mcs51/Makefile.asx8051: new module strcmpi
8817         * as/mcs51/Makefil.bcc: new module strcmpi
8818         * as/mcs51/Makefile.in: new module strcmpi
8819         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8820
8821 2003-01-26    <johan AT balder>
8822
8823         * src/SDCCglue.c: reverted back to 1.124
8824         * src/SDCCast.c: reverted back to 1.156
8825         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8826
8827 2003-01-25    <johan AT balder>
8828
8829         * src/SDCCglue.c: A better fix for bug #661910
8830         * src/SDCCast.c: A better fix for bug #661910
8831         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8832
8833 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8834
8835         * src/Makefile.in: remove spawn.o
8836         * src/SDCCmain.c: remove spawn.h
8837         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8838         * src/spawn.c: removed
8839         * src/spawn.h: removed
8840         * support/regression/ports/ds390/spec.mk: link with -r
8841
8842 2003-01-24    <johan AT CP255758-A>
8843
8844         * src/ds390/gen.c (aopOp): fixed bug #667458
8845         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8846         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8847         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8848
8849 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8850
8851         * src/mcs51/peeph.def: better assembler identation by Frieder
8852         * src/mcs51/gen.c: better assembler identation by Frieder
8853
8854 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8855
8856         * as/z80/string.h: removed for gcc 3.2
8857         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8858         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8859
8860 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8861
8862         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8863         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8864         * support/regression/Makefile: separate temp files for ports
8865         * support/regression/generate-cases.py: separate temp files for ports
8866         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8867         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8868
8869 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8870
8871         * moved tinitalk to device/examples/ds390
8872
8873 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8874
8875         * as/mcs51/lkmem.c: rflag is for DS390
8876         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8877         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8878                          (linkEdit): move mem- and map-files the same way as ihx-files
8879         * src/z80/main.c (_setDefaultOptions): removed --generic
8880         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8881         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8882         * src/pic/glue.c (picglue): --c1mode works again
8883         * src/pic16/glue.c (pic16glue): --c1mode works again
8884         * src/asm.c (printCLine): fix #660034
8885
8886 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8887
8888         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8889         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8890         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8891         * as/mcs51/lkmem (summary): better fix for sp problem
8892         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8893         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8894         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8895                                               remove --stack-after-data
8896
8897 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8898
8899         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8900         * src/SDCCutil.c (join): ugly bug: missing '\0'
8901         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8902
8903 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8904
8905         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8906         * src/port.h: typo
8907         * src/pic/main.c (_asmCmd): gpasm supports -o
8908         * src/z80/main.c: more general macros
8909         * device/lib/Makefile.in: remove intermediate files
8910
8911 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8912
8913         * .version: Bumped version number to 2.3.3
8914         * src/SDCCBBlock.c: new option -o
8915         * src/SDCCglobl.h: new option -o
8916         * src/SDCCglue.c: new option -o
8917         * src/SDCCmain.c: new option -o
8918         * src/asm.c: new option -o
8919         * src/ds390/main.c: new option -o
8920         * src/pic/glue.c: new option -o
8921         * src/pic/pcode.c: new option -o
8922         * src/pic/ralloc.c: new option -o
8923         * src/pic16/glue.c: new option -o
8924         * src/pic16/pcode.c: new option -o
8925         * src/pic16/ralloc.c: new option -o
8926         * src/z80/main.c: new option -o
8927         * device/lib/Makefile.in: use -o
8928         * support/regression/ports/ds390/spec.mk: use -o
8929         * support/regression/ports/gbz80/spec.mk: use -o
8930         * support/regression/ports/mcs51/spec.mk: use -o
8931         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8932         * support/regression/ports/z80/spec.mk: use -o
8933         * support/regression/ports/ucz80/spec.mk: use -o
8934         * support/regression/ports/xa51/spec.mk: use -o
8935         * support/regression/fwk/lib/timeout.c: fix usage string
8936
8937 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8938         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8939
8940 2003-01-07    <johan AT balder>
8941
8942         * src/SDCCast.c (decorateType): fixed bug #600035
8943
8944 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8945         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8946         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8947         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8948         * src/pic/pcode.c: outcommented unused variable to remove warnings
8949         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8950
8951 2003-01-06    <karl AT turbobit.com>
8952         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8953    regression tests.
8954
8955 2003-01-06    <johan AT balder>
8956
8957         * src/SDCCicode.c: fixed array add
8958
8959 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8960         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8961         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8962
8963 2003-01-04    <johan AT balder>
8964
8965         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8966
8967 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8968         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8969
8970 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8971         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8972         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8973
8974 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8975         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8976
8977 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8978         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8979
8980 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8981         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8982
8983 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8984
8985     * in \sdcc\as\mcs51\ changed these files in order to create an
8986     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8987     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8988     following files to include the previous two files: aslink.dsp,
8989     Makefile.aslink, Makefile.bcc, and Makefile.in.
8990
8991     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8992     .adb instead of .cdb
8993
8994 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8995
8996         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8997         value from option --iram-size.
8998
8999 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9000
9001         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9002         dram[] array.
9003
9004 2002-09-18    <wiml AT hhhh.org>
9005
9006         * SDCClrange.h: exposed setFromRange() and setToRange()
9007         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9008           packRegsForAccUse() (bug 542397)
9009         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9010           multiple times and emitting the fetch operations more than once
9011           added aopGetUsesAcc() function to allow binary operators to
9012           fetch their operands in the correct order; made genMinus() emit
9013           compact code for X = LITERAL - Y
9014
9015 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9016         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9017         sprintf() in line 1267.
9018
9019 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9020         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9021         like ports.
9022
9023 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9024         Changes to aslink (All the changes are marked with 'JCF'):
9025
9026         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9027         summary().
9028
9029         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9030         area BSEG.  Also moves, if possible, the DATA area down into the internal
9031         ram so more space is available.
9032
9033         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9034         sflag.
9035
9036         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9037         not bytes.  Function summary() which creates a memory usage summary
9038         file with extension .mem.  Reports of overlaping stack and small stack
9039         size.  If the space for the stack is less than 16 bytes aslink trows a
9040         warning.
9041
9042         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9043         the 8051.  Option 'y' for memory summary output file.
9044
9045         Changes to sdcc (All the changes are marked with 'JCF'):
9046
9047         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9048
9049         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9050         overlaying area for it (uses RegBankUsed[4]).
9051
9052         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9053         bank zero as used by default.  By default aslink locates the stack
9054         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9055         the creation of the .mem file.  Delegates the allocation of data area
9056         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9057         the begining of the stack area to aslink.
9058
9059         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9060         glue() in SDCCglue.c creates an area for it.
9061
9062 2002-09-03  Borut Razem <borut.razem AT siol.net>
9063         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9064         sdcc/src/pic/glue.c:
9065         introduced atexit() handler for teporay files removal in case of
9066         errors, assertions, ...
9067
9068 2002-08-29  Borut Razem <borut.razem AT siol.net>
9069         * sdcc/support/cpp2/auto-host_vc_in.h:
9070         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9071         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9072         Maybe there is a similar problem with BORLANDC? It should be checked!
9073
9074         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9075         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9076         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9077         was not executed, and the compiler (cl) launched a warning:
9078         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9079
9080 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9081         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9082
9083 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9084         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9085
9086         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9087           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9088           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9089           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9090           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9091           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9092           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9093         - added Release configuration in VS projects
9094         - review of compiler an linker options
9095         - VC .exe files are generated in bin_vc directory, not to interfere
9096           with binaries generated from other projects (cygwin, mingw, bcc ...)
9097
9098         * sdcc/src/yacc.dsp: added
9099
9100         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9101         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9102         and insert the version number definitions from .version
9103
9104         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9105
9106         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9107         added - genarate auto-host.h using auto-host_vc_in.h as template
9108
9109         * sdcc/sdcc_vc.h,
9110         removed from CVS, generated automatically
9111
9112 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9113         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9114
9115 2002-08-11  Borut Razem <borut.razem AT siol.net>
9116         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9117
9118 2002-08-10  Borut Razem <borut.razem AT siol.net>
9119         * src/SDCCmain.c (main):
9120         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9121         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9122         The consequence was that some temporary files were not removed.
9123
9124         * src/SDCCglue.c:
9125         unification of code in functions tempfilename() and tempfile():
9126         function tempnam() is defined in Visual Studio 6.0 and .NET
9127
9128         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9129
9130         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9131           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9132         - removed compiler command line option /WX: Treats all warnings as errors
9133         - update a list of source files, included into the project
9134
9135         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9136           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9137         changed project type to Generic Project so that can be correcly converted to VS.NET project
9138
9139         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9140
9141         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9142
9143         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9144
9145         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9146         added return 0 statements after assert() to make compiler happy
9147
9148         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9149         added newline in the def file to keep MSC compiler satisfied
9150
9151         * sdcc/src/z80/gen.c:
9152         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9153           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9154         - solved MSC error in function aopDump()
9155
9156         * sdcc_vc.h: define PREFIX as "\\sdcc"
9157
9158 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9159         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9160
9161 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9162         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9163         - Rewrote the register banking algorithm.
9164         - Added pCode live-range analysis to registers (for now, only non-used and
9165         singly-used registers optimized away)
9166
9167         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9168
9169         * 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.
9170
9171 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9172         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9173
9174 2002-04-22  Michael Hope  <michaelh AT vroom>
9175
9176         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9177
9178         * configure.in (DD_COPT): Added include support required for gbdk.
9179
9180         * .version: Bumped version number just to increase it.
9181
9182         * src/SDCCmain.c: Added -nostdinc to the default options.
9183
9184 2002-04-15  Michael Hope  <michaelh AT vroom>
9185
9186         * device/lib/z80/printf.c (sprintf): Added.
9187
9188         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9189
9190         * src/z80/peeph.def: Added transpose redundent load rule.
9191
9192         * src/z80/main.c: Added force callee saves for jaune.
9193
9194         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9195
9196         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9197
9198 2002-03-28  Johan Knol  <johan AT balder>
9199
9200         * src/SDCCval.c: fixed bug #532436
9201
9202 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9203         * /src/port.h:
9204         Added "char *Processor" field to the port structure.
9205
9206         * /src/SDCCmain.c:
9207         Added -p option. Allows port dependent processor to be specified.
9208
9209         * all ports:
9210         Initialized the new field char *Processor field to NULL in all ports
9211
9212         * /src/pic/*:
9213         Compiler generated registers for interrupt context saving
9214         were not getting allocated.
9215
9216 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9217
9218         * /src/SDCCast.c:
9219         Fixed left shift. Will promote the left side of a left shift
9220         if a) left shifting more than size of operand or b) when assigned
9221         to something size > size of left side
9222
9223 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9224         * src/pic/*
9225         tons of changes. Register allocation has been
9226         rewritten. Added customization for the various PICs. Flow
9227         analysis is restructured. ...
9228
9229         * src/pic/device.h:
9230         Added
9231
9232         * src/pic/device.c:
9233         Added. device.c is a PIC port hack to accomodate variations
9234         in PIC devices.
9235
9236 2002-03-13  Michael Hope  <michaelh AT vroom>
9237
9238         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9239
9240 2002-03-04  johanknol  <johanknol AT manik>
9241
9242         * /src/SDCCval.c: fixed
9243
9244         const unsigned char arr[][2] = { { 0, 1 } };
9245         t18.c:1: error: Initializer element is not constant
9246
9247 2002-03-04  bela  <bela AT manik>
9248
9249         * /device/include/mcs51reg.h:
9250         ds89c420 register definition update
9251
9252 2002-03-03    <johan AT FRIJA>
9253
9254         * support/Util/SDCCerr.c: did something, but don't no why anymore
9255
9256         * support/regression/tests/bug-524691.c: made it a little less shy
9257
9258         * src/SDCCast.c (decorateType): fixed bug #524697
9259
9260         * src/SDCCast.c: made some lineno improvements
9261
9262         * src/SDCCval.c (getNelements): changed warning to error
9263
9264         * src/SDCCglue.c (printIvalArray): changed warning to error
9265
9266         * src/SDCCicode.c: fixed a warning for mingw
9267
9268         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9269
9270         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9271
9272 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9273
9274         * src/ds390/peeph.def:
9275         Added some more peephole rules
9276
9277         * src/ds390/gen.c: Various fixes & enhancements
9278
9279         * src/SDCClrange.c, src/SDCClrange.h:
9280         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9281
9282         * src/ds390/ralloc.c:
9283         various fixes & enhancements (ds390) specific
9284
9285         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9286         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9287         from rallocs.
9288
9289         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9290
9291 2002-03-02    <johan AT FRIJA>
9292
9293         * src/SDCCast.c (decorateType): fixed bug #524708
9294
9295         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9296
9297         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9298
9299 2002-03-01  Michael Hope  <michaelh AT vroom>
9300
9301         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9302
9303         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9304
9305 2002-03-01    <johan AT FRIJA>
9306
9307         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9308
9309         * src/SDCCast.c (decorateType): fixed bug #524209
9310
9311         * src/SDCCval.c (valNot): fixed bug #524195
9312
9313 2002-02-26    <johan AT balder>
9314
9315         * src/xa51/gen.c: fixed a warning
9316
9317         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9318
9319         * src/SDCCast.c (decorateType): fixed bug #522534
9320
9321 2002-02-23    <johan AT balder>
9322
9323         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9324
9325 2002-02-22    <johan AT balder>
9326
9327         * src/SDCCast.c: fixed bug #514865
9328
9329         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9330
9331 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9332
9333         * sdcc/src/SDCCloop.c:
9334         Previous fix was not good. basic blocks that have "break" or "return" are
9335         not really partof a loop , but live ranges used in these blocks should
9336         be live thru the entire loop, so set partOfLoop but don't add them to
9337         loop region
9338
9339 2002-02-21    <johan AT FRIJA>
9340
9341         * src/SDCCcse.c: fixed bug #514308
9342
9343 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9344
9345         * src/SDCCloop.c:
9346         Fixed BUG #519583. If a conditional block ended in a return/break
9347         statement inside a loop, it was not being considered part of the loop.
9348
9349         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9350
9351 2002-02-10  Karl Bongers <karl AT turbobit.com>
9352
9353         * debugger/*:
9354         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9355         with lots of comments and notes.
9356
9357         * device/examples/test2.c:
9358         Fix bug, "red" variable not being initialized(compiler complained).
9359
9360         * device/examples/Makefile, examples/test3.c:
9361         Add Makefile in device/examples folder, compiles test3.c
9362         for use as a multiple module SDCDB test case.
9363
9364         * sim/ucsim/cmd.src/cmdset.cc:
9365         Took out debug printfs in ucsim "next" command.
9366
9367         * sim/ucsim/xa.src:
9368         Karl and Johan start ucsim XA support.  Most dissassembly working,
9369         about 75% emulation done(plenty of work remaining).
9370
9371         * sim/ucsim/z80.src:
9372         Add Z80 support to ucsim, add test-ucz80 regression test,
9373         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9374         Notice z80 compiler fails on examples/test3.c/crc code.
9375
9376 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9377
9378         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9379         Added support for --parms-in-bank1
9380
9381         * src/ds390/peeph.def:
9382         added a few more peephole optimzations
9383
9384         * src/ds390/main.c:
9385         1) added __builtin_inp & __builtin_outp used to read in data of given length
9386            from a memory mapped port
9387         2) added __builtin_memcmp
9388         3) added __builtin_swapw swap bytes of a short
9389
9390         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9391         1) handle multiple send & receives from register bank1
9392         2) ralloc can now allocate DPTR1 to some liveRanges
9393
9394         * src/SDCCsymt.c, src/SDCCsymt.h:
9395         changes to handle multiple sends & receives
9396
9397         * src/SDCCptropt.h:
9398         added some pointer arithmetic optimization
9399
9400         * src/SDCCptropt.c:
9401         added some pointer arithmetic optimizations but not stable yet so not
9402         called from anywhere (will get this working shortly)
9403
9404         * src/SDCCopt.c: fixed for multiple sends & receives
9405
9406         * src/SDCCmain.c:
9407         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9408         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9409            set preprocessor defines (depending on options)
9410
9411         * src/SDCCicode.c, src/SDCCicode.h:
9412         changes made to handle multiple sends & receives
9413
9414         * src/SDCCglobl.h:
9415         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9416
9417         * src/SDCCcse.c, src/SDCCcse.h:
9418         added function findbackward def (to be used in upcoming optimization)
9419
9420         * src/SDCCcflow.c, src/SDCCcflow.h:
9421         added function returnAtEnd - to determine if a basic block terminates with
9422         a RETURN iCode
9423
9424         * src/SDCCast.c, src/SDCCast.h:
9425         added option parms-in-bank1
9426
9427         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9428         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9429         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9430         adjusted for --parms-in-bank1 option
9431
9432         * device/include/string.h:
9433         donot redefine "reentrant" keyword
9434
9435         * device/include/ds80c390.h: Added some more SFRs
9436
9437 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9438
9439         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9440
9441 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9442
9443         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9444
9445 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9446
9447         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9448
9449 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9450
9451         * Added --xram-movc option
9452
9453 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9454
9455         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9456
9457 2002-01-11  Johan Knol
9458
9459         * Added math lib of Jesus Calvino-Fraga
9460
9461 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9462
9463         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9464         * support/regression/Makefile: new target test-mcs51-stack-auto
9465         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9466
9467 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9468
9469         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9470
9471 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9472
9473         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9474
9475 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9476
9477         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9478
9479         * src/SDCCglue.h: add definition for printIvalChar()
9480
9481 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9482
9483         * src/SDCCast.c: fix #498138 by Johan
9484
9485         * src/SDCCglue.c: fix #498138 by Johan
9486
9487 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9488
9489         * support/regression/Makefile: fix clean
9490
9491         * support/regression/ports/ds390/support.c: fix transmission of last character
9492
9493 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9494
9495         * /sdcc/src/ds390/gen.c:
9496         a) improved computing address of stack variable
9497         b) took out some #if 0 code
9498         c) improved parmBytes adjustment
9499         d) improved genPlusIncr & genMinusIncr
9500         e) genCmp could generate bad code (when left assigned to DPTR)
9501         f) Fixed bug in hasInc
9502
9503         * /sdcc/src/ds390/ralloc.c:
9504         a) packRegsForSupport could mess up live information (Fixed)
9505         b) packRegsDPTRuse could be incorrect for left & right shift
9506
9507         * /sdcc/src/mcs51/ralloc.c:
9508         packRegsForSupport could mess up the live information (Fixed)
9509
9510         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9511
9512         * /sdcc/src/SDCCast.c:
9513         can reverse a loop even if function call is present as long
9514         as the loop control variable is local & is not passed as parameter
9515
9516 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9517
9518         * /sdcc/ChangeLog: *** empty log message ***
9519
9520         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9521         More builtin function additions for TININative
9522
9523         * /sdcc/src/ds390/ralloc.c:
9524         Had broken the regression testsuite
9525
9526         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9527
9528         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9529         Added funcattr hasStackParms will be set for reentrant functions when there
9530         are paramteres on the stack, this helps in minimizing frame pointer generation
9531         typeFromStr can handle function pointers now
9532
9533         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9534         *** empty log message ***
9535
9536 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9537
9538         * /src/ds390/gen.c, /src/ds390/main.c:
9539         More builtin function additions for TININative
9540
9541         * /src/ds390/ralloc.c:
9542         Had broken the regression testsuite
9543
9544         * /src/SDCCast.c: Fixed a bug in dumptree
9545
9546         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9547         Added funcattr hasStackParms will be set for reentrant functions when there
9548         are paramteres on the stack, this helps in minimizing frame pointer generation
9549         typeFromStr can handle function pointers now
9550
9551         * /doc/builtins.txt, /doc/TININative.txt:
9552         *** empty log message ***
9553
9554
9555 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9556
9557         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9558         ALPHA version for -mTININative
9559
9560         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9561         updated to reflect changes in the port structure
9562
9563         * /src/port.h:
9564         added function do_assemble (similar to do_link) if non-null this function
9565         will be called to do assembly (-mTININative) requires a multi command
9566         assembly
9567         added function genAssemblerEnd will be called to generate assembler Epilogue
9568
9569         * /src/SDCCsymt.c:
9570         added _JavaNative to debug info printing
9571
9572         * /src/SDCCmain.c: added option --tini-libid
9573         added port->do_assemble function (-mTININative) has a multi command assemble
9574
9575         * /src/SDCCglue.c: Disabled "constExpr" check
9576         added port->genAssemblerEnd function
9577
9578         * /src/SDCCglobl.h: Added option --tini-libid value
9579
9580         * /src/SDCCast.h:
9581         tookout optimizeCompare from the header (has no external references)
9582
9583         * /src/SDCCast.c: made one more function "static"
9584
9585 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9586
9587         * src/z80/mappings.i: Added z80asm support.
9588
9589         * src/z80/main.c: Added z80asm support on --asm=z80asm
9590
9591         * src/z80/gen.c: Fixed asm portability issues.
9592
9593         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9594
9595         * src/SDCCglue.c (printExterns): Added global/extern split.
9596
9597 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9598
9599         * support/regression/Makefile: added test for mcs51 model large
9600
9601         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9602
9603         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9604
9605 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9606
9607         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9608
9609 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9610
9611         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9612
9613         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9614
9615 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9616
9617         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9618
9619         * support/regression/tests/simplefloat.c: Port to mcs51.
9620
9621 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9622         * support/regression/tests/bug-485362.c: Added.
9623
9624         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9625
9626         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9627
9628         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9629
9630         * src/z80/gen.c (aopDump): Added a dump function.
9631
9632 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9633         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9634
9635         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9636
9637         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9638
9639         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9640
9641         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9642
9643         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9644
9645         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9646
9647         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9648
9649         * support/regression/ports/ds390/support.c: Use tinibios.
9650
9651         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9652
9653 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9654
9655         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9656         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9657
9658         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9659
9660         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9661
9662 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9663
9664         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9665
9666         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9667         (packRegsForIYUse): Created and optimised.
9668
9669 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9670
9671         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9672 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9673
9674         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9675
9676         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9677
9678         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9679
9680 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9681
9682         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9683
9684         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9685
9686 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9687
9688         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9689
9690         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9691
9692         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9693
9694 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9695
9696         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9697         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9698         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9699
9700         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9701
9702         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9703         (genNotFloat): Added.
9704         (genUminusFloat): Added.
9705
9706         * device/lib/z80/Makefile: Added floating pt stubs.
9707
9708         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9709
9710         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9711
9712         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9713
9714 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9715
9716         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9717
9718         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9719
9720         * sdcc/support/regression/Makefile: Add port ds390.
9721
9722         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9723
9724         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9725
9726         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9727
9728         * sdcc/support/regression/ports/ds390/support.c: Added.
9729
9730         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9731
9732         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9733
9734         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9735
9736 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9737
9738         * device/include/malloc.h: Added z80 and gbz80 support.
9739
9740         * device/lib/gbz80/heap.s: Added.
9741
9742         * device/lib/z80/heap.s: Added.
9743
9744         * device/lib/malloc.c: Added z80 and gbz80 support.
9745
9746         * support/regression/tests/malloc.c (testMalloc): Added.
9747
9748         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9749
9750         * support/regression/tests/bug-478094.c: Added.
9751
9752         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9753
9754 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9755
9756         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9757
9758         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9759
9760         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9761
9762         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9763
9764         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9765
9766 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9767
9768         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9769
9770 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9771
9772         * support/regression/tests/bug-477927.c: Added.
9773
9774         * src/z80/peeph.def: Added minor rules.
9775
9776         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9777
9778         * src/z80/peeph.def: Added jump optimisation modification.
9779
9780 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9781
9782         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9783
9784 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9785
9786         * support/regression/tests/funptrs.c: Added.
9787
9788 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9789
9790         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9791
9792 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9793
9794         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9795
9796         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9797
9798         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9799         (movLeft2ResultLong): Created.
9800
9801         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9802         (joinPushes): Added.  Joins two char pushes into a word push.
9803
9804 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9805
9806         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9807
9808         * support/makebin/Makefile (install): Added creation of dest dir.
9809
9810 2001-10-24 Karl Bongers <karl AT turbobit.com>
9811
9812         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9813
9814 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9815
9816         * src/z80/ralloc.c: Turned off faulty pack for one use.
9817
9818         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9819
9820         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9821
9822 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9823
9824         * support/regression/Makefile: Improved clean
9825
9826         * support/regression/ports/gbz80/spec.mk: Added clean
9827
9828         * support/regression/ports/host/spec.mk: Added clean
9829
9830         * support/regression/ports/z80/spec.mk: Added clean
9831
9832         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9833
9834         * support/regression/ports/mcs51/timeout.c: little improvements
9835
9836 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9837
9838         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9839
9840         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9841
9842         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9843
9844 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9845
9846         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9847
9848         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9849
9850 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9851         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9852
9853         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9854
9855         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9856
9857         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9858
9859         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9860
9861         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9862
9863         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9864
9865         * support/regression/tests/longor.c: Added.
9866
9867 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9868
9869         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9870
9871         * as/mcs51/aslink.h: define PATH_MAX
9872
9873         * as/mcs51/asm.h: define PATH_MAX
9874
9875         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9876
9877         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9878
9879         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9880
9881         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9882
9883         * src/SDCCglobl.h: define PATH_MAX
9884
9885         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9886
9887         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9888
9889 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9890
9891         * src/z80/gen.c (gencjneshort): Fixed
9892
9893         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9894
9895 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9896
9897         * support/regression/tests/bug-469671.c: Added.
9898
9899         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9900
9901 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9902
9903         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9904
9905         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9906
9907 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9908
9909         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9910
9911         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9912
9913         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9914
9915         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9916
9917         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9918
9919         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9920
9921         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9922
9923 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9924
9925         * 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.
9926
9927         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9928
9929         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9930
9931 2001-10-07    <johan AT FRIJA>
9932
9933         * device/lib/gets.c (gets): fixed the return value.
9934
9935 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9936         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9937
9938         * 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.
9939
9940         * 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.
9941
9942         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9943
9944         * src/pic/gen.c: Removed Safe_strdup.
9945
9946         * configure.in: Added option to enable libgc support.
9947
9948         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9949         (bitVectUnion): Optimised.
9950         (bitVectIntersect): Optimised.
9951         (bitVectBitsInCommon): Optimised.
9952         (bitVectCplAnd): Optimised.
9953
9954         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9955
9956 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9957
9958         * src/SDCCmain.c: distinguish between assembler debug and plain options
9959
9960         * src/avr/main.c:   remove standard assembler options
9961
9962         * src/ds390/main.c: remove standard assembler options
9963
9964         * src/mcs51/main.c: remove standard assembler options
9965
9966         * src/port.h: removed "PENDING" comment
9967
9968 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9969
9970         * src/device/lib/_mulint.c  : new, with assember functions
9971
9972         * src/device/lib/_mullong.c : new, with assember functions
9973
9974         * src/device/lib/_divuint.c : with assember functions
9975
9976         * src/device/lib/_divsint.c : with assember functions
9977
9978         * src/device/lib/_divulong.c: with assember functions
9979
9980         * src/device/lib/_divslong.c: with assember functions
9981
9982         * src/device/lib/_moduint.c : with assember functions
9983
9984         * src/device/lib/_modsint.c : with assember functions
9985
9986         * src/device/lib/_modulong.c: with assember functions
9987
9988         * src/device/lib/_modslong.c: with assember functions
9989
9990         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9991
9992         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9993
9994         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9995                                       replaced _mululong.c and _mulslong.c by _mullong.c
9996
9997 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9998
9999         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10000
10001 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10002
10003         * src/SDCCglue.c: test, if win32api is available for MINGW
10004
10005 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10006
10007         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10008         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10009         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10010         * support/regression/ports/host/spec.mk: removed GENERIC
10011         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10012         * support/regression/ports/z80/spec.mk: removed GENERIC
10013
10014 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10015
10016         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10017
10018         * support/regression/tests/bug-467035.c: Created.
10019
10020 2001-10-01    <johan AT FRIJA>
10021
10022         * src/SDCC.y: fixed bug #466586 part 1
10023
10024 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10025
10026         * SDCCicode.c: z80 has no generic pointers
10027         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10028
10029 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10030
10031         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10032
10033 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10034
10035         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10036
10037         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10038
10039 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10040
10041         * configure.in: Fixed up so that ucsim is only configured once.
10042
10043         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10044
10045         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10046         (getPathDifference): As above.
10047
10048         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10049
10050         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10051
10052 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10053         * .version: Updated to 2.3.1
10054
10055         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10056         Added copyright header.
10057
10058         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10059         (assemble): Added support for macro based assembler commands.
10060         (linkEdit): Added support for macro based linker commands.
10061         (preProcess): Changed the pre-processor to use macros.
10062         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10063         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10064
10065         * device/lib/z80/crt0.s: Added module name for debugging.
10066
10067 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10068
10069         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10070
10071         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10072
10073         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10074
10075         * src/Makefile.in: Added SDCCmacro and SDCCutil
10076
10077 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10078
10079         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10080
10081 2001-09-16    <johan AT FRIJA>
10082
10083         * 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.
10084
10085 2001-09-15    <johan AT FRIJA>
10086
10087         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10088         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10089
10090 2001-09-11    <johan AT FRIJA>
10091
10092         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10093
10094 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10095
10096         * support/regression/tests/bug-460444.c: Added test case.
10097
10098         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10099         (genCast): Added justification for all of the asserts.
10100
10101 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10102
10103         * support/regression/support.c: _xdata replaced by xdata
10104
10105         * support/regression/spec.mk: removed _generic
10106
10107 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10108
10109         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10110
10111         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10112         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10113
10114         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10115
10116         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10117
10118         * support/regression/tests/bug-460010.c: Added test case.
10119
10120         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10121
10122 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10123
10124         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10125
10126         * support/regression/testfwk.c: removed workaround for bug #436344
10127
10128         * support/regression/tests/bp.c: use less memory with mcs51
10129
10130         * support/regression/tests/bug-441448.c: use less memory
10131
10132         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10133
10134         * support/regression/collate-results.py: typo
10135
10136 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10137
10138         * support/regression/tests/fetchoverlap.c: Added new test case.
10139
10140         * support/regression/tests/bp.c: Added new test case.
10141
10142         * support/regression/tests/bug-448984.c: Added new test case.
10143
10144         * support/regression/tests/pow2shifts.c: Added new test case.
10145
10146         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10147         (genlshTwo): Fixed right shift for count > 8.
10148
10149         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10150
10151 2001-09-08    <johan AT FRIJA>
10152
10153         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10154
10155 2001-09-07    <johan AT FRIJA>
10156
10157         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10158
10159         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10160
10161 2001-09-06    <johan AT FRIJA>
10162
10163         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10164         * bernhard noted me at this: "() equals to (void)" (1.38)
10165
10166 2001-09-05    <johan AT FRIJA>
10167
10168         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10169
10170 2001-09-04    <johan AT FRIJA>
10171
10172         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10173
10174
10175 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10176
10177         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10178
10179 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10180
10181         * link/z80/aslink.h: Fixed path for PATH_MAX
10182
10183 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10184
10185         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10186
10187         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10188
10189         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10190
10191         * 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.
10192
10193 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10194
10195         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10196         (genCmp): Fixed up genCmp for the GB with longs.
10197
10198         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10199
10200         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10201
10202         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10203
10204         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10205
10206 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10207
10208         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10209
10210 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10211
10212         * 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.
10213
10214         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10215
10216 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10217
10218         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10219
10220         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10221
10222 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10223
10224   * sim/ucsim/configure:    little improvement of Cygwin-detection
10225   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10226   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10227   * support/regression/tests/bug-221100.c: small changes for mcs51
10228   * support/regression/tests/bug-221168.c: small changes for mcs51
10229   * support/regression/tests/bug-227710.c: small changes for mcs51
10230   * support/regression/tests/staticinit.c: small changes for mcs51
10231   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10232   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10233   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10234
10235 $Revision$