4693ac983f46cc6024d80aa81e980564c154f3cc
[fw/sdcc] / ChangeLog
1 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
4         and fields-list too
5         * src/SDCCast.c (createIvalArray): removed obsolete comment
6
7 2005-11-24 Borut Razem <borut.razem AT siol.net>
8
9         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
10           added missing device/lib/mcs51/crt*.asm sources
11
12 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
13
14         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
15
16 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
17
18         * device/lib/_fs2schar.c,
19         * device/lib/_fs2sint.c,
20         * device/lib/_fs2slong.c: optimized inline asm
21
22 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
23
24         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
25           Better handling of floats between -1.0 and 0.0.
26
27 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
28
29         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
30           (the missing "if"s prohibited removal of redundant labels)
31
32 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
33
34         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
35           Properly convert floats between -1.0 and 0.0 to long, int, and char
36           types (max integer value of negative floats tends to zero).
37         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
38           Removed changes made so to work properly with floats between
39           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
40           and _fs2char.c
41
42 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
43
44         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
45         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
46         (genCast) cosmetic change
47         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
48         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
49         from mcs51
50         * support/regression/tests/bitfields (testSignedBitfields): added
51
52 2005-11-18 Borut Razem <borut.razem AT siol.net>
53
54         * sdcc/device/lib/Makefile.in: remove all unnecessary files
55         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
56           introduced SILENT option to make building of pic16 libraries less
57
58 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
59
60         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
61           Now they work properly with floats between -1.0 and 0.0
62         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
63
64 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
65
66         * src/SDCCicode.c (printOperand): added missing else
67
68 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
69
70         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
71         reformatted for better readability
72         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
73         signed bitfields
74
75 2005-11-17 Borut Razem <borut.razem AT siol.net>
76
77         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
78           introduced SILENT option to make building of pic16 libraries less
79           verbose - used for nightly snapshot build
80         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
81           available on Win32 platforms.
82         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
83           medium, large, pic and pic16
84
85 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
86
87         * device/lib/printf_large.c: Temporary patch for bug 1358192:
88           printf("%f"...) sets fraction to zero.
89
90 2005-11-16 Raphael Neider <rneider AT web.de>
91
92         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
93           fixes #1357221
94         * src/pic/gen.c (genIfx): implemented for CARRY bit
95         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
96           to generic pointers, fixes #1357332,
97           (pic16_movLit2f): NEW,
98           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
99
100 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
101
102         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
103
104 2005-11-11 Raphael Neider <rneider AT web.de>
105
106         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
107         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
108           compute pointer's type from operand,
109           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
110           improved single bit reads, fixes bug #1353379
111
112 2005-11-09 Borut Razem <borut.razem AT siol.net>
113
114         * support/scripts/sdcc.nsi: added lib/pic to the package
115
116 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
117
118         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
119
120 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
121
122         * support/regression/tests/bug1348008.c: added
123         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
124         * support/regression/tests/bug1337835.c: updated comment
125
126 2005-11-06 Borut Razem <borut.razem AT siol.net>
127
128         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
129           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
130           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
131           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
132           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
133           dynamic construction of cl_error_class and derivates - 2.nd try
134
135 2005-11-05 Borut Razem <borut.razem AT siol.net>
136
137         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
138           bug, which caused Bus Errors on sparc solaris
139
140 2005-11-04 Borut Razem <borut.razem AT siol.net>
141
142         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
143           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
144           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
145           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
146           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
147           and derivates to resolve the initialization problem on OSX
148
149 2005-11-02 Borut Razem <borut.razem AT siol.net>
150
151         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
152           corrected typo - #include <winsock2.h>
153
154 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
155
156         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
157           (_asxxxx_mapping): added org directive for future enhancements
158
159 2005-11-01 Borut Razem <borut.razem AT siol.net>
160
161         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
162           enabled sockets on WIN32
163         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
164
165 2005-10-31 Borut Razem <borut.razem AT siol.net>
166
167         * support/regression/generate-cases.py: escape backslashes in {testcase}:
168           WIN32 backslash path delimiters should be escaped when used in C strings
169         * support/regression/tests/bitfields.c: exclude failing assertions for
170           __CYGWIN32__ and __MINGW32__ hosts
171
172 2005-10-30 Borut Razem <borut.razem AT siol.net>
173
174         * src/SDCCutil.c: corrected double comparison typo
175
176 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
177
178         * device/lib/medium/Makefile: added for new memory model medium
179         * device/include/asm/mcs51/features.h: updated for medium/pdata
180         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
181           added Multiply & Accumulate sbit's and MAC0_PAGE define
182         * device/include/mcs51/c8051f300.h: added sfr16 definitions
183         * device/include/mcs51/c8051f310.h: added sfr16 definitions
184         * device/lib/_mullong.c: update for medium model
185         * device/lib/incl.mk: added medium model
186         * doc/sdccman.lyx: documented medium model
187         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
188         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
189         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
190         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
191           (allocParms): set SCLS and OCLS to pdata for medium model
192         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
193           for pdata,
194           (powof2): return <0 if not power of 2
195         * src/avr/gen.c (genBitWise): use updated powof2
196         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
197           (shiftR2Left2Result): small optimization in setup, save acc when storing,
198           (shiftLLeftOrResult): use B if necessary
199         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
200         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
201         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
202         * support/regression/Makefile.in: added test-mcs51-medium
203         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
204
205 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
206
207         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
208         specifier unsigned
209         * device/lib/time.c (mktime): fixed bug 1334315
210
211 2005-10-28 Raphael Neider <rneider AT web.de>
212
213         * device/include/pic/p16f_common.inc: added common declarations
214         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
215
216 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
217
218         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
219           (aopPutUsesAcc): added to predict accumulator use,
220           (assignResultValue): save acc if necessary,
221           (genMinusDec): store result if indirectly addressed,
222           (genDivOneByte):  save acc if necessary,
223           (movLeft2Result): bugfix if left already in acc,
224           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
225             attention to accumulator use (esp. pdata),
226           (genReceive): receive pdata correctly
227         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
228         * src/SDCCicode.h: added isOperandInPagedSpace prototype
229
230 2005-10-27 Raphael Neider <rneider AT web.de>
231
232         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
233
234 2005-10-27 Raphael Neider <rneider AT web.de>
235
236         * .version: changed version to 2.5.4
237         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
238         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
239           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
240             arithmetics support routines
241         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
242         * device/lib/Makefile.in: also create installdir for pic
243
244         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
245           pic14 port as well
246         * src/pic/device.c (dump_sfr): rewritten to delegate register
247           placement to the linker (use `extern sym' rather than sym EQU addr),
248           (validAddress): fixed to check last specified address
249         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
250           (popGetLit): truncate literal value to 8 bit,
251           (popGet): moved assert to more appropriate place
252           (popGetExternal): create pCode operand from and mark the according
253             symbol as being `extern'
254           (popGetAddr): added sanity check on immediate's offset, provide
255             GPOINTER tag on demand
256           (aopPut): fixed for immediates,
257           (mov2w_op): move operand's address or contents to WREG (depending on
258             operand type), safer variant of mov2w,
259           (movwf,call_libraryfunc): NEW, handy abbreviations,
260           (get_argument_pcop,get_return_val_pcop,pass_argument,
261           get_returnvalue): interface for accessing function parameters and
262             return values,
263           (assignResultValuei,genRet): use new parameter/return value interface
264           (pic14_getDataSize): back to old version handling generic pointers,
265           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
266             provided implementation and/or fixed old one,
267           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
268             calls, removed legacy 8051 reference code
269           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
270           (loadSignToC): NEW, move the operands sign bit to CARRY,
271           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
272             genRightShiftSigned, accepts negative shift counts,
273           (setup_fsr): load FSR and adjust IRP (indirect memory access),
274           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
275             generic pointers, __data pointers and __code pointers,
276           (genUnpackBits,genPackBits): rewritten to work with generic pointers
277             and signed bitfields, limit bitfields to 8 bit,
278           (genDataPointerGet): fixed number of bytes read,
279           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
280           (genPointerGet,genPointerSet): fixed handling of __code pointers,
281             pointers to constant data are no longer assumed to point to __code
282             space, removed invalid pointer types,
283           (bitpatternFromVal): retrieve the PICs representation of an integer
284             or float literal,
285           (genDataPointerSet): fixed assigning to po_immediate operands,
286           (genGenPointerSet): implemented as library call,
287           (genIfx): fixed incorrect condition,
288           (genAddrOf): limit generic pointers' addresses to 2 bytes,
289             provide GPOINTER tag according to destination's storage class,
290           (genCast): added code to handle casting to generic pointers, added
291             sign-/zero extension of the result
292           (aop_isLitLike,op_isLitLike): fixed handling of immediates
293         * src/pic/gen.h: added macros to access IRP bit in STATUS register
294         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
295           extend the result
296         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
297           address/register resides in the shared banks
298           (emitSymbolToFile): improved to handle global and `pinned' symbols,
299             put all variables into separate sections (have the linker arrange
300             them)
301           (picglue): put init code and interrupt handlers in separate sections
302         * src/pic/main.c: added port specific options table, modified to PORT
303           structure to make GPOINTERs 3 byte, added pic14_options
304           (_pic14_do_link): private linking routine (update paths to libraries,
305             add libsdcc.lib by default)
306         * src/pic/main.h: declare pic14_options
307         * src/pic/pcode.c: fixed instructions i/o relations,
308           (RegCond): reverted to correct version,
309           (newpCodeOpLit): truncate literals to 8 bit,
310           (genericPrint): added debug output,
311           (getRegFromInstruction): fixed for various operand types, simplified
312           (BuildFlow): fixed broken handling of isntructions with labels
313           (LinkFlow): start at last instruction in flow (skip trailing comments),
314             pass the flow on to the next instruction after CALL
315           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
316           (insertPCodeInstruction): fixed inserting after a skip instruction,
317           (DoBankSelect): fixed for labeled instructions
318           (OptimizepBlock): honor --nopeep switch
319           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
320         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
321         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
322           (pCodeOptime2pCodes): allow disabling this optimization via
323             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
324             but is still buggy), started implementation of a dataflow based
325             pCode optimization (CSE + dead code elimination)
326           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
327         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
328           names are independant of the stack location and therefore portable across
329           devices
330
331 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
332
333         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
334           (selectSpil): fixed bug 1337835 by not spilling bit variables
335         * support/regression/tests/bug1337835.c: added test for this bug
336         * src/mcs51/peeph.def: restart after rule 3.c,
337           addded rules 263.x to optimize loading constants
338
339 2005-10-26 Raphael Neider <rneider AT web.de>
340
341         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
342         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
343           (genAssign): emit warning when casting literals to generic pointer
344             type, also applies when taking the address of a fixed variable,
345           (genCast): improved casting to generic pointers
346         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
347           extern variables, added verbose error message
348         * device/include/pic16/{string.h,errno.h}: added #pragma library c
349
350 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
351
352         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
353         carry must be complemented too
354         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
355         could be emitted by genMinus
356         * src/SDCCval.c (constVal): fixed bug 1305065
357
358 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
359
360         * src/SDCCast.c (addCast): added promotion for bit variables
361         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
362         promotion casts + optimisation
363         (optimizeGetWord): fix warning 'i' might be used uninitialized
364         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
365         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
366
367 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
368
369         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
370         all chars are promoted to int; promotion should be handled in SDCCast.c
371
372 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
373
374         * device/lib/_strcmp.c: Fixed bug 1326457
375
376 2005-10-11 Raphael Neider <rneider AT web.de>
377
378         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
379         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
380
381 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
382
383         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
384         * support/regression/tests/sfr16.c: added test for the sfr32 bug
385
386 2005-10-04 Raphael Neider <rneider AT web.de>
387
388         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
389           device/lib/pic16/pics.all: added pic18f1320
390         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
391
392 2005-09-30 Raphael Neider <rneider AT web.de>
393
394         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
395         * src/pic16/devices.inc: NEW, provides device descriptions
396         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
397
398 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
399
400         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
401           GETHBIT
402
403 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
404
405         * doc/sdccman.lyx: updated Highest Order Bit documentation,
406           documented Any Order Bit, Higher Order Byte and Higher Order Word
407         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
408         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
409           (optimizeGetAbit): new, to get any bit, not only the high bit,
410           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
411           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
412           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
413           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
414             RIGHT_OP: also try GETBYTE, GETWORD optimization,
415             GETABIT, GETBYTE, GETWORD: decorate them,
416           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
417           (ast_print): added GETABIT, GETBYTE, GETWORD
418         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
419         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
420           (geniCodeBinary): new generic binary icode,
421           (ast2iCode): added GETABIT, GETBYTE, GETWORD
422         * src/port.h: updated comment for PORT.hasExtBitOp
423         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
424           (genGetByte): new, to get a single byte,
425           (genGetWord): new, to get a word from a long,
426           (gen51Code): added GETABIT, GETBYTE, GETWORD
427         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
428
429 2005-09-23 Raphael Neider <rneider AT web.de>
430
431         * configure.in, configure: have device/lib/pic configured
432         * device/lib/Makefile.in: added model-pic14
433         * device/lib/clean.mk: added pic/ to clean rule
434         * device/lib/pic: added rudimentary pic14 library providing support
435           functions for multiplication/division/generic pointer access
436         * src/SDCCopt.c (convilong): mark support functions as extern
437           for pic14 port as well
438         * src/pic/gen.c (genMult): added assertions,
439           (genpic14Code): emit warning on unhandled iCodes
440         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
441         * src/pic/pcode.c (pCodeOpCopy),
442         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
443           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
444           SFR_REGISTER}), made safe for future extensions
445         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
446           instructions even if preceeded by SKIP instructions (also remove
447           them); removed unused code
448         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
449           prevents leaving parts of the structure uninitialized after copying
450
451 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
452
453         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
454           ago by me
455         * support/regression/tests/addsub.c: added test for the bug
456
457 2005-09-21 Raphael Neider <rneider AT web.de>
458
459         * device/include/pic16/pic18f1220.h,
460           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
461         * device/lib/pic16/Makefile.rules: added missing opening paren
462         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
463           are provided in genutils.c,
464           (genUminusFloat,genUminus,genCmpEq): added asserts on different
465           operand/result sizes,
466           (genCmp): assert on NULL pointers first, then check deref'ed values
467         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
468           result size
469
470 2005-09-18 Raphael Neider <rneider AT web.de>
471
472         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
473           as these are now unused,
474           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
475         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
476           local, avoids uninitialized pointer dereference on r->name
477         * src/pic16/ralloc.c (newReg): fixed indentation
478
479 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
480
481         * src/SDCCval.c (constVal): fixed bug 730366
482         * support/Util/SDCCerr.c,
483         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
484
485 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
486
487         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
488
489 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
490
491         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
492
493 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
494
495         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
496           (hex2dec): made hex_digit unsigned char, removed ascii dependance
497         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
498           (hex2dec): made hex_digit unsigned char, removed ascii dependance
499         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
500         * packihx/packihx.c (hexDigit): made c unsigned char
501         * as/mcs51/lklibr.c (fndsym),
502         * link/z80/lkgb.c (gb),
503         * link/z80/lklibr.c (fndsym),
504         * link/z80/lkrloc.c (relr),
505         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
506         * src/SDCC.lex (checkCurrFile, process_pragma),
507         * src/SDCCglue.c (spacesToUnderscores),
508         * src/SDCCmain.c (setParseWithComma, processFile),
509         * src/asm.c (tvsprintf, printCLine),
510         * src/avr/gen.c (emitcode, aopPut),
511         * src/ds390/gen.c (emitcode),
512         * src/hc08/gen.c (emitcode, emitinline),
513         * src/mcs51/gen.c (emitcode, genInline),
514         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
515           tokenizeLineNode),
516         * src/pic/ralloc.c (debugLog),
517         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
518           tokenizeLineNode),
519         * src/pic16/ralloc.c (debugLog),
520         * src/z80/main.c (_process_pragma):
521            made all ctype.h function calls safe
522         * src/SDCCopt.c: include math.h for fabs
523         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
524           and used them throughout the code to make ctype.h function calls safe
525         * src/ds390/main.c (asmLineNodeFromLineNode),
526         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
527         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
528            unsigned char*
529         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
530           (newpCodeAsmDir): made ctype.h function calls safe
531         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
532           pic16_emitcode):  made lbp unsigned char*
533         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
534           (pic16_newpCodeAsmDir): made ctype.h function calls safe
535         * src/xa51/gen.c (emitcode),
536         * src/z80/gen.c (_emit2): made lbp unsigned char*
537         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
538            char*
539
540 2005-09-05 Raphael Neider <rneider AT web.de>
541
542         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
543           access bank splitpoint
544
545 2005-09-05 Raphael Neider <rneider AT web.de>
546
547         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
548
549 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
550
551         * .version: changed to version 2.5.3
552         * doc/sdccman.lyx: changed version to 2.5.3,
553           documented --codeseg and --constseg and pragma codeseg and constseg,
554           documented bit parameters (reentrant) and bit returning
555         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
556            currFunc->recvSize, but is this ok for all ports?
557           (ast2iCode): result of ~ on unsigned char must be cast to int for
558            bool to work
559         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
560           function pointers in bit space
561         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
562           (processFuncArgs): call port.reg_parm() with reentrancy info
563         * src/port.h,
564         * src/avr/main.c,
565         * src/ds390/main.c,
566         * src/hc08/main.c,
567         * src/pic/main.c,
568         * src/pic16/main.c,
569         * src/xa51/main.c,
570         * src/z80/main.c: port.reg_parm prototype extended with
571           "bool reentrant" parameter
572         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
573           options.stackAuto for allocating bit register parameters
574         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
575           (genSend): set BitBankUsed if it is,
576           (selectRegBank): factored out of genCall for use in genPcall,
577           (genCall): removed redundant dtype assignmen, use selectRegBank,
578           (genPcall): handle returning in Carry properly, save in F0 if needed,
579           (genReceive): handle bit register parameters
580         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
581           (mcs51_assignRegisters): enable bit registers for all reentrant
582            functions and don't set BitBankUsed unconditionally
583         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
584         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
585         * support/regression/tests/funptrs.c: added tests for BOOL and for return
586
587 2005-08-27 Borut Razem <borut.razem AT siol.net>
588
589         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
590         ppc-osx (Darwin) does not support -u option. It seems that it is
591         supported only on Linux - GNU cp
592
593 2005-08-25 Borut Razem <borut.razem AT siol.net>
594
595         * sim/ucsim/gui.src/serio.src/Makefile.in,
596           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
597           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
598           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
599           install and strip, since the strip at /usr/ccs/bin should be used
600           on solaris
601
602 2005-08-24 Borut Razem <borut.razem AT siol.net>
603
604         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
605
606 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
607
608         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
609         ffffffffu
610
611 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
612
613         * as/mcs51/aslink.h: completed lkrloc.c prototypes
614         * as/mcs51/lkmain.c (link_main): fixed warning
615         * device/include/stdbool.h: ds390 has no advanced bit support yet
616         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
617         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
618         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
619           and updated their macros
620         * src/SDCCval.c (constVal): updated comment for renamed b_long
621
622 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
623
624         * as/mcs51/asdata.c: changed ctype['['] to BINOP
625         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
626           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
627           (oprio): set priority for '['
628         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
629            and adb_24_bit
630         * as/mcs51/asm.h: added defines R_BIT and S_BIT
631         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
632         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
633         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
634           added overlayable BIT_BANK area
635         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
636           (summary2): explain 'T' in legenda
637         * as/mcs51/lkrloc.c: replaced old K&R style,
638           (relr): added R_BIT processing,
639           (errmsg): added "Bit-addressable relocation error",
640           (adb_bit): added for converting from byte- to bit-addressable space,
641           (adb_24_bit): added for converting from byte- to bit-addressable space
642         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
643            used in reentrant functions now even as return value
644         * device/lib/_gptrput.c (_gptrput): removed obsolete code
645         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
646           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
647         * src/SDCCglobl.h: added indicator BitBankUsed
648         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
649            the bit registers b0-b7
650         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
651           (geniCodeCast): fixed bug 1263853,
652           (geniCodeLogicAndOr): put result in bool or char,
653           (geniCodeReceive): added parameter func for accessing the return type,
654           (geniCodeFunctionBody): pass func to geniCodeReceive
655         * src/SDCCmain.c: added indicator BitBankUsed
656         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
657         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
658           (checkSClass): don't put automatic bool/bit on stack,
659           (checkFunction): removed check on function cannot return bit
660         * src/SDCCsymt.h: added newBoolLink prototype
661         * src/mcs51/gen.c (rb1regs): added bit registers,
662           (movc): created for assigning to carry,
663           (pushReg, popReg): created for pushing registers,
664           (sameRegs): check both AOP_REG and AOP_CRY types,
665           (aopOp): handle bit registers,
666           (aopPut): optimization no self-assign,
667           (saveRegisters): push reg->base (bits) only once for bit registers,
668            and use pushReg,
669           (unsaveRegisters): pop reg->base only once and use popReg,
670           (assignResultValue): added parameter func and return in carry for bits,
671           (genIpush): optimization no reload in A if not changed,
672           (genSend): bit parameters in reentrant functions are passed in bit
673            registers by first assigning to bits in B, then save registers and
674            copy B to bits,
675           (genCall): handle returning in Carry properly, save it in F0 if needed,
676           (genPcall): updated assignResultValue call, this is not safe yet for bit
677            returning function !!!
678           (genFunction): don't generate equ's for bit registers and use pushReg,
679           (genEndFunction): take care of bit returning functions and use popReg,
680           (genRet): return bit in Carry,
681           (genIfx): optimize bit registers and other directly addressable bits,
682           (genReceive): updated assignResultValue call
683         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
684           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
685            registers when using stack-auto
686         * src/mcs51/ralloc.c (_G): added allBitregs,
687           (regs8051): added the bit registers,
688           (createStackSpil): use macro IS_BIT,
689           (getRegBit): added to allocate a bit register, else spill,
690           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
691           (updateRegUsage): factored out to ease stepping while debugging,
692           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
693            also allocate bit registers,
694           (fillGaps): handle bit registers,
695           (findAllBitregs): added to create bit vector with all bit registers,
696           (mcs51_allBitregs): returns this bit vector,
697           (mcs51_assignRegisters): when using stack-auto use bit registers for
698            passing parameters and creating local variables
699         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
700
701 2005-08-22 Borut Razem <borut.razem AT siol.net>
702
703         * device/lib/Makefile.in: replaced find option -or with -o
704           to make it run on solaris
705
706 2005-08-22 Raphael Neider <rneider AT web.de>
707
708         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
709           fixes #1265442 (crash on Solaris)
710
711 2005-08-20 Borut Razem <borut.razem AT siol.net>
712
713         * configure, configure.in: added tests for libsocket and libnsl libraries,
714           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
715           from support/regression/Makefile.in
716         * support/regression/Makefile.in: added
717         * device/lib/pic16/Makefile.common.in: force make to use bash shell
718         * sim/ucsim/libtool: regenerated on sparc-solaris
719         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
720           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
721           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
722           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
723           sparc-solaris, which doesn't use GNU ld linker
724         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
725         * as/Makefile: find on sparc-solaris does not support -maxdepth option
726
727 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
728
729         * src/mcs51/peeph.def: updated comments
730
731 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
732
733         * device/lib/_gptrget.c,
734         * device/lib/_gptrput.c: slightly shorter
735         * doc/sdccman.lyx: incremented version
736         * src/mcs51/peeph.def: moved peephole comments to the line of first
737           change to better keep line correlation, reanimated 186.e
738         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
739
740 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
741
742         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
743           David Saxton with quotes around file name.
744
745 2005-08-15 Borut Razem <borut.razem AT siol.net>
746
747         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
748           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
749           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
750           make tests run on x86_64 platform
751
752 2005-08-13 Raphael Neider <rneider AT web.de>
753
754         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
755           as it might be executed DURING a build (parallel make is wonderful)
756
757 2005-08-13 Raphael Neider <rneider AT web.de>
758
759         * device/lib/Makefile.in (port-specific-objects-pic16):
760           revert to cp $(PORT)/bin/*.* $(PORTDIR)
761         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
762           dependency
763         * device/lib/pic16/Makefile.rules: build subdirs before creating
764           the library, removed builddir rule, create $(builddir) early in
765           recurse rule, use empty recurse rule for leaf directories
766         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
767           mkdir errors (race condition), removed duplicate suffix "hex"
768           from clean rules
769         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
770         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
771           prevents mkdir -p from aborting on Alpha
772
773 2005-08-12 Raphael Neider <rneider AT web.de>
774
775         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
776           db-statements in order to allow for arrays of pointers in code
777           sections to be placed without interspersed 0-padding, fixes
778           bug #1256215
779         * (emitStatistics): fixed division by zero for pic18f1220
780         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
781           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
782         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
783         * (pic16_pCodeConstString): keep track of already emitted string
784           literals to prevent "duplicate definitions of symbol _str_NR"
785         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
786           debug message
787         * device/lib/Makefile.in: ignore failing PIC16 library builds
788         * device/lib/pic16/Makefile: do not build if gputils are missing
789         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
790
791 2005-08-10 Raphael Neider <rneider AT web.de>
792
793         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
794           my last commit)
795
796 2005-08-10 Raphael Neider <rneider AT web.de>
797
798         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
799           Rokas' patch to add the new fixed point type "__fixed16x16"
800         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
801           functions for __fixed16x16 arithmetics
802         * device/lib/pic16: reimplemented the build system to support
803           a separate build directory, better handling of libio (create
804           the library in a separate subdir for each architecture) and
805           easier configuration (centralized in Makefile.common)
806
807 2005-08-07 Raphael Neider <rneider AT web.de>
808
809         * src/pic16/gen.c (genrshTwo): fixed sign extension
810         * src/pic16/device.c: added pic18f2320, 4220 and 4320
811         * device/include/pic16/pic18f2220.h: changed some bit definitions,
812           added T0CONbits
813         * device/include/pic16/pic18f4220.h: NEW, header for
814           pic18f4220 and pic18f4320
815         * device/include/pic16/pic18fregs.h: added new devices,
816           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
817         * device/include/pic16/signal.h: resolved name clashes
818           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
819           to also allow testing for interrupt enable bits, added
820           comments on how to use the macros
821         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
822         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
823           register definitions for the devices
824         * device/lib/pic16/pics.all: added new devices
825         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
826           allocated memory
827         * device/lib/pic16/libc/stdlib/memfree: do not count
828           the block header as free memory
829         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
830           simplified and added missing end-of-blocklist-marker
831           (reported by Peter Onion, fixes #1252814)
832         * (_mergeHeapBlock): fixed loop condition
833         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
834           len==0, restructured code
835         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
836           up a bit, reduced bitfield accesses, prevent endless loops
837           in case of heap corruption
838         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
839           "unreferenced arguments/must return a value" warnings
840         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
841           replaced BAUDREG with SPBRG
842         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
843           device/lib/pic16/debug/gstack/gstack.c: replaced
844           _naked, _asm, _endasm with __naked, __asm, __endasm
845
846 2005-08-05 Raphael Neider <rneider AT web.de>
847
848         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
849           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
850
851 2005-08-05 Borut Razem <borut.razem AT siol.net>
852
853         * device/lib/Makefile.in: added missing ';'
854         * configure: removed ^M characters
855
856 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
857
858         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
859           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
860           License
861
862 2005-08-04 Borut Razem <borut.razem AT siol.net>
863
864         * configure.in: pic16 libraries build 2nd try - enable running
865           configure in device/lib/pic16
866         * configure: regenerated from configure.in
867         * device/lib/Makefile.in: create $(PORT)/bin directory
868
869 2005-08-03 Raphael Neider <rneider AT web.de>
870
871         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
872           to get/set values via pointers
873         * (genUnpackBits,genPackBits): changed detection of
874           ptr->bitfield vs. sym.bitfield, fixed access via generic
875           pointers, removed dead (wrong) code for multibyte bitfields
876         * (genNearPointerGet, genGenPointerGet): removed useless code,
877           fixed bitfield detection, fixes #1250594
878         * (genNearPointerSet): removed useless code
879         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
880           and introduced macro pic16_emitpcode that conditionally emits
881           the origin of the following pCode (useful for debugging SDCC)
882         * src/pic16/pcode.c: changed (and disabled) some debug outputs
883         * (createDefmap): fixed handling of LFSR for --optimize-df
884
885 2005-08-02 Borut Razem <borut.razem AT siol.net>
886
887         * device/lib/Makefile.in: pic16 libraries build enabled since
888           gputils-0.13.2 are now localy installed at sourceforge's compile farm
889
890 2005-08-02 Raphael Neider <rneider AT web.de>
891
892         * src/pic16/gen.c (genPackBits): removed deprecated warning
893         * (genGenPointerSet): fixed bitfield detection
894
895 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
896
897         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
898
899 2005-07-31 Raphael Neider <rneider AT web.de>
900
901         * device/lib/pic16/libdev/pic18f458.c,
902           device/include/pic16/pic18f458.h: added missing T0CONbits
903
904 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
905
906         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
907
908 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
909
910         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
911
912 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
913
914         * device/include/mcs51/at89c51ed2.h: added.
915
916 2005-07-23 Raphael Neider <rneider AT web.de>
917
918         * src/pic/gen.h: added emitpcode macro for debugging
919         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
920           and replace by macro adding debug information on demand
921         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
922         * (gencjne): tried to fix; replaced with correct (slower) code
923         * (gen{Unp,P}ackBits): fixed single bit access
924         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
925         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
926           previous instruction
927         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
928           register has to be handled with care (forbidding movement
929           of assignments/uses, removing assignments completely, ...)
930         * (pCodeOptime2pCodes): make use of regIsSpecial
931         * added lots of debugging output (commented out)
932         * src/pic/rallloc.c (deassignLRs): prevent operand registers
933           from being reused as result UNLESS it is known to work
934
935 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
936
937         * support/Util/dbuf.h: include <stddef.h> for size_t
938         * .version: changed to version 2.5.2
939
940 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
941
942         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
943
944 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
945
946         * src/hc08/gen.c (genMinus): fixed bug #1241835,
947           (genModOneByte): removed needless psha/pula
948
949 2005-07-22 Raphael Neider <rneider AT web.de>
950
951         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
952           have PIC14 handled like PIC16, fixes broken pic14 linker calls
953         * src/pic/gen.c (resolveIfx): do not "invent" labels
954         * (genSkipc): changed to positive logic
955         * (genSkipCond): removed as no longer needed
956         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
957           backport from PIC16
958         * (genLeftShift): check operands are in different registers
959         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
960           INCF does not update CARRY...
961         * src/pic/main.c: fixed _linkCmd
962         * src/pic/pcode.c (unlinkpCode): added inactive code
963         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
964           alive (do not assign result and operand overlapping registers)
965
966 2005-07-22 Raphael Neider <rneider AT web.de>
967
968         * src/pic/device.c (dump_sfr): replaced register declaration with
969           call to emitSymbolToFile() to avoid duplicate symbols
970         * (assignRelocatableRegisters): do not declare external symbols
971         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
972           right (take size of type, not etype)
973         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
974         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
975         * (packRegsForAccUse): disabled assignment of WREG as
976           the result reg to prevent occurence of just fixed #1235003,
977           fixes #1242954
978         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
979           symbols (avoids duplicate symbols in .asm file)
980         * (pic14emitRegularMap): use emitSymbolToFile()
981         * src/pic/gen.c (aopOp): fixed spillLocation handling
982         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
983         * (genDataPointerSet): removed unneccessary variables/output
984
985 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
986
987         * as/mcs51/lkarea.c: enlarged codemap for banked memory
988         * device/lib/mcs51/crtbank.asm: added # to 0x0F
989
990 2005-07-21 Raphael Neider <rneider AT web.de>
991
992         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
993           architecture cannot handle them efficiently, fixes bug #1235003
994         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
995           check for empty sets before using them (fixes bug #1232190)
996
997 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
998
999         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1000           (lnksect2): generate warnings for memory overlap
1001         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1002           constseg to set the name of these segments so you can instruct the linker
1003           to place them in banks
1004         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1005         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1006           added code_seg and const_seg to options
1007         * src/SDCCglue.c (emitMaps): use options.const_seg,
1008           (createInterruptVect): put interrupt vectors in segment HOME,
1009           (glue): put HOME before static segment and put the main glue in HOME,
1010           (glue): use options.code_seg
1011         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1012         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1013           these segments so you can instruct the linker to place them in banks
1014           (linkEdit): use code_loc for HOME segment which should be the first
1015           segment in code memory now
1016         * src/SDCCmem.c: fixed more stuff like bug 1238386
1017         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1018           (changePointer): don't change function pointers to code pointers for
1019           banked functions,
1020           (compareType): added exceptional check for banked function pointers
1021         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1022         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1023           after static in code memory
1024         * src/mcs51/gen.c: added aopLiteralLong prototype,
1025           (aopForSym): use getSize for functions,
1026           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1027           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1028           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1029           the segment,
1030           (genPcall): use call for literal function pointers and generate banked
1031           calls over the one trampoline so there's only one place for the user to
1032           modify according to his/hers hardware,
1033           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1034           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1035         * src/mcs51/main.c: added keyword banked,
1036           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1037         * support/Util/SDCCerr.c,
1038         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1039           needed for passing the bank and address to the trampoline
1040         * device/lib/mcs51/crtbank.asm: added for bankswitching
1041         * device/lib/mcs51/Makefile: added crtbank
1042
1043 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1044
1045         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1046           for fields at offset 0 of a struct or union as reported
1047           on 2005-07-07 in the developer mailing list.
1048
1049 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1050
1051         * src/SDCCmem.c: fixed bug 1238386
1052
1053 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1054
1055         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1056           (patch #1144962), added peephole 300, enabled 259.x
1057         * doc/sdccman.lyx: removed screenshot and provided link instead
1058
1059 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1060
1061         * doc/sdccman.lyx: added section about debugging with ddd
1062         * doc/figures/ddd_example.eps: screenshot of debugging session
1063
1064 2005-07-04 Raphael Neider <rneider AT web.de>
1065
1066         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1067           like CODE pointers, fixes #1115683
1068         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1069           call, fixes bugs #1232211, #1228110,
1070           fixed wrong casts to pCodeFlow from pCodeInstructions
1071
1072 2005-07-04 Raphael Neider <rneider AT web.de>
1073
1074         * src/pic/gen.c (popGet): changed assert to allow for
1075           bit operands
1076         * (popGetAddr): changed signature to provide
1077           an additional index, patched all call sites
1078         * (genCmpEq): handle literal-like operands correctly
1079         * (genAddrOf): added sanity checks on __code/__data pointers
1080         * (genAssign): added handling of symbols from __code section
1081         * (gencjne): do not generate code for comparisons whose result
1082           is neither stored nor used, fixes bug #1171114
1083         * (AccLsh, AccRsh): operate on operand instead of WREG
1084         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1085           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1086           by known count
1087         * rewrote complete shift-by-literal logic, commented unused
1088           functions out
1089         * (genConstPointerGet): get multiple bytes (if result size > 1),
1090           fixed handling of non-immediate addresses
1091         * (genPointerGet): handle CODE pointers like CONST pointers
1092         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1093         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1094           operand is to be treated as a literal or not
1095         * (mov2w,genPcall,genCmpEq),
1096           src/pic/genarith.c: use aop_isLitLike() to decide between
1097           literal/register contents
1098         * (addSign): added missing offset
1099         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1100           only emit comment in debug-mode,
1101           use {aop,op}_isLitLike throughout the file
1102         * src/pic/glue.c: fix initializers for pointers (work in progress)
1103         * src/pic/pcode.c (get_op): honor index on _const symbols
1104         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1105         * (dumppBlock): added pCode size estimation
1106         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1107           check for IS_SYMOP before OP_SYMBOL'ing
1108         * fixed indentation, compacted switch-statements
1109         * (allocReg): find free register and allocate it instead of
1110           allocating new registers all the time
1111         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1112           registers as its operands (necessary only for multibyte GETs)
1113
1114 2005-07-01 Raphael Neider <rneider AT web.de>
1115
1116         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1117           debugging .asm-output macros FENTRY + FEXIT
1118         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1119           way... I wonder...
1120         * (emitpComment): NEW, printf to pCode
1121         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1122           offset handling
1123         * (popGetAddr): NEW, variant of popGet to access an immediates
1124           high(er) bytes instead of the n'th byte of memory they reference,
1125           replaced popGet with popGetAddr where neccessary
1126         * (genDataPointerGet): reactivated and fixed implementation
1127         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1128           accesses
1129         * (genDataPointerSet): fixed multibyte assignments
1130         * (genpic14Code): fixed --i-code-in-asm handling
1131         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1132         * (genPlus): fixed index-out-of-bounds error
1133         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1134         * src/pic/ralloc.c: added debugging output macro FENTRY2
1135         * (spillThis): fixed indentation, enbraced for-body for clarity
1136         * (rematStr): commented out as now unused
1137         * (regTypeNum): commented out special spill case (overwrites
1138           arbitrary values)
1139         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1140
1141 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1142
1143         * doc/sdccman.lyx: documented sfr16/sfr32,
1144           added example for using storage class with function pointers
1145         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1146
1147 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1148
1149         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1150         * device/lib/_itoa.c,
1151         * device/lib/_ltoa.c: optimized codesize
1152         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1153           but don't know how to suppress the double warning.
1154         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1155         * support/Util/SDCCerr.c,
1156         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1157
1158 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1159
1160         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1161           fixed old K&R prototypes
1162         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1163         * device/lib/_gptrget.c,
1164         * device/lib/_gptrgetc.c,
1165         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1166           also new versions for small generic pointers and banked generic pointers
1167         * src/port.h: added const_name
1168         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1169         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1170         * src/SDCCcse.c (findPrevIc): check all associative operators
1171         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1172         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1173         * src/SDCCmem.c: updated comments,
1174           set far-space to 0 for pdata, results in optimized code
1175         * src/SDCCmem.h: added macro CONST_NAME
1176         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1177           moving the info into the highest bits, see also gptrget/gptrput
1178         * src/src.dsp: added sdcc.ico to project files
1179         * src/avr/gen.c (genCast): fixed bug 0x%d
1180         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1181         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1182           relation between ptr_type and DCL_TYPE,
1183           (genCast): fixed bug 0x%d
1184         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1185           (CODE)" for const_name
1186         * src/hc08/gen.c (genCast): fixed bug 0x%d
1187         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1188           (hc08_port): added "CONST (CODE)" for const_name
1189         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1190           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1191           between ptr_type and DCL_TYPE,
1192           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1193           operand* and took AOP() inside function so sfr-ness can be checked,
1194           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1195           new prototype,
1196           (genFunction, genEndFunction): optimized stack setup,
1197           (genMinus): optimized for literals with ending zeroes (in bytes),
1198           (genCast): fixed bug 0x%d
1199         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1200           (mcs51_port): added "CONST (CODE)" for const_name
1201         * src/mcs51/peeph.def: made rule 226 more generic
1202         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1203         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1204         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1205         * src/z80/main.c (z80_port): added NULL for const_name,
1206           (gbz80_port): added NULL for const_name
1207         * support/regression/tests/bug663539.c,
1208         * support/regression/tests/sfr16.c: new tests
1209
1210 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1211
1212         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1213
1214 2005-06-24 Raphael Neider <rneider AT web.de>
1215
1216         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1217           corrected typos...
1218         * device/include/pic16/signal.h: added USBIF
1219           and SIG_USB
1220
1221 2005-06-24 Raphael Neider <rneider AT web.de>
1222
1223         * device/lib/pic16/libdev/pic18f2455.c,
1224           device/include/pic16/pic18f2455.h: NEW
1225         * device/include/pic16/pic18fregs.h,
1226           device/lib/pic16/pics.all,
1227           src/pic16/device.c: added 18f2455
1228         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1229           device/include/pic16/{pic18f[68][567].h,usart.h}:
1230           replaced MULTIPLE_USARTS define with more relaible
1231           compatibility sfrs (for USART access)
1232
1233 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1234
1235         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1236           and the output asm file line is printed on two lines.
1237
1238 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1239
1240         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1241           BGT, BLE, BHI, and BLS instructions
1242         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1243           genCmpEq): removed
1244         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1245           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1246           fixes bug #1216342
1247         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1248
1249 2005-06-15 Raphael Neider <rneider AT web.de>
1250
1251         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1252         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1253         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1254           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1255           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1256
1257 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1258
1259         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1260           Marcel Telka in bug #1215704
1261
1262 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1263
1264         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1265           located in shared memory bank.
1266
1267 2005-05-31 Raphael Neider <rneider AT web.de>
1268
1269         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1270           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1271           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1272
1273 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1274
1275         * device/lib/_strncpy.c: fixed the fix
1276
1277 2005-05-26 Raphael Neider <rneider AT web.de>
1278
1279         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1280           initializers with \0, bug #1208187
1281         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1282           intializers with \0, bug #1208187
1283
1284 2005-05-26 Raphael Neider <rneider AT web.de>
1285
1286         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1287           initializers with \0, bug #1208187
1288         * src/pic16/main.c (_process_pragma): added sanity checks
1289           for stack position and size, emit warnings when appropriate
1290
1291 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1292
1293         * device/lib/_strncpy.c: fixed not filling with \0
1294
1295 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1296
1297         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1298           createFunction),
1299         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1300           compound_statement),
1301         * src/SDCCsymt.h,
1302         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1303
1304 2005-05-24 Raphael Neider <rneider AT web.de>
1305
1306         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1307
1308 2005-05-24 Raphael Neider <rneider AT web.de>
1309
1310         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1311           TRISE definitions, closes bug #1162453
1312
1313 2005-05-22 Raphael Neider <rneider AT web.de>
1314
1315         * src/pic16/main.c (_process_pragma): check for missing
1316           arguments to pragmas code and udata
1317         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1318           consistency fixes to match other headers (thanks to Jim Paris)
1319         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1320
1321 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1322
1323         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1324
1325 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1326
1327         * support/regression/tests/bug1198642.c: new test
1328         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1329         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1330         * support/scripts/resource.h,
1331         * support/scripts/resource.rc,
1332         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1333         * support/scripts/sdcc.ico: added 32x32 icon
1334
1335 2005-05-18 Raphael Neider <rneider AT web.de>
1336
1337         * device/lib/pic16/libdev/pic18f*.c,
1338         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1339           keywords to "__sfr" and "__at (X)"
1340         * device/include/pic16/pic18fregs.h: added pic18f4520
1341         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1342           #1203088 (MPLAB compatibility)
1343
1344 2005-05-17 Raphael Neider <rneider AT web.de>
1345
1346         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1347         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1348         * device/lib/pic16/pics.all: added new devices
1349         * src/pic16/device.c: added support for pic18f4520
1350
1351 2005-05-16 Raphael Neider <rneider AT web.de>
1352         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1353         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1354         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1355           convenience function for bit access
1356
1357 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1358
1359         * device/lib/printf_large.c: fixed bug 1193299
1360         * support/regression/tests/bug1057979.c: added test %3.3s
1361
1362 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1363
1364         * device/include/mcs51/8051.h,
1365         * device/include/mcs51/8052.h: made parseable with lint
1366         * device/include/mcs51/lint.h: added include file for (sp)lint
1367         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1368         * doc/cdbfileformat.lyx,
1369         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1370
1371 2005-05-14 Raphael Neider <rneider AT web.de>
1372
1373         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1374         * device/lib/pic16/libc/stdlib/itoa.c (new)
1375         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1376         * device/lib/pic16/libio/Makefile: exclude subdir according to
1377           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1378         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1379         * src/pic16/gen.c (genFunction): prevent annoying warning
1380         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1381           nameclashes on BeOS
1382         * support/cpp2/cppmain.c (cpp_output_string): new
1383         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1384           fixes bug 1116802
1385
1386 2005-05-13 Borut Razem <borut.razem AT siol.net>
1387
1388         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1389
1390 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1391
1392         * .version: changed to version 2.5.1; back to bleeding edge development
1393
1394 2005-05-11 Borut Razem <borut.razem AT siol.net>
1395
1396         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1397           generate PDF version 1.3 documents
1398
1399 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1400
1401         * .version: changed to version 2.5.0
1402
1403 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1404
1405         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1406
1407 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1408
1409         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1410         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1411         well as many smaller updates.
1412         * .version: changed to version 2.5.0-pre1
1413
1414 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1415
1416         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1417
1418 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1419
1420         * support/regression/tests/bug1185672.c: added
1421         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1422           bug 1185672
1423         * src/mcs51/gen.c (genCall): added comments, made it look safer
1424         * src/mcs51/gen.c (genEndFunction): simplified
1425
1426 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1427
1428         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1429
1430 2005-04-14 Borut Razem <borut.razem AT siol.net>
1431
1432         * fixed bug 1045046 - SIGSEGV with really simple code?:
1433           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1434           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1435
1436 2005-04-14 Borut Razem <borut.razem AT siol.net>
1437
1438         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1439           src/pic16/device.h: temporarily disabled experimental #inline pragma
1440           for 2.5.0 release
1441
1442 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1443
1444         * device/include/z80/stdio.h,
1445         * device/include/z80/string.h: removed these highly incomplete files so
1446           SDCC can use the default ones in device/include/
1447
1448 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1449
1450         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1451         gcc warning.
1452         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1453         fix sdcpp warnings.
1454
1455 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1456
1457         * device/include/malloc.h: removed redundant __reentrant prototypes
1458         * device/lib/_mullong.c: added working xstack variant in asm (C version
1459           doesn't pass regression tests)
1460         * device/lib/bpx.c: used __data and made bpx char for mcs51
1461         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1462           (createFunction): fixed bug with xstackPtr
1463         * src/SDCCcse.c: corrected comments
1464         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1465           (killDeadCode, eBBlockFromiCode): removed unused code
1466         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1467           corrected comments
1468         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1469           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1470           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1471           (genModOneByte): fixed warning in MSVC
1472         * src/mcs51/main.c (): added comments
1473         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1474
1475 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1476
1477         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1478
1479 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1480
1481         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1482
1483 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1484
1485         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1486         characters arrays of larger size than the declared one.
1487
1488 2005-04-10 Borut Razem <borut.razem AT siol.net>
1489
1490         * src/pic/gen.c (genInline),
1491           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1492           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1493           (findNextInstruction), (findPrevInstruction),
1494           (findInstructionUsingLabel),
1495           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1496         * src/pic/pcode.c (findLabel): added missing '\n'
1497         * src/src.dsp: added SDCCdwarf2.c to the project
1498
1499 2005-04-09 Borut Razem <borut.razem AT siol.net>
1500
1501         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1502
1503 2005-04-08 Raphael Neider <rneider AT web.de>
1504
1505         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1506           into the chain after a given one) and mergeDefmapSymbols (combine
1507           defmap entries for each symbol per pcode)
1508         * (createDefmap): have defmap entries merged in the end
1509         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1510           a symbol before replacing one access type's symbol, merge symbols in
1511           the end (replacement symbol might already have an entry)
1512         * (assignValnums): keep reference to written WREG intact
1513
1514 2005-04-08 Raphael Neider <rneider AT web.de>
1515
1516         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1517           Alpha)
1518
1519 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1520
1521         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1522         bytes
1523
1524 2005-04-07 Raphael Neider <rneider AT web.de>
1525
1526         * device/include/pic16/usart.h: added compatibility defines for
1527           devices with more than one USART
1528         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1529
1530 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1531
1532         * device/lib/Makefile.in: updated for port specific include
1533
1534 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1535
1536         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1537
1538 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1539
1540         * device/include/8051.h,
1541         * device/include/8052.h,
1542         * device/include/at89S8252.h,
1543         * device/include/at89c55.h,
1544         * device/include/at89x051.h,
1545         * device/include/at89x51.h,
1546         * device/include/at89x52.h,
1547         * device/include/mcs51reg.h,
1548         * device/include/reg51.h,
1549         * device/include/reg764.h,
1550         * device/include/regc515c.h,
1551         * device/include/sab80515.h: (re)moved these 12 files
1552         * device/include/mcs51/8051.h,
1553         * device/include/mcs51/8052.h,
1554         * device/include/mcs51/at89S8252.h,
1555         * device/include/mcs51/at89c55.h,
1556         * device/include/mcs51/at89x051.h,
1557         * device/include/mcs51/at89x51.h,
1558         * device/include/mcs51/at89x52.h,
1559         * device/include/mcs51/mcs51reg.h,
1560         * device/include/mcs51/reg51.h,
1561         * device/include/mcs51/reg764.h,
1562         * device/include/mcs51/regc515c.h,
1563         * device/include/mcs51/sab80515.h: and added them here
1564
1565 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1566
1567         * device/include/stdarg.h: changed SDCC specific keywords to double
1568           underlined form.
1569         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1570           mcs51 and ds390.
1571         * device/include/hc08/mc68hc908gp32.h,
1572         * device/include/hc08/mc68hc908jb8.h,
1573         * device/include/hc08/mc68hc908jkjl.h,
1574         * device/include/hc08/mc68hc908qy.h: fixed comments
1575         * device/include/mcs51/README: updated
1576         * device/include/mcs51/c8051f120.h: added PINRSF
1577         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1578         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1579           amidst code. Also inline is not supported.
1580
1581 2005-04-06 Raphael Neider <rneider AT web.de>
1582
1583         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1584         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1585           callers stack/frame pointers
1586
1587 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1588
1589         * device/include/pic16/usart.h: added, missing in previous commit,
1590         * device/include/pic16/adc.h: fixed typo,
1591         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1592         commit,
1593         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1594         <p18fxxx.inc>
1595         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1596         uninitialized because a bug appears with gplink
1597         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1598         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1599         complains for unrecognised option
1600
1601 2005-04-05 Raphael Neider <rneider AT web.de>
1602
1603         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1604           structs as well (using memcpy)
1605         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1606           on ISRs (GOTO has no label)
1607         * src/pic16/device.h: added OF_OPTIMIZE_DF
1608         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1609           new data flow analysis/optimization
1610         * src/pic16/pcode.c: added (prototypes for and implementation of)
1611           dataflow analysis functions, fixed pCodeInstructions' inCond and
1612           outCond values, made RCALL a branch instruction
1613         * (pic16_unlinkpCode): keep C line if possible
1614         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1615           C line moved if possible
1616         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1617         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1618           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1619         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1620           new flow)
1621         * (pic16_getJumptabpCode): NEW, needed in...
1622         * (LinkFlow): fixed handling of jumptables, calls and conditional
1623           branches
1624         * (pic16_InsertCommentAfter): NEW
1625         * (pic16_pCodeReplace): made verbose and flow preserving
1626         * (AnalyzeFlow): added call to data flow analysis
1627         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1628         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1629         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1630
1631 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1632
1633         * src/SDCCast.c (decorateType): fixed bug #1105626
1634
1635 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1636
1637         * device/include/asm/pic16/features.h,
1638         * pic18f*.h headers,
1639         * device/include/pic16/adc.h,
1640         * device/include/pic16/delay.h,
1641         * device/include/pic16/i2c.h,
1642         * device/include/pic16/malloc.h,
1643         * device/include/pic16/stdio.h,
1644         * device/include/pic16/stdlib.h,
1645         * device/include/pic16/string.h,
1646         * device/lib/pic16/libc/stdio/printf_tiny.c,
1647         * device/lib/pic16/libc/stdio/printf_small.c,
1648         * device/lib/pic16/libc/stdio/strmgpsim.c,
1649         * device/lib/pic16/libc/stdio/strmmssp.c,
1650         * device/lib/pic16/libc/stdio/strmusart.c,
1651         * device/lib/pic16/libc/stdio/vfprintf.c,
1652         * device/lib/pic16/libc/stdlib/ltoa.c,
1653         * device/lib/pic16/libc/stdlib/putchar.c,
1654         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1655         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1656         * device/lib/pic16/libc/stdlib/memchrram.c,
1657         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1658         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1659         * device/lib/pic16/libio/adc/adcbusy.c,
1660         * device/lib/pic16/libio/adc/adcread.c,
1661         * device/lib/pic16/libio/adc/adcsetch.c,
1662         * device/lib/pic16/libio/usart/ubaud.c,
1663         * device/lib/pic16/libio/usart/ubusy.c,
1664         * device/lib/pic16/libio/usart/udrdy.c,
1665         * device/lib/pic16/libio/usart/uopen.c,
1666         * device/lib/pic16/libio/usart/uputc.c,
1667         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1668         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1669         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1670         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1671         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1672         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1673         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1674         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1675         specific keywords to double underlined form,
1676         * device/lib/pic16/libc/Makefile.rules,
1677         * device/lib/pic16/libsdcc/Makefile.rules,
1678         * device/lib/pic16/libm/Makefile,
1679         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1680         to compile with C standard set in Makefile.common
1681         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1682         rand.c and crc.c in compilation process,
1683         * device/lib/pic16/libsdcc/int/divuint.c,
1684         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1685         `c' from signed to unsigned,
1686         * device/lib/pic16/startup/crt0.c,
1687         * device/lib/pic16/startup/crt0i.c,
1688         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1689         keywords to double underlined form, bug fixes in _do_cinit function
1690         which prevented the correct initialization of the .idata segment,
1691         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1692         core to enter a infinite loop
1693         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1694
1695 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1696
1697         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1698
1699 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1700
1701         * device/include/Makefile.in: add support for hc08 subdirectory
1702         * device/include/hc08/: new subdirectory
1703         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1704         Lucas Loizaga, thanks!
1705         * device/include/hc08/mc68hc908qy.h,
1706         * device/include/hc08/mc68hc908gp32.h,
1707         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1708         their own directory. Changed internal macro names to use the compiler
1709         reserved namespace. Changed SDCC specific keywords to double
1710         underlined form.
1711         * device/include/math.h,
1712         * device/include/malloc.h,
1713         * device/include/stdarg.h,
1714         * device/include/stdbool.h
1715         * device/include/string.h,
1716         * device/include/tinibios.h,
1717         * device/include/ds400rom.h,
1718         * device/include/8051.h,
1719         * device/include/8052.h,
1720         * device/include/80c51xa.h,
1721         * device/include/at89c55.h,
1722         * device/include/at89S8252.h,
1723         * device/include/at89x51.h,
1724         * device/include/at89x52.h,
1725         * device/include/ds80c390.h,
1726         * device/include/reg764.h,
1727         * device/include/regc515c.h,
1728         * device/include/sab80515.h,
1729         * device/include/mcs51/c8051f000.h,
1730         * device/include/mcs51/c8051f018.h,
1731         * device/include/mcs51/c8051f020.h,
1732         * device/include/mcs51/c8051f040.h,
1733         * device/include/mcs51/c8051f060.h,
1734         * device/include/mcs51/c8051f120.h,
1735         * device/include/mcs51/c8051f300.h,
1736         * device/include/mcs51/c8051f310.h,
1737         * device/include/mcs51/c8051f320.h,
1738         * device/include/mcs51/c8051f330.h,
1739         * device/include/mcs51/c8051f350.h,
1740         * device/include/z180.h: Changed SDCC specific keywords to double
1741         underlined form.
1742
1743 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1744
1745         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1746         18F4455,
1747         * (pic16_assignConfigWordValue): disable testing of configuration
1748         register value with config mask,
1749         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1750         function with port->fun_prefix,
1751         * (genFunction): when generating a naked interrupt function never
1752         create an absolute segment placed in interrupt vector address, place
1753         the actual interrupt function at IVA instead, when an interrupt
1754         function is generated with unspecified interrupt then do not create
1755         the absolute section,
1756         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1757         code for generating a call to generic pointer get/put function with
1758         a call to function pic16_callGenericPointer(),
1759         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1760         the call to the generic pointer get/put functions with prefixing the
1761         function name with port->fun_prefix,
1762         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1763         * src/pic16/main.c (_process_pragma): prefix function with
1764         port->fun_prefix,
1765         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1766         calling assembler, old 18Fxxxx macro is deprecated,
1767         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1768         PC_ASMDIR in while condition,
1769         * (findInstruction): add PC_ASMDIR in while condition,
1770         * (buildCallTree): prefix main with port->fun_prefix,
1771         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1772         identifier for variable with banked access in instructions BTFSS,
1773         BTFSC, BCF, BSF, BTG
1774         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1775         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1776         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1777         perform optimization when enviroment variable NO_REG_OPT is set,
1778         * (insideLRBlock): NEW, return 1 if register is inside an
1779         INF_LOCALREGS block,
1780         * (RemoveRegFromLRBlock): remove a register that is completely
1781         eliminated by register optimization, but it is still left in local
1782         register store/restore in/from stack block,
1783         * (Remove2pcodes): after removing register, check to see if it
1784         should be removed from local register store/restore in/from stack
1785         block,
1786         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1787         DUMMY_READ_VOLATILE,
1788
1789         * device/include/pic16/adc.h: minor prototype modifications and
1790         update,
1791         * device/include/pic16/malloc.h: added GPL notice various
1792         modifications,
1793         * device/include/pic16/stdint.h: NEW, standard header for ints
1794         * device/include/pic16/delay.h: NEW, header for delay functions,
1795         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1796         delay1mtcy,
1797         * device/include/pic16/signal.h: NEW, header providing helper macros
1798         for implementing signal handlers,
1799         * device/include/pic16/stdio.h: added prototypes for functions,
1800         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1801         prototypes for stdin and stdout, added macro PUTCHAR to
1802         automatically implement putchar function prototype,
1803         * device/include/pic16/usart.h: modified and updated USART library,
1804         * device/lib/pic16/libio/adc/,
1805         * device/lib/pic16/libio/i2c: some modifications to improve library
1806         performance,
1807         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1808         family of functions,
1809         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1810         family of functions and other sources,
1811         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1812         of the PIC18Fxx[28] devices,
1813         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1814         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1815         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1816         _do_cinit function, because the previous failed when local variables
1817         where not placed in the same memory bank,
1818         * device/lib/pic16/libsdcc/char/: various modifications to improve
1819         library performance,
1820         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1821         information on the new functions of the c library and more...
1822
1823 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1824
1825         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1826
1827 2005-03-26 Raphael Neider <rneider AT web.de>
1828
1829         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1830           if condition == CARRY)
1831         * (genCmp): adapted to new genSkipc semantics
1832         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1833           on rIfx (genCmp was broken)
1834
1835 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1836
1837         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1838         * src/z80/main.c (_keywords[]),
1839         * src/SDCCglobal.h (struct options),
1840         * src/SDCC.y,
1841         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1842         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1843         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1844         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1845         always available in leading double underscore form. The C99 support is
1846         mostly missing, but it's a start.
1847         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1848         reserved identifier "__data".
1849
1850 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1851
1852         * src/mcs51/peeph.def: fixed bug 1170013
1853
1854 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1855
1856         * device/include/mcs51reg.h: fixed bug 842007
1857
1858 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1859
1860         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1861         last time.
1862
1863 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1864
1865         * src/port.h (struct PORT),
1866         * src/avr/ralloc.c (avr_assignRegisters),
1867         * src/avr/main.c,
1868         * src/ds390/ralloc.c (ds390_assignRegisters),
1869         * src/ds390/main.c,
1870         * src/hc08/ralloc.c (hc08_assignRegisters),
1871         * src/hc08/main.c,
1872         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1873         * src/mcs51/main.c,
1874         * src/pic/ralloc.c (pic14_assignRegisters),
1875         * src/pic/main.c,
1876         * src/pic16/ralloc.c (pic16_assignRegisters),
1877         * src/pic16/main.c,
1878         * src/xa51/ralloc.c (xa51_assignRegisters),
1879         * src/xa51/main.c,
1880         * src/z80/ralloc.c (z80_assignRegisters),
1881         * src/z80/ralloc.h,
1882         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1883         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1884         * src/SDCCcse.h,
1885         * src/SDCCdflow.c (computeDataFlow),
1886         * src/SDCCdflow.h,
1887         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1888         * src/SDCCloop.h,
1889         * src/SDCCcflow.c (*),
1890         * src/SDCCcflow.h,
1891         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1892         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1893         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1894         immedDom() returning wrong block; probably fixes bug #1160833)
1895
1896 2005-03-20 Borut Razem <borut.razem AT siol.net>
1897
1898         * support/scripts/inc2h.pl: WIN32 port
1899
1900 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1901
1902         * device/lib/makefile.in: added abs.c and labs.c
1903
1904 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1905
1906         * device/include/stdint.h: added
1907         * device/lib/abs.c: added
1908         * device/lib/labs.c: added
1909         * device/include/stdlib.h: added abs() and labs() prototypes
1910         * device/lib/libsdcc.lib: added abs and labs
1911         * device/include/float.h,
1912         * device/lib/_fsmul.c,
1913         * device/lib/printf_fast.c,
1914         * device/lib/printf_tiny.c: updated comments
1915
1916 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1917
1918         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1919         bug #1164313
1920
1921 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1922
1923         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1924         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1925
1926 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1927
1928         * device/lib/printf_large.c: removed inline assembly for portability and
1929           readability. Use printf_fast if speed or size are more important.
1930         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1931         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1932
1933 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1934
1935         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1936         prevent compiler warning
1937
1938 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1939
1940         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1941         moved to level 0 and declared as static. Also they are explicit
1942         placed in access bank. This was necessery because some times they
1943         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1944         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1945         optimizations. Currently only compare to unsigned char is implemented,
1946         * src/pic16/gen.c: added fReturnIdx array,
1947         * (struct resolvedIfx) is moved to gen.h and made public,
1948         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1949         * (aopForSym): added an optimization to directly store in stack of
1950         the operand of a SEND iCode,
1951         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1952         but as registers instead (AOP_REG) using the fReturnIdx array,
1953         * (pic16_freeAsmop): remove the freed register from the
1954         _G.sregsAlloc field,
1955         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1956         a compare of 'WREG',
1957         * (pic16_popGetTempRegCond): changed function prototype, now
1958         function takes also a bitVector argument v which holds the current
1959         set of registers that are allocated for stack access by aopForSym,
1960         registers allocated in aopForSym for accessing stack symbols are not
1961         any more part of the functions usedRegs field,
1962         * (genCall): some times aopOp is called for a stack variable to be
1963         send, aopForSym might perform the push, if this is true make sure
1964         that genCall doesn't push the variable twice by testing _G.resDirect,
1965         * (genFunction): changed testing for unspecified interrupt number
1966         from 256 to INTNO_UNSPEC,
1967         * modified selection scheme of frame pointer generation. Previously
1968         if function did use local registers a frame pointer was generated,
1969         now a frame pointer is generated only if function has arguments
1970         (that need PLUSW2 register access), or has stack arguments, or the
1971         compiler is not instructed to omit the frame pointer,
1972         * (genEndFunction): before restoring local registers that were saved
1973         in the function preamble, also restore the registers that *might*
1974         have been allocated for stack access,
1975         * (genRet): removed some old comments,
1976         * (genCmp, the active (RN's) version): added a call to the
1977         pic16_genCmp_special function to perform the compare with a more
1978         robust and optimized way,
1979         * (genInline): a feature has been added in inline code generation,
1980         which allows a wildcard variable substitution when writing inline
1981         assembly. Code is incomplete and experimental therefore undocumented,
1982         * (genCast): changed order of aopOp for result and right to allow
1983         aopForSym to directly load the result if possible,
1984         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1985         perform an optimized compare on some selected special occasions,
1986         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1987         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1988         generate an IVT any more,
1989         * src/pic16/main.c (pic16_optionsTable): added command line option
1990         --optimize-cmp,
1991         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1992         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1993         macros,
1994         * src/pic16/NOTES: Raphael Neider added in list of active developers
1995         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1996         jumptable_end to prevent bug #,
1997         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1998         inCond and outCond fields,
1999         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2000         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2001         turn off register spilling,
2002         * (packRegsForOneUse): synced with other ports' versions although it
2003         is not used currently,
2004         * (pic16_packRegisters): added an optimization while reading
2005         structure bitfields, some registers may be saved (malloc code is
2006         decreased by 80 bytes)
2007
2008 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2009
2010         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2011         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2012         this can be optimized more?
2013
2014 2005-03-10 Raphael Neider <rneider AT web.de>
2015
2016         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2017           genNearPointerGet): (hopefully) fixed access to bitfields via
2018           pointers (p->bitN = x; and x = p->bitN; failed)
2019
2020 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2021
2022         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2023
2024 2005-03-09 Raphael Neider <rneider AT web.de>
2025
2026         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2027
2028 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2029
2030         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2031         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2032           (regTypeNum): set REG_BIT type if necessary
2033         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2034         * support/regression/tests/critical.c: check bug 1144613
2035
2036 2005-03-02 Raphael Neider <rneider AT web.de>
2037
2038         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2039
2040 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2041
2042         * src/avr/ralloc.c (serialRegAssign),
2043         * src/ds390/ralloc.c (serialRegAssign),
2044         * src/hc08/ralloc.c (serialRegAssign),
2045         * src/mcs51/ralloc.c (serialRegAssign),
2046         * src/pic/ralloc.c (serialRegAssign),
2047         * src/pic16/ralloc.c (serialRegAssign),
2048         * src/xa51/ralloc.c (serialRegAssign),
2049         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2050
2051 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2052
2053         * src/SDCCast.c (decorateType): fixed bug 1124787
2054
2055 2005-02-20 Hubert Sack <sack AT digiplan.de>
2056         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2057
2058         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2059         patch #1121755
2060
2061 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2062
2063         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2064         to keep the correct label reference count when adding/removing references
2065         to labels. A peephole file using this is appended to patch #1144962.
2066
2067 2005-02-14 Raphael Neider <rneider AT web.de>
2068
2069         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2070         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2071         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2072           retrievals of result operand's value on assignment
2073
2074 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2075
2076         * device/include/pic16/string.h: modified prototype for memccpy()
2077         to memccpy(void *, void *, char, size_t)
2078         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2079         check whether to omit frame pointer or not,
2080         * (genInline): convert all occurences of "\n" to LF in inline
2081         assembler blocks, this helps formatting the inline text,
2082         * (pic16_loadFSR0): modified prototype,
2083         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2084         removed some 8051 legacy code,
2085         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2086         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2087         before allocating temporary registers in functions,
2088
2089 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2090
2091         * support/regression/tests/bitvars.c: corrected the "fix"
2092
2093 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2094
2095         * support/regression/tests/bitvars.c,
2096         * support/regression/tests/bitwise.c,
2097         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2098
2099 2005-02-10 Raphael Neider <rneider AT web.de>
2100
2101         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2102           different size for Alpha
2103         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2104
2105 2005-02-09 Raphael Neider <rneider AT web.de>
2106
2107         * src/SDCC.lex(doPragma) : save and restore warning options as well
2108           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2109         * have #pragma less_pedantic set the errorlevel to WARNING
2110           (fixes #1117001)
2111         * (cloneOptimize) : fixed wrong malloc's size
2112         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2113           facilitate correct handling of #pragma (save|restore)
2114
2115 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2116
2117         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2118
2119 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2120
2121         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2122
2123 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2124
2125         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2126
2127 2005-02-02 Raphael Neider <rneider AT web.de>
2128
2129         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2130         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2131         * (pic16_storeForReturn): fixed to allow returning function pointers
2132         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2133         * device/include/pic16/{stddef.h,stdbool.h}: added
2134
2135 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2136
2137         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2138
2139 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2140
2141         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2142         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2143          appeared to be required
2144
2145 2005-01-31 Borut Razem <borut.razem AT siol.net>
2146
2147         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2148           include/mcs51 and include/z80 directories to the package
2149
2150 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2151
2152         * src/hc08/gen.c (genFunction): fixed bug #1112752
2153
2154 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2155
2156         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2157
2158 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2159
2160         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2161
2162 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2163
2164         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2165
2166 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2167
2168         * device/include/c8051fxxx.h: removed these 6 files
2169         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2170
2171 2005-01-26 Raphael Neider <rneider AT web.de>
2172
2173         * src/pic16/gen.c (genAssign): fixed assignment from longs
2174           in codespace (were cut to three bytes)
2175         * (genDummyRead): implemented (except for CODESPACE...),
2176           fixed bug #1108575
2177         * src/pic16/glue.c (emitStatistics): beautified
2178         * device/lib/pic16/libm/Makefile: added include path
2179
2180 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2181
2182         * src/z80/gen.c (aopPut): fixed bug #1103902
2183
2184 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2185
2186         * device/lib/expf.c: fixed bug #1095792
2187
2188 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2189
2190         * device/lib/pic16/libm: added Math library sources
2191
2192 2005-01-24 Raphael Neider <rneider AT web.de>
2193
2194         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2195           to enable upcast to pCodeOpReg2 (there is no type tag to
2196           differenciate the two and pic16_popGet2p cast into PCOR2)
2197         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2198           (sizeof(sectNames) changed to sizeof(sectName))
2199           Both patches fix segfaults under MinGW.
2200
2201 2005-01-23 Raphael Neider <rneider AT web.de>
2202
2203         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2204           Safe_[mc]?alloc()'ed variables
2205         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2206           of (byte sized) temporaries (assign them to WREG for now)
2207         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2208           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2209           this might fix SIGSEGVs on MinGW...
2210         * src/SDCCopt.c (killDeadCode): restored original behaviour
2211           (volatile operands might get thrown away though)
2212
2213 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2214
2215         * src/pic16/gen.c: fixed bug #1106975,
2216         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2217         pointer update, INTCON is saved, global interrupts are disabled and
2218         restored after updateing TOS.
2219         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2220         * added function attribute 'shadowregs' to take advantage of shadow
2221         registers,
2222         * added function attribute 'wparam' as an alternative to the wparam
2223         pragma,
2224         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2225         user declares a non-ISR function as 'shadowregs',
2226         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2227
2228 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2229
2230         * .version: bumped version number to 2.4.8
2231         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2232         pic16 port,
2233         * device/lib/pic16/libio/i2c/: I2C module support library,
2234         * device/include/pic16/i2c.h: I2C support library header,
2235         * device/lib/pic16/libc/stdio/: standard IO support sources,
2236         * (printf_small.c): printf_small() source, supports float print,
2237         * (printf_tiny.c): printf_tiny() source, does not support floats,
2238         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2239         enable global optimizations for entire library source, other
2240         Makefiles in the source tree are also modified to reflect this,
2241         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2242         function,
2243         * doc/sdccman.lyx: updated to reflect new changes,
2244         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2245         sym->onStack if-case,
2246         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2247         sbit, idata, _idata, xdata, _xdata,
2248         * added pragma library, to link an external library, (see doc),
2249         * removed command line options, --pomit-config-words, --pomit-ivt,
2250         --pleave-reset-vector,
2251         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2252         when calling assembler to reflect memory model used, also define
2253         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2254         reflect stack model used,
2255         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2256         on stack return NULL,
2257
2258 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2259
2260         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2261           of the operands is volatile. Fixes #1020220
2262
2263 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2264
2265         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2266         * (OptimizeRegUsage): make sure that there is really no other flow where
2267           the first pCode is used
2268
2269 2005-01-22 Raphael Neider <rneider AT web.de>
2270
2271         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2272           to fix #1106967 (pCode->seq are not set up correctly)
2273
2274 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2275
2276         * src/SDCCglue.c (glue): make sure code area is declared before the
2277         static initialization area.
2278
2279 2005-01-21 Raphael Neider <rneider AT web.de>
2280
2281         * device/lib/Makefile.in: fixed test for pic16 install dir
2282         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2283           optimizations
2284         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2285           added --optimize-goto compiler switch and pragma wparam documentation
2286         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2287         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2288           and PRODH closing bug #1071770 (peephole optimizer)
2289
2290 2005-01-19 Raphael Neider <rneider AT web.de>
2291
2292         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2293           cmdLine buffers (used when calling sdcpp...) are large enough
2294           (MAX_PATH=256 truncates arguments leading to system halts when
2295           used in MinGW...)
2296         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2297         * (genUminus): rewritten to for efficiency
2298         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2299           used uninitialized in some cases)
2300         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2301           copy the third byte from the int -- now assumes 0x80 (data memory)
2302         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2303           operands (genAddLit expects the iCode's operands to swapped as
2304           well), fixed leftover bytes (crashed for short left operands)
2305         * (pic16_genMinusDec): performance improvements, removed false
2306           PIC14 emitSKPNCs
2307         * (pic16_genMinus): fixed to cope with differently sized operands
2308         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2309           for --obanksel > 1
2310         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2311         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2312           new banksel optimization
2313         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2314           analysis for temporary registers (segfaults...)
2315         * src/pic16/peeph.def: added rule
2316
2317 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2318
2319         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2320         which converts a float number to its ASCII representation
2321         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2322         functions to convert the fractional and integer part of a float to ASCII,
2323         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2324         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2325         ram
2326         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2327         _STATMEM macros,
2328         * device/include/pic16/adc.h: added GPL info,
2329         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2330         a pCodeOp as tested operand,
2331         * (genNearPointerGet): optimized bit testing, does not use
2332         intermediate register for bit value, test directly instead with
2333         BTFSS, BTFSC, works only for single bits,
2334         * (genpic16Code): dump the name of the iCode in the asm,
2335         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2336         renamed to pic16_decodeOp,
2337         * (serialRegAssign): do not allocate a temporary register for iCode
2338         sequences that test a single bit for 1/0
2339
2340 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2341
2342         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2343         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2344         access stack and frame pointers. They are initially assigned to
2345         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2346         accessing SFRs. Updated all occurences of modification of stack or
2347         frame pointer in gen.c and pcode.c,
2348         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2349         assigning of a literal value to pointers,
2350         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2351         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2352         selected
2353
2354 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2355
2356         * doc/sdccman.lyx: update documentation about stack pragma, added
2357         some info for stack memory models
2358
2359 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2360
2361         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2362
2363 2005-01-08 Raphael Neider <rneider AT web.de>
2364
2365         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2366           udata sections to fix bug #1097823
2367
2368 2005-01-05 Raphael Neider <rneider AT web.de>
2369
2370         * src/pic16/gen.c (genGenericShift): added handling of differently
2371           sized left operand and result
2372
2373 2005-01-04 Raphael Neider <rneider AT web.de>
2374
2375         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2376         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2377           to hold the condition bit)
2378         * added new version of genCmp (old code available via #define)
2379         * added new version of genShiftLeft/genShiftRight in a generic
2380           way, now supports shifting by negative values
2381         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2382           shiftCount (expected by genGenericShift)
2383         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2384         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2385           dump
2386         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2387           is an invalid literal too...)
2388
2389 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2390
2391         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2392         from Raphael Neider,
2393         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2394         for 8-bit literals. This fixes some literal operands which are sign
2395         extended to 16-bits ints when instruction needs only 8-bits.
2396
2397 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2398
2399         * device/lib/logf.c: added mcs51 assembly version
2400         * device/lib/expf.c: added mcs51 assembly version
2401         * device/lib/_logexpf.c: new shared asm code for expf and logf
2402         * device/include/math.h: add defines for assembly math library
2403         * device/lib/Makefile.in: build new _logexpf.c
2404         * device/lib/libfloat.lib: use new _logexpf.c
2405
2406 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2407
2408         * src/pic/device.c
2409         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2410           device types which have less than 0x7f registers.
2411
2412 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2413
2414         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2415
2416 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2417
2418         * device/lib/printf_fast.c: only build on supported arch.
2419         * device/lib/printf_tiny.c: only build on supported arch.
2420         * device/lib/printf_fast_f.c: only build if asm float lib
2421         * device/lib/_fsget1arg.c: only build if asm float lib
2422         * device/lib/_fsget2args.c: only build if asm float lib
2423         * device/lib/_fsnormalize.c: only build if asm float lib
2424         * device/lib/_fsreturnval.c: only build if asm float lib
2425         * device/lib/_fsrshift.c: only build if asm float lib
2426         * device/lib/_fsswapargs.c: only build if asm float lib
2427         * device/include/stdio.h: don't provide print_fast,
2428           print_fast_f, print_tiny prototypes if --xstack used
2429
2430 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2431
2432         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2433         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2434           to the SOURCES
2435
2436 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2437
2438         * device/lib/printf_fast_f.c: same as printf_fast, but
2439           with floating point enabled
2440         * device/lib/printf_fast.c: minor tweaks
2441         * device/include/stdio.h: add printf_fast_f
2442
2443 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2444
2445         * src/SDCCmain.c: make --float-reent default for mcs51
2446         * device/lib/_fsadd.c: added mcs51 assembly version
2447         * device/lib/_fssub.c: added mcs51 assembly version
2448         * device/lib/_fsmul.c: added mcs51 assembly version
2449         * device/lib/_fsdiv.c: added mcs51 assembly version
2450         * device/lib/_fseq.c: added mcs51 assembly version
2451         * device/lib/_fsneq.c: added mcs51 assembly version
2452         * device/lib/_fsgt.c: added mcs51 assembly version
2453         * device/lib/_fslt.c: added mcs51 assembly version
2454         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2455         * device/lib/Makefile.in: add _fscmp to build
2456         * device/lib/libfloat.lib: add _fscmp to build
2457
2458 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2459
2460         * device/lib/_fs2slong.c: added mcs51 assembly version
2461         * device/lib/_fs2sint.c: added mcs51 assembly version
2462         * device/lib/_fs2schar.c: added mcs51 assembly version
2463         * device/lib/_fs2ulong.c: added mcs51 assembly version
2464         * device/lib/_fs2uint.c: added mcs51 assembly version
2465         * device/lib/_fs2uchar.c: added mcs51 assembly version
2466         * device/lib/_slong2fs.c: added mcs51 assembly version
2467         * device/lib/_sint2fs.c: added mcs51 assembly version
2468         * device/lib/_schar2fs.c: added mcs51 assembly version
2469         * device/lib/_ulong2fs.c: added mcs51 assembly version
2470         * device/lib/_uint2fs.c: added mcs51 assembly version
2471         * device/lib/_uchar2fs.c: added mcs51 assembly version
2472         * device/include/float.h: added #define to select asm vs c
2473
2474 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2475
2476         * device/lib/printf_fast.c: improvements to float output
2477         * device/include/float.h: add defines for assembly float library
2478         * device/lib/_fsget1arg.c: receive 1 float arg
2479         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2480         * device/lib/_fsnormalize.c: normalize a float
2481         * device/lib/_fsreturnval.c: return float, various helper routines
2482         * device/lib/_fsrshift.c: right shift a float's mantissa
2483         * device/lib/_fsswapargs.c: swap 2 floats
2484         * device/lib/Makefile.in: build these 6 new files for mcs51
2485         * device/lib/libfloat.lib: add these 6 files to the library
2486
2487 2004-12-26 Borut Razem <borut.razem AT siol.net>
2488
2489         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2490           built by gcc 3.4.2
2491
2492 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2493
2494         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2495           and fully reentrant and register bank neutral.
2496         * device/lib/printf_fast.c: added float (not enabled by default),
2497           added compact/slower integer (also not enabled by default),
2498           improved size/speed of fast integer code, other minor changes
2499         * device/include/stdio.h, device/lib/Makefile.in,
2500           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2501
2502 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2503
2504         * src/pic16/pcode.c: declaring variables other than at the start of a
2505           block is not supported in C by VC6.
2506
2507 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2508
2509         * applied a previous patch from Raphael Neider that wasn't included
2510         in the previous commits, which fixes infinite loops within jumptable
2511         improvements,
2512         * made some fixes that previous patches introduced
2513
2514 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2515
2516         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2517         that fixes an issue with AOP_PCODE asmop's offset,
2518         * (pic16_popCopyReg): update instance field too,
2519         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2520         function of pic port,
2521         * (genCmp, genAnd, genAssign),
2522         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2523
2524 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2525
2526         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2527         variables initial values to idata section,
2528         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2529         variables in some functions. This utilizes parmBytes field of iCode
2530         structure to hold the offset of the variable in stack. (might be
2531         able to use the stack field too?)
2532         * applied patch from Raphael Neider # ### , # ###
2533         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2534         variable initial values in idata section,
2535         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2536         for static variables with initial value
2537         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2538         applied fix in while loop from Raphael Neider.
2539
2540 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2541
2542         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2543         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2544         * src/ds390/ralloc.c (serialRegAssign): spill bits
2545         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2546         * support/Util/SDCCerr.c,
2547         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2548         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2549         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2550
2551 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2552
2553         * device/include/sdcc-lib.h: inserted LGPL, added includes
2554           asm/ds390/features.h and asm/mcs51/features.h
2555         * device/include/asm/default/features.h,
2556         * device/include/asm/gbz80/features.h,
2557         * device/include/asm/z80/features.h: added empty _AUTOMEM
2558           and _STATMEM
2559         * device/include/asm/ds390/features.h,
2560         * device/include/asm/mcs51/features.h: added files with defines for
2561           _AUTOMEM and _STATMEM indicating automatic and static storage class
2562         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2563         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2564         * src/SDCCicode.c (geniCodeCast),
2565         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2566         * src/SDCCloop.c (loopInduction): removed unused variable lr
2567         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2568           to convertToFcall to include char modulo (RFE 1065037), added check
2569           if left operand is unsigned and use abs of literal value
2570         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2571           as it doesn't work after conversion from peephole.def to peephole.rul
2572         * src/mcs51/gen.c (toBoolean): added check for size,
2573           (genModOneByte): optimized code for signed char modulo a literal
2574           power of 2 (thanks to Hubert Sack),
2575           (genRRC): removed unnecessary "clr c",
2576           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2577         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2578           jump optimization,
2579           swapped rules 256.c and 256.d,
2580           extended 256.d by using new multiple checks (thanks Erik),
2581           added rules 256.e and 256.f,
2582           updated rule 261.a and 261.b to new generated code
2583         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2584
2585 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2586
2587         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2588           induction related bugs, including first part of bug #1074377
2589
2590 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2591
2592         * applied patch from bug-report #1076292,
2593         * applied patches for genAnd and Goto-optimizations for Raphael
2594         Neider,
2595         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2596         dump a less iCode information,
2597         * src/pic16/device.h (pic16_options_t): added field debgen,
2598         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2599         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2600         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2601         puclic,
2602         * (various functions): added macros FENTRY and FENTRY2 to functions,
2603         to emit function prologue,
2604         * (various functions): fixed indentation,
2605         * (genNearPointerGet): fixed loading of FSR0,
2606         * (genPackBits): applied patch from Raphael Neider to fix updating
2607         of FSR0 and touching only the modified bits,
2608         * src/pic16/genarith.c (various functions): added macros FENTRY to
2609         emit function prologue in comments,
2610         * src/pic16/pcode.h: added functions debugf2, debugf3,
2611         * src/pic16/ralloc.c: partial fix for packForPush caused
2612         segmentation fault,
2613
2614 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2615
2616         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2617           <stsp AT users.sourceforge.net> with reversed byte order
2618         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2619
2620 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2621
2622         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2623           bug #1074377
2624         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2625         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2626
2627 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2628
2629         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2630
2631 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2632
2633         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2634           conditions,
2635           (setFromConditionArgs): friendly operand parser for peephole rules,
2636           (operandBaseName, operandsNotRelated): new peephole condition
2637           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2638           architecture specific register naming into account, handles n-way
2639           comparisons, and supports quoted literals
2640         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2641
2642 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2643
2644         * src/mcs51/peeph.def: fixed bug #1076940
2645
2646 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2647
2648         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2649
2650 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2651
2652         Adding support for replacing ljmps with sjmps in jumptables
2653         generated for switch statements. For now you need to set the
2654         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2655         Now 4 algorithms for mcs51 jumptable generation are used:
2656         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2657         addresses loaded pc-relative for up to 112 cases and stack-pushing
2658         target addresses loaded with offset from dptr for up to 256 cases.
2659
2660         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2661         * src/mcs51/main.c: adapted constants for switch table generation
2662         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2663
2664 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2665
2666         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2667         * support/regression/tests/bug1057979.c: added test for bug 1073386
2668
2669 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2670
2671         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2672         compilers
2673
2674 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2675
2676         * src/pic16/device.h,
2677         * src/pic16/genarith.c,
2678         * src/pic16/glue.c,
2679         * src/pic16/main.c,
2680         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2681
2682 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2683
2684         Large cummulative patch for pic16 port.
2685         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2686         to call when a stack overflow occurs,
2687         * (malloc.h): added CVS Id tag,
2688         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2689         variable,
2690         * added libc directory. The current version of LibC contains string
2691         functions, ctype functions and macros and some functions of the
2692         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2693         be extensively tested in the future. Standard disclaimer here.
2694         Library is not automatically build yet. But one can build it by
2695         invoking 'make' inside the libc directory.
2696         * added ADC library under libio. Preliminary version yet.
2697
2698         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2699         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2700         aopForRemat() now and not by pic16_aopOp(),
2701         * (pic16_popGetTempReg): removed warning messgae when allocating
2702         temporary registers, its a buggy feature and will be removed,
2703         * (pic16_popGet): set register instance field in AOP_CRY,
2704         * (pic16_outBitC): fixed for results in size greater than 1,
2705         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2706         * (pic16_storeForReturn): optimized return of 0,
2707         * (genCmp): experimental code for new genCmp which uses PIC18's
2708         special compare&skip instructions. Initial tests fail some times
2709         with variables grater than 1 byte in size, so new code is disabled,
2710         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2711         a single bit,
2712         * (genCast): began a fix to optimize the casting of a bit to another
2713         bit, now assigning a bitfield to another bitfield will fail, sorry,
2714         * src/pic16/main.c: disabled the use of lr-support feature,
2715         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2716         * added some function prototypes, added function _debugf prototype,
2717         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2718         bits with offset (case PO_GPR_BIT),
2719         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2720         command line,
2721         * (isBankInstruction): modified to return 0 for no banking instruction,
2722         and 1 for banking instruction,
2723         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2724         caused stop processing pCodes after a inline assembly block,
2725         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2726         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2727         registers when it shouldn't,
2728         * src/pic16/ralloc.c (allocReg): add preliminary support for
2729         supporting a limited set of temporary registers,
2730
2731 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2732
2733         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2734           genDataPointerSet): ensure assignments always copy in MSB to LSB
2735           order,
2736           (loadRegFromAop): recognize CLRH optimization,
2737           (genFunction): optimize RECEIVE iCodes in reentrant functions
2738
2739 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2740
2741         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2742           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2743           selected.
2744         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2745         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2746           contiguous with data
2747
2748 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2749
2750         * device/lib/_gptrget.c (_gptrget),
2751         * device/lib/_gptrgetc.c (_gptrgetc),
2752         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2753           instead of sjmp to ret
2754         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2755           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2756
2757 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2758
2759         * .version: bumped version to 2.4.7
2760         * device/lib/_gptrget.c (_gptrget): is now _naked
2761         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2762         * device/lib/_gptrput.c (_gptrput): is now _naked
2763         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2764           (createFunction): fixed xstack
2765         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2766         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2767           or bit either,
2768           (geniCodeCritical): store original interrupt state in an iTemp bit
2769           var unless stack-auto
2770         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2771         * src/SDCCmain.c (setIncludePath): added include/target to search path
2772         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2773         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2774           prototype,
2775           (processFuncArgs): put bit vars in bit area
2776         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2777           unsaveRBank): fixed xstack,
2778           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2779           (genFunction, genEndFunction): fixed xstack,
2780           (genAssign): optimization don't walk backwards through mem
2781         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2782         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2783         * support/regression/Makefile: also make library (for stack-auto) when
2784           making "all" and added "test-mcs51-xstack-auto"
2785         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2786         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2787         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2788         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2789         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2790           make-library by MAKE_LIBRARY
2791         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2792           regression tests for xstack
2793         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2794         * support/regression/tests/critical.c: test for critical on mcs51
2795
2796 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2797
2798         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2799           built version of sdcc instead of installed version
2800
2801 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2802
2803         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2804         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2805           vprintf.c now
2806         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2807         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2808           WARNING: remove device/lib/build/z80/printf.o by hand when
2809           updating from previous build!
2810         * device/lib/z80/printf.c: updated comment
2811         * support/regression/tests/bug1057979.c: test all ports now
2812         * support/regression/tests/bug1065458.c: file added
2813
2814 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2815
2816         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2817           *_start and *_end symbols for static functions
2818
2819 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2820
2821         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2822           and search crt0.o in all library paths,
2823           (setIncludePath): proper handling of --nostdinc,
2824           (setLibPath): proper handling of --nostdlib
2825         * support/regression/Makefile,
2826         * support/regression/ports/ds390/spec.mk,
2827         * support/regression/ports/gbz80/spec.mk,
2828         * support/regression/ports/hc08/spec.mk,
2829         * support/regression/ports/mcs51/spec.mk,
2830         * support/regression/ports/mcs51-large/spec.mk,
2831         * support/regression/ports/mcs51-stack-auto/spec.mk,
2832         * support/regression/ports/z80/spec.mk: use include and lib files from
2833           built version of sdcc instead of installed version
2834         * doc/sdccman.lyx: fixed typo in --nostdinc
2835
2836 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2837
2838         * src/pic/pcode.c,
2839         * src/pic/device.c,
2840         * src/pic/ralloc.c,
2841         * src/pic/gen.c : added support to generate code for struct bit fields.
2842
2843 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2844
2845         * as/xa51/xa_version.h,
2846         * device/include/errno.h,
2847         * device/include/regc515c.h,
2848         * device/lib/_itoa.c,
2849         * device/lib/_ltoa.c,
2850         * device/lib/ser_ir_cts_rts.c,
2851         * sim/ucsim/xa.src/glob.cc,
2852         * sim/ucsim/xa.src/inst_gen.cc,
2853         * sim/ucsim/xa.src/xa_bit.cc,
2854         * sim/ucsim/xa.src/xa_sfr.cc,
2855         * sim/ucsim/z80.src/inst_dd.cc,
2856         * sim/ucsim/z80.src/inst_fdcb.cc,
2857         * support/scripts/keil2sdcc.pl,
2858         * src/pic16/pic16.dsp,
2859         * src/pic16/pic16a.dsp: corrected cvs line endings
2860         * device/lib/printf_large.c: fixed bug 1057979
2861         * src/pic16/gen.c: fixed non-C standard code
2862         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2863         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2864         * support/regression/ports/mcs51/support.c: reload T1 asap
2865         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2866           pdata use and clear idata startup behaviour
2867         * support/regression/tests/bug1057979.c: added
2868
2869 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2870
2871         * device/examples/ds390/ow390/ad26.h,
2872         * device/examples/ds390/ow390/cnt1d.h,
2873         * device/examples/ds390/ow390/crcutil.c,
2874         * device/examples/ds390/ow390/ownet.h,
2875         * device/examples/ds390/ow390/owsesu.c,
2876         * device/examples/ds390/ow390/swt12.h,
2877         * device/examples/ds390/ow390/swtoper.c,
2878         * device/examples/ds390/ow390/temp10.h,
2879         * device/examples/ds390/ow390/thermodl.c,
2880         * device/examples/ds390/tinitalk/tinitalk.dsp,
2881         * device/examples/ds390/tinitalk/tinitalk.dsw,
2882         * device/examples/mcs51/clock/hw.h,
2883         * device/examples/mcs51/simple2/go.bat,
2884         * device/examples/serialcomm/windows/serial.h,
2885         * device/examples/xa51/dummy.c,
2886         * device/examples/xa51/hello.c,
2887         * device/include/80c51xa.h,
2888         * device/include/at89x051.h: corrected cvs line endings
2889
2890 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2891
2892         * src/pic16/main.c (options): added command line --gstack, to trace
2893         stack over/under flows,
2894         * added pragma 'wparam' to allow passing first byte of function
2895         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2896         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2897         call to __gstack_test function and sets up the symbol as extern,
2898         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2899         * popaop): added call to pic16_testStackOverflow,
2900         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2901         wparamList list,
2902         * (genCall, genPcall): now all parameters are passed via stack
2903         except in functions that are pass to wparam pragma in which WREG is
2904         used too,
2905         * (genPcall): REENTRANT flag is checked to see if variable prototype
2906         contains reentrant keyword, don't call a non-reentrant function, via
2907         a reentrant function pointer or vice versa, functions are never
2908         passed via WREG,
2909         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2910         D.Winkler,
2911         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2912         SIGSEGV when accessing a NULL register stucture,
2913         * (pic16_printGPointerType): modified to handle UPPER modifier for
2914         function initializers, changed prototype of function to simpler one,
2915         * (pic16_printIvalFuncPtr): check to see if function is already
2916         added in externs list,
2917         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2918         optimized a move from W to SFR with a move to the same register
2919         later after a CALL,
2920         * device/lib/pic16/debug: NEW directory, contains debug features
2921         which are enabled when linking with libdebug.lib, currently command
2922         line option --gstack enables stack pointer tracing for over/under
2923         flow, corresponding sources are in debug/gstack
2924
2925 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2926
2927         * doc/sdccman.lyx: updated SDCC version,
2928         * (PIC16 port): update list of command line options,
2929         * src/pic16/device.h (structure pic16_options_t): added field gstack
2930         to enable stack overflow tracing on push/pops,
2931         * src/pic16/device.c (statistics structure): added statistics
2932         structure,
2933         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2934         pic16_dump_int_registers): increase statistics counters for each
2935         * variable which is encountered
2936         * (pic16_dump_usection): emit each .udata variable to its own udata
2937         section,
2938         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2939         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2940         parameters via stack, otherwise use old scheme,
2941         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2942         assembler output file,
2943         * src/pic16/main.c: added command line options --gstack to enable
2944         push/pop tracing for stack overflow,
2945         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2946         instructions): added size of each instruction,
2947         * (pic16_countInstruction): estimate size of instructions in
2948         the_pFile list, inline assembly blocks are not counted,
2949         * (pic16_FixRegisterBanking): trace previous register usage, when
2950         banksel optimizations is greater than 0, don't emit a redudant
2951         banksel directive,
2952
2953 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2954
2955         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2956         * src/pic16/ralloc.c : applied same fix for pic16.
2957         * src/pic/gen.c : tidied it up a little.
2958
2959 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2960
2961         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2962         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2963
2964 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2965
2966         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2967
2968 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2969
2970         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2971         non-reentrant function __modsint in the interrupt function (thus
2972         corrupting math operations during serial I/O)
2973         * device/lib/ser_ir.c: as above, changed buffersize
2974         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2975         256.c,d for zeroing
2976         * doc/Makefile: added option -t for rsync
2977
2978 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2979
2980         * src/SDCCast.h (struct ast),
2981         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2982
2983 2004-10-20 Borut Razem <borut.razem AT siol.net>
2984
2985         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2986         package
2987
2988 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2989
2990         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2991         makefile targets,
2992         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2993         support functions to replace long sequences of MOVFF's from access
2994         bank registers to stack and vice versa,
2995         * src/pic16/device.h: added new field opt_flags, where optimization
2996         flags can be set to enable certain features,
2997         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2998         * pBlock, (genFunction, genEndFunction): surroung loop for
2999         saving/loading used registers in stack with PC_INFO pCodes,
3000         INF_LREGS. Code in between can then be optimized by pCode optimizer
3001         to support function calls,
3002         * (genDataPointerSet): fixed bug which loaded float fields in
3003         structures with corrupt data,
3004         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3005         in a standard way debug info on stderr. Feature used for developing
3006         and debugging only,
3007         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3008         obsolete chunks of code,
3009         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3010         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3011         * pic16/src/pcode.c (pic16_newpCodeInfo,
3012         * (pic16_newpCodeOpLocalRegs),
3013         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3014         feature,
3015         * (pic16_pCodeConstString): printing of the initial value of a
3016         symbol as a comment is inhibited since parsing was already done by
3017         copyStr and output is corrupt,
3018         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3019
3020 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3021
3022         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3023
3024 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3025
3026         * as/mcs51/lkarea.c: removed old K&R style,
3027           (lnksect): changed check on boundary error,
3028           (lnksect2): changed check on boundary error,
3029           (lnksect2): extend XSTK to end of page if size = 1
3030         * as/mcs51/lkmain.c: removed old K&R style,
3031           (Areas51): create l_IRAM symbol
3032         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3033         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3034           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3035         * device/lib/_mullong.c: added version to be compiled with xstack
3036         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3037         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3038         * device/lib/mcs51/crtxstack.asm: fixed comment
3039         * src/SDCCglue.c: maxInterrupts defaults to 0,
3040           (emitMaps): added pdata,
3041           (createInterruptVect): (re)moved default,
3042           (glue): added pdata,
3043           (glue): moved __start__xstack to XSTK with default size 1
3044         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3045           and options.float_rent when options.stackAuto is set,
3046           (linkEdit): only write XDATA_NAME if provided on command line
3047         * src/SDCCmem.h,
3048         * src/SDCCmem.c: added pdata
3049         * src/port.h: added pdata_name to PORT
3050         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3051           (saveRegisters, unsaveRegisters): removed usage of B,
3052           (genMinus): fixed accumulator clash,
3053           (genJumpTab): added comment, this needs another look
3054         * src/mcs51/gen.c: added check for "B in use" paranoia,
3055           added pushB() and popB()
3056         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3057           chance
3058         * src/avr/main.c,
3059         * src/ds390/main.c,
3060         * src/hc08/main.c,
3061         * src/mcs51/main.c,
3062         * src/pic/main.c,
3063         * src/pic16/main.c,
3064         * src/xa51/main.c,
3065         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3066           added PSEG (PAG,XDATA) or NULL to port specifier
3067         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3068         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3069           (_mcs51_genInitStartup): removed __start__xstack equ,
3070           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3071         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3072         * src/z80/gen.c (_rleAppend): fixed warnings
3073         * support/regression/tests/zeropad.c: added pdata test
3074         * .version: bumped to 2.4.6
3075
3076 2004-10-17 Borut Razem <borut.razem AT siol.net>
3077
3078         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3079         as a part of nightly build
3080
3081 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3082
3083         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3084         WREG holds the first byte function parameters,
3085         * (aopForSym): take special case for symbols which are in FARSPACE
3086         but in CODESPACE too,
3087         * (assignResultValue): modified to take into account _G.useWreg,
3088         * (genCall): don't use wreg for parameter passing when function is
3089         declared as reentrant, too, added optimization INCF to stack
3090         pointer when stack parameter count is 1,
3091         * (genFunction, genEndFunction): refurnished and fixed to not using
3092         wreg for passing parameters when function has varargs or is
3093         reentrant, fixed bug with symbol name compare for generating
3094         functions in absolute address,
3095         * (pic16_storeForReturn): refurnished,
3096         * (genCmp): began writing a new version of the function, not ready
3097         yet, therefore it is disabled,
3098         * (genAssign): do not read code memory when assigning a function to
3099         a pointer function,
3100         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3101         array of characters, not pointer,
3102         * (pic16initialComments): in debug mode emit an .ident directive for
3103         the assembler,
3104         * (_process_pragma): emit a new warning type (internal to pic16)
3105         when setting stack to default length, emit a similar warning when
3106         placing a function at absolute address and address is not word aligned
3107         * (_pic16_parseOptions): added 'return TRUE' statement,
3108         * (_pic16_linkEdit): if compiling a source, then add the source's
3109         file object, first in the list of objects to link,
3110
3111 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3112
3113         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3114         * src/pic/main.c : removed VC warning.
3115         * src/pic/gen.c : changed comment.
3116
3117 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3118
3119         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3120         reference to a deprecated symbol _GPTRREG was causing failure to
3121         link. Thanks G. M. Gallant for the info.
3122
3123 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3124
3125         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3126         comments for Bugs item #954788.
3127
3128 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3129
3130         * src/pic16/device.c (pic16_dump_gsection,
3131         * pic16_groupRegistersInSection): handle symbols declared to be in
3132         access bank differently,
3133         * src/pic16/gen.c (struct _G): added field resDirect,
3134         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3135         send values read from stack directly to result and don't allocate
3136         temporary values,
3137         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3138         same registers,
3139         * (pic16_sameRegsOfs): NEW,
3140         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3141         free because they were not allocated from temporary pool,
3142         * pic16_popRegFromString): workaround to fix a problem with
3143         allocating variables twice or never,
3144         * (genGenPointerGet): using PRODL instead of FSR0H,
3145         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3146         instead of FSR0H,
3147         * (genAssign): take advantage of the _G.resDirect flag,
3148         * (genCast): around line 11844, use mov2f instead of directly
3149         MOVFF'ing between operands to account for literal values,
3150         * src/pic16/genutils.c: some new debug functions for gpsim have been
3151         added,
3152         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3153         float with integer part only,
3154         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3155         place variables in access bank
3156         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3157         updated sources to reflect recent changes in gen.c
3158
3159 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3160
3161         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3162         sources that searched for headers in installation path, now the
3163         device/include/pic16 is used,
3164         * src/pic16/glue.c (pic16glue),
3165         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3166         .line directives if not in debug mode, this suppresses assembler's
3167         warnings for ignored directives
3168
3169 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3170
3171         * src/port.h: made reset_regparms prototype void parameter explicit.
3172         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3173         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3174         * doc/sdccman.lyx: documented warning disabling and how to use
3175           printf_large to make it print floats.
3176         * device/include/stdbool.h: NEW
3177         * device/lib/_atof.c,
3178         * device/lib/_divuint.c,
3179         * device/lib/_divulong.c,
3180         * device/lib/expf.c,
3181         * device/lib/printf_large.c,
3182         * device/lib/sincosf.c,
3183         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3184         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3185           a completely reentrant lib.
3186
3187 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3188
3189         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3190         * device/include/pic16/stdio.h: fixed bug with colon
3191
3192 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3193
3194         * device/include/pic16/stdio.h,
3195         * device/include/pic16/stdlib.h,
3196         * device/include/pic16/math.h: NEW
3197         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3198         declared as _naked to reduce overhead
3199         * device/lib/Makefile.in (target port-specific-objects-pic16):
3200         changed * to *.* so to ignore the CVS directory,
3201         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3202         stacked variables back in stack,
3203         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3204         corruption
3205
3206 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3207
3208         * .version: bumped version number to 2.4.5
3209         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3210         * support/Util/SDCCerr.c (messages structure): added entry for
3211         W_POSSBUG2
3212
3213         Large cumulative patch for pic16 port and libraries.
3214         * device/include/pic16/sdcc-lib.h,
3215         * device/include/pic16/stdarg.h,
3216         * device/include/asm/pic16/features.h,
3217         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3218         * device/include/pic16/float.h: changes reentrant keyword with
3219         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3220         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3221         updated target build-libraries to include objects from gptr,
3222         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3223         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3224         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3225         all function headings,
3226         * src/SDCCmain.c: added global parameter userIncDirsSet,
3227         * (parseCmdLine): when option -I is encountered add directory to
3228         userIncDirsSet too,
3229         * src/version.awk: added space between control and long,
3230         * src/pic16/NOTES: added some notes for the port,
3231         * src/pic16/gen.c: added prototype for mov2fp function,
3232         * (fReturnpic16[]): properly named return value registers,
3233         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3234         * (aopForSym): added code to handle symbols with onStack flag set,
3235         symbols onStack are allocated PTRSIZE bytes,
3236         * (aopFreeAsmop): handles special case where asmops are stack objects,
3237         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3238         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3239         added argument lock to trace flaws in allocating temporary registers
3240         when developing port,
3241         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3242         * (pic16_popRegFromString): reenabled allocating a direct register
3243         from string,
3244         * (assignResultValue): various beautifications,
3245         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3246         referenced function argument,
3247         * (genIpush): reenabled to allow stacked arguments, handles only
3248         ic->parmPush iCodes,
3249         * (genCall, genPcall): major changes to allow for variable argument
3250         functions, fixed a bug with falsely restoring stack pointer after
3251         returning from call,
3252         * (genFunction): pending code for critical function,
3253         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3254         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3255         * (genNearPointerGet): fixed bug with indirect reading, was always
3256         reading from INDF0
3257         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3258         pointers,
3259         * (genAddrOf): rewrote code to take address of a stacked function parameter
3260         * (genCast): fixed casting to generic pointer type,
3261         * src/pic16/gen.h: added AOP_STA,
3262         * (struct asmop): added field stk,
3263         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3264         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3265         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3266         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3267         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3268         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3269         generic pointers,
3270         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3271         and library paths,
3272         * (pic16_port structure): generic pointer size is set to 3,
3273         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3274         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3275         compiler warning,
3276         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3277         operand is an iTemp,
3278
3279 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3280
3281         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3282         * debugger/mcs51/simi.c: addapt new syntax of s51
3283
3284 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3285
3286         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3287         * src/pic16/pcode.c: commented out some calls to free() in order to
3288         fix bug #989576,
3289
3290 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3291
3292         * src/SDCCicode.h,
3293         * src/SDCCicode.c (isiCodeInFunctionCall),
3294         * src/avr/ralloc.c (selectSpil),
3295         * src/pic/ralloc.c (selectSpil),
3296         * src/pic16/ralloc.c (selectSpil),
3297         * src/ds390/ralloc.c (selectSpil),
3298         * src/hc08/ralloc.c (selectSpil),
3299         * src/xa51/ralloc.c (selectSpil),
3300         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3301         stack in the middle of a function call sequence (fixes bug #1020268)
3302         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3303         costs associated with the minimum switch case.
3304
3305 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3306
3307         * src/SDCC.lex: fixed bug #1030549
3308
3309 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3310
3311         * src/SDCCcse.h (struct cseDef),
3312         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3313         over a function call if the CSE is derived from a symbol whose
3314         address has been taken (fixes bug #1029883)
3315         * support/regression/tests/bug-1029883: a new regression test for
3316         this bug
3317
3318 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3319
3320         * src/hc08/gen.c (emitinline): fixed bug #1029778
3321         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3322         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3323         and starts toward RFE #905167)
3324
3325 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3326
3327         * src/pic16/gen.c (mov2f): New function to move an operand to
3328         another without considering if it is a literal or a register,
3329         * (pic16_sameRegs): don't check if they are both AOP_REG,
3330         * (AccRsh): removed andmask=0 lines,
3331         * (genLeftShift): duplicated to be improved in future versions,
3332         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3333         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3334         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3335         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3336         * (insertBankSwitch): fixed inserting banksel directives algorithm
3337         for instructions that follow a skip instruction, this fixes a report
3338         for broken subtraction code generation,
3339         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3340         iCode is a left op, just in case result and right share the same
3341         registers
3342
3343 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3344
3345         * src/hc08/main.c,
3346         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3347         preservation of HX
3348         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3349         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3350         on 2004-09-12; it was buggy
3351
3352 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3353
3354         * src/SDCCsymt.h: removed RESULT_CHECK
3355         * src/SDCCast.c,
3356         * src/SDCCglue.c,
3357         * src/SDCCval.c,
3358         * src/pic/glue.c,
3359         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3360
3361 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3362
3363         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3364         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3365         configuration values no more rejected by compiler, they are assigned
3366         to configuration registers with a warning message instead,
3367         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3368         the for-loop so last conf register is emitted too,
3369         * (_pic16_initPaths): link library libsdcc.lib by default,
3370         * (_hasNativeMulFor): modified test for multiplication according to
3371         Raphael Neider's remarks. Integer multiplication is also done with
3372         support functions,
3373         * device/include/pic16/pic18fregs.h: corrected type error in while
3374         testing and including 18f6720 header file
3375
3376 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3377
3378         * src/pic16/device.h (pic16_options): removed field use_crt,
3379         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3380         until an optimization to handle single bits is added,
3381         * (pic16_loadFSR0): moved before genUnpackBits,
3382         * (genAnd): some white lines removed,
3383         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3384         leave_reset flags in pic16_options when using crt modules,
3385
3386 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3387
3388         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3389           for bugs 898889 & 979599. Also used some safer print instructions.
3390
3391 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3392
3393         * src/pic16/device.h (pic16_options_t): added field use_crt,
3394         crt_name, no_crt,
3395         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3396         catch a probable future bug,
3397         * src/pic16/gen.c: aopIdx function commented out,
3398         * (genAssign): commented out old code which used aopIdx,
3399         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3400         code, added if conditionals to take into account the --use-crt
3401         command line options,
3402         * src/pic16/main.c (pic16_optionsTable): added new command line
3403         options, --use-crt= and --no-crt,
3404         * (_pic16_linkEdit): now the proper crt object is added in the
3405         linker command line except than when --no-crt is specified,
3406         * src/pic16/pcode.c,
3407         * src/pic16/pcode.h: added some structures and functions for a new
3408         optimization scheme to compansate for instruction overhead between
3409         same iCodes, this scheme is currently under development and is not
3410         working in any way,
3411         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3412         to && operator,
3413         * device/lib/pic16/startup/crt0i.c,
3414         * device/lib/pic16/startup/crt0iz.c: added global char variable
3415         __uflags to force the generation of an idata section
3416
3417 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3418
3419         * doc/Makefile,
3420         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3421         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3422
3423 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3424
3425         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3426         Frieder) and clarified the default code optimization mode
3427
3428 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3429
3430         * src/SDCC.lex (doPragma, process_pragma),
3431         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3432         "opt_code_size", and "opt_code_balanced"
3433         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3434         regrouped options by category, added support for category headers
3435         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3436         and "--opt-code-size"
3437         * doc/sdccman.lyx: documented these new options and pragmas
3438         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3439         preference into account
3440
3441 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3442
3443         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3444           geniCodePreDec): Fixed bug 904237 by generating a warning
3445         * src/SDCCerr.h,
3446         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3447
3448 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3449
3450         * src/pic/device.c : When no max ram set validate full memory range.
3451         * src/pic/pcode.c,
3452         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3453
3454 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3455
3456         * device/lib/_gptrget.c,
3457         * device/lib/_gptrput.c: updated comment
3458         * device/lib/calloc.c,
3459         * device/lib/free.c,
3460         * device/lib/malloc.c,
3461         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3462         * src/SDCCcse.c (cseBBlock),
3463         * src/SDCCicode.c (printOperand, geniCodeArray),
3464         * src/SDCCicode.h (struct operand): fixed bug 868103
3465         * support/regression/tests/bug-868103.c: added
3466         * src/SDCCast.c (searchLitOp),
3467         * src/SDCCcse.h (struct cseDef),
3468         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3469         * src/SDCCicode.h (struct operand),
3470         * src/SDCCsymt.h (struct sym_link),
3471         * src/avr/gen.c (hasInc),
3472         * src/ds390/gen.c (hasInc),
3473         * src/hc08/gen.c (genPlusIncr, hasInc),
3474         * src/mcs51/gen.c (hasInc),
3475         * src/pic16/glue.c (pic16_printIvalChar),
3476         * src/pic16/ralloc.c (regWithIdx),
3477         * src/xa51/gen.c (hasInc) : removed warnings
3478         * src/SDCCast.c (createBlock): added comment ???
3479         * src/hc08/ralloc.c: updated comments
3480
3481 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3482
3483         * doc/sdccman.lyx: updated section on switch statements, added
3484         section about semaphore locking
3485         * doc/Makefile: added option -info for latex2html
3486         * device/lib/_gptrget.c,
3487         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3488
3489 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3490
3491         * src/pic/device.h,
3492         * src/pic/device.c,
3493         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3494          maxram is less than 0x100.
3495
3496 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3497
3498         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3499
3500 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3501
3502         * src/port.h,
3503         * src/mcs51/main.c,
3504         * src/ds390/main.c,
3505         * src/z80/main.c,
3506         * src/hc08/main.c,
3507         * src/pic/main.c,
3508         * src/pic16/main.c,
3509         * src/avr/main.c,
3510         * src/xa51/main.c
3511         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3512         a jump table is the best form for a switch statement, including
3513         automatic insertion of missing cases to make the case range
3514         continuous. Developed in collaboration with Frieder Ferlemann.
3515
3516 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3517
3518         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3519         accumulator result if it needs sign extension
3520
3521 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3522
3523         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3524
3525 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3526
3527         * device/lib/gbz80/printf.c,
3528         * device/lib/z80/printf.c: removed define for NULL
3529
3530 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3531
3532         * as/xa51/xa_link.c,
3533         * device/examples/ds390/ow390/ad26.c,
3534         * device/examples/ds390/ow390/cnt1d.c,
3535         * device/examples/ds390/ow390/counter.c,
3536         * device/examples/ds390/ow390/ds2480.h,
3537         * device/examples/ds390/ow390/ds2480ut.c,
3538         * device/examples/ds390/ow390/findtype.c,
3539         * device/examples/ds390/ow390/gethumd.c,
3540         * device/examples/ds390/ow390/owllu.c,
3541         * device/examples/ds390/ow390/ownetu.c,
3542         * device/examples/ds390/ow390/swt12.c,
3543         * device/examples/ds390/ow390/swtloop.c,
3544         * device/examples/ds390/ow390/temp.c,
3545         * device/examples/ds390/ow390/temp10.c,
3546         * device/examples/ds390/ow390/thermo21.c,
3547         * device/examples/ds390/ow390/tinilnk.c,
3548         * device/examples/ds390/ow390/tstfind.c,
3549         * device/examples/serialcomm/windows/serial.cpp,
3550         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3551         * device/include/reg51.h: fixed line endings for cvs
3552
3553 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3554
3555         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3556         packRegsForAccUse, packRegisters): new accumulator register
3557         packing algorithm
3558         * support/regression/ports/hc08/support.c (_putchar): suppress
3559         warning of unused variable
3560         * src/SDCCicode.c: added SWAP entry to codeTable
3561
3562 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3563
3564         * device/lib/sprintf.c: forgot to add this file before previous commit
3565
3566 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3567
3568         * src/pic16/gen.c (genPackBits): added operand right in function
3569         parameters, load result directly if p_type is POINTER (that is
3570         called by genNearPointerSet)
3571         * (genUnPackBits): added operand left in function parameters,
3572         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3573         FSR0 if accessing bitfields,
3574
3575 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3576
3577         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3578           _print_format; updated printf, sprintf, vsprintf
3579         * device/include/asm/default/features.h: corrected comment/define
3580         * device/lib/Makefile.in: added sprintf.c
3581         * device/lib/libsdcc.lib: added sprintf module
3582         * device/lib/printf_large.c,
3583         * device/lib/vprintf.c,
3584         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3585           into these 3 files
3586         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3587         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3588         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3589           hc08 test
3590         * support/regression/tests/zeropad.c: define idata as data for hc08
3591
3592 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3593
3594         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3595         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3596         labels are referenced at least once (even if a reference is not found)
3597         * src/hc08/gen.c (emitcode): set isComment flag for comments
3598         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3599         loads), rules 6a..6b (optimize jumps to return)
3600
3601 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3602
3603         * device/lib/acosf.c (acosf),
3604         * device/lib/asinf.c (asinf),
3605         * device/lib/atanf.c (atanf),
3606         * device/lib/ceilf.c (ceilf),
3607         * device/lib/cosf.c (cosf),
3608         * device/lib/coshf.c (coshf),
3609         * device/lib/cotf.c (cotf),
3610         * device/lib/fabsf.c (fabsf),
3611         * device/lib/floorf.c (floorf),
3612         * device/lib/log10f.c (log10f),
3613         * device/lib/logf.c (logf),
3614         * device/lib/sinf.c (sinf),
3615         * device/lib/sinhf.c (sinhf),
3616         * device/lib/sqrtf.c (sqrtf),
3617         * device/lib/tanf.c (tanf),
3618         * device/lib/tanhf.c (tanhf),
3619         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3620         replaced all instances of "reentrant" in the library functions
3621         defined in math.h with this macro.
3622         * support/regression/tests/float_trans.c: reenabled test for hc08
3623
3624 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3625
3626         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3627         erroneously deleted
3628
3629 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3630
3631         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3632         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3633         multi-byte volatile operands are used
3634         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3635         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3636         initialization to area GSINIT0 so that it would always precede
3637         any static initializers in GSINIT
3638         * support/regression/tests/zeropad.c: fixed idata define for hc08
3639         * support/regression/tests/bug-927659.c,
3640         * support/regression/tests/float_trans.c: disabled tests for hc08
3641         pending missing library routines
3642         * .version: increased version number to 2.4.4 - hc08 port now passes
3643         regression tests
3644
3645
3646 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3647
3648         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3649         * Makefile.common.in,
3650         * as/Makefile,
3651         * as/hc08/Makefile.in,
3652         * as/mcs51/Makefile.in,
3653         * as/z80/Makefile.in,
3654         * debugger/mcs51/Makefile.in,
3655         * device/include/Makefile.in,
3656         * device/lib/Makefile.in,
3657         * doc/Makefile,
3658         * link/Makefile,
3659         * link/z80/Makefile.in,
3660         * packihx/Makefile.in,
3661         * sim/ucsim/main_in.mk,
3662         * sim/ucsim/avr.src/Makefile.in,
3663         * sim/ucsim/doc/Makefile.in,
3664         * sim/ucsim/gui.src/serio.src/Makefile.in,
3665         * sim/ucsim/hc08.src/Makefile.in,
3666         * sim/ucsim/s51.src/Makefile.in,
3667         * sim/ucsim/xa.src/Makefile.in,
3668         * sim/ucsim/z80.src/Makefile.in,
3669         * src/Makefile.in,
3670         * support/cpp2/Makefile.in,
3671         * support/librarian/Makefile,
3672         * support/makebin/Makefile: added DESTDIR to the install path proposed
3673         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3674         * doc/sdccman.lyx: added DESTDIR documentation
3675
3676 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3677
3678         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3679         instruction for interrupt handlers, use fast returns when returning
3680         from high priority interrupts
3681
3682 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3683
3684         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3685         code generation
3686         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3687         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3688         bugs, ported much of Bernhard's code from mcs51
3689         * src/mcs51/gen.c (genSend),
3690         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3691         than one when calling a reentrant function
3692         * device/lib/_mullong.c: defined an alternate struct layout for big
3693         endian ports (hc08)
3694
3695 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3696
3697         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3698         test
3699
3700 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3701
3702         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3703         are sane and complete before asking the port its prefered parameter
3704         passing method (fixes bug #1017633)
3705         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3706         and _ret3
3707
3708 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3709
3710         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3711         problem in bitfields >= 8 bits.
3712
3713 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3714
3715         * src/SDCCsymt.c: undid changes that were not meant to be committed
3716
3717 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3718
3719         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3720
3721 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3722
3723         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3724           copied and wrong bit got inverted
3725
3726 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3727
3728         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3729         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3730         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3731         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3732         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3733         assignments to bitfields at known addresses
3734         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3735         reads from bitfields at known addresses
3736         * src/hc08/ralloc.c (packRegisters),
3737         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3738         genhc08Code): optimize pointer get values used as conditionals
3739         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3740         and branch
3741
3742 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3743
3744         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3745         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3746         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3747         as conditionals
3748
3749 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3750
3751         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3752
3753 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3754
3755         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3756         related problems
3757
3758 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3759
3760         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3761
3762 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3763
3764         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3765         mcs51 port
3766
3767 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3768
3769         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3770
3771 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3772
3773         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3774         cases use more compact code.
3775
3776 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3777
3778         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3779
3780 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3781
3782         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3783
3784 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3785
3786         * src/SDCCsymt.h,
3787         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3788         parameter of changePointer() from symbol* to sym_link*
3789         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3790         * src/SDCCsymt.c (compareType): void* type is castable to other
3791         pointers, but not necesarily an exact match.
3792         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3793         is no longer blindly treated as an exact match.
3794         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3795
3796 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3797
3798         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3799
3800 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3801
3802         * src/pic/gen.c,
3803         * src/pic/pcode.c,
3804         * src/pic/ralloc.h,
3805         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3806
3807 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3808
3809         * src/pic/device.c,
3810         * src/pic/device.h,
3811         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3812
3813 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3814
3815         * src/mcs51/gen.c (emitcode): fixed bug #992819
3816
3817 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3818
3819         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3820           there's no need to make it worse
3821
3822 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3823
3824         * src/mcs51/ralloc.c (deassignLR),
3825         * src/ds390/ralloc.c (deassignLR),
3826         * src/hc08/ralloc.c (deassignLR),
3827         * src/z80/ralloc.c (deassignLR),
3828         * src/pic/ralloc.c (deassignLR),
3829         * src/pic16/ralloc.c (deassignLR),
3830         * src/avr/ralloc.c (deassignLR),
3831         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3832         rlivePoint): fixed another part of bug #971834
3833
3834 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3835
3836         * src/z80/main.c: enabled "critical" keyword
3837         * src/z80/mappings.i,
3838         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3839         functions (fixes bug #979646)
3840         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3841
3842 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3843
3844         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3845           such as c:\mydir.
3846
3847 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3848
3849         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3850           doesn't disable too much optimizations
3851
3852 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3853
3854         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3855
3856 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3857
3858         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3859
3860 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3861
3862         * src/pic/gen.c tidied up tabs
3863         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3864         * src/pic/main.c tidied up tabs
3865         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3866         * src/pic/pcoderegs.c tidied up tabs
3867         * src/pic/ralloc.c tidied up tabs
3868
3869 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3870
3871         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3872         to S_FIXED for pic16 port and when symbol is not in level 0,
3873         allocate for S_REGISTER storage class and pic16 port, too,
3874         * src/pic16/device.h: prototype for checkSym,
3875         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3876         * (pic16_assignConfigWordValue): test the value and the mask to
3877         validate that the value is suitable for the configuration word,
3878         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3879         collect extern declared symbols, don't emit symbol twice, check
3880         first if symbol is in publics set first,
3881         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3882         * added command line '--fstack' which enables an experimental
3883         feature for stack access, too buggy to be used yet...
3884         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3885         * (pic16_allocDirReg): when register has storage class S_REGISTER
3886         allocate in pic16_dynAccessRegs,
3887         * device/include/pic16/pic18f????.h: modified configuration word
3888         naming convention, words started as CONFIG0H but should be CONFIG1H
3889
3890 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3891
3892         * device/include/mcs51reg.h: fixed bug 970993
3893
3894 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3895
3896         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3897         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3898         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3899         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3900         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3901         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3902           error/warning numbers,
3903           added function setWarningDisabled()
3904         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3905         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3906           _memcmp.c _memmove.c calloc.c realloc.c free.c
3907         * support/regression/tests/malloc.c: added tests for new functionality
3908         * support/regression/tests/zeropad.c: added tests for truncated initializers
3909           and initialized char arrays starting with '\x0'
3910         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3911
3912 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3913
3914         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3915
3916 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3917
3918         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3919         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3920         peephole 177.e. Thanks to anonymous
3921
3922 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3923
3924         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3925         function isn't used in the source but referenced as a
3926         variable initializer then declare it as extern in .asm file
3927
3928 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3929
3930         * .version: increased version number to 2.4.3
3931
3932         Adding version extension according to ChangeLog CVS revision
3933         * src/Makefile.in (target all): added dependency 'version.h'
3934         * (rule version.h): added rule to create version.h from ChangeLog,
3935         * (rule dep): added dependency version.h,
3936         * src/version.awk: AWK script to create version.h
3937         * src/SDCCdwarf2.c (dwWriteModule),
3938         * src/SDCCglue.c (initialComments),
3939         * src/SDCCmain.c (printVersionInfo): modified to write after
3940         version string the version extension number,
3941         * src/SDCCutil.c: included "version.h"
3942         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3943         number,
3944         * src/SDCCutil.h: added prototype for getBuildNumber
3945
3946         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3947         includeDirsSet, too,
3948         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3949         const char [] is found in function prototype...
3950
3951         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3952         moving to WREG with source is already in WREG,
3953         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3954         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3955         * (aopForSym): stack'ed symbols are partially supported, added
3956         if-clause to support symbols in FARSPACE,
3957         * (sameRegs): added test for AOP_ACC to see if registers are same,
3958         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3959         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3960         * (pic16_popRegFromString): will not allocate a new register if it
3961         doesn't find one by name, bug may have introduced...
3962         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3963         * (genIpush): revived to use pic16 port's stack,
3964         * (genAddrOf): added incomplete case for stack'ed operand,
3965         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3966         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3967         can handle multibyte operands,
3968         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3969         * (pic16initialComments): added message for MPLAB compatibility
3970         mode enabled,
3971         * src/pic16/main.h: prototype for pic16_mplab_comp,
3972         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3973         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3974         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3975         because of increased complexity of procedure,
3976         * (_process_pragma): stack pragma changed to format 'stack pos len',
3977         emit symbol '_stack_end' to conform with gplink,
3978         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3979         to search for register,
3980         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3981         PO_GPR_REGISTER,
3982         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3983         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3984         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3985         case for PO_GPR_REGISTER,
3986         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3987         dies, the new era is ahead !...
3988         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3989         pic16_dynInternalRegs,
3990         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3991         * (pic16_allocDirReg): minor optimizations and bug fixes,
3992         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3993
3994         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3995         load stack and frame pointer with address of 'stack_end' symbol
3996
3997 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3998
3999         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4000         without source code but only variable initializers
4001
4002 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4003
4004         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4005         external are not declared as extern to reduce overhead while linking
4006
4007 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4008
4009         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4010
4011 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4012
4013         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4014           Yee Keat for the patch
4015         * src/SDCCast.c (decorateType): fixed bug #979599
4016         * src/ds390/gen.h: removed local fReturnSizeDS390
4017         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4018         * src/ds390/gen.c (genAnd, genOr, genXor),
4019         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4020
4021 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4022
4023         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4024         add relFilesSet to $3, manipulate $2 to handle linking of object
4025         files without source files in command line,
4026         * device/include/pic16 (all headers): added ID location macros,
4027         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4028         entries for ID location bytes,
4029         * (pic16_assignIdByteValue): NEW,
4030         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4031         added field dumpcalltree to pic16_options_t,
4032         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4033         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4034         emitting rFalseIfx label after check_carry label,
4035         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4036         pic16_emitDIRegs), NEW
4037         * (pic16glue): dump .calltree file when option --calltree found,
4038         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4039         * (_pic16_genAssemblerPreamble): emit ID locations after
4040         configuration registers,
4041         * (pic16_linkCmd): modifications of the link command,
4042         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4043         * (pic16_pCodeInitRegisters): don't init stack registers,
4044         * (pic16_findPrevInstruction): fixed bug,
4045         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4046         bug with immediate registers,
4047         * (buildCallTree): traces stack push and pop,
4048         * (pct2): dump also stack usage for each function,
4049         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4050         * (pic16_allocDirReg): various modifications,
4051         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4052         fixed to 1,
4053
4054 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4055
4056         * src/pic16/pcode.c: removed buggy double colon
4057
4058 2004-07-01 Borut Razem <borut.razem AT siol.net>
4059
4060         * support/scripts/sdcc.nsi: added include/pic16 to setup
4061
4062 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4063
4064         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4065         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4066         target 'clean',
4067         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4068         specific command line arguments. Also added sample lkr script
4069         for placing a variable at a specific memory bank.
4070         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4071         at a specific memory bank,
4072         * (pic16_dump_isection): fixed bug which caused string literals to
4073         be omitted when dumping idata section,
4074         * (pic16_groupRegistersInSection): added code to handle registers
4075         in specific memory banks,
4076         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4077         public, all references are renamed too,
4078         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4079         AOP_DPTR2,
4080         * (pic16_storeForReturn): added case to handle when dest is WREG,
4081         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4082         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4083         pic16_rel_udata, check to see if that register is marked as being
4084         a member of a specific memory bank,
4085         * (pic16_printIvalCharPtr): added code to add string literals either
4086         to code or the idata sections,
4087         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4088         also accept the 'udata' pragma,
4089         * src/pic16/main.h: new structure types sectName and sectSym
4090         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4091         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4092         * (pic16_findPrevInstruction): fixed, it returned nothing,
4093         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4094         instruction combinations,
4095         * (pic16_FixRegisterBanking): heavily reorganised,
4096         * (pic16_AnalyzeBanking): if generating banksel directives is
4097         disabled, then don't call FixRegisterBanking at all,
4098         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4099         completely removed,
4100         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4101
4102 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4103
4104         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4105         Phuah Yee Keat <yk.phuah AT nestac.com>
4106
4107 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4108
4109         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4110         correctly the IVT even if it is relocated to some other location
4111
4112 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4113
4114         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4115         * device/include/pic16/pic18f2220.h: NEW,
4116         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4117         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4118         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4119         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4120         nodefaultlibs, ivt_loc is the location of the interrupt vector
4121         table, and nodefaultlibs signs that default libraries should not be
4122         linked in link stage,
4123         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4124         according to --ivt-loc argument,
4125         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4126         when pragma stack is found,
4127
4128 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4129
4130         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4131         256 (range check), 257 (do while), 258.a-f (bit banging
4132         f.e. on 3-wire SPI bus)
4133
4134 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4135
4136         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4137         variables used exclusively within a loop
4138
4139 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4140
4141         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4142
4143 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4144
4145         * src/SDCClrange.c (computeClash): fixed bug #971834
4146
4147 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4148
4149         * src/mcs51/gen.c (genCmp): fixed bug #975903
4150         * src/hc08/gen.c (operandsEqu),
4151         * src/ds390/gen.c (operandsEqu),
4152         * src/z80/gen.c (operandsEqu),
4153         * src/pic/gen.c (operandsEqu),
4154         * src/pic16/gen.c (operandsEqu),
4155         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4156         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4157
4158 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4159
4160         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4161
4162 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4163
4164         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4165         default case in switch statement,
4166         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4167         to eliminate problem with initialisation of pointers, but problem
4168         still exists,
4169         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4170         * (emitStaticSegment): removed various lines emitting debug info,
4171         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4172         added processor registers for utilizing EEPROM,
4173         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4174         configurable and set 8
4175
4176 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4177
4178         * .version: increased version number to 2.4.2,
4179
4180         Cumulative patch for pic16 port
4181         * src/pic16/device.c: changed scheme to dump initial values for
4182         variables in idata segment, all print_idata* functions were removed,
4183         now the pic16_printIval* will be called,
4184         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4185         * _pic16_printPointerType, pic16_printPointerType,
4186         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4187         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4188         NEW, similar to the respective functions in SDCCglue.c,
4189         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4190         way, emitting hex bytes,
4191         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4192
4193 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4194
4195         * src/avr/ralloc.c (serialRegAssign),
4196         * src/xa51/ralloc.c (serialRegAssign),
4197         * src/pic/ralloc.c (serialRegAssign),
4198         * src/pic16/ralloc.c (serialRegAssign),
4199         * src/hc08/ralloc.c (serialRegAssign),
4200         * src/z80/ralloc.c (serialRegAssign),
4201         * src/ds390/ralloc.c (serialRegAssign),
4202         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4203
4204 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4205
4206         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4207         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4208
4209 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4210
4211         Cumulative patch for pic16 port:
4212         * src/pic16/device.h (typedef PIC16_device) modified fields for
4213         defining microcontrollers,
4214         * src/pic16/device.c: added new info for all devices in Pics16 array,
4215         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4216         to be optimised out by the pCode optimiser,
4217         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4218         specially, bug reported by G.M. Gallant,
4219         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4220         as force'd so that cannot be optimised out by pCode optimiser,
4221         * src/pic16/pcode.c,
4222         * src/pic16/pcodepeeph.c,
4223         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4224         they are disabled by default, but can be enabled explicit with
4225         command argument --denable-peeps, for testing,
4226         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4227         --pomit-ivt in COMPILE_FLAGS
4228
4229 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4230
4231         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4232           compilation on MSVC
4233
4234 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4235
4236         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4237
4238 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4239
4240         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4241         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4242
4243 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4244
4245         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4246         would only assign 0x300001 register.
4247
4248 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4249
4250         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4251         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4252
4253 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4254
4255         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4256         for ds80c400
4257         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4258         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4259         added peephole 254 (left shift), 255 (jump table)
4260
4261 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4262
4263         * device/lib/Makefile.in: removed comment line with model-pic16,
4264         * (target port-specific-objects-pic16): the libraries and objects
4265         are copied to the build directory form the device/lib/pic16/bin
4266         directory
4267
4268         Cumulative patch concerning pic16 port:
4269         * library directory has been re-organized,
4270         * added support for PIC18F1220,
4271         * added headers and library sources for chips 18f1220,18f6520,
4272         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4273
4274         * configuration registers setting has changed, now each supported
4275         device has a complete description of the registers it uses,
4276         * all initialisations are moved to idata sections, these section
4277         can be absolute or relocatable,
4278         * fixed initialisation of codespace variables,
4279         * fixed warning about PCLATU and gpsim,
4280         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4281         * (genAssign): use table reads when assigning from variables in codespace,
4282         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4283         char/int variables placed in codespace,
4284         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4285         registers set in .asm file, no need for --pomit-config-words anymore,
4286         * (pic16glue): some 8051 legacy segments are commented out
4287         (to be removed completely),
4288         * added support for alternative assembler and linker with --asm=
4289         and --link= command line arguments,
4290         * peepholes are disabled automatically in the port, no need to
4291         specify on command line,
4292         * port supports natively char/int/long multiplication, but converts
4293         all divisions to support functions,
4294         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4295         to the file set in variable $2,
4296         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4297         strings in ASCII format and not in hex,
4298         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4299         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4300         allocate proper register if iCodes aren't temporary,
4301
4302 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4303
4304         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4305
4306 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4307
4308         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4309         is commented out
4310
4311 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4314         computed address is reused
4315         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4316         multi-byte bitfields
4317
4318 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4319
4320         * src/z80/gen.c: (genArrayInit): must check for pointers too
4321
4322 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4323
4324         * support/regression/tests/zeropad.c: never meant to commit the
4325           nestedstruct test: removed, added check for GCC version
4326
4327 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4328
4329         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4330         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4331         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4332           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4333           bugs 928906 and 954082 half-empty initializers
4334         * src/SDCCsymt.h,
4335         * src/SDCCsymt.c (getAllocSize): added for above fix
4336         * src/z80/gen.c (genArrayInit): fixed bug 741044
4337         * support/regression/tests/zeropad.c: added tests
4338
4339 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4340
4341         * src/pic16/device.c (pic16_dump_section): corrected bug which
4342         caused some symbols of the libraries to be misplaced
4343
4344 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4345
4346         * src/pic16/glue.c,
4347         * src/pic16/ralloc.h,
4348         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4349         to fix conflict with pic port
4350
4351 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4352
4353         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4354         externs configuration variables,
4355         * src/pic16/ralloc.h,
4356         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4357         prototype in header, commented out some debug messages
4358
4359 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4360
4361         * src/pic16/glue.c,
4362         * src/pic16/main.c,
4363         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4364         for gpasm COFF object generation. Thanks to D. Hawkins for
4365         his patch info
4366
4367 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4368
4369         * src/ds390/main.c,
4370         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4371         Brock for spotting this)
4372         * src/ds390/gen.c (genEndFunction),
4373         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4374         interrupt handler and critical. Disable push/pop optimizations when
4375         peephole optimizations disabled.
4376
4377 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4378
4379         Updated pic16 library sources and headers.
4380         * device/lib/pic16/pic18f*/ ,
4381         * device/include/pic16/*.h: modified to handle structured SFR
4382         definitions
4383
4384 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4385
4386         * src/port.h (PORT structure): added hook initPaths, now each
4387         port can declare its own default search paths,
4388         which can been seen with the --print-search-dirs option,
4389         see pic16 port for example,
4390         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4391         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4392         * (doPrintSearchDirs): NEW, replaces in a central manner the
4393         printing of search dirs which was split in set*Paths functions,
4394         * (main): added call to port->initPaths and doPrintSearchDirs,
4395         * src/avr/main.c,
4396         * src/ds390/main.c,
4397         * src/hc08/main.c,
4398         * src/izt/i186.c,
4399         * src/izt/tlcs900h.c,
4400         * src/mcs51/main.c,
4401         * src/pic/main.c,
4402         * src/pic16/main.c: modified port structures to reflect addition of
4403         initPaths hook,
4404
4405         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4406         * (pic16_dump_section): for registers in same address reserve memory once,
4407         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4408         to no_banksel,
4409         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4410         result is greater in size than right or left,
4411         * (pic16_genUMult8X8_8): there are some cases where the result can
4412         be 16 bits size, so handle these,
4413         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4414         * (pic16_outBitC): modified to emit pcodes,
4415         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4416         or not,
4417         * (genDivOneByte): implemented algorithm to divide 8-bits,
4418         * (genCmp): uncommented goto, but issues still exist,
4419         * (genAnd): fixed a bug with variables >8bits,
4420         * (genPackBits): optimization added that uses BCF/BSF to change a
4421         single bit,
4422         * (genAssign): fixed bug when assigning floating point literals,
4423         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4424         __sdcc_gsinit_startup label,
4425         * src/pic16/main.c (_pic16_init): removed search directory
4426         initialisations,
4427         * (_pic16_initPaths): NEW, used to initialise search directories,
4428         * (_hasNativeMulFor): support functions for all except char/int
4429         multiplication, and char division,
4430         * (PIC16_port struct): modified entry for native mul support,
4431         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4432         no_banksel option,
4433         * (buildCallTree): call to register_usage is ifdef'ed out,
4434
4435 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4436
4437         * device/include/string.h: applied Stas Sergeev's patch to make this
4438         header file compatible with the preprocessor -Wundef option
4439         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4440         failure (fixes bug #941458)
4441
4442 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4443
4444         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4445         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4446         that the variable, not the function, should be static
4447         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4448         to be consistent with non-literal case
4449
4450 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4451
4452         * src/SDCCast.c (isConformingBody): fixed bug #949967
4453         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4454         convilong): fixed bug #952086
4455
4456 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4457
4458         * src/SDCCmem.c (allocVariables): fixed bug #955321
4459
4460 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4461
4462         * src/hc08/main.c (_hc08_genAssemblerEnd),
4463         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4464         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4465         completely eliminated the use of a temporary file
4466         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4467         when more than one file linked
4468         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4469
4470 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4471
4472         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4473         which fixes bug #543481
4474         * support/regression/tests/bug-751703.c: fixed comments left from a
4475         cut and paste error
4476         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4477         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4478         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4479         scopes
4480         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4481         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4482         are now changed to underscores in moduleName
4483
4484 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4485
4486         * as/mcs51/lkmem.c: better fix for bug #954173
4487
4488 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4489         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4490
4491         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4492         * device/include/c8051f000.h,
4493         * device/include/c8051f120.h,
4494         * device/include/c8051f300.h,
4495         * device/include/c8051f310.h,
4496         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4497         PWM16) and detab'ed
4498
4499 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4500
4501         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4502         and mailing lists, doc'ed --no-peep-comments, removed reference
4503         to knoppix (newest version has no LyX/LaTeX), other minor changes
4504         * src/SDCCglue.c (glue): save 2 bytes stack space with
4505         option --main-return. The ljmp could probably be avoided too
4506
4507 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4508
4509         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4510
4511 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4512
4513         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4514         * src/SDCCopt.c (isLocalWithoutDef),
4515         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4516         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4517         (credit to Maarten Brock for patch #949363, on which this is based)
4518         * support/regression/tests/bug-751703.c: some test cases of extern used
4519         within inner scopes.
4520
4521 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4522
4523         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4524         SPEC_STRUCT
4525         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4526         struct definitions
4527         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4528         dwWriteLabel): fix to create valid debugger symbols even when
4529         the module name has non-alphanumeric symbols in it
4530         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4531         when a variable's allocation has been optimized away
4532
4533
4534 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4535
4536         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4537         * src/hc08/main.c,
4538         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4539         * src/mcs51/main.c,
4540         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4541         * src/ds390/main.c,
4542         * src/z80/gen.c (z80_emitDebuggerSymbol),
4543         * src/z80/main.c,
4544         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4545         * src/pic/main.c,
4546         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4547         * src/pic16/main.c,
4548         * src/avr/gen.c (avr_emitDebuggerSymbol),
4549         * src/avr/main.c,
4550         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4551         * src/xa51/main.c,
4552         * src/SDCCdebug.c (emitDebuggerSymbol),
4553         * src/SDCCdebug.h,
4554         * src/port.h: added a debugger struct to the port struct. Added a
4555         callback for defining debugger symbols
4556
4557         * src/SDCCast.c (createLabel),
4558         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4559         with isitmp = 1
4560         * src/SDCCicode.h,
4561         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4562         iCode back to the ast for the function
4563
4564         * src/hc08/ralloc.c (hc08_assignRegisters),
4565         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4566         unneeded fields from the regs struct.
4567         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4568         pushReg() & pullReg() functions instead of emitcode()
4569
4570         * src/hc08/gen.c (genLabel, genhc08Code),
4571         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4572
4573         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4574         debugger hooks
4575
4576         * src/hc08/gen.c (genEndFunction, genhc08Code),
4577         * src/hc08/gen.h,
4578         * src/mcs51/gen.c (genEndFunction, gen51Code),
4579         * src/mcs51/gen.h,
4580         * src/ds390/gen.c (genEndFunction, gen390Code),
4581         * src/ds390/gen.h,
4582         * src/z80/gen.c (genEndFunction, genZ80Code),
4583         * src/z80/gen.h,
4584         * src/z80/z80.h,
4585         * src/pic/gen.c (genEndFunction, genpic14Code),
4586         * src/pic/gen.h,
4587         * src/pic16/gen.c (genEndFunction, genpic16Code),
4588         * src/pic16/gen.h,
4589         * src/avr/gen.c (genEndFunction, genAVRCode),
4590         * src/avr/gen.h,
4591         * src/xa51/gen.c (genEndFunction, genXA51Code),
4592         * src/xa51/gen.h,
4593         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4594         specific code to cdbFile.c and out of the backend code generators
4595
4596         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4597         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4598         starting address is now 0
4599
4600         * as/hc08/asm.h,
4601         * as/hc08/m08pst.c,
4602         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4603         assembler directive for DWARF support
4604         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4605
4606         * src/src.dsp,
4607         * src/Makefile.in,
4608         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4609
4610 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4611
4612         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4613         and inappropriate peephole optimization in jump tables
4614
4615 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4616
4617         * as/hc08/m08pst.c,
4618         * src/SDCCglue.c: sdccopt works for the hc08 port now
4619
4620 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4621
4622         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4623
4624 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4625
4626         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4627
4628 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4629
4630         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4631         rules
4632         * src/SDCCmain.c,
4633         * src/SDCCglobl.h,
4634         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4635         comments from the peephole optimizer replacement rules
4636         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4637         symbols
4638         * src/SDCCcse.c (updateSpillLocation),
4639         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4640         equivalents
4641         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4642         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4643         objects far pointers
4644
4645 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4646
4647         * src/SDCCsymt.h: a missing part of my last change
4648         * src/pic/ralloc.c (regTypeNum),
4649         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4650
4651 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4652
4653         * src/SDCCicode.h,
4654         * src/SDCCicode.c (aggrToPtrDclType),
4655         * src/SDCCptropt.h,
4656         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4657         ptrPseudoSymConvert),
4658         * src/pic/ralloc.c (regTypeNum),
4659         * src/pic16/ralloc.c (regTypeNum),
4660         * src/hc08/ralloc.c (regTypeNum),
4661         * src/ds390/ralloc.c (regTypeNum),
4662         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4663         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4664
4665 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4666
4667         * link/z80/lkmain.c (afile),
4668         * as/hc08/lkmain.c (afile),
4669         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4670         prevent a pointer problem when a filename has no directory and
4671         no extension specified.
4672
4673 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4674
4675         * link/z80/lkmain.c (afile): allow periods in directory names
4676         * link/z80/lkmain.c (afile),
4677         * as/mcs51/lkmain.c (afile),
4678         * as/hc08/lkmain.c (afile): allow linker script file to have an
4679         extension other than ".lnk"
4680         * link/z80/lklex.c (getfid),
4681         * link/z80/lkmain.c (parse),
4682         * as/mcs51/lklex.c (getfid),
4683         * as/mcs51/lkmain.c (parse),
4684         * as/hc08/lklex.c (getfid),
4685         * as/hc08/lkmain.c (parse): Support comments in the linker script
4686         file on lines by themselves and after filenames
4687
4688 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4689
4690         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4691
4692 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4693
4694         * src/z80/peeph-z80.def: removed some peephole rules that don't
4695         work with multibyte arithmetic (fixed bug #937126)
4696         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4697         to registers and not global variables
4698         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4699         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4700         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4701         checking for assignments not internally generated (fixed bug #931895)
4702         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4703         structure member (fixed bug #930072)
4704
4705 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4706
4707         * src/SDCCmain.c (linkEdit),
4708         * src/hc08/main.c (_hc08_parseOptions),
4709         * as/hc08/Makefile.in,
4710         * as/hc08/aslink.h,
4711         * as/hc08/asm.h,
4712         * as/hc08/m08pst.c,
4713         * as/hc08/lkrloc.c (relr, rele),
4714         * as/hc08/lkarea.c (lnkarea)
4715         * as/hc08/lkmain.c (afile, parse),
4716         * as/hc08/lkelf.c: support for ELF output
4717         * as/hc08/lks19.c (s19),
4718         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4719
4720 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4721
4722         * as/mcs51/lkihx.c: Fixed bug #899105.
4723
4724 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4725
4726         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4727         .dsp files from Unix to DOS.
4728
4729 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4730
4731         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4732         function pointers; we have been compliant for several months now.
4733         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4734         change that was accidently commented out
4735         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4736         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4737         bug #922319
4738
4739 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4740
4741         * src/hc08/gen.c: output of all of the internal debugging information
4742         is now controlled by the D() macro; it is disabled by default
4743
4744 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4745
4746         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4747         harder to keep the same registers during a CAST iCode
4748         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4749         long via int can be done in a single cast, if the signedness is
4750         correct.
4751         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4752         putchar() in tinibios.c in ds390's library
4753
4754 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4755
4756         * src/SDCCast.c (decorateType): fixed bug #898889,
4757         cast result of a literal complement too
4758         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4759         fixed check for bitfields
4760
4761 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4762
4763         * src/SDCCicode.c (geniCodeLogic): made it static,
4764         (geniCodeLogicAndOr): added in order to fix bug #905492,
4765         (ast2iCode): fixed bug #905492
4766         * support/regression/tests/bug-905492.c: added
4767         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4768         (processParms): fixed bug #927659: don't copy parms, this will clear
4769         decorated flag
4770         * support/regression/tests/bug-927659.c: added
4771
4772 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4773
4774         * src/SDCCast.c (addCast): don't cast float to char
4775         * device/lib/libsdcc.lib: added _memmove
4776
4777 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4778
4779         * device/lib/large/Makefile: fixed parallel execution by
4780         replacing `make` by `$(MAKE)`
4781
4782 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4783
4784         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4785         offsets (fixes bug #923936)
4786
4787 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4788
4789         * device/lib/small/Makefile: fixed parallel execution by
4790         replacing `make` by `$(MAKE)`
4791
4792 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4793
4794         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4795
4796 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4797
4798         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4799         * src/regression/Makefile: Regression test was not running.
4800
4801 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4802
4803         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4804         complement if possible
4805         * src/SDCCval.c (valComplement),
4806         * src/SDCCicode.c (operandOperation): fixed complement of literal
4807         * support/regression/tests/onebyte.c (testComplement): added
4808
4809 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4810
4811         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4812         return an optimized tree; actually replace actParm with the new tree
4813         * src/SDCCast.h: added some parantheses to remove side effects
4814         * support/regression/tests/bug-920866.c
4815
4816 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4817         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4818         Bit operands were not being handled properly in the pic14 port.
4819         (now src/regression/add.c passes again).
4820
4821 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4822
4823         * src/SDCC.y (labeled_statement): case and default no longer require
4824         a following statement (RFE #893037)
4825
4826 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4827
4828         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4829         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4830         disabled (fixes bug #916294)
4831         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4832         "mov a,acc"; patch provided by Lenny Story
4833         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4834
4835 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4836
4837         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4838         functions
4839         * src/ds390/gen.c (genFunction, genEndFunction),
4840         * src/ds390/ralloc.c (ds390_assignRegisters),
4841         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4842         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4843         pushed if there are parameters passed on the stack. Also, a cleaner
4844         way to decide if r0/r1 should be pushed/popped. (Together they fix
4845         bug #918693)
4846
4847 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4848
4849         * doc/sdccman.lyx,
4850         * device/lib/mcs51/crtpagesfr.asm,
4851         * device/lib/mcs51/crtxinit.asm,
4852         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4853         to avoid confusion with Si Lab's SFRPAGE register.
4854
4855 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4856
4857         * src/SDCCglue.c (emitMaps): allow public sfr variables
4858         * src/SDCCglue.c (initialComments): include compiler build date
4859         with compiler version and put the timestamp of the generated
4860         assembly file on a serperate line to be less confusing.
4861         * src/port.h: added genInitStartup hook
4862         * src/avr/main.c,
4863         * src/ds390/main.c,
4864         * src/hc08/main.c,
4865         * src/pic/main.c,
4866         * src/pic16/main.c,
4867         * src/xa51/main.c,
4868         * src/z80/main.c: genInitStartup initialize as NULL (default to
4869         historical behaviour)
4870         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4871         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4872         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4873         library instead of hard coding it into the compiler.
4874         * support/regression/ports/mcs51-stack-auto/spec.mk,
4875         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4876         * device/lib/mcs51/Makefile,
4877         * device/lib/small/Makefile,
4878         * device/lib/large/Makefile,
4879         * device/lib/mcs51/crtpagesfr.asm,
4880         * device/lib/mcs51/crtstart.asm,
4881         * device/lib/mcs51/crtxclear.asm,
4882         * device/lib/mcs51/crtxinit.asm,
4883         * device/lib/mcs51/crtclear.asm,
4884         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4885         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4886         and into user configurable files.
4887         * device/lib/clean.mk: clean mcs51 directory too
4888         * support/regression/tests/longlit.c: added static to T1 declaration
4889         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4890         accesses in the initialization code
4891
4892 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4893
4894         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4895         OSCTRIMVAL as noted in bug #916008
4896
4897 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4898
4899         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4900         in loops with multiple exits (reported as incorrect registers
4901         used by Martin Helmling in Sdcc-user list)
4902
4903 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4904
4905         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4906         made ds390 register extensions look less like error messages
4907
4908 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4909
4910         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4911         reported by Adam Wozniak in Sdcc-user list
4912
4913 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4914
4915         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4916         arithmetic optimizations, added debug output
4917
4918 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4919
4920         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4921         * sdcc.spec: updated and split sdcc into 3 rpms
4922         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4923         needed for literals of LEFT_OP and '+'
4924         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4925         introduced RESULT_TYPE_NOPROM
4926         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4927         left shift
4928         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4929         limited promotion to int only for '*'
4930         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4931
4932 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4933
4934         * src/pic16/gen.c (genSkip),
4935         (genc16bit2lit), (gencjneshort): commented out
4936         (is_LitOp): new helper function, checks operand type
4937         (genCmpEq): rewritten
4938
4939 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4940
4941         * support/regression/tests/bug-908454.c: added
4942
4943 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4944
4945         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4946         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4947         (geniCodeCast): cosmetic, don't preserve bit storage class
4948         (geniCodeLeftShift): added promotion
4949         (geniCodeLogic): fixed regression
4950         * src/SDCCsymt.c (computeTypeOr): accept bits too
4951         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4952
4953 2004-03-07  Borut Razem <borut.razem AT siol.net>
4954
4955         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4956
4957 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4958
4959         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4960         version of pic16_genPackRegisters which does not check if ic is a
4961         CAST operator,
4962         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4963         function cause string1.c regression test fails
4964
4965 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4966
4967         * sim/ucsim/configure.in,
4968         * sim/ucsim/configure,
4969         * sim/ucsim/doc/Makefile.in: use docdir
4970         * src/SDCC.y: fixed sbit atrributes
4971         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4972         * src/SDCCast.c (decorateType): |^& need special promotion handling
4973         * src/SDCCast.h,
4974         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4975         * src/SDCCsymt.h (computeType),
4976         * src/SDCCicode.c: computeType() needs op
4977         * src/SDCCsymt.c (checkTypeSanity),
4978         * doc/sddman.lyx: "plain" bitfields are unsigned
4979         * src/SDCCsymt.c (computeTypeOr): added
4980         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4981         |^& ops
4982         * src/SDCCval.c (val*): computeType() needs op
4983         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4984         * support/regression/tests/onebyte.c: added tests for |^&
4985
4986 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4987
4988         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4989         for writing icode into asm output.
4990
4991 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4992
4993         * src/pic16/device.c: added some debug lines enabled
4994         with macro DEBUG_CHECK,
4995         * src/pic16/genarith.c: more debug in genPlus,
4996         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4997         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4998         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4999         * (aopForSym): onStack symbols are re-placed in data memspace,
5000         and onStack flag is cleared,
5001         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5002         copy temporary pcodeop,
5003         * (genPcall): added warning for not updating PCLATU,
5004         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5005         always true for pic16 port,
5006         * (genMultOneWord): NEW, supports integer multiplication,
5007         * (genMult): modified to call genMultOneWord,
5008         * (ifxForOp): added warning when return NULL,
5009         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5010         flag is set before call to operandFromSymbol for implicit
5011         added structures,
5012         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5013         options.intlong_rent are set by default,
5014         * (_hasNativeMulFor): modified to allow port generation of integer
5015         multiplication,
5016         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5017         set regtype to REG_SFR for all registers, restricting seting the
5018         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5019
5020 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5021
5022         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5023         more than 500 times in the regression tests
5024
5025 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5026
5027         * support/Util/SDCCerr.h,
5028         * support/Util/SDCCerr.c,
5029         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5030         enumerator_list),
5031         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5032         for symbol conflicts.
5033         * support/valdiags/tests/enum.c,
5034         * support/valdiags/tests/tentdecl.c,
5035         * support/valdiags/tests/struct.c: expect possible error messages
5036         referring to original symbol definitions.
5037         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5038         * src/SDCCsymt.h,
5039         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5040
5041 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5042
5043         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5044
5045 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5046
5047         * src/pic16/ralloc.c (newReg): fixed bug #908929
5048
5049 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5050
5051         * src/ds390/gen.c: added missing #include "main.h"
5052
5053 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5054
5055         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5056         checking if symbol is already in set,
5057         * src/pic16/device.h: prototype for checkAddSym,
5058         * src/pic16/gen.c: (_G): added entry interruptvector,
5059         * (assignResultValue): removed some commented out lines,
5060         * (genFunction): check for ISR via sym->type, absolute section for
5061         interrupt code is created via a new pBlock, the goto instruction is
5062         placed now correctly at the interrupt vector position, changed all
5063         references from ivec to _G.interruptvector,
5064         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5065         is the interrupt is a high priority one, same for return from ISR,
5066         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5067         externs to calls of checkAddSym,
5068         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5069         pic16_pcode_verbose flag is set,
5070         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5071         * src/pic16/pcoderegs.c: message about how many registers are saved
5072         will only be emitted if pic16_pcode_verbose flag is set,
5073
5074 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5075
5076         * src/ds390/ralloc.h,
5077         * src/ds390/ralloc.c (ds390_regWithIdx),
5078         * src/ds390/gen.c (emitcode),
5079         * src/ds390/main.h,
5080         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5081         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5082         ds390operandCompare, getRegsRead, getRegsWritten,
5083         initializeAsmLineNode): customized instruction size calculation for
5084         ds390, started basis for some register optimizations
5085         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5086         corresponding assembly output
5087         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5088         missing push/pop of r0/r1. Optimized push/pops
5089
5090 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5091
5092         * src/mcs51/main.c (instructionSize): fixed ACALL size
5093         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5094
5095 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5096
5097         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5098         the sorting of rlist with NULL elements
5099         * (print_idataType, print_idata): NEW to create idata sections
5100         * src/pic16/device.h: idataSymSet new variable
5101         * src/pic16/gen.c (genFunction): fixed some bugs in string
5102         comparing, improved the absolute section creation for ISRs,
5103         added FSR0L/FSR0H in registers that are saved in an ISR,
5104         * (genInline): fixed the processing of inline snippets,
5105         now they undergo no process by the peephole optimizer
5106         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5107         are placed in idataSymSet,
5108         * (pic16emitStaticSeg): extern symbols are added in externs,
5109         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5110         switching when aboslute variables are placed in access bank memory
5111         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5112         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5113         commented out with #if,
5114         * (pic16_packRegisters): reintroduce the check for CAST because some
5115         symbols are not correctly handled,
5116         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5117         pCodeInstruction instead of pCode,
5118         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5119         pCodeAsmDir definition,
5120         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5121         directive, then the argument directive is emitted without the leading
5122         tab, hack for inline labels which must be in the first column,
5123         * (compareLabel,pic16_findNextInstruction),
5124         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5125         * (insertBankSwitch): modified for the new pCodeAsmDir,
5126
5127 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5128         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5129
5130         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5131         instance,
5132         * (pushSide): commented out with #if,
5133         * (assignResultValue): fixed some typos in saving
5134         registers,
5135         * (genPcall): FIXED and sync'ed with genCall,
5136         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5137         * (genNearPointerGet): fixed to handle some more cases,
5138         implementation scheme via table reads,
5139         * (genConstPointerGet): modified to access code memory correct,
5140         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5141         and improved to handle some cases
5142         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5143         instead of "RETLW" for init data
5144         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5145         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5146         variables are placed in access bank memory (<0x80 and >=0xf80),
5147         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5148         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5149         TBLWT_POSTDEC,TBLWT_PREINC
5150         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5151         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5152         directives
5153         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5154         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5155         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5156         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5157
5158 2004-02-29  Borut Razem <borut.razem AT siol.net>
5159
5160         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5161         support/Util/findme.h, support/Util/system.h: enhance binary relative
5162         search for lib and include by using findProgramPath()
5163
5164 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5165
5166         * src/SDCCpeeph.h,
5167         * src/SDCCpeeph.c (pcDistance),
5168         * src/port.h,
5169         * src/mcs51/ralloc.h,
5170         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5171         * src/mcs51/main.h,
5172         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5173         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5174         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5175         size calculation port specific, started basis for some register
5176         optimizations
5177         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5178         missing push/pop of r0/r1. Optimized push/pops
5179         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5180         * device/lib/_modsint.c (_modsint),
5181         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5182         and stack version so regression tests pass
5183
5184 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5185
5186         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5187         * src/SDCCast.c (decorateType): catch another small optimization
5188         with '?' operator
5189         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5190         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5191         modified to finally use computeType() all over SDCC,
5192         see Feature Request #877103
5193         * src/SDCCval.h: cosmetic
5194         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5195         valCompare(); regression tested in muldiv.c
5196         * support/regression/tests/muldiv.c (testMod): mod sign follows
5197         dividend only
5198
5199 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5200
5201         * src/SDCCast.c (decorateType): fixed bug #902362
5202         * doc/INSTALL.txt: fixed install instructions for win32
5203
5204 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5205
5206         * device/include/Makefile.in (install): fixed by replacing spaces
5207         by tabs
5208         * doc/README.txt,
5209         * doc/INSTALL.txt: updated for release
5210         * doc/sdccman.lyx: added warning for --xstack being buggy
5211
5212 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5213
5214         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5215         to eliminate build warnings.
5216         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5217
5218 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5219            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5220
5221         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5222         removed -penable-stack, added comment for stack pragma, added
5223         warning for not initializing the stack/frame registers, removed
5224         comment at interrupts section
5225
5226         Stack is made permanent, there is no ability to disable stack usage.
5227         * src/pic16/device.h,
5228         * src/pic16/device.c: removed all references to USE_STACK macro,
5229         * src/pic16/device.c (pic16_dump_section): when no elements in
5230         rlist, free rlist before return,
5231         * (pic16_dump_int_registers): NEW, internal registers are a new set
5232         of general purpose registers reused by each function,
5233         * (checkAddReg): returns 1 if registers is added to set,
5234         * (pic16_groupRegistersInSection): when a registers is of type
5235         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5236         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5237         SRCASECMP macro is moved here from device.c
5238         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5239         PO_PCLATU, PO_PRODL, PO_PRODH,
5240         * (pic16_pCodeOpType, genMinus,
5241         changed compares to "a" register, with AOP_ACC,
5242         * (pic16_genPlus): fixed some bugs and indented properly,
5243         * (pic16_addSign): changed size to size+offset in the MOVWF
5244         instruction,
5245         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5246         multiply 8-bit operand by literal, result is 8-bit,
5247         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5248         multiply 2 8-bit operand, result is 8-bit,
5249         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5250         genUMult8X*_16,
5251         * src/pic16/gen.c: changed accUse to contain WREG only,
5252         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5253         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5254         true, do not use immediate addressing any more unless sym is a
5255         pointer in codespace,
5256         * (aopForRemat): do not use immediate addressing when symbol not in
5257         codespace and when symbol's address is requested,
5258         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5259         accUse size (= 1),
5260         * (aopGet): added case for AOP_ACC and don't return "accumulator
5261         bug" but WREG instead,
5262         * (popGetTempReg): pushes contents of temporary register in stack,
5263         * (popReleaseTempReg): pops contents of temporary register from
5264         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5265         * (pic16_popGet): separated case AOP_ACC to return register WREG
5266         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5267         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5268         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5269         the use of immediate pointers to certain cases only.
5270
5271         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5272         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5273         * (assignResultValue, genCall, genRet): modified to use the new
5274         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5275         genPcall is still broken,
5276         * (genFunction): added code to create 'A' type pBlocks when
5277         interrupt functions are generated, code not extensively tested yet,
5278         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5279         * (genEndFunction): modified so ISRs pop stored registers from stack,
5280         * (genMultOneByte): cleanup,
5281         * (AccRsh): added flag andmask, to and result with appropriate mask,
5282         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5283         * (genDataPointerGet): fixed and reenabled its use,
5284         * (genNearDataPointerGet): bugs fixed,
5285         * (genDataPointerSet): bugs fixed,
5286         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5287         pic16_DumpSymbol, pic16_DumpOp,
5288         * src/pic16/genutils.h: function prototypes for the above functions,
5289         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5290         pointers,
5291         * (pic16emitRegularMap): many many many improvements, but needs a
5292         major cleanup,
5293         * src/pic16/main.c: enable_stack in pic16_options is removed,
5294         * (_pic16_parseOptions): removed command line options -penable-stack,
5295         * (_process_pragma): emit stack symbol only when stack pragma is
5296         processed,
5297         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5298         redirected to FSR0L/FSR0H pair,
5299         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5300         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5301         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5302         for immediates,
5303         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5304         * (dumpPicOptype): NEW,
5305         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5306         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5307         with movff instruction,
5308         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5309         added pic16_int_regs, some packRegsFor* functions are commented out,
5310         because produce errors,
5311         * src/pic16/NOTES: minor modifications
5312
5313 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5314
5315         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5316         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5317         --pack-iram.
5318         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5319         * as/mcs51/lkaomf51.c: fixed bug #895763
5320
5321 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5322
5323         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5324
5325 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5326
5327         * doc/sdccman.lyx: added details about the HC08 storage classes and
5328         interrupts, fixed the register usage info for z80 & gbz80
5329
5330 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5331
5332         * doc/sdccman.lyx: added more pic16 port documentation
5333         * device/include/pic16/: added header pic18fregs.h
5334
5335 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5336
5337         * doc/sdccman.lyx: added Vangelis' contribution
5338
5339 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5342         extend to the next CALL or PCALL, not just to the next CALL.
5343
5344 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5345
5346         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5347
5348 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5351         bug #895752 and a better fix for bug #716790
5352
5353 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5354
5355         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5356
5357 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5358
5359         * doc/sdccman.lyx: minor changes, minor changed
5360
5361 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5362
5363         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5364         which can't handle SDCC_NEWONEBYTEOPS,
5365         (geniCodeMultiply): removed conversion from mult to shift for pic14
5366         and pic16
5367
5368 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5369
5370         * src/hc08/gen.h,
5371         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5372         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5373         thus fixing bug #895406
5374
5375 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5376
5377         * device/lib/_modsint.c,
5378         * device/lib/_modslong.c: sign follows divisor only
5379         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5380         signs or signedness can be ignored
5381         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5382         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5383         added optimization for IFX,
5384         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5385         arguments;
5386         reenabled optimization for IFX, which was removed on 2004-01-11
5387         * src/SDCCast.h: added return type IFX
5388         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5389         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5390         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5391         SDCC_OLDONEBYTEOPS selects the old behaviour
5392         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5393         changed again and commented promotion rule
5394         * src/SDCCval.c (valDiv): promotion no longer necessary
5395         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5396         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5397         rewritten
5398         * support/regression/tests/onebyte.c: added
5399
5400 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5401
5402         * gen.c (genInline): reverted to old code for assemnling inline
5403         code because of bug reported James Chadd
5404
5405 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5406
5407         * ralloc.h: missing declarations from previous patch,
5408         seems that patch for ralloc.h was never applied, fixed
5409
5410 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5411            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5412
5413         * pcode.c,
5414         * pcode.h,
5415         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5416         indirect addressing. Marked FSR0 as deprecated
5417         * gen.c (pointerCode): commented out, not needed now
5418         (pic16_popGet2p): new MOVFF helper function
5419         (genGenPointerGet),
5420         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5421         (shiftRLong): removed duplicate debugging info
5422
5423 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5424
5425         * src/ds390/gen.c (genNearPointerGet),
5426         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5427         optimization with bits, but not bitfields.
5428         * src/ds390/ralloc.c (packRegisters),
5429         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5430
5431 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5432
5433         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5434
5435 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5436
5437         * src/SDCCsymt.h,
5438         * src/SDCCicode.c (operandFromSymbol),
5439         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5440         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5441         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5442         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5443         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5444         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5445         bug #892038
5446         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5447         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5448         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5449         * src/SDCCsymt.c (newSymbol),
5450         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5451         enumerator_list),
5452         * src/SDCCval.h,
5453         * src/SDCCval.c (newiList): fixed bug #885705
5454
5455 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5456
5457         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5458         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5459
5460 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5461
5462         * device/include/c8051f120.h,
5463         * device/include/c8051f300.h,
5464         * device/include/c8051f310.h: added/updated header files for Silicon
5465         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5466         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5467         in new section Submitting patches
5468
5469 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5470
5471         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5472         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5473         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5474         genGenPointerSet),
5475         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5476         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5477         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5478         genGenPointerSet),
5479         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5480         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5481         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5482         genGenPointerSet),
5483         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5484         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5485         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5486         genGenPointerSet): fixed bug #892400
5487         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5488         to eliminate build warnings.
5489         * src/SDCCast.c (processParms),
5490         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5491         fixed bug 751859
5492         * support/valdiag/valdiag.py: added GCC to the list of defines active
5493         when compiling with gcc
5494
5495 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5496
5497         * support/Util/SDCCerr.h,
5498         * support/Util/SDCCerr.c,
5499         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5500         with an incomplete type (fixed bug #883734)
5501         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5502
5503 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5504
5505         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5506
5507 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5508
5509         * src/SDCCast.c (decorateType),
5510         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5511         function pointer implementation
5512         * support/regression/tests/funptrs.c: added tests to verify both forms
5513         of function pointers work correctly. Added tests to verify parameters
5514         are passed in the correct order.
5515
5516 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5517
5518         * device.c (regCompare): registers are sorted by ascending
5519         address and increasing size,
5520         * main.c (_pic16_finaliseOptions): removed the declaration
5521         of compiler macro MCU. Now a macro of the format pic18fxxxx
5522         will be defined from the command line
5523
5524 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5525             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5526
5527         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5528         PCOP_RLCF was overwritten!
5529         * gen.c (genSkip): commented out calls to pic16_emitcode,
5530         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5531         * (genlshTwo),
5532         * (genRRC): added debugging info,
5533         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5534         overwritten while shifting,
5535         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5536         overwritten while shifting,
5537         * (AccLsh),
5538         * (AccRsh),
5539         * (shiftLLeftOrResult),
5540         * (shiftRLeftOrResult),
5541         * (shiftRLong),
5542         * (shiftLLong): Implemented with pic16_emitpcode
5543         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5544         * (genLeftShift): Fixed bug, operand for shift by variable always
5545         was "and"ed with 0x0f,
5546         * (genLeftShiftLiteral),
5547         * (genrshTwo),
5548         * (genRightShiftLiteral): added debugging info,
5549         * (genrshFour): added comment,
5550         * (genRightShift): determined signedness from operand "left"
5551         instead of "result"
5552
5553 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5554
5555         * src/SDCCicode.c (geniCodeParms),
5556         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5557         function pointers, fixed function pointer bugs #861242 and #861896
5558
5559 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5560
5561         * device/include/c8051f000.h,
5562         * device/include/c8051f120.h,
5563         * device/include/c8051f300.h: added header files for Silicon
5564         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5565
5566 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5567
5568         * src/SDCCast.c (processParams): added new type flow and restructured
5569         (gatherAutoInit): added new type flow
5570         (addCast): cosmetic changes
5571         (getLeftResultType): added new type flow for array indices, patch
5572         provided by Stas, see FR #877103
5573         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5574         array index patch by Stas
5575         * src/SDCCast.h: added prototype getResultTypeFromType()
5576         * src/SDCCval.h,
5577         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5578         * src/pic/glue.c (pic14emitStaticSeg),
5579         * src/pic16/glue.c (pic16emitStaticSeg),
5580         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5581         for initialization of symbols
5582         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5583         * support/Util/SDCCerr.h:
5584         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5585         * .version: bumped version number to 2.3.8
5586         * device/include/Makefile.in (install),
5587         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5588         avoid warnings
5589
5590 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5591
5592         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5593         Slade Rich fixed an optimization bug
5594         * src/pic/pcodepeep.c,
5595         * src/pic/pcoderegs.c
5596         * doc/Makefile (install): added test for directory
5597
5598 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5599
5600         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5601         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5602         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5603         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5604         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5605         * as/mcs51/asexpr.c (term),
5606         * as/hc08/asexpr.c (term): fixed bug #887146
5607
5608 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5609
5610         * src/z80/gen.c (genMult): handle single byte result product
5611         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5612         DUMMY_READ_VOLATILE (fixed bug #886367)
5613
5614 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5615
5616         * support/regression/tests/libmullong.c: fixed logic, on little endian
5617         hosts we ended without a mullong_wrapper()
5618
5619 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5620
5621         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5622         virus/worm forged address usage.
5623
5624 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5625
5626         Fixed promotion, it should be done on AST level:
5627         * src/SDCCast.c (addCast): added promotion to int
5628         (decorateType): updated call to upCast()
5629         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5630         usualUnaryConversions()
5631
5632 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5633
5634         * support/regression/tests/literalop.c (mulWrapper): Added a
5635         wrapper to remove integer overflow warnings.
5636
5637         * support/regression/tests/float_trans.c: Made work on host.
5638
5639         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5640         location of sz80.
5641
5642         * support/regression/generate-cases.py (main): Changed from inline
5643         to a main method.
5644
5645         * doc/Makefile (install): Changed to depth first to get rid of
5646         missing directory install warning.
5647
5648         * as/Makefile (install-doc): Made work on Mac.
5649
5650 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5651
5652         * src/SDCCast.c: added an additional type flow in decorateType() of
5653         opposite direction, see feature request #860006; it's enabled at runtime
5654         by setting the environment variable SDCC_NEWTYPEFLOW
5655         * src/SDCCast.h: changed prototype of decorateType()
5656         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5657         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5658         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5659         see feature request #877103
5660         * src/SDCCval.c: updated call of decorateType()
5661         (valBitwise): fixed bug #882876
5662         (valMinus): added promotion
5663         (valLogicAndOr): result is unsigned
5664         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5665         * src/SDCCsymt.c (computeType),
5666         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5667         must not cause an unsigned operation
5668         * src/pic/glue (pic14emitRegularMap),
5669         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5670
5671 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5672
5673         * src/pic/pcode.c (PCodeID): commented out left over debug code
5674
5675 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5676
5677         * support/valdiag/tests/overflow.c: added shift tests
5678         * src/pic/device.c,
5679         * src/pic/gen.c,
5680         * src/pic/gen.h,
5681         * src/pic/glue.c,
5682         * src/pic/main.c,
5683         * src/pic/pcode.c,
5684         * src/pic/pcode.h,
5685         * src/pic/pcodepeep.c,
5686         * src/pic/pcoderegs.c,
5687         * src/pic/ralloc.c,
5688         * src/pic/ralloc.h: applied patch from Slade Rich;
5689         added support for multiple code pages and multiple RAM banks on the
5690         PIC 14 port. The ASM files now no longer simply assume all the
5691         code / RAM are in the same page / bank. This means the linker can
5692         safely allocate code/RAM of separate ASM files to different pages/banks.
5693         * doc/sdccman.lyx: added Slade's tips
5694         * src/mcs51/peeph.def: fixed bug #880768
5695
5696 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5697
5698         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5699         * src/SDCCast.c (decorateType): fixed bug #880197
5700
5701 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5702
5703         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5704         getopt.h.
5705
5706         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5707         strtof is not part of C89 and isn't included with Mac OS X.
5708
5709 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5710
5711         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5712         shiftL2Left2Result): fixed bug #879326
5713         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5714         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5715         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5716         address fetch for clr instruction
5717         * device/lib/hc08/_mulint.c: created optimized assembly version
5718         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5719
5720 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5721
5722         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5723         proposed in FR #877103
5724
5725 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5726
5727         * src/SDCCval.c (cheapestVal): added missing checks
5728         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5729         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5730
5731 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5732
5733         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5734         equal operands
5735
5736 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5737
5738         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5739         loaded with the linker search paths (-L arguments) and the libraries
5740         to be linked with the current source (-l arguments). Changes
5741         currently will affect only the pic16 port.
5742         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5743         include path the port specific paths and port specific libraries,
5744         * gplink command now contains the $3 argument,
5745         * src/pic16/device.h,
5746         * src/pic16/device.c,: structure PIC_device is made public and
5747         renamed to PIC16_device, the same for variable Pics which is renamed
5748         to Pics16. Updated all references to them.
5749         * src/pic16/glue.c (pic16glue): corrected bug with code
5750         initialization which bypassed the variable initializations block.
5751
5752         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5753         COMPILE_FLAGS and added the --nostdinc option
5754
5755 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5756
5757         * device/include/mc68hc908jb8.h: Register defs for another member
5758         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5759
5760 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5761
5762         Documenting changes from previous commits.
5763         * configure.in (version 1.56),
5764         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5765         when generating output files to configure the pic16 library,
5766         but now I've commented it out, since gputils aren't installed in the
5767         SF compile farm, so library won't compile
5768
5769         * device/lib/Makefile.in (version 1.56): initially I've added in
5770         target 'all' the prerequestive 'model-pic16' so it compiled the
5771         pic16 library, but now I've commented it out for the same reasons
5772         above,
5773         * added targets 'model-pic16' and 'objects-pic16' to compile the
5774         library
5775         * added target 'port-specific-objects-pic16' to handle the
5776         generated libraries and copy them into the build/ directory
5777         * added target 'clean-intermediate-pic16' to clean intermediate
5778         files into pic16 directory
5779         * in target 'installdirs' added line to create directory pic16 in
5780         the installation path
5781
5782         * device/include/Makefile.in (version 1.11): in target 'install'
5783         added lines to copy all header files to installation path,
5784         * in target 'installdirs' added line create directory for pic16
5785         headers in the installation path
5786
5787 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5788
5789         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5790          a function call
5791
5792 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5793
5794         * configure,
5795         * device/lib/configure.in,
5796         * device/lib/configure: fixed for autoconf 2.57
5797
5798 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5799
5800         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5801         option so that it actually works. Made it specific to the z80, since
5802         the gbz80 doesn't have these kinds of I/O ports.
5803
5804 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5805
5806         * device/include/z180.h,
5807         * device/lib/_memcpy.c,
5808         * device/lib/_memmove.c,
5809         * device/lib/_mulint.c,
5810         * device/lib/ser_ir.c,
5811         * device/lib/ser_ir_cts_rts.c,
5812         * device/lib/_strcmp.c,
5813         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5814         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5815         portmode; added deprecation warning for bank= and protmode= forms.
5816         Also, guard against buffer overflow.
5817         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5818
5819 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5820
5821         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5822         changed interrupt vector table generation to only emit declared vectors.
5823         * device/include/Makefile.in: added missing backslash
5824         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5825
5826 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5827
5828         Mainly changes to support compilation of the device libraries
5829         * src/pic16/device.c: stack is allocated via symbol and not
5830         via literal number. The symbol is placed in the corresponding
5831         position of the data ram
5832         * (pic16_dump_section): relocatable and absolute uninitialized
5833         data are now emitted in sorted order to reduce section naming,
5834         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5835         weren't marked as being in the access bank,
5836
5837 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5838
5839         Added portion of GNU PIC Library under the directory
5840         device/include/pic16 and device/lib/pic16. These files
5841         contain the declarations of SFRs for the PIC18Fxx2 devices.
5842         The directory is initialized via configure from toplevel.
5843
5844 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5845
5846         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5847         the spilllocations to be compared correctly
5848
5849 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5850
5851         * src/SDCCast.c (decorateType): fixed bug introduced today
5852
5853 2004-01-12  Borut Razem <borut.razem AT siol.net>
5854
5855         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5856         doc/sdccman.lyx: upper case pragmas are deprecated
5857
5858 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5859
5860         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5861         in simpler and even better code
5862
5863 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5864
5865         * src/SDCCicode.c (operandOperation): fixed bug #874819
5866         * src/SDCCast.c (decorateType): fixed
5867         char foo (unsigned long ul) { return ul > 0; }
5868
5869 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5870
5871         * doc/sdccman.lyx: Moved and added some sections, small changes
5872         all over. Telling LaTeX to be less strict with word spacing
5873         to better keep the right margin. Changed some notes about
5874         maintainance of the ports in section 3.2.1 - is it OK like this?
5875
5876 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5877
5878         SDCC source changes:
5879         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5880         convilong): modified to inform the pic16 port that builtin functions
5881         are external
5882
5883         PIC16 PORT specific changes:
5884         * src/pic16/device.c pic16_dump_equates() added,
5885         processor registers declared internally by the port are emitted in
5886         the translation as equates,
5887         * src/pic16/gen.c: inline code is passed unprocessed to the
5888         translation,
5889         * (pic16_popGetLit2): fnuction modified to take second operand as
5890         pCodeOp pointer and not as literal,
5891         * (popRegFromIdx): prefixed with pic16_,
5892         * (pic16_popCombine2): modified to receive already allocated pCode
5893         operands,
5894         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5895         * (genFunction): initializes local stack frame and pushes on stack
5896         all the registers used by this function,
5897         * (genEndFunction): restores all registers from stack and restores
5898         stack frame,
5899         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5900         improvements,
5901         * (pic16glue): changed the program startup sequence,
5902         * added new dbName code 'A' for functions placed in absolute section
5903         * src/pic16/main.c: added function attribute _naked,
5904         * added pragma 'code' to place a fnuction at an absolute address,
5905         * added command line arguments --debug-ralloc and --pcode-verbose,
5906         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5907         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5908         * (pic16_newpCodeOpLit2): modified to take the second operand as
5909         pCodeOp pointer,
5910         * (pic16_printpBlock): modified to emit each function in a separate
5911         section,
5912         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5913         UPPER for immediate operands,
5914         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5915         instruction,
5916         * src/pic16/peeph.def: all peepholes with movff are commented out,
5917         because there is a problem in the pcode peep optimizer,
5918         * src/pic16/ralloc.c: the register allocator can now reuse local
5919         function symbols for another function. This saves register usage.
5920         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5921
5922         Added file src/pic16/NOTES with information about program writing on
5923         the current port version.
5924
5925 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5926
5927         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5928         and peephole 252 (array access)
5929
5930 2004-01-09  Borut Razem <borut.razem AT siol.net>
5931
5932         * src/SDCCmain.c : fixed #872250: -l command line defined library
5933           files are scanned before standard library files
5934
5935 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5936
5937         * src/SDCCast.c (decorateType): fixed bug #874046
5938
5939 2004-01-09  Borut Razem <borut.razem AT siol.net>
5940
5941         * support/scripts/sdcc.nsi: remove previous installation
5942
5943 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5944
5945         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5946         bytes for last interrupt vector (mcs51)
5947         * sdcc.spec: fixed typo
5948
5949 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5950
5951         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5952         gen51Code): more efficient parameter receive for --model-large
5953         ("bug" #845294)
5954
5955 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5956
5957         * src/ds390/main.c,
5958         * src/z80/main.c: added missed needLinkerScript flags (more than
5959         one port structure defined in these file)
5960         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5961         bug #795325
5962
5963 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5964
5965         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5966         * src/port.h: added flag needLinkerScript in port->linker
5967         structure to inform whether to create a .lnk file or not,
5968         * src/avr/main.c,
5969         * src/ds390/main.c,
5970         * src/hc08/main.c,
5971         * src/mcs51/main.c,
5972         * src/pic/main.c,
5973         * src/pic16/main.c,
5974         * src/xa51/main.c,
5975         * src/z80/main.c: changed appropriately to configure
5976         needLinkerScript flag
5977         * src/pic/gen.c,
5978         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5979         * src/pic/glue.c: added variable udata_section_name to
5980         override default uninitialized data segment definition for
5981         devices only with SHAREBANK memory (reported from Erik Epetrich)
5982         * (pic14emitOverlay): modified to emit a commented overlay segment
5983         directive when no overlay data exist
5984         * (picglue): modified to emit uninitialized data segment
5985         according to udata_section_name
5986         * src/pic/main.c (_pic14_parseOptions): added command line
5987         options --udata-section-name=[name] to override default
5988         udata definition name
5989         * modified _linkCmd and _asmCmd to include compiler passed
5990         arguments via -W option
5991         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5992         object file from '.rel' to '.o' in port->linker structure,
5993         changed size of fptr from 2 to 3 in port structure
5994
5995 2004-01-07  Borut Razem <borut.razem AT siol.net>
5996
5997         * support/scripts/sdcc.nsi: update PATH
5998         * support/scripts/sdcc.ico: craeted
5999
6000 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6001
6002         * device/include/Makefile.in: fix install
6003         * doc/Makefile: fix install
6004
6005 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6006
6007         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6008         in bug #860505
6009         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6010         how the function variable allocation summary is displayed; also
6011         include information about variables allocated to the overlay
6012         segment
6013
6014 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6015
6016         * as/mcs51/lkmain.c: Help about -Y option
6017         * as/mcs51/lkarea.c: Fixed gcc warnings
6018
6019 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6020
6021         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6022         fixed warning
6023         * support/valdiag/tests/overflow.c: added
6024         * src/SDCCast.c (decorateType),
6025         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6026         LEFT_OP (left shift)
6027
6028 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6029
6030         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6031         (default behaviour).
6032
6033 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         A python script to validate compiler diagnostic messages. It can be
6036         used to verify that sdcc complains about bad c source code and
6037         gives a good location of the error.
6038         * support/valdiag/Makefile,
6039         * support/valdiag/valdiag.py,
6040         * support/valdiag/tests/*
6041
6042 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6043
6044         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6045         * src/SDCCsymt.c (newEnumType),
6046         * src/SDCCsymt.h
6047         * support/Util/SDCCerr.c,
6048         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6049         enum related bugs.
6050         * support/regression/tests/enum.c: added test for enum values that
6051         require at least 2 bytes of storage.
6052
6053 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6054
6055         * src/common.h: added ifndef/define/endif macros
6056         around the header file.
6057         Bug reported from Jesus Calvino-Fraga
6058
6059 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6060
6061         * sdcc.spec: updated
6062         * device/include/Makefile.in: don't install CVS directories
6063         * device/lib/Makefile.in: added removal of CVS directories after install
6064         * doc/Makefile: fixed install, added local_icons
6065         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6066         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6067         * src/ds390/gen.c (genRightShift): fixed bug #870788
6068         * src/SDCCast.c (decorateType): fixed bug #870781
6069
6070 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6071
6072         PIC16 port related changes:
6073         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6074         added variable stackPos,
6075
6076         * gen.c: genCall, assignResultValue: added support for
6077         pushing/retrieving function parameters to/from stack,
6078         genFunction,genEndFunction: setup stack frame for the
6079         generated function,
6080         genAddrOf: will be changed according to bug 863624
6081
6082         * added files genutils.c and genutils.h which contain gen*
6083         debugged and optimised functions extracted from gen.c
6084
6085         * glue.c: added variable 'externs' which holds extern symbols,
6086         pic16emitRegularMap: is modified to properly handle relocatable
6087          symbols under the new scheme,
6088         pic16createInterruptVect: is modified
6089         pic16printPublics: is modified to emit 'global' assembler directives,
6090         added pic16_printExterns to print extern symbols,
6091         pic16glue: initializes stack/frame pointer in the beginning of
6092         the assembly output. Temporary hack, will be corrected later,
6093         because gplink yet does not support stack and SDCC does not
6094         yet support a type of crt0.o object to create the final binary.
6095
6096         * Removed many lines that contain 8051 legacy code.
6097         * The code is finally placed under a 'code' directive.
6098         * Added port specific options.
6099
6100         * _process_pragma: simplified since now we do not need *special*
6101         include file to define SFR registers. But a separate header
6102         will be needed. This will be developed later.
6103         * _pic16_parseOptions: added, parses port specific options:
6104         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6105         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6106         --preplace-udata-with=
6107
6108         * _pic16_setDefaultOptions: modified to initialize section names,
6109         but hack is temporarly out of order since it needs improvement.
6110         * _pic16_genAssemblerPreamble: configuration words are emitted by
6111         their address instead of their name. This part is incomplete and
6112         supports only the 18Fxx2 devices. Other devices will emit an error
6113         during assembly since they do not contain the same set of config
6114         registers
6115         * _pic16_genIVT: is modified,
6116
6117         * pcode.c: added definitions for some hardware registers that are needed
6118         for stack support
6119         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6120         All PCI entries are updated. Now LFSR is supported.
6121         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6122         * added pic16_newpCodeOpLit2 to support instructions with
6123         two literal arguments
6124         * pic16_pCode2str: corrected code that emits assembler instructions
6125         with two literal operands and those that have an access bit modifier
6126         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6127         this fixes a bug which caused some labels to be lost, when an
6128         assembler directive was added, i.e. banksel,
6129         * pic16_FixRegisterBanking: improved logic that causes the insertion
6130         of bank switching,
6131         * InlineFunction: functions that are called once, are not any more
6132         inlined. This can be a port option in the future,
6133
6134         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6135
6136         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6137         hold the corresponding uninitialized symbols,
6138         * pic16_allocProcessorRegister: registers have explicit marked the
6139         accessBank field,
6140         * pic16_allocInternalRegister: registers are explicit marked as
6141         not used,
6142         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6143         processing list, so bit registers were lost,
6144         *
6145
6146         * ralloc.h: added field 'accessBank' and original symbol operand
6147         in register definition,
6148         * removed the field isMapped from register definition,
6149
6150         ** Several functions have been removed from various sources:
6151         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6152         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6153         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6154         pic16_assignRelocatableRegisters
6155
6156         ** others have been introduced:
6157         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6158         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6159
6160 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6161
6162         * support/scripts/inc2h.pl: changed definition of BIT_AT
6163         to emit 'sbit at' instead of 'bit at'. This was a request.
6164
6165         PIC16 port related preliminary changes:
6166         * gen.c: prefixed function popRegFromString with
6167         pic16_ and all references to it corrected
6168         * pcode.c: all pic16_pc_* hardware registers prefixed
6169         with underscore (_),
6170         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6171         * ralloc.c: newReg(): when register is REG_SFR then
6172         set address to rIdx,
6173         pic16_allocProcessorRegister(): marks register wasUsed=0
6174         pic16_writeUsedRegs(): added a call to assign processor
6175         registers via pic16_assignFixedRegisters
6176
6177 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6178
6179         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6180         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6181         variables in unused register banks.  Also the SSEG is placed
6182         wherever there is enough space for it, and IDATA can be anywhere
6183         in internal RAM.  For now compile using -Wl-Y[stack_size].
6184         The mem file is different for this option as well, since it
6185         makes no sense of talking about DSEG lenght.
6186
6187 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6188
6189         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6190         in certain cases, e.g. when ROM assignment, patch provided
6191         from Albert den Haan.
6192
6193 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6194
6195         Many signedness and type propagation fixes:
6196         * src/SDCCicode.c: made geniCodeCast() static
6197         replaced SPEC_ by IS_ (cosmetic)
6198         (operandOperation): fixed div and mod operation
6199         (usualBinaryConversions): added support for promotion of char
6200         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6201         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6202         (geniCodeAdd): an array index will stay unsigned, even if promoted
6203         from char to int
6204         (geniCodeArray): ditto
6205         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6206         * src/SDCCsymt.c (computeType): added more support for char;
6207         promotion of char is selectable by promoteCharToInt, fixed signedness
6208         for all cases
6209         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6210         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6211         * src/SDCCval (val*): replaced signedness calculation by
6212         computeType()
6213         rearranged if-branches (cosmetic)
6214         (valShift): added warning W_SHIFT_CHANGED
6215         (valCompare): fixed problem with different types
6216         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6217         * support/regression/tests/literalop.c: added many cases
6218         * support/regression/tests/ast_constant_folding.c: changed finally to
6219         'unsigned int'
6220         * .version: new year, new version: 2.3.7
6221         * src/SDCCmain.c (main): applied patch #866468
6222         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6223         provided by Scott Bronson
6224         * doc/sdccman.lyx: updated documentation for sdcdb
6225         updated and added chapter tips
6226
6227 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6228
6229         * src/SDCCsymt.h: missing from yesterday's commits
6230
6231 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * src/SDCC.y (struct_or_union_specifier),
6234         * support/Util/SDCCerr.c,
6235         * support/Util/SDCCerr.h: verify that struct & union tags are used
6236         as declared.
6237
6238 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6239
6240         * src/SDCCglobl.h: missing from yesterday's commits
6241
6242 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6243
6244         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6245         sft_attributes, struct_declaration, parameter_declaration,
6246         type_name, start_block, declaration_list),
6247         * src/SDCC.lex (check_type): support redefinition of typedef names
6248
6249 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6250
6251         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6252         aligned xdata arrays. Erik helped me with the if clause.
6253
6254 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6255
6256         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6257         warning
6258
6259 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6260
6261         * src/SDCCast.h,
6262         * src/SDCCast.c (newAst_),
6263         * src/SDCCicode.h,
6264         * src/SDCCicode.c (ast2iCode, newiCode),
6265         * src/SDCCglobl.h,
6266         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6267         expr, statement, expression_statement, selection_statement,
6268         iteration_statement, expr_opt, jump_statement): foundation for tracking
6269         sequence points
6270         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6271         point code too)
6272
6273 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6274
6275         * support/Util/SDCCerr.c,
6276         * src/SDCCast.h,
6277         * src/SDCCast.c (createCase, createDefault, decorateType),
6278         * src/SDCClabel.c (labelUnreach),
6279         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6280         to error messages.
6281         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6282         (with thanks to Stas Sergeev)
6283         * device/include/time.h,
6284         * device/lib/time.c (CheckTime): suppress unreachable code warning
6285
6286 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6287
6288         * src/SDCCast.c (createIvalCharPtr),
6289         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6290         bug #753752)
6291         * support/regression/tests/nullstring.c: tests for these two bugs
6292
6293 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6294
6295         * support/Util/SDCCerr.h,
6296         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6297         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6298         about storage class and 'at' used inside struct or union
6299         * src/SDCCBBlock.c (iCodeFromeBBlock),
6300         * src/SDCCcse.c (ifxOptimize),
6301         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6302         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6303         printIval, emitStaticSeg, emitOverlay),
6304         * src/SDCClabel.c (deleteIfx),
6305         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6306         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6307         gatherAutoInit, processParms),
6308         * support/Util/SDCCerr.h,
6309         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6310         reporting for post-parse errors.
6311
6312 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6313
6314         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6315         implicit casts via union; they don't work on big endian systems
6316         (possible fix for bug #861138)
6317
6318 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6319
6320         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6321         * src/mcs51/main.c: fixed the fix for bug #737001
6322
6323 2003-12-15  Borut Razem <borut.razem AT siol.net>
6324
6325         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6326
6327 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6328
6329         * support/makebin/makebin.c: put output in binary mode
6330
6331 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6332
6333         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6334         xdata and data memory on startup. Set the environment variable
6335         SDCC_NOGENRAMCLEAR to disable this.
6336         * src/mcs51/peephole.def,
6337         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6338         (allows non-interrupt and interrupt code to safely compete for a resource
6339         without the non-interrupt code having to disable interrupts)
6340
6341 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6342
6343         * src/SDCCicode.c (geniCodeAdd),
6344         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6345         with valFromType if type might be a pointer and host is big endian).
6346         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6347         types, not just integer types.
6348         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6349         multiply defined with mismatching "at" address.
6350
6351 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6352
6353         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6354         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6355         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6356         with embedded nulls (fixed bug #753752)
6357
6358 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6359
6360         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6361         Apparently this did not see much testing (endless loop)
6362
6363 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6364
6365         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6366
6367 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6368
6369         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6370         gracefully handle NULL memmap pointers
6371
6372 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6373
6374         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6375         instead of deleting the iCode when an operand is volatile
6376         * src/z80/gen.c (genDummyRead),
6377         * src/mcs51/gen.c (genDummyRead),
6378         * src/ds390/gen.c (genDummyRead),
6379         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6380         not just IC_RIGHT
6381         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6382         * src/SDCC.y: fixed bug #850420
6383
6384 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6385
6386         Applied z80 i/o port patch from Peter Townson and fixed some operators
6387         to better handle operands in A register.
6388         * device/include/z180.h
6389         * src/SDCC.y
6390         * src/SDCCglue.c
6391         * src/z80/gen.c
6392         * src/z80/gen.h
6393         * src/z80/main.c
6394         * src/z80/peeph-z80.def
6395         * src/z80/peeph.def
6396         * src/z80/z80.h
6397
6398 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6399
6400         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6401
6402 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6403
6404         * device/lib/hc08/_mullong.c: Removed extra #endif
6405
6406 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6407
6408         * sim/ucsim/hc08.src/inst.cc,
6409         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6410         carries from x to h
6411         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6412         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6413         * device/include/stdarg.h: fixed varargs for hc08
6414         * device/lib/Makefile.in,
6415         * device/lib/hc08/Makefile,
6416         * device/lib/hc08/_mulint.c,
6417         * device/lib/hc08/_mullong.c: fixed some endian problems
6418
6419 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6420
6421         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6422         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6423         * device/lib/_gptrget.c,
6424         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6425
6426 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6429         * src/SDCCast.c (astErrors): fixed bug #846007
6430         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6431
6432 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6433
6434         * src/SDCCast.c (decorateType): disabled a transformation I added in
6435         revision 1.188 (access to fields of a structure at an absolute address);
6436         it breaks with bitfields, extern declarations, and gcse analysis.
6437         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6438         could be assigned through a pointer, so don't complain.
6439         * src/SDCCast.c (astErrors),
6440         * src/SDCCast.h,
6441         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6442
6443 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6444
6445         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6446         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6447         output of __config directives, since gpasm now supports them
6448         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6449         pre-processor macro, i.e. -DMCU=p18f452
6450         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6451         and modified to handle 'cast' icode similarly to '=' icode
6452         * src/pic16/device.h (typedef struct PIC_device): added field
6453         'extMIface' to indicate that chip has external memory interface
6454         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6455         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6456         18F8720
6457
6458 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6459
6460         * src/SDCC.y (pointer): fixed bug #846006
6461         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6462         * src/SDCCast.c (decorateType): fixed bug #846009
6463         * src/ds390/peeph.def,
6464         * src/ds390/gen.c (genAnd, genOr),
6465         * src/mcs51/peeph.def,
6466         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6467
6468 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6469
6470         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6471         * src/SDCCdflow.c
6472         * src/SDCCcse.c
6473         * src/SDCCcse.h
6474         * src/SDCCBBlock.h
6475         * src/SDCCBBlock.c
6476
6477 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6478
6479         fixed bug #845089
6480         * src/SDCCbitv.h,
6481         * src/SDCCbitv.c: added function to free a bitvector
6482         * src/SDCClrange.h,
6483         * src/SDCClrange.c: added function to recompute the liveranges
6484         * src/avr/ralloc.c,
6485         * src/ds390/ralloc.c,
6486         * src/hc08/ralloc.c,
6487         * src/mcs51/ralloc.c,
6488         * src/pic/ralloc.c,
6489         * src/pic16/ralloc.c,
6490         * src/xa51/ralloc.c,
6491         * src/z80/ralloc.c: recompute the liveranges after register packing
6492
6493 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6494
6495         * src/SDCCloop.c (newInduction): fixed bug #845630
6496
6497 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6498
6499         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6500         inadvertantly left behind from my 2003-11-12 change
6501
6502 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6503
6504         Updated headers I neglected to commit yesterday.
6505         * src/SDCClrange.h,
6506         * src/SDCCicode.h
6507
6508 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6509
6510         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6511         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6512         * src/SDCCopt.c (eBBlockFromiCode),
6513         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6514         the creation of the key hash table from the sequencing so it can be used
6515         earlier (for some GCSE bug fixes still pending)
6516
6517 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6518
6519         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6520         * support/regression/tests/addsub.c: testing genPlus shortcut
6521
6522 2003-11-15  Borut Razem <borut.razem AT siol.net>
6523
6524         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6525
6526 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6527
6528         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6529         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6530         ordering is immaterial.
6531         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6532
6533 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6534
6535         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6536         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6537         (SIGSEV) of bug #840381
6538         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6539         unlink new file before rename if new and old filenames are the same)
6540
6541 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6542
6543         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6544         uninitialized variables) for the mcs51. Set environment variable
6545         SDCC_GENRAMCLEAR to test.
6546         xdata initialization slightly shorter
6547
6548 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6549
6550         * src/SDCCsymt.h,
6551         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6552         #838241 & 780691 (basicly the same bug)
6553         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6554         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6555
6556 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6557
6558         * src/SDCCmain.c (linkEdit): "fix" #834252
6559
6560 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6561
6562         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6563         * src/SDCCast.h,
6564         * src/SDCC.y: fixed bug #819403
6565
6566 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6567
6568         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6569         the reentrant attribute.
6570         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6571         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6572         simulation
6573         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6574         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6575         erroneously reduced to a literal.
6576         * src/hc08/ralloc.c (packRegisters, rematStr),
6577         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6578         some cases
6579
6580 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6581
6582         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6583         * doc/sdccman.lyx: changed from 'article' to 'book'
6584         * doc/Makefile: readded test_suite_spec and cdbfileformat
6585
6586 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6587
6588         * device/include/stdlib.h: include malloc.h to comply with ANSI
6589         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6590
6591 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6592
6593         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6594         * doc/clean.mk: also remove *.out files
6595         * doc/sdccman.lyx: some additions, larger top/bottom margins
6596
6597 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6598
6599         * src/SDCC.y: fixed bug #837365
6600         * support/regression/tests/bitopcse.c
6601         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6602         a symbol (might be valop instead)
6603         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6604         * device/lib/clean.mk: added hc08 to the cleaning list
6605
6606 2003-11-04  Borut Razem <borut.razem AT siol.net>
6607
6608         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6609           made 2003-11-04
6610         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6611           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6612           malloc is declared in standard stdlib.h
6613
6614 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6615
6616         * device/lib/hc08/Makefile: need to clean .rel not .o files
6617         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6618
6619 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6620
6621         * src/port.h,
6622         * src/hc08/main.c,
6623         * src/mcs51/main.c,
6624         * src/ds390/main.c,
6625         * src/z80/main.c,
6626         * src/avr/main.c,
6627         * src/pic/main.c,
6628         * src/pic16/main.c,
6629         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6630         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6631         tests (which uses the port's oclsExpense function)
6632         * src/SDCC.y,
6633         * src/SDCCast.c,
6634         * src/SDCCicode.c,
6635         * src/hc08/gen.c,
6636         * src/ds390/gen.c,
6637         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6638
6639 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6640
6641         * src/SDCCcse.c (ifxOptimize),
6642         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6643         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6644         deleting the IFX iCode.
6645         * src/hc08/ralloc.c: reduced unneeded slocs
6646         * src/hc08/gen.c: fixed bug in asmopToBoolean
6647
6648 2003-11-04  Borut Razem <borut.razem AT siol.net>
6649
6650         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6651           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6652           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6653           transferred to configure
6654
6655 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6656
6657         Use headers defined in the C[++] standards:
6658         * sim/ucsim/gui.src/serio.src/fileio.cc
6659         * sim/ucsim/gui.src/serio.src/frontend.cc
6660         * sim/ucsim/gui.src/serio.src/main.cc
6661         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6662         * support/Util/NewAlloc.c
6663         * as/hc08/lklibr.c
6664         * as/mcs51/lklibr.c
6665         * as/z80/aslist.c
6666         * as/z80/assym.c
6667
6668 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6669
6670         * Added MSVC projects for hc08 assembler and linker:
6671         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6672         /as/hc08/link_hc08.dsp
6673
6674 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6675
6676         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6677
6678 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6679
6680         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6681
6682 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6683
6684         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6685
6686 2003-10-31  Borut Razem <borut.razem AT siol.net>
6687
6688         * support/cpp2/cpplib.h,
6689           support/cpp2/cpplib.c,
6690           support/cpp2/cpplex.c,
6691           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6692           to switch _asm block preprocessing on / off. Default is
6693           #pragma preproc_asm +
6694
6695 2003-10-31  Borut Razem <borut.razem AT siol.net>
6696
6697         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6698           when outputting comment blocks (when executed with -C option) and
6699           _asm (SDCPP specific) blocks
6700
6701 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6702
6703         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6704
6705 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6706
6707         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6708
6709 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6710
6711         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6712         * src/SDCCast.c (decorateType): fixed bug #832664
6713
6714 2003-10-31  Borut Razem <borut.razem AT siol.net>
6715
6716         * support\cpp2\cpplex.c: fixed for SDCPP:
6717           comments(when executed with -C option) and _asm blocks
6718           were included even if they where in skipped #if block.
6719           Applied solution from GCC cpp 3.3.2
6720
6721 2003-10-31  Borut Razem <borut.razem AT siol.net>
6722
6723         * src/SDCC.lex: sdcc now understands both formats:
6724           '# <line_number> <file_name>' and
6725           '#line <line_number> <file_name>'
6726         * support/cpp2/cppmain.c: sdcpp now generates the standard
6727           '# <line_number> <file_name>' instead of former
6728           '#line <line_number> <file_name>'
6729
6730 2003-10-30  Borut Razem <borut.razem AT siol.net>
6731
6732         * support/cpp2/cpphash.h,
6733         * support/cpp2/cpplib.h
6734         * support/cpp2/cpplex.c,
6735         * support/cpp2/cppmain.c,
6736         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6737
6738 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6739
6740         Fixed a number of problems revealed by bug #827883.
6741         * src/SDCCloop.c (loopInvariants): Spill location of the
6742         result operand should be recomputed if extracted from
6743         a loop. Also, don't extract assignments of an iTemp
6744         from a literal.
6745         * src/SDCCast.c (isConformingBody): loop reversal should
6746         not occur if the control variable is involved with a
6747         relational operator.
6748
6749 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6750
6751         * .version: bumped to 2.3.6 to reflect the big improvements
6752         made by Erik and Klaus. Thanks!
6753
6754 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6755
6756         Replaced the livrange code.
6757         * src/SDCClrange.c: added new LR code
6758         * src/SDCCloop.c,
6759         * src/SDCCBBlock.h: removed remainig parts from old LR code
6760         * src/ds390/ralloc.c,
6761         * src/ds390/gen.c: minor fixes to make it work with new code
6762
6763 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6764
6765         * as/hc08/asm.h,
6766         * as/hc08/lkrloc.c,
6767         * src/hc08/gen.c,
6768         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6769         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6770         (tweaked fix for bug #818696)
6771
6772 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6773
6774         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6775
6776 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6777
6778         * src/SDCCmain.c,
6779         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6780         * src/mcs51/gen.c (gencjneshort),
6781         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6782         more efficient (per Scott Bronson's suggestion)
6783
6784 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6785
6786         Extended the semantics of the critical keyword to include
6787         individual statements. See RFE #827755 and #799831
6788         * src/SDCC.y
6789         * src/SDCCicode.c
6790         * src/SDCCopt.c
6791         * src/SDCCast.c
6792         * support/Util/SDCCerr.c
6793         * support/Util/SDCCerr.h
6794         * src/mcs51/gen.c
6795         * src/ds390/gen.c
6796         * src/hc08/gen.c
6797
6798 2003-10-19  Borut Razem <borut.razem AT siol.net>
6799
6800         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6801
6802 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6803
6804         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6805         Fixed bug #818696
6806         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6807         and predecrement operand is displayed
6808
6809 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6810
6811         * src/SDCCval.c (valMinus): fixed bug #826041
6812
6813 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6814
6815         Some hc08 related updates that I missed earlier
6816         * sim/ucsim/stypes.h
6817         * support/regression/ports/hc08/spec.mk
6818
6819 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6820
6821         New target "hc08" for the Motorola 68hc08 family of micros
6822
6823         * configure
6824         * configure.in
6825         * Makefile
6826         * src/hc08/*
6827         * src/SDCCmain.c
6828         * src/port.h
6829         * sim/ucsim/hc08.src/*
6830         * sim/ucsim/configure.in
6831         * src/ucsim/configure
6832         * sim/ucsim/packages_in.mk
6833         * as/hc08/*
6834         * as/Makefile
6835         * device/include/mc68hc908qy.h
6836         * device/lib/hc08/*
6837         * device/lib/Makefile.in
6838         * support/regression/ports/hc08/*
6839         * support/regression/Makefile
6840
6841 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6842
6843         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6844         regression test
6845         * src/ds390/gen.c (genCast): fixed bug #821957
6846
6847 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6848
6849         * device/lib/logf.c: "fixed" overlay bug
6850         * support/regression/ports/host/spec.mk: added m library
6851         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6852         * support/regression/tests/float_trans: added (for Eric)
6853
6854 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6855
6856         * src/mcs51/gen.c (genCpl): fixed bug
6857         http://sf.net/mailarchive/message.php?msg_id=6263915
6858
6859 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6860
6861         * src/SDCCast.c (decorateType): added extended constant folding
6862         * src/SDCCsymt.c (computeType): cleanup
6863         * src/SDCCval.c (valShift): minor optimization
6864         * support/regression/tests/ast_constant_folding.c: added
6865
6866 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6867
6868         * src/SDCCmain.c: removed some unintended changes
6869
6870 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6871
6872         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6873         * src/z80/gen.c: fixed part of bug #817589
6874         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6875
6876 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6877
6878         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6879         * src/SDCCcflow.c
6880         * src/SDCCcse.c
6881         * src/SDCCdflow.c
6882         * src/SDCClabel.c
6883         * src/SDCClrange.c
6884         * src/SDCCmem.c
6885         * src/SDCCopt.c
6886         * src/SDCCpeeph.c
6887         * src/SDCCset.c
6888         * src/avr/ralloc.c
6889         * src/ds390/ralloc.c
6890         * src/izt/ralloc.c
6891         * src/mcs51/ralloc.c
6892         * src/pic/ralloc.c
6893         * src/pic16/ralloc.c
6894         * src/xa51/ralloc.c
6895         * src/z80/ralloc.c
6896         * src/z80/gen.c: removed unused label "release:"
6897
6898 2003-10-06  Borut Razem <borut.razem AT siol.net>
6899
6900         * src/SDCC.lex: removed definition of unused variables
6901           save_optimize and save_options
6902
6903 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6904
6905         * clean.mk: removed '=' in "-maxdepth=1"
6906         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6907         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6908
6909 2003-10-06  Borut Razem <borut.razem AT siol.net>
6910
6911         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6912           my_unput() replaced by unput()
6913
6914 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6915
6916         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6917         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6918         type-punned pointer will break strict-aliasing rules"
6919         Old LR behaviour is again default; Klaus' LR can be choosen by
6920         defining the environment variable LRKLAUS
6921         * src/SDCCBBlock.h
6922         * src/SDCCloop.c
6923         * src/SDCClrange.c
6924         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6925         * clean.mk: fixed removal of files in bin/CVS/
6926         * device/lib/clean.mk: fixed removal of directories small and large
6927         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6928         * src/SDCCicode.c,
6929         * src/SDCCval.c: removed superflous test for pedantic
6930
6931 2003-10-05  Borut Razem <borut.razem AT siol.net>
6932
6933         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6934           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6935           message "unmatched #pragma SAVE and #pragma RESTORE"
6936
6937 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6938
6939         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6940           assembly, critical functions, atomic, nojtbound)
6941
6942 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6943
6944         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6945         * src/SDCCBBlock.h
6946         * src/SDCCloop.c
6947         * src/SDCCloop.h
6948         * src/SDCClrange.c
6949
6950 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6951
6952         * src/z80/gen.h,
6953         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6954         * src/mcs51/gen.h
6955         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6956         * src/ds390/gen.h
6957         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6958         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6959         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6960
6961 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6962
6963         * src/z80/gen.c (genRet): fixed bug #524753
6964         * src/z80/gen.c (genCast): fixed internal error on cast from
6965         pointer to long
6966         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6967         fix for bug #477835 to the z80
6968         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6969         for tracking iCodes in the peephole optimizer for z80
6970
6971 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6972
6973         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6974         the other part of bug #814548
6975         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6976
6977 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6978
6979         * src/SDCCcse.c: fixed part of bug #814548
6980
6981 2003-09-28  Borut Razem <borut.razem AT siol.net>
6982
6983         * src/asm.c: rewrite of printILine() to use temporary file instead
6984           a pipe
6985         * src/xa51/main.c: commented out declaration of int rewinds
6986
6987 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6988
6989         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6990
6991 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6992
6993         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6994         * src/asm.c (printILine): Fixed bug #811015
6995
6996 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6997
6998         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6999         freeing.
7000
7001 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7002
7003         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7004         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7005         to correctly handle general case of AOP_PAIRPTR
7006         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7007
7008 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7009
7010         * src/mcs51/ralloc.c (fillGaps),
7011         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7012         register positioning bug)
7013
7014 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7015
7016         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7017
7018 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7019
7020         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7021         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7022         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7023         (ralloc doesn't intentionally do this now, but perhaps later)
7024         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7025         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7026         register positioning bugs (Fixed bug #762602 and #795325)
7027         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7028         (Fixed bug #808779)
7029         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7030         lines that --i-code-in-asm generates
7031
7032 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7033
7034         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7035         trying to fclose a FILE* that was already closed.
7036
7037 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7038
7039         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7040         of const struct should be treated as if const themselves)
7041
7042 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7043
7044         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7045
7046 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7047
7048         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7049         Unix (/n) and DOS (/r/n) line terminations.
7050
7051 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7052
7053         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7054         bug #613775
7055
7056 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7057
7058         * src/mcs51/gen.c (genFunction, genEndFunction),
7059         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7060         and restore of EA so that stack offsets to parameters are
7061         correct when using both critical and reentrant/stack-auto.
7062         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7063         size (can be triggered in error if sloc is shared between
7064         different sized objects)
7065         * device/include/float.h: fixed macros to explicitly use
7066         unsigned long where needed
7067
7068 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7069
7070         Feature req. 799831: added code to allow nesting of critical functions
7071         * src/mcs51/gen.c (genFunction, genEndFunction)
7072         * src/ds390/gen.c (genFunction, genEndFunction)
7073
7074 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7075
7076         * src/SDCCsymt.c (sclsFromPtr),
7077         * src/SDCCsymt.h,
7078         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7079         support for standard C idiom of memory mapped variables; for
7080         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7081         to xdata int at 0x1234 tempvar = 1.
7082         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7083         provided by Akiya ISHIDA
7084
7085 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7086
7087         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7088         * src/SDCCval.c (constVal): added reduction from int to char
7089         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7090         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7091         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7092         to ignore the sign
7093         * support/regression/tests/shifts.c: fixed
7094
7095 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7096
7097         * src/z80/gen.c (genXor): Fixed bug #805445
7098
7099 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7100
7101         Fixed bug #621531 (const & volatile confusion in the type chain).
7102         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7103         refer to the const or volatile state of the pointer itself.
7104
7105         * src/SDCCast.c
7106         * src/SDCCglue.c
7107         * src/SDCCicode.c
7108         * src/SDCCsymt.c
7109         * src/SDCCval.c
7110         * src/SDCC.y
7111         * src/SDCCsymt.h
7112         * src/pic/gen.c
7113         * src/pic/ralloc.c
7114         * src/pic16/gen.c
7115         * src/pic16/ralloc.c
7116         * support/regression/tests/const.c
7117
7118 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7119
7120         When checking for duplicated modules, use absolute paths
7121         instead of relative paths.  Files changed:
7122
7123         * as/mcs51/lklib.c
7124         * link/z80/lklib.c
7125
7126 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7127
7128         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7129
7130 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7131
7132         * device/include/string.h: added size_t typedef, changed
7133         prototypes to use size_t, eliminated separate reentrant and
7134         non-reentrant declarations, added _memmove declaration
7135         * device/lib/_memcpy.c: changed to use size_t instead of int,
7136         changed /4 to >>2 to avoid division library call
7137         * device/lib/_memcmp.c,
7138         * device/lib/_memset.c,
7139         * device/lib/_strncat.c,
7140         * device/lib/_strncpy.c,
7141         * device/lib/_strncmp.c: changed to use size_t instead of int
7142         * device/lib/_memmove.c: new file (fixed bug #772294)
7143         * device/lib/Makefile.in: added _memmove.c
7144         * device/lib/z80/asm_strings.s: fixed bug #772290
7145         * support/regression/tests/bitfields.c: attempt to fix host assertion
7146         failure on amd64-unknown-linux2.2
7147
7148 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7149
7150         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7151         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7152         * as/z80/asmain.c (main): fixed bug #801766
7153
7154 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7155
7156         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7157         compilers
7158
7159 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7160
7161         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7162         reported in bug #800609
7163
7164 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7165
7166         * Top header beautifications in src/pic16 directory:
7167           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7168           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7169           pcoderegs.h, ralloc.c, ralloc.h
7170         * main.c: added top header and GPL license notice
7171         * pcode.c: fixed the if-conditional warning
7172
7173 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7174
7175         * device/lib/_mullong.c: replaced int by short for gcc
7176
7177 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7178
7179         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7180         and JUMPTABLE iCodes properly now (worked by accident before)
7181         * src/mcs51/gen.c (leftRightUseAcc),
7182         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7183         iCode properly now. Use getSize instead of nRegs since a & b
7184         aren't part of the nRegs tally.
7185
7186 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7187
7188         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7189         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7190           before instructions that use the _STATUS register
7191
7192 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7193
7194         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7195         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7196         fetching of the pointer
7197         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7198         copied from genNearPointerSet()
7199         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7200         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7201         If they pop r0/r1 they must be called in the opposite order than aopOp().
7202         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7203         (resp. --stack-auto), prepared for --xstack
7204
7205 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7206
7207         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7208
7209 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7210
7211         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7212         these ports have their own __sdcc_external_start()
7213
7214 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7215
7216         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7217         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7218         type for bits was changed. It resulted in bit variables becoming
7219         global, which is not permitted in PIC 14 assembly output.
7220
7221 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7222
7223         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7224
7225 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7226
7227         Z80 and MCS51 linkers complaint if a public symbol is defined
7228         in more than one library module:
7229
7230         * as/mcs51/lklib.c
7231         * link/z80/lklib.c
7232         * as/mcs51/Makefile.in
7233
7234 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7235
7236         A few small changes that speed up the peephole optimizer.
7237
7238         * src/SDCCpeeph.c
7239
7240 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7241
7242         Try to make the peephole optimizer smarter by maintaining
7243         an association between the assembly source code and the
7244         iCodes that originated them. Put this information to use
7245         with a new peephole rule condition "notVolatile" so that
7246         the rules can be aggressive yet still safe.
7247
7248         * src/SDCCpeeph.c
7249         * src/SDCCpeeph.h
7250         * src/mcs51/gen.c
7251         * src/mcs51/peeph.def
7252
7253 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7254
7255         Fixed bug #741761
7256
7257         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7258         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7259         if the left or right operand symbols have the accuse flag set.
7260
7261 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7262
7263         Changed the type of the result of the ! (NOT) operator to char;
7264         previously it returned the same type as the source. This allows
7265         us to eliminate all the genFloatNot functions (all of its target
7266         implementations were very buggy) since !float can use the same
7267         code as !long now.
7268
7269         * src/SDCCicode.c (ast2iCode): ! returns char
7270         * src/mcs51/gen.c (genNot, genNotFloat),
7271         * src/ds390/gen.c (genNot, genNotFloat),
7272         * src/z80/gen.c (genNot, genNotFloat),
7273         * src/pic/gen.c (genNot, genNotFloat),
7274         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7275
7276 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7277
7278         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7279         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7280            during interrupts. Ensure WSAVE is located at a shared bank address.
7281         2. Fixed page selection in some places
7282         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7283            the registers name strings.
7284         4. Fixed "signed / unsigned compare" compiler warnings.
7285         5. The PIC port manages its own allocation of the general purpose
7286            registers, but makes no attempt to reuse them. As a result when
7287            compiling it soon runs out of general purpose registers. Some
7288            additional code was added to the files pcode.c and device.c to walk
7289            through the function call tree and rename the registers so that they
7290            get reused.
7291
7292         * src/pic/device.c
7293         * src/pic/gen.c
7294         * src/pic/glue.c
7295         * src/pic/pcode.c
7296         * src/pic/pcode.h
7297         * src/pic/ralloc.c
7298         * src/pic/ralloc.h
7299         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7300         genPlus() & genMinus() when the result is the same as left or right
7301
7302 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7303
7304         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7305
7306 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7307
7308         Made bitfield a distinct type from bit so that bitfields
7309         convert as per ANSI C and bits retain their traditional
7310         boolean style behaviour. Implemented bitfield support in
7311         the z80 port.
7312
7313         * src/SDCCsymt.h,
7314         * src/SDCCsymt.c,
7315         * src/SDCCast.c,
7316         * src/cdbFile.c,
7317         * src/mcs51/gen.c,
7318         * src/ds390/gen.c: bit v bitfield split
7319         * src/z80/gen.c: New support for bitfields
7320         * support/regression/tests/bitfields.c: reenabled z80,
7321         added more tests
7322
7323 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7324
7325         Rules 246.x, 247.x relate to bitfields, the others speed up
7326         access to xdata mapped I/O devices.
7327
7328         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7329
7330 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7331
7332         Cleaned up genPackBits and genUnpackBits and added two helper
7333         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7334         for literal assignments in genPackBits (thanks to Frieder for
7335         reminding me).
7336
7337         * src/mcs51/gen.c
7338         * src/ds390/gen.c
7339
7340 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7341
7342         Fixed bug #748310 (pointer to function type mishandled when the
7343         function name is omitted). Also fixed a SIGSEGV when a function
7344         attribute (reentrant, etc) is used on a non-function or on a
7345         function but misplaced before the parameter list.
7346
7347         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7348         bug #748310
7349         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7350         * support/Util/SDCCerr.h,
7351         * support/Util/SDCCerr.c: Added func attr misuse error msg
7352
7353 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7354
7355         Fixed bug #787649 by anonymous
7356         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7357         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7358
7359 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7360
7361         Fixed numerous bitfield problems.
7362
7363         * src/SDCC.y: More bitfield related error checking
7364         * src/SDCCsymt.h,
7365         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7366         * support/Util/SDCCerr.h,
7367         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7368         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7369         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7370         * support/regression/tests/bitfields.c: tests added
7371
7372 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7373
7374         Made the constant following the "interrupt" keyword optional. If
7375         omitted, the function will not automatically be given an entry
7376         in the interrupt vector table (similar to #pragma NOIV, but
7377         less syntacticly kludgy). The interrupt number is also now
7378         range checked. Also fixed a bug in the high order bit example
7379         in the manual.
7380
7381         * src/SDCC.y
7382         * src/SDCCmem.c
7383         * src/SDCCglue.c
7384         * src/SDCCsymt.h
7385         * support/Util/SDCCerr.c
7386         * support/Util/SDCCerr.h
7387         * doc/sdccman.lyx
7388
7389 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7390
7391         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7392         * src/SDCCicode.c (operandOperation): rewritten some ops
7393         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7394         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7395         other type
7396         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7397         be re-activated by defining REDUCE_LITERALS)
7398         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7399         unsigned, but are signed by default
7400         * src/SDCCval.c (constVal): rearranged
7401         * src/SDCCval.c (valMod): preliminary fix
7402         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7403         * support/regression/literalop.c: added, work in progress
7404
7405 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7406
7407         Generate warnings for useless declarations like "char data;"
7408         that don't do what new users expect.
7409
7410         * src/SDCC.y
7411         * support/Util/SDCCerr.h
7412         * support/Util/SDCCerr.c
7413
7414 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7415
7416         * src/SDCCval.c (valMult): fix overflow detection of negative int
7417
7418 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7419
7420         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7421
7422         Changes to support big endian targets:
7423
7424         * src/ports.h
7425         * src/SDCCglue.c
7426         * src/avr/main.c
7427         * src/ds390/main.c
7428         * src/izt/i186.c
7429         * src/mcs51/main.c
7430         * src/pic/main.c
7431         * src/pic16/main.c
7432         * src/xa51/main.c
7433         * src/z80/main.c
7434
7435 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7436
7437         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7438         * device/lib/time.c: fixed warning "integer overflow in expression"
7439
7440 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7441
7442         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7443         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7444         constants are unsigned; added recognition of "u" flag for unsigned
7445         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7446         * src/SDCCval.c (valDiv, valMod): fixed signdness
7447         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7448         signedness of modulo, left and right shift
7449         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7450         * support/Util/SDCCerr.h: added warning W_INT_OVL
7451         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7452         * src/SDCCast.c (ast_print): improved output of constants
7453
7454 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7455
7456         Fixed some warnings when building with MSVC:
7457
7458         * as\mcs51\asdata.c
7459         * as\z80\asdata.c
7460         * as\mcs51\asm.h
7461         * as\z80\asm.h
7462         * link\z80\aslink.h
7463         * link\z80\lkdata.c
7464         * link\z80\lkeval.c
7465         * link\z80\lkgb.c
7466         * link\z80\lkihx.c
7467         * link\z80\lks19.c
7468         * link\z80\lksym.c
7469         * support\cpp2\cpplib.c
7470         * src\ds390\gen.c
7471         * src\mcs51\gen.c
7472
7473 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7474
7475         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7476
7477 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7478
7479         * support\librarian\clean.mk: Do not remove Makefile.
7480         * support\librarian\Makefile: added.
7481
7482 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7483
7484         Added librarian to MSVC build:
7485         * all.dsp
7486         * sdcc.dsw
7487         * support\librarian\librarian.dsp
7488
7489         'configure' not needed for librarian, removed:
7490         * support\librarian\configure
7491         * support\librarian\configure.in
7492         * support\librarian\config_in.h
7493         * support\librarian\Makefile.in
7494
7495         Hopefully these ones built the librarian and the rest of sdcc properly:
7496         * Makefile
7497         * Makefile.common.in
7498
7499         Messed up 'configure', so revert to previous version:
7500         * configure
7501         * configure.in
7502
7503 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7504
7505         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7506         there, while the mantissa of a double is "only" 53 bits wide.
7507
7508 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7509
7510         Adding sdcclib to the build.  MSVC project coming soon.
7511         Files added/changed:
7512
7513         * support\librarian\clean.mk
7514         * support\librarian\configure
7515         * support\librarian\configure.in
7516         * support\librarian\config_in.h
7517         * support\librarian\Makefile.bcc
7518         * support\librarian\Makefile.in
7519         * support\librarian\sdcclib.c
7520         * Makefile.bcc
7521         * Makefile
7522         * Makefile.common.in
7523         * configure
7524         * configure.in
7525
7526 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7527
7528         Linker now complaints if linked modules have conflicting options, for
7529         example, one compiled using --model-large and another one compiled with
7530         --model-small.  The following files were modified:
7531
7532         * as\mcs51\asdata.c
7533         * as\mcs51\aslink.h
7534         * as\mcs51\asm.h
7535         * as\mcs51\asmain.c
7536         * as\mcs51\asout.c
7537         * as\mcs51\i51pst.c
7538         * as\mcs51\lkdata.c
7539         * as\mcs51\lklibr.c
7540         * as\mcs51\lkmain.c
7541         * as\z80\asdata.c
7542         * as\z80\asm.h
7543         * as\z80\asmain.c
7544         * as\z80\asout.c
7545         * as\z80\z80pst.c
7546         * link\z80\aslink.h
7547         * link\z80\lkdata.c
7548         * link\z80\lklibr.c
7549         * link\z80\lkmain.c
7550         * src\SDCCglue.c
7551
7552 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7553
7554         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7555         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7556
7557 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7558
7559         * src/z80/mappings.i: fix _mul[us][int,long] entries
7560
7561 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7562
7563         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7564
7565 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7566
7567         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7568         * support/regression/tests/bitopcse.c: added
7569         fixed warning:
7570         * src/avr/gen.c:
7571         * src/pic/gen.c:
7572         * src/pic16/gen.c:
7573         * src/z80/gen.c:
7574         * src/xa51/gen.c:
7575
7576 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7577
7578         added support for new library format to z80, gbz80 linkers:
7579         *link/z80/aslink.h
7580         *link/z80/lklex.c
7581         *link/z80/lklib.c
7582         *link/z80/lklist.c
7583
7584 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7585
7586         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7587         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7588
7589 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7590
7591         added DUMMY_READ_VOLATILE:
7592         * src/SDCC.y:
7593         * src/avr/gen.c:
7594         * src/xa51/gen.c:
7595         * src/z80/gen.c:
7596         * src/pic/gen.c:
7597         * src/pic16/gen.c:
7598         * src/mcs51/gen.c:
7599         * src/ds390/gen.c:
7600         * src/SDCCcse.c (algebraicOpts): many improvements
7601         * src/SDCCcse.h: removed algebraicOpts()
7602         * src/SDCCicode.c (picDummyRead): added
7603
7604 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7605
7606         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7607         "Insufficient space in data memory".
7608
7609 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7610
7611         * src/mcs51/gen.c: fixed bug #771358
7612         * src/z80/gen.c: fixed bug #759087
7613
7614 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7615
7616         * src/pic16/glue.c: minor cleanup by Vangelis
7617
7618 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7619
7620         * device/include/regc515c.h: fixed #758477
7621         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7622         * device/lib/_gptrput.c: saved a few bytes
7623         * my tab spacing is 8, yours too?)
7624         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7625         * device/lib/serial.c: process RX bytes earlier than TX bytes
7626         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7627
7628 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7629
7630         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7631
7632 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7633
7634     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7635
7636 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7637
7638         * device/lib/Makefile.in: bad fix, reverted to 1.43
7639
7640 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7641
7642         * device/lib/Makefile.in: added missing z80 object files
7643
7644 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7645
7646         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7647         pic16 progress by Vangelis:
7648         * src/SDCCglobl.h:
7649         * src/SDCCmain.c:
7650         * src/pic/Makefile:
7651         * src/pic:
7652         * pic/Makefile:
7653         * pic16/device.c:
7654         * pic16/device.h:
7655         * pic16/gen.c:
7656         * pic16/gen.h:
7657         * pic16/genarith.c:
7658         * pic16/glue.c:
7659         * pic16/main.c:
7660         * pic16/pcode.c:
7661         * pic16/pcode.h:
7662         * pic16/pcodepeep.c:
7663         * pic16/peeph.def:
7664
7665 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7666
7667     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7668
7669 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7670
7671     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7672     added gbz80 build to MSVC project.
7673     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7674     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7675     from 8051 stuff and setup so it links using a .lnk file.
7676
7677 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7678
7679     * support/librarian/sdcclib.c: sdcc librarian.
7680     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7681     with sdcclib.
7682
7683 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7684
7685     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7686
7687 2003-07-02  Borut Razem <borut.razem AT siol.net>
7688
7689         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7690         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7691         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7692         src/xa51/main.c, src/z80/main.c:
7693         virtualization of glue() function: each port has it's own glue function,
7694         which is accessed by do_glue function pointer in PORT.general structure
7695
7696 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7697
7698         * DS800C400 fun, improved ROM interface and tinibios.
7699
7700 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7701
7702         * More support for DS80C400. Now includes beginning of interface to ROM.
7703
7704 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7705
7706         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7707
7708 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7709
7710         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7711
7712 2003-06-19  Borut Razem <borut.razem AT siol.net>
7713
7714         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7715
7716 2003-06-19  Borut Razem <borut.razem AT siol.net>
7717
7718         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7719         fixed Z80 port - crt0.o: cannot open.
7720
7721 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7722
7723         * support/Util/MySystem.c (merge_command): revert bad fix
7724
7725 2003-06-18  Borut Razem <borut.razem AT siol.net>
7726
7727         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7728
7729 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7730
7731         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7732         option --use-stdout sends errors to stdout instead of stderr.
7733
7734 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7735
7736         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7737
7738 2003-06-15  Borut Razem <borut.razem AT siol.net>
7739
7740         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7741         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7742         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7743         fixed width array of pointers replaced with sets;
7744         multiple include and lib paths ared transferred to preprocessor and linker
7745         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7746         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7747         fixed width array of pointers
7748         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7749         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7750         fixupPath(), getPathDifference()
7751         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7752         fixed width array of pointers
7753
7754 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7755
7756         * src/pic16/ralloc.c: fix warnings
7757         * src/pic16/pcode.c: fix warning
7758
7759 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7760
7761          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7762         know all the details, but essentially this set of changes enable
7763         the pic16 port to generate movff instructions and generate assembler
7764         directives,
7765         * src/SDCCmain.c:
7766         * src/pic16/gen.c:
7767         * src/pic16/glue.c:
7768         * src/pic16/pcode.c:
7769         * src/pic16/device.c:
7770         * src/pic16/main.c:
7771         * src/pic16/pcode.h:
7772         * src/pic16/pcoderegs.c:
7773         * src/pic16/ralloc.c:
7774         * src/pic16/ralloc.h:
7775
7776 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7777
7778         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7779         added option --vc, so sdcc errors and warnings are compatible with
7780         Microsoft Visual Studio.
7781
7782 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7783
7784         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7785           device/lib/libfloat.lib: added atof function.
7786
7787 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7788
7789         * doc/sdccman.lyx: updated to Lyx 1.3
7790         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7791         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7792         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7793
7794 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7795
7796         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7797
7798 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7799
7800         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7801           additions to the "related tools/documentation" section
7802
7803 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7804
7805         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7806
7807 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7808
7809         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7810         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7811
7812 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         * doc/sdccman.lyx: fix double dash and other minor things
7815         * doc/Makefile: fix double dash
7816
7817 2003-05-28  Karl Bongers(patches from Martin Helmling)
7818         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7819           condition and ignore commands.
7820
7821 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7822
7823         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7824           is in parts still quite out of date, I did changes as far as I felt makes sense
7825           for a non-native english speaker.
7826           Please feel free to add to the manual or to correct my changes.
7827         * doc/Makefile: undid touching the date of intermediate tex files.
7828
7829 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7830
7831         * doc/sdccman.lyx: Manual has an index now
7832
7833 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7834
7835         Finalize muluint/mulsint and mululong/mulslong merging:
7836         * device/lib/_mulint.c
7837         * device/lib/_mullong.c
7838         * device/lib/gbz80/mul.s
7839         * device/lib/gbz80/stubs.s
7840         * device/lib/z80/mul.s
7841         * device/lib/z80/stubs.s
7842         * src/SDCCsymt.c (initCSupport)
7843
7844 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7845
7846         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7847         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7848           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7849           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7850           instead of /Zm500.
7851
7852 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7853
7854         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7855           the regression tests I'm not brave enough to enable 245.b, 245.c
7856         * doc/sdccman.lyx: added latex preamble for hyperref package.
7857           Using pdflatex this will give you a hyperlinked pdf file with
7858           bookmarks. (prepend '%' before /usepackage if this breaks something)
7859
7860 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7861
7862          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7863
7864 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7865
7866         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7867
7868 2003-05-21    <johan AT balder>
7869
7870         * src/SDCCglue.c (printIval): fixed bug #739934
7871
7872 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7873
7874         Applied patch from bug 737905 (renamed yylineo to mylineno):
7875         * src/altlex.c
7876         * src/SDCCast.c
7877         * src/SDCglobl.h
7878         * src/SDCC.lex
7879         * src/SDCCsymt.c
7880         * src/SDCCval.c
7881         * src/pic16/pcode.c: Cleaned warnings
7882         * src/pic16/pcodeflow.c: Cleaned warnings
7883         * src/pic16/pcoderegs.c: Cleaned warnings
7884
7885 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7886
7887         * src/pic16/pcode.c: Cleaned warnings
7888         * src/pic16/pcodepeep.c: Cleaned warnings
7889         * src/pic16/ralloc.c: Cleaned warnings
7890
7891 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7892
7893         * doc/sdccman.lyx: fixed bug 739745
7894         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7895
7896 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7897
7898         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7899         it can be defined with CFLAGS when running configure
7900         * src/SDCCmain.c: fixed compiling + linking with object files
7901
7902 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7903
7904         * configure.in: configure for pic16 port,
7905             added --disable-pic16-port
7906         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7907         * src/SDCCmain.c: linkOptions is changed to set *,
7908             added if/endif conditional macros to remove options help
7909             messages from optionsTable when a port is not configured, added
7910             support for the PIc16 port in the ports table, when executing
7911             the compiler with no port specified on command line, a default
7912             port is selected with the new macro DEFAULT_PORT which is
7913             defined in port.h, in setDefaultOptions() linkOptions is removed
7914             from initialization assignment, since now it is a set,
7915             parseCmdLine uses setParseWithComma for linkOptions, in
7916             linkEdit() linkOptions are accessed with new function indexSet()
7917             which returns the i'th item of a set variable. See SDCCset.c, in
7918             linkEdit() when calling buildCmdLine(), added linkOptions as
7919             last argument. Now users can pass arguments to gplink via the
7920             -Wl option, main() uses pic16glue() to glue up pic16 programs
7921         * src/SDCCpeeph.c: various changes to support pic16
7922         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7923             return the i'th item of the set
7924         * src/SDCCset.h: added function prototype for indexSet()
7925         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7926         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7927         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7928             added macro DEFAULT_PORT
7929         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7930         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7931             generated
7932         * src/pic16/glue.c: commented out some error producing lines
7933         * src/pic16/main.c: __config directives are commented out to stop
7934             gpasm complaining and test the linkage with gplink, _linkCmd and
7935             _asmCmd changed to be more gplink and gpasm friendly
7936         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7937             produced an error when parsed, peep rule 12 is added to utilize
7938             movff, but it is commented out since the pCode does not support
7939             yet a command with 2 address arguments
7940
7941 2003-05-18    <johan AT balder>
7942
7943         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7944         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7945 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7946
7947         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7948   Added feature to script commands from file.
7949
7950 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7951
7952         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7953         * src/SDCCutil.c: include ctype.h for win32
7954
7955 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7956
7957         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7958
7959 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7960
7961         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7962   Fixed so you can set breakpoints prior to run, run does not stop
7963   on entry now.  Add tbreak.  Other enhancements and fixes for use
7964   with ddd.
7965
7966 2003-05-12  Borut Razem <borut.razem AT siol.net>
7967
7968         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7969
7970 2003-05-11  Borut Razem <borut.razem AT siol.net>
7971
7972         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7973         the path of bin directory, so that PATH is the only env. variable, which has to be set
7974         in case of standard installation.
7975         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7976         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7977         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7978
7979 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7980
7981         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7982         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7983         temp files are in the port dir; clean the gen/test directory when
7984         generating new test.c
7985         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7986         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7987         * support/regression/tests/zeropad.c: added
7988
7989 2003-05-09    <johan AT balder>
7990
7991         * src/SDCCglue.c: fixed bug #597940
7992
7993 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7994
7995         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7996   cache sfr, optimize next,step, fix off by one sourceline,
7997   support ddd list function.
7998         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7999
8000 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8001
8002         * support/regression/HTMLgen.py: added compare_s2f()
8003         * support/regression/Makefile: redo 1.27
8004         * support/regression/generate-cases.py: redo 1.5
8005
8006 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8007
8008         * support/regression/tests/float.c: workaround 33 bit hex constant
8009         * support/regression/tests/simplefloat.c: fix division for host
8010
8011 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8012
8013         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8014         that tame's the PIC's over-aggressive optimizer.
8015
8016 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8017
8018          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8019          support for MSVC.
8020
8021 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8022
8023         Initial support for DS80C400. "Hello world" runs on TINIm400
8024         (with polled I/O).
8025
8026 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8027
8028          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8029          * Some notes on ddd usage added in debugger/README
8030          Martin Helmling adding more features and fixes for ddd GUI debugger.
8031          Code added for nexti, stepi, up, down, and other adjustments.
8032
8033 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8034
8035         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8036         * src/pic/peeph.def Added two rules to optimize carry manipulation
8037         * src/pic/* removed debug printfs
8038
8039 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8040
8041         * debugger/mcs51/cmd.c: added header newalloc.h
8042
8043 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8044
8045         * as/Makefile: new EXEEXT
8046         * as/z80/Makefile: remove trailing slash of BUILDIR
8047         * as/z80/clean.mk: new EXEEXT
8048         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8049         * support/cpp2/Makefile.in: new EXEEXT
8050         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8051
8052 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8053
8054         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8055         EXEEXT was introduced to fix all related problems with targets
8056         "clean", "install" and "uninstall"; a couple of further flaws
8057         especially with "clean" have been fixed too
8058         * as/mcs51/Makefile.in
8059         * as/mcs51/clean.mk
8060         * as/z80/Makefile
8061         * Makefile
8062         * clean.mk
8063         * debugger/mcs51/Makefile.in
8064         * debugger/mcs51/clean.mk
8065         * link/z80/Makefile
8066         * link/z80/Makefile.in
8067         * link/z80/clean.mk
8068         * link/Makefile
8069         * packihx/Makefile.in
8070         * packihx/clean.mk
8071         * sim/ucsim/Makefile
8072         * sim/ucsim/clean.mk
8073         * sim/ucsim/avr.src/Makefile.in
8074         * sim/ucsim/avr.src/clean.mk
8075         * sim/ucsim/s51.src/Makefile.in
8076         * sim/ucsim/s51.src/clean.mk
8077         * sim/ucsim/xa.src/Makefile.in
8078         * sim/ucsim/xa.src/clean.mk
8079         * sim/ucsim/z80.src/Makefile.in
8080         * sim/ucsim/z80.src/clean.mk
8081         * sim/ucsim/main_in.mk
8082         * sim/ucsim/packages_in.mk
8083         * sim/ucsim/gui.src/Makefile.in
8084         * sim/ucsim/gui.src/serio.src/Makefile.in
8085         * sim/ucsim/gui.src/serio.src/clean.mk
8086         * src/Makefile.in
8087         * src/clean.mk
8088         * support/cpp2/Makefile.in
8089         * support/cpp2/clean.mk
8090         * support/makebin/Makefile
8091         * support/makebin/clean.mk
8092         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8093         * doc/sdccman.lyx: --program-suffix no longer needed
8094
8095 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8096
8097          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8098          Martin Helmling added support for ddd GUI debugger.
8099          Code added to display assembly, set variables, and other commands
8100          to interface to ddd.
8101
8102 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8103
8104         * as/Makefile: fix target clean
8105         * as/clean.mk: fix target clean
8106         * as/z80/clean.mk: fix target clean
8107
8108 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8109
8110         * Makefile.common.in: added  AT EXEEXT AT
8111         * configure.in: removed all mingw32 stuff
8112         * configure: rebuilt from configure.in
8113         * doc/sdccman.lyx: updated section "installation"
8114         * support/scripts/sdcc_mingw32: adapted to configure
8115         * support/scripts/sdcc_cygwin_mingw32: added
8116
8117 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8118
8119         * src/pic Added object file support for the PIC port
8120         * src/pic Applied patch from Craig Franklin (this started the object file support)
8121         * src/regression Updated the PIC regression tests for object files
8122
8123 2003-04-20  Borut Razem <borut.razem AT siol.net>
8124
8125         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8126           lklex.c: In function `getfid':
8127           lklex.c:203: warning: array subscript has type `char'
8128         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8129           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8130         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8131           stack handling macros
8132
8133 2003-04-19  Borut Razem <borut.razem AT siol.net>
8134
8135         * "handling space characters in file path" task:
8136         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8137         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8138         * support/Util/MySystem.h: make it self-sufficient
8139         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8140           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8141           handling space characters in file path
8142         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8143           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8144         * support/Util/MySystem.c: handling space characters in executable's path
8145
8146 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8147
8148         * as/z80/Makefile: fix permanent rebuild of z80
8149         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8150         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8151
8152 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8153
8154         * src/SDCCopt.c: add special case optimization to replace modulo by
8155           a power of two with a bitwise AND.
8156
8157 2003-04-18    <johan AT balder>
8158
8159         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8160
8161 2003-04-17    <johan AT balder>
8162
8163         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8164         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8165
8166 2003-04-13  Borut Razem <borut.razem AT siol.net>
8167
8168         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8169         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8170           fixed mingw problem in adl_NORMALIZE_PATH
8171
8172 2003-04-12  Borut Razem <borut.razem AT siol.net>
8173
8174         * fixed "#pragma SAVE/RESTORE can not be nested":
8175         * src/SDCC.lex: reworked pragma handling functions
8176         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8177         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8178
8179 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8180
8181         * src/SDCCutil.c (pathEquivalent): defined but not used
8182         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8183         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8184         * configure: rebuilt from configure.in
8185         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8186         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8187         * device/include/Makefile.in: replace sdcc_datadir
8188         * device/lib/Makefile.in: replace sdcc_datadir
8189         * Makefile.common.in: add LDFLAGS from configure
8190         * packihx/Makefile.in: use LDFLAGS
8191         * src/Makefile.in: use LDFLAGS
8192         * support/cpp2/Makefile.in: add LDFLAGS from configure
8193         * support/makebin/Makefile: use LDFLAGS
8194         * .version: bumped version number to 2.3.5
8195
8196 2003-04-12  Borut Razem <borut.razem AT siol.net>
8197
8198         * completed "different paths" task:
8199         * src/SDCCmacro.c: fixed bug in handling quotes
8200         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8201         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8202
8203 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8204
8205         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8206
8207 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8208
8209         * ds390/gen.c ds390/peeph.def: fix bug 706781
8210
8211 2003-04-11  Borut Razem <borut.razem AT siol.net>
8212
8213         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8214
8215 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8216
8217         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8218         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8219          set - this bit used to not be set...).
8220         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8221           bad code in PIC Port
8222         * src/regression/and2.c added to test bug 609268
8223         * src/regression/Makefile added and2.c to regression test
8224
8225
8226 2003-04-08    <johan AT CP255758-A>
8227
8228         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8229         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8230         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8231
8232 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8233
8234         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8235         fix bug #487815
8236         * support/cpp2/Makefile.in: fix bug #487815
8237         * configure: rebuilt from configure.in
8238         * Makefile.common.in: docdir changed, new path suffixes
8239         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8240         * sdcc_vc_in.h: reflect changes from sdccconf.h
8241         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8242         * src/SDCCutil.h: remove BINDIR hack
8243         * doc/sdccman.lyx: update new path hierarchy
8244
8245 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8246
8247         * src/SDCCpeeph.c: added okToRemoveSLOC test
8248
8249 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8250
8251         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8252
8253 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8254
8255         * src/SDCCpeeph.c: added labelIsReturnOnly test
8256         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8257
8258 2003-04-05    <johan AT balder>
8259
8260         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8261         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8262         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8263         * src/SDCCast.c: fixed a warning
8264         * src/SDCCast.h: fixed a warning
8265         * src/SDCCicode.c (operandFromAst): fixed a warning
8266
8267 2003-04-04    <johan AT balder>
8268
8269         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8270         * src/SDCCast.c (decorateType): fixed bug #715076
8271         * src/SDCC.y: fixed bug #702907
8272
8273 2003-04-03    <johan AT balder>
8274
8275         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8276         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8277         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8278         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8279         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8280
8281 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8282
8283         * _decdptr.c: fix return values
8284         * _gptrget.c: fix return values
8285         * _gptrgetc.c: fix return values
8286         * _gptrput.c: fix return values
8287         * _mulint.c: fix return values
8288         * as/z80/Makefile: fix 'make -j' problem
8289
8290 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8291
8292         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8293         * configure.in: big cleanup, updated to autoconf 2.5x
8294         * configure: rebuilt from configure.in
8295         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8296         * sdcc_vc_in.h: reflect changes from sdccconf.h
8297         * doc/Makefile: fixed a flaw in "make install"
8298
8299 2003-04-02    <johan AT balder>
8300
8301         * src/ds390/gen.c (genCmp): no comments
8302         * src/mcs51/gen.c (genCmp): no comments
8303         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8304         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8305
8306 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8307
8308         * support/regression/generate-cases.py: place generated file in given sub directory
8309         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8310         * support/regression/Makefile: improvements for 'make -j';
8311         side effect: it's simpler and faster now
8312
8313 2003-03-31  Borut Razem <borut.razem AT siol.net>
8314
8315         * src/z80/main.c: link-{port} and as-{port} defined without path
8316         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8317
8318 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8319
8320         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8321
8322 2003-03-30  Borut Razem <borut.razem AT siol.net>
8323
8324         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8325           changed type of list parameter to set
8326         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8327         * src/port.h: changed type of do_assemble() parameter to set
8328         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8329           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8330           definition of "cppoutfilename" macro with NULL value in preProcess()
8331         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8332         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8333         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8334           replaced with set *binPathSet
8335         * shash_add() deallocates the item, if allready exsists, before adding the new one
8336         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8337
8338 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8339
8340         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8341           a nested for loop bug in the PIC port
8342         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8343           for loops
8344
8345 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8346
8347         * support/Util/dbuf.h: remove C++ stuff to make it portable
8348
8349 2003-03-28  Borut Razem <borut.razem AT siol.net>
8350
8351         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8352           literal strings in stringLiteral()
8353         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8354         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8355           to the project
8356
8357 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8358
8359         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8360
8361 2003-03-26    <johan AT balder>
8362
8363         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8364         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8365         * src/SDCCast.c (decorateType): fixed " -v < 3"
8366
8367 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8368
8369         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8370         Added Lenny Story's debug infrastructure changes:
8371         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8372         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8373         * src/cdbFile.c: added
8374         * src/SDCCdebug.c: added
8375         * src/SDCCdebug.h: added
8376         * src/SDCCast.c (createFunction)
8377         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8378         * src/SDCCmain.c (parseCmdLine, main)
8379         * src/SDCCmem.c (redoStackOffsets)
8380         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8381         * src/SDCCsymt.h
8382         * src/common.h
8383         * src/avr/gen.c (genAVRCode)
8384         * src/ds390/gen.c (gen390Code)
8385         * src/mcs51/gen.c (gen51Code)
8386         * src/pic/gen.c (genpic14Code)
8387         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8388         * src/xa51/gen.c (genXA51Code)
8389         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8390
8391 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8392
8393         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8394         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8395
8396 2003-03-22    <johan AT balder>
8397
8398         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8399
8400 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8401
8402         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8403         * doc/cdbfileformat.lyx: added, written by Lenny Story
8404         * doc/Makefile: added cdbfileformat.lyx
8405         * doc/clean.mk: added cdbfileformat.lyx
8406
8407 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8408
8409         * src/mcs51/peeph.def: fix bug #705773
8410
8411 2003-03-20    <johan AT balder>
8412
8413         An sfr/sbit can have an "at #" AND an initializer
8414         * src/SDCCsymt.c (checkSClass):
8415         * src/SDCCmem.c (allocGlobal):
8416         * src/SDCCmem.c (allocLocal):
8417         * src/SDCCast.c (createBlock):
8418
8419 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8420
8421         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8422
8423 2003-03-16    <johan AT balder>
8424
8425         Undid the hackup of const and volatile, the problem is much bigger
8426         * src/SDCC.y:1.65
8427         * src/SDCCast.c:1.171
8428         * src/SDCCglue.c:1.138
8429         * src/SDCCicode.c:1.146
8430         * src/SDCCsymt.c:1.150
8431         * src/SDCCval.c:1.65
8432
8433 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8434
8435         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8436         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8437
8438 2003-03-13    <johan AT balder>
8439
8440         Hackup const and volatile modifiers in type chains a bit:
8441         * src/SDCC.y:1.63
8442         * src/SDCCast.c:1.169
8443         * src/SDCCglue.c:1.136
8444         * src/SDCCicode.c:1.143
8445         * src/SDCCsymt.c1.146
8446         * src/SDCCsymt.h1.59
8447         * src/SDCCval.c:1.63
8448
8449 2003-03-12    <johan AT balder>
8450
8451         * src/SDCCBBlock.h: more LRH debugging junk
8452         * src/SDCCcflow.h: more LRH debugging junk
8453         * src/SDCCloop.c: more LRH debugging junk
8454         * src/SDCC.y (struct_declaration): fixed bug #697590
8455         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8456         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8457         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8458
8459 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8460         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8461         test function names must now match exactly).
8462         * src/SDCCcse.c: added special case in findCheaperOp to allow
8463         extending a short integer. Makes less awful code for bug 700121 test case.
8464
8465 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8466
8467         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8468         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8469
8470 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8471
8472         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8473         actually called (operandsNotEqual() was called for all
8474         operandsNotEqualX tests).
8475
8476 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8477
8478         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8479         with shorter literals. Fixes bug 700121.
8480
8481 2003-03-11    <johan AT balder>
8482
8483         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8484
8485 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8486
8487         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8488         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8489
8490 2003-03-10  Borut Razem <borut.razem AT siol.net>
8491
8492         * src/SDCCmain.c: pipe preprocessor's output
8493         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8494         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8495         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8496         which closes all pipes in pipeSet set
8497         * src/SDCCset.c: free deleted item in function deleteSetItem()
8498         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8499         moved from z80 to src subproject
8500         * .version: increased version number to 2.3.4
8501
8502 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8503
8504         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8505         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8506         * support/regression/ports/xa51/spec.mk: fix typo
8507
8508 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8509
8510         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8511
8512 2003-03-09  Borut Razem <borut.razem AT siol.net>
8513
8514         * src/SDCCmain.c: pipe preprocessor's output
8515         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8516         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8517         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8518         which closes all pipes in pipeSet set
8519         * src/SDCCset.c: free deleted item in function deleteSetItem()
8520         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8521         moved from z80 to src subproject
8522
8523 2003-03-09  Borut Razem <borut.razem AT siol.net>
8524
8525         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8526         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8527         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8528         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8529         * src/SDCCglobl.h: unification of WIN32 native definitions
8530
8531 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8532
8533         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8534
8535 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8536
8537         * src/configure.in:   check for endianess (even while cross-compiling)
8538         * src/configure:      check for endianess (even while cross-compiling)
8539         * src/configure_in.h: check for endianess (even while cross-compiling)
8540         * src/avr/gen.c:        remove old endianess stuff
8541         * src/mcs51/gen.c:      remove old endianess stuff
8542         * src/ds390/gen.c:      remove old endianess stuff
8543         * src/pic/gen.c:        remove old endianess stuff
8544         * src/pic/genarith.c:   remove old endianess stuff
8545         * src/pic/glue.c:       fix endianess check
8546         * src/pic16/gen.c:      remove old endianess stuff
8547         * src/pic16/genarith.c: remove old endianess stuff
8548         * src/pic16/glue.c:     fix endianess check
8549         * src/xa51/gen.c:       remove old endianess stuff
8550         * src/z80/gen.c:        fix endianess check
8551         * src/SDCCglue.c:       fix endianess check
8552         * src/ds390/peeph.def: fix bug 700036
8553
8554 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8555
8556         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8557         * src/configure: find appropriate data-types on host for SDCC's int and long
8558         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8559         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8560         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8561
8562 2003-03-07    <johan AT balder>
8563
8564         Just a big NOOP:
8565                 some minor cleanups before the big shot
8566                 OP_DEFS and OP_USES now use Kevin's protection
8567                 new option --nolabelopt
8568
8569         * src/SDCCBBlock.c:
8570         * src/SDCCast.c,:
8571         * src/SDCCcflow.c:
8572         * src/SDCCcse.c:
8573         * src/SDCCicode.c:
8574         * src/SDCCicode.h:
8575         * src/SDCClabel.c:
8576         * src/SDCCloop.c:
8577         * src/SDCCmain.c:
8578         * src/ds390/ralloc.c:
8579         * src/mcs51/ralloc.c:
8580         * src/pic/ralloc.c:
8581         * src/xa51/ralloc.c:
8582         * src/z80/ralloc.c:
8583
8584 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8585
8586         * src/pic/pcode.c (get_op): fix 64 bit warnings
8587         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8588         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8589         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8590         * support/regression/tests/malloc.c: fix 64 bit warnings
8591
8592 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8593
8594         * src/mcs51/gen.c (genMinus): fixed bug 696436
8595
8596 2003-03-02  Borut Razem <borut.razem AT siol.net>
8597
8598         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8599
8600 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8601
8602         * configure.in: test for mkstemp
8603         * sdccconf_in.h: add HAVE_MKSTEMP
8604
8605 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8606
8607         * device/include/ctype.h: removed warning while using --stack-auto
8608         * device/include/malloc.h: removed warning while using --stack-auto
8609         * device/include/string.h: removed warning while using --stack-auto
8610
8611 2003-02-23  Borut Razem <borut.razem AT siol.net>
8612
8613         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8614         because NDEBUG is defined (see man assert)
8615         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8616
8617 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8618
8619         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8620         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8621
8622 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8623
8624         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8625         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8626
8627 2003-02-18    <johan AT balder>
8628
8629         * as/mcs51/asmain.c (asmbl): module can start with a digit
8630         * as/z80/asmain.c (asmbl): module can start with a digit
8631
8632 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8633
8634         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8635         * src/asm.c: fix pipe() for Mingw32
8636
8637 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8638
8639         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8640         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8641         make -V work again; --c1mode reads now from stdin
8642         * doc/sdccman.lyx: added --c1mode
8643         * support/Util/SDCCerr.c: new messages for c1 mode
8644         * support/Util/SDCCerr.h: new messages for c1 mode
8645         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8646
8647 2003-02-15    <johan AT balder>
8648
8649         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8650
8651 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8652
8653         * doc/sdccman.lyx: Environment variables, -o and other minor things
8654
8655 2003-02-14    <johan AT balder>
8656
8657         * src/xa51/main.c: before anyone really tries to use it :)
8658
8659         * Install doc's in share/sdcc/doc
8660         * removed some obsolete files
8661         * Do a proper make distclean and uninstall
8662         M Makefile.common.in
8663         R sdccbuild.sh
8664         M as/Makefile
8665         M device/include/Makefile.in
8666         M device/lib/Makefile.in
8667         M doc/sdccman.lyx
8668         M link/Makefile
8669         M sim/ucsim/doc/Makefile.in
8670         M src/clean.mk
8671         R src/avr/peeph.rul
8672         R src/xa51/peeph.rul
8673         M support/cpp2/Makefile.in
8674         M support/makebin/Makefile
8675
8676
8677 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8678
8679         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8680
8681 2003-02-10  Borut Razem <borut.razem AT siol.net>
8682
8683         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8684         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8685         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8686         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8687         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8688         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8689         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8690         src/z80/Makefile.bcc: Borland Makefile cleanup
8691         * as/z80/Makefile.bcc: Added Borland Makefile
8692         * support/cpp2/borland.h: Removed
8693
8694 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8695
8696         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8697         * src/SDCC.lex: new pragma NOIV
8698         * src/SDCCglobl.h: new pragma NOIV
8699         * src/SDCCmem.c: new pragma NOIV
8700
8701 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8702
8703         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8704
8705 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8706
8707         * src/SDCCmain.c: signal handling is switched off by --debug
8708         * doc/Makefile: small fix for install; use clean.mk again
8709         * doc/clean.mk: clean *.pdf and *.html too
8710
8711 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8712
8713         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8714         * device/lib/printfl.c: fix a ds390 bug by making it portable
8715         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8716         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8717         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8718         * debugger/mcs51/cmd.c: converted multi-line string literals
8719         * sim/ucsim/globals.cc: converted multi-line string literals
8720         * src/SDCCmain.c: introduced signal handler to remove temp files
8721         * doc/Makefile: small tweaks, implement clean
8722         * doc: removed generated files
8723
8724 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8725
8726         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8727         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8728         Address Record is not correctly generated for DS390."
8729
8730 2003-02-02  Borut Razem <borut.razem AT siol.net>
8731
8732         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8733         * as/mcs51/asm.h: fixed compilation with Borland C
8734         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8735         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8736         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8737         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8738         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8739         src/z80/Makefile.bcc: delete $(LIB) only if exist
8740         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8741
8742 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8743
8744         * device/include/malloc.h: introduced NULL
8745         * device/include/string.h: introduced NULL
8746         * device/include/stdlib.h: introduced NULL
8747         * device/lib/_memcpy.c: removed NULL
8748         * device/lib/_strcat.c: removed NULL
8749         * device/lib/_strchr.c: removed NULL
8750         * device/lib/_strcmp.c: removed NULL
8751         * device/lib/_strcpy.c: removed NULL
8752         * device/lib/_strcspn.c: removed NULL
8753         * device/lib/_strlen.c: removed NULL
8754         * device/lib/_strncat.c: removed NULL
8755         * device/lib/_strncmp.c: removed NULL
8756         * device/lib/_strncpy.c: removed NULL
8757         * device/lib/_strpbrk.c: removed NULL
8758         * device/lib/_strrchr.c: removed NULL
8759         * device/lib/_strspn.c: removed NULL
8760         * device/lib/_strstr.c: removed NULL
8761         * device/lib/_strtok.c: removed NULL
8762         * device/lib/malloc.c: removed NULL, include own header
8763
8764 2003-02-02    <johan AT balder>
8765
8766         * 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
8767         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8768         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8769         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8770         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8771         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8772
8773 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8774
8775         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8776         area 'DATA'"
8777
8778 2003-02-01    <johan AT balder>
8779
8780         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8781
8782 2003-01-31    <johan AT CP255758-A>
8783
8784         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8785
8786 2003-01-30    <johan AT balder>
8787
8788         * src/SDCCBBlock.c: automatic bug detection
8789         * src/SDCCicode.c: automatic bug detection
8790
8791 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8792
8793         * src/SDCCglobl.h:   now --xram-size 0 works
8794         * src/SDCCmain.c:    now --xram-size 0 works
8795
8796 2003-01-29    <johan AT balder>
8797
8798         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8799
8800 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8801
8802         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8803         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8804         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8805         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8806         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8807         * src/SDCCmain.c:    Added options --xram-size and --code-size
8808
8809 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8810
8811         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8812         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8813
8814 2003-01-27    <johan AT balder>
8815
8816         * src/SDCC.y: fixed bug #613764
8817
8818 2003-01-26    <johan AT balder>
8819
8820         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8821         * src/SDCCsymt.h: fixed bug #673374
8822         * src/SDCCglue.c: fixed bug #661910
8823         * src/SDCCast.c: fixed bug #458099 and 673374
8824
8825 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8826
8827         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8828         * as/mcs51/strcmpi.h: added
8829         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8830         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8831         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8832         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8833         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8834         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8835         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8836         * as/mcs51/Makefile.aslink: new module strcmpi
8837         * as/mcs51/Makefile.asx8051: new module strcmpi
8838         * as/mcs51/Makefil.bcc: new module strcmpi
8839         * as/mcs51/Makefile.in: new module strcmpi
8840         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8841
8842 2003-01-26    <johan AT balder>
8843
8844         * src/SDCCglue.c: reverted back to 1.124
8845         * src/SDCCast.c: reverted back to 1.156
8846         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8847
8848 2003-01-25    <johan AT balder>
8849
8850         * src/SDCCglue.c: A better fix for bug #661910
8851         * src/SDCCast.c: A better fix for bug #661910
8852         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8853
8854 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8855
8856         * src/Makefile.in: remove spawn.o
8857         * src/SDCCmain.c: remove spawn.h
8858         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8859         * src/spawn.c: removed
8860         * src/spawn.h: removed
8861         * support/regression/ports/ds390/spec.mk: link with -r
8862
8863 2003-01-24    <johan AT CP255758-A>
8864
8865         * src/ds390/gen.c (aopOp): fixed bug #667458
8866         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8867         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8868         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8869
8870 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8871
8872         * src/mcs51/peeph.def: better assembler identation by Frieder
8873         * src/mcs51/gen.c: better assembler identation by Frieder
8874
8875 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8876
8877         * as/z80/string.h: removed for gcc 3.2
8878         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8879         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8880
8881 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8882
8883         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8884         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8885         * support/regression/Makefile: separate temp files for ports
8886         * support/regression/generate-cases.py: separate temp files for ports
8887         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8888         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8889
8890 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8891
8892         * moved tinitalk to device/examples/ds390
8893
8894 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8895
8896         * as/mcs51/lkmem.c: rflag is for DS390
8897         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8898         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8899                          (linkEdit): move mem- and map-files the same way as ihx-files
8900         * src/z80/main.c (_setDefaultOptions): removed --generic
8901         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8902         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8903         * src/pic/glue.c (picglue): --c1mode works again
8904         * src/pic16/glue.c (pic16glue): --c1mode works again
8905         * src/asm.c (printCLine): fix #660034
8906
8907 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8908
8909         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8910         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8911         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8912         * as/mcs51/lkmem (summary): better fix for sp problem
8913         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8914         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8915         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8916                                               remove --stack-after-data
8917
8918 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8919
8920         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8921         * src/SDCCutil.c (join): ugly bug: missing '\0'
8922         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8923
8924 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8925
8926         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8927         * src/port.h: typo
8928         * src/pic/main.c (_asmCmd): gpasm supports -o
8929         * src/z80/main.c: more general macros
8930         * device/lib/Makefile.in: remove intermediate files
8931
8932 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8933
8934         * .version: Bumped version number to 2.3.3
8935         * src/SDCCBBlock.c: new option -o
8936         * src/SDCCglobl.h: new option -o
8937         * src/SDCCglue.c: new option -o
8938         * src/SDCCmain.c: new option -o
8939         * src/asm.c: new option -o
8940         * src/ds390/main.c: new option -o
8941         * src/pic/glue.c: new option -o
8942         * src/pic/pcode.c: new option -o
8943         * src/pic/ralloc.c: new option -o
8944         * src/pic16/glue.c: new option -o
8945         * src/pic16/pcode.c: new option -o
8946         * src/pic16/ralloc.c: new option -o
8947         * src/z80/main.c: new option -o
8948         * device/lib/Makefile.in: use -o
8949         * support/regression/ports/ds390/spec.mk: use -o
8950         * support/regression/ports/gbz80/spec.mk: use -o
8951         * support/regression/ports/mcs51/spec.mk: use -o
8952         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8953         * support/regression/ports/z80/spec.mk: use -o
8954         * support/regression/ports/ucz80/spec.mk: use -o
8955         * support/regression/ports/xa51/spec.mk: use -o
8956         * support/regression/fwk/lib/timeout.c: fix usage string
8957
8958 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8959         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8960
8961 2003-01-07    <johan AT balder>
8962
8963         * src/SDCCast.c (decorateType): fixed bug #600035
8964
8965 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8966         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8967         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8968         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8969         * src/pic/pcode.c: outcommented unused variable to remove warnings
8970         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8971
8972 2003-01-06    <karl AT turbobit.com>
8973         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8974    regression tests.
8975
8976 2003-01-06    <johan AT balder>
8977
8978         * src/SDCCicode.c: fixed array add
8979
8980 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8981         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8982         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8983
8984 2003-01-04    <johan AT balder>
8985
8986         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8987
8988 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8989         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8990
8991 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8992         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8993         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8994
8995 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8996         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8997
8998 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8999         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9000
9001 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9002         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9003
9004 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9005
9006     * in \sdcc\as\mcs51\ changed these files in order to create an
9007     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9008     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9009     following files to include the previous two files: aslink.dsp,
9010     Makefile.aslink, Makefile.bcc, and Makefile.in.
9011
9012     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9013     .adb instead of .cdb
9014
9015 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9016
9017         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9018         value from option --iram-size.
9019
9020 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9021
9022         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9023         dram[] array.
9024
9025 2002-09-18    <wiml AT hhhh.org>
9026
9027         * SDCClrange.h: exposed setFromRange() and setToRange()
9028         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9029           packRegsForAccUse() (bug 542397)
9030         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9031           multiple times and emitting the fetch operations more than once
9032           added aopGetUsesAcc() function to allow binary operators to
9033           fetch their operands in the correct order; made genMinus() emit
9034           compact code for X = LITERAL - Y
9035
9036 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9037         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9038         sprintf() in line 1267.
9039
9040 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9041         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9042         like ports.
9043
9044 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9045         Changes to aslink (All the changes are marked with 'JCF'):
9046
9047         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9048         summary().
9049
9050         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9051         area BSEG.  Also moves, if possible, the DATA area down into the internal
9052         ram so more space is available.
9053
9054         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9055         sflag.
9056
9057         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9058         not bytes.  Function summary() which creates a memory usage summary
9059         file with extension .mem.  Reports of overlaping stack and small stack
9060         size.  If the space for the stack is less than 16 bytes aslink trows a
9061         warning.
9062
9063         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9064         the 8051.  Option 'y' for memory summary output file.
9065
9066         Changes to sdcc (All the changes are marked with 'JCF'):
9067
9068         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9069
9070         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9071         overlaying area for it (uses RegBankUsed[4]).
9072
9073         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9074         bank zero as used by default.  By default aslink locates the stack
9075         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9076         the creation of the .mem file.  Delegates the allocation of data area
9077         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9078         the begining of the stack area to aslink.
9079
9080         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9081         glue() in SDCCglue.c creates an area for it.
9082
9083 2002-09-03  Borut Razem <borut.razem AT siol.net>
9084         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9085         sdcc/src/pic/glue.c:
9086         introduced atexit() handler for teporay files removal in case of
9087         errors, assertions, ...
9088
9089 2002-08-29  Borut Razem <borut.razem AT siol.net>
9090         * sdcc/support/cpp2/auto-host_vc_in.h:
9091         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9092         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9093         Maybe there is a similar problem with BORLANDC? It should be checked!
9094
9095         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9096         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9097         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9098         was not executed, and the compiler (cl) launched a warning:
9099         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9100
9101 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9102         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9103
9104 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9105         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9106
9107         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9108           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9109           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9110           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9111           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9112           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9113           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9114         - added Release configuration in VS projects
9115         - review of compiler an linker options
9116         - VC .exe files are generated in bin_vc directory, not to interfere
9117           with binaries generated from other projects (cygwin, mingw, bcc ...)
9118
9119         * sdcc/src/yacc.dsp: added
9120
9121         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9122         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9123         and insert the version number definitions from .version
9124
9125         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9126
9127         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9128         added - genarate auto-host.h using auto-host_vc_in.h as template
9129
9130         * sdcc/sdcc_vc.h,
9131         removed from CVS, generated automatically
9132
9133 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9134         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9135
9136 2002-08-11  Borut Razem <borut.razem AT siol.net>
9137         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9138
9139 2002-08-10  Borut Razem <borut.razem AT siol.net>
9140         * src/SDCCmain.c (main):
9141         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9142         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9143         The consequence was that some temporary files were not removed.
9144
9145         * src/SDCCglue.c:
9146         unification of code in functions tempfilename() and tempfile():
9147         function tempnam() is defined in Visual Studio 6.0 and .NET
9148
9149         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9150
9151         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9152           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9153         - removed compiler command line option /WX: Treats all warnings as errors
9154         - update a list of source files, included into the project
9155
9156         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9157           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9158         changed project type to Generic Project so that can be correcly converted to VS.NET project
9159
9160         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9161
9162         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9163
9164         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9165
9166         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9167         added return 0 statements after assert() to make compiler happy
9168
9169         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9170         added newline in the def file to keep MSC compiler satisfied
9171
9172         * sdcc/src/z80/gen.c:
9173         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9174           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9175         - solved MSC error in function aopDump()
9176
9177         * sdcc_vc.h: define PREFIX as "\\sdcc"
9178
9179 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9180         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9181
9182 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9183         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9184         - Rewrote the register banking algorithm.
9185         - Added pCode live-range analysis to registers (for now, only non-used and
9186         singly-used registers optimized away)
9187
9188         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9189
9190         * 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.
9191
9192 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9193         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9194
9195 2002-04-22  Michael Hope  <michaelh AT vroom>
9196
9197         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9198
9199         * configure.in (DD_COPT): Added include support required for gbdk.
9200
9201         * .version: Bumped version number just to increase it.
9202
9203         * src/SDCCmain.c: Added -nostdinc to the default options.
9204
9205 2002-04-15  Michael Hope  <michaelh AT vroom>
9206
9207         * device/lib/z80/printf.c (sprintf): Added.
9208
9209         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9210
9211         * src/z80/peeph.def: Added transpose redundent load rule.
9212
9213         * src/z80/main.c: Added force callee saves for jaune.
9214
9215         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9216
9217         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9218
9219 2002-03-28  Johan Knol  <johan AT balder>
9220
9221         * src/SDCCval.c: fixed bug #532436
9222
9223 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9224         * /src/port.h:
9225         Added "char *Processor" field to the port structure.
9226
9227         * /src/SDCCmain.c:
9228         Added -p option. Allows port dependent processor to be specified.
9229
9230         * all ports:
9231         Initialized the new field char *Processor field to NULL in all ports
9232
9233         * /src/pic/*:
9234         Compiler generated registers for interrupt context saving
9235         were not getting allocated.
9236
9237 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9238
9239         * /src/SDCCast.c:
9240         Fixed left shift. Will promote the left side of a left shift
9241         if a) left shifting more than size of operand or b) when assigned
9242         to something size > size of left side
9243
9244 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9245         * src/pic/*
9246         tons of changes. Register allocation has been
9247         rewritten. Added customization for the various PICs. Flow
9248         analysis is restructured. ...
9249
9250         * src/pic/device.h:
9251         Added
9252
9253         * src/pic/device.c:
9254         Added. device.c is a PIC port hack to accomodate variations
9255         in PIC devices.
9256
9257 2002-03-13  Michael Hope  <michaelh AT vroom>
9258
9259         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9260
9261 2002-03-04  johanknol  <johanknol AT manik>
9262
9263         * /src/SDCCval.c: fixed
9264
9265         const unsigned char arr[][2] = { { 0, 1 } };
9266         t18.c:1: error: Initializer element is not constant
9267
9268 2002-03-04  bela  <bela AT manik>
9269
9270         * /device/include/mcs51reg.h:
9271         ds89c420 register definition update
9272
9273 2002-03-03    <johan AT FRIJA>
9274
9275         * support/Util/SDCCerr.c: did something, but don't no why anymore
9276
9277         * support/regression/tests/bug-524691.c: made it a little less shy
9278
9279         * src/SDCCast.c (decorateType): fixed bug #524697
9280
9281         * src/SDCCast.c: made some lineno improvements
9282
9283         * src/SDCCval.c (getNelements): changed warning to error
9284
9285         * src/SDCCglue.c (printIvalArray): changed warning to error
9286
9287         * src/SDCCicode.c: fixed a warning for mingw
9288
9289         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9290
9291         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9292
9293 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9294
9295         * src/ds390/peeph.def:
9296         Added some more peephole rules
9297
9298         * src/ds390/gen.c: Various fixes & enhancements
9299
9300         * src/SDCClrange.c, src/SDCClrange.h:
9301         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9302
9303         * src/ds390/ralloc.c:
9304         various fixes & enhancements (ds390) specific
9305
9306         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9307         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9308         from rallocs.
9309
9310         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9311
9312 2002-03-02    <johan AT FRIJA>
9313
9314         * src/SDCCast.c (decorateType): fixed bug #524708
9315
9316         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9317
9318         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9319
9320 2002-03-01  Michael Hope  <michaelh AT vroom>
9321
9322         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9323
9324         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9325
9326 2002-03-01    <johan AT FRIJA>
9327
9328         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9329
9330         * src/SDCCast.c (decorateType): fixed bug #524209
9331
9332         * src/SDCCval.c (valNot): fixed bug #524195
9333
9334 2002-02-26    <johan AT balder>
9335
9336         * src/xa51/gen.c: fixed a warning
9337
9338         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9339
9340         * src/SDCCast.c (decorateType): fixed bug #522534
9341
9342 2002-02-23    <johan AT balder>
9343
9344         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9345
9346 2002-02-22    <johan AT balder>
9347
9348         * src/SDCCast.c: fixed bug #514865
9349
9350         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9351
9352 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9353
9354         * sdcc/src/SDCCloop.c:
9355         Previous fix was not good. basic blocks that have "break" or "return" are
9356         not really partof a loop , but live ranges used in these blocks should
9357         be live thru the entire loop, so set partOfLoop but don't add them to
9358         loop region
9359
9360 2002-02-21    <johan AT FRIJA>
9361
9362         * src/SDCCcse.c: fixed bug #514308
9363
9364 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9365
9366         * src/SDCCloop.c:
9367         Fixed BUG #519583. If a conditional block ended in a return/break
9368         statement inside a loop, it was not being considered part of the loop.
9369
9370         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9371
9372 2002-02-10  Karl Bongers <karl AT turbobit.com>
9373
9374         * debugger/*:
9375         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9376         with lots of comments and notes.
9377
9378         * device/examples/test2.c:
9379         Fix bug, "red" variable not being initialized(compiler complained).
9380
9381         * device/examples/Makefile, examples/test3.c:
9382         Add Makefile in device/examples folder, compiles test3.c
9383         for use as a multiple module SDCDB test case.
9384
9385         * sim/ucsim/cmd.src/cmdset.cc:
9386         Took out debug printfs in ucsim "next" command.
9387
9388         * sim/ucsim/xa.src:
9389         Karl and Johan start ucsim XA support.  Most dissassembly working,
9390         about 75% emulation done(plenty of work remaining).
9391
9392         * sim/ucsim/z80.src:
9393         Add Z80 support to ucsim, add test-ucz80 regression test,
9394         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9395         Notice z80 compiler fails on examples/test3.c/crc code.
9396
9397 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9398
9399         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9400         Added support for --parms-in-bank1
9401
9402         * src/ds390/peeph.def:
9403         added a few more peephole optimzations
9404
9405         * src/ds390/main.c:
9406         1) added __builtin_inp & __builtin_outp used to read in data of given length
9407            from a memory mapped port
9408         2) added __builtin_memcmp
9409         3) added __builtin_swapw swap bytes of a short
9410
9411         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9412         1) handle multiple send & receives from register bank1
9413         2) ralloc can now allocate DPTR1 to some liveRanges
9414
9415         * src/SDCCsymt.c, src/SDCCsymt.h:
9416         changes to handle multiple sends & receives
9417
9418         * src/SDCCptropt.h:
9419         added some pointer arithmetic optimization
9420
9421         * src/SDCCptropt.c:
9422         added some pointer arithmetic optimizations but not stable yet so not
9423         called from anywhere (will get this working shortly)
9424
9425         * src/SDCCopt.c: fixed for multiple sends & receives
9426
9427         * src/SDCCmain.c:
9428         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9429         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9430            set preprocessor defines (depending on options)
9431
9432         * src/SDCCicode.c, src/SDCCicode.h:
9433         changes made to handle multiple sends & receives
9434
9435         * src/SDCCglobl.h:
9436         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9437
9438         * src/SDCCcse.c, src/SDCCcse.h:
9439         added function findbackward def (to be used in upcoming optimization)
9440
9441         * src/SDCCcflow.c, src/SDCCcflow.h:
9442         added function returnAtEnd - to determine if a basic block terminates with
9443         a RETURN iCode
9444
9445         * src/SDCCast.c, src/SDCCast.h:
9446         added option parms-in-bank1
9447
9448         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9449         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9450         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9451         adjusted for --parms-in-bank1 option
9452
9453         * device/include/string.h:
9454         donot redefine "reentrant" keyword
9455
9456         * device/include/ds80c390.h: Added some more SFRs
9457
9458 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9459
9460         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9461
9462 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9463
9464         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9465
9466 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9467
9468         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9469
9470 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9471
9472         * Added --xram-movc option
9473
9474 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9475
9476         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9477
9478 2002-01-11  Johan Knol
9479
9480         * Added math lib of Jesus Calvino-Fraga
9481
9482 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9483
9484         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9485         * support/regression/Makefile: new target test-mcs51-stack-auto
9486         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9487
9488 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9489
9490         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9491
9492 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9493
9494         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9495
9496 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9497
9498         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9499
9500         * src/SDCCglue.h: add definition for printIvalChar()
9501
9502 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9503
9504         * src/SDCCast.c: fix #498138 by Johan
9505
9506         * src/SDCCglue.c: fix #498138 by Johan
9507
9508 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9509
9510         * support/regression/Makefile: fix clean
9511
9512         * support/regression/ports/ds390/support.c: fix transmission of last character
9513
9514 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9515
9516         * /sdcc/src/ds390/gen.c:
9517         a) improved computing address of stack variable
9518         b) took out some #if 0 code
9519         c) improved parmBytes adjustment
9520         d) improved genPlusIncr & genMinusIncr
9521         e) genCmp could generate bad code (when left assigned to DPTR)
9522         f) Fixed bug in hasInc
9523
9524         * /sdcc/src/ds390/ralloc.c:
9525         a) packRegsForSupport could mess up live information (Fixed)
9526         b) packRegsDPTRuse could be incorrect for left & right shift
9527
9528         * /sdcc/src/mcs51/ralloc.c:
9529         packRegsForSupport could mess up the live information (Fixed)
9530
9531         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9532
9533         * /sdcc/src/SDCCast.c:
9534         can reverse a loop even if function call is present as long
9535         as the loop control variable is local & is not passed as parameter
9536
9537 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9538
9539         * /sdcc/ChangeLog: *** empty log message ***
9540
9541         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9542         More builtin function additions for TININative
9543
9544         * /sdcc/src/ds390/ralloc.c:
9545         Had broken the regression testsuite
9546
9547         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9548
9549         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9550         Added funcattr hasStackParms will be set for reentrant functions when there
9551         are paramteres on the stack, this helps in minimizing frame pointer generation
9552         typeFromStr can handle function pointers now
9553
9554         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9555         *** empty log message ***
9556
9557 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9558
9559         * /src/ds390/gen.c, /src/ds390/main.c:
9560         More builtin function additions for TININative
9561
9562         * /src/ds390/ralloc.c:
9563         Had broken the regression testsuite
9564
9565         * /src/SDCCast.c: Fixed a bug in dumptree
9566
9567         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9568         Added funcattr hasStackParms will be set for reentrant functions when there
9569         are paramteres on the stack, this helps in minimizing frame pointer generation
9570         typeFromStr can handle function pointers now
9571
9572         * /doc/builtins.txt, /doc/TININative.txt:
9573         *** empty log message ***
9574
9575
9576 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9577
9578         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9579         ALPHA version for -mTININative
9580
9581         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9582         updated to reflect changes in the port structure
9583
9584         * /src/port.h:
9585         added function do_assemble (similar to do_link) if non-null this function
9586         will be called to do assembly (-mTININative) requires a multi command
9587         assembly
9588         added function genAssemblerEnd will be called to generate assembler Epilogue
9589
9590         * /src/SDCCsymt.c:
9591         added _JavaNative to debug info printing
9592
9593         * /src/SDCCmain.c: added option --tini-libid
9594         added port->do_assemble function (-mTININative) has a multi command assemble
9595
9596         * /src/SDCCglue.c: Disabled "constExpr" check
9597         added port->genAssemblerEnd function
9598
9599         * /src/SDCCglobl.h: Added option --tini-libid value
9600
9601         * /src/SDCCast.h:
9602         tookout optimizeCompare from the header (has no external references)
9603
9604         * /src/SDCCast.c: made one more function "static"
9605
9606 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9607
9608         * src/z80/mappings.i: Added z80asm support.
9609
9610         * src/z80/main.c: Added z80asm support on --asm=z80asm
9611
9612         * src/z80/gen.c: Fixed asm portability issues.
9613
9614         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9615
9616         * src/SDCCglue.c (printExterns): Added global/extern split.
9617
9618 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9619
9620         * support/regression/Makefile: added test for mcs51 model large
9621
9622         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9623
9624         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9625
9626 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9627
9628         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9629
9630 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9631
9632         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9633
9634         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9635
9636 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9637
9638         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9639
9640         * support/regression/tests/simplefloat.c: Port to mcs51.
9641
9642 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9643         * support/regression/tests/bug-485362.c: Added.
9644
9645         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9646
9647         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9648
9649         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9650
9651         * src/z80/gen.c (aopDump): Added a dump function.
9652
9653 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9654         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9655
9656         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9657
9658         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9659
9660         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9661
9662         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9663
9664         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9665
9666         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9667
9668         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9669
9670         * support/regression/ports/ds390/support.c: Use tinibios.
9671
9672         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9673
9674 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9675
9676         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9677         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9678
9679         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9680
9681         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9682
9683 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9684
9685         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9686
9687         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9688         (packRegsForIYUse): Created and optimised.
9689
9690 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9691
9692         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9693 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9694
9695         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9696
9697         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9698
9699         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9700
9701 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9702
9703         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9704
9705         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9706
9707 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9708
9709         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9710
9711         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9712
9713         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9714
9715 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9716
9717         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9718         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9719         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9720
9721         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9722
9723         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9724         (genNotFloat): Added.
9725         (genUminusFloat): Added.
9726
9727         * device/lib/z80/Makefile: Added floating pt stubs.
9728
9729         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9730
9731         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9732
9733         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9734
9735 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9736
9737         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9738
9739         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9740
9741         * sdcc/support/regression/Makefile: Add port ds390.
9742
9743         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9744
9745         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9746
9747         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9748
9749         * sdcc/support/regression/ports/ds390/support.c: Added.
9750
9751         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9752
9753         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9754
9755         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9756
9757 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9758
9759         * device/include/malloc.h: Added z80 and gbz80 support.
9760
9761         * device/lib/gbz80/heap.s: Added.
9762
9763         * device/lib/z80/heap.s: Added.
9764
9765         * device/lib/malloc.c: Added z80 and gbz80 support.
9766
9767         * support/regression/tests/malloc.c (testMalloc): Added.
9768
9769         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9770
9771         * support/regression/tests/bug-478094.c: Added.
9772
9773         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9774
9775 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9776
9777         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9778
9779         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9780
9781         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9782
9783         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9784
9785         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9786
9787 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9788
9789         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9790
9791 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9792
9793         * support/regression/tests/bug-477927.c: Added.
9794
9795         * src/z80/peeph.def: Added minor rules.
9796
9797         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9798
9799         * src/z80/peeph.def: Added jump optimisation modification.
9800
9801 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9802
9803         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9804
9805 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9806
9807         * support/regression/tests/funptrs.c: Added.
9808
9809 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9810
9811         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9812
9813 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9814
9815         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9816
9817         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9818
9819         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9820         (movLeft2ResultLong): Created.
9821
9822         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9823         (joinPushes): Added.  Joins two char pushes into a word push.
9824
9825 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9826
9827         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9828
9829         * support/makebin/Makefile (install): Added creation of dest dir.
9830
9831 2001-10-24 Karl Bongers <karl AT turbobit.com>
9832
9833         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9834
9835 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9836
9837         * src/z80/ralloc.c: Turned off faulty pack for one use.
9838
9839         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9840
9841         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9842
9843 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9844
9845         * support/regression/Makefile: Improved clean
9846
9847         * support/regression/ports/gbz80/spec.mk: Added clean
9848
9849         * support/regression/ports/host/spec.mk: Added clean
9850
9851         * support/regression/ports/z80/spec.mk: Added clean
9852
9853         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9854
9855         * support/regression/ports/mcs51/timeout.c: little improvements
9856
9857 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9858
9859         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9860
9861         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9862
9863         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9864
9865 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9866
9867         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9868
9869         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9870
9871 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9872         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9873
9874         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9875
9876         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9877
9878         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9879
9880         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9881
9882         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9883
9884         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9885
9886         * support/regression/tests/longor.c: Added.
9887
9888 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9889
9890         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9891
9892         * as/mcs51/aslink.h: define PATH_MAX
9893
9894         * as/mcs51/asm.h: define PATH_MAX
9895
9896         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9897
9898         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9899
9900         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9901
9902         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9903
9904         * src/SDCCglobl.h: define PATH_MAX
9905
9906         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9907
9908         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9909
9910 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9911
9912         * src/z80/gen.c (gencjneshort): Fixed
9913
9914         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9915
9916 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9917
9918         * support/regression/tests/bug-469671.c: Added.
9919
9920         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9921
9922 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9923
9924         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9925
9926         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9927
9928 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9929
9930         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9931
9932         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9933
9934         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9935
9936         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9937
9938         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9939
9940         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9941
9942         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9943
9944 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9945
9946         * 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.
9947
9948         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9949
9950         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9951
9952 2001-10-07    <johan AT FRIJA>
9953
9954         * device/lib/gets.c (gets): fixed the return value.
9955
9956 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9957         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9958
9959         * 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.
9960
9961         * 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.
9962
9963         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9964
9965         * src/pic/gen.c: Removed Safe_strdup.
9966
9967         * configure.in: Added option to enable libgc support.
9968
9969         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9970         (bitVectUnion): Optimised.
9971         (bitVectIntersect): Optimised.
9972         (bitVectBitsInCommon): Optimised.
9973         (bitVectCplAnd): Optimised.
9974
9975         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9976
9977 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9978
9979         * src/SDCCmain.c: distinguish between assembler debug and plain options
9980
9981         * src/avr/main.c:   remove standard assembler options
9982
9983         * src/ds390/main.c: remove standard assembler options
9984
9985         * src/mcs51/main.c: remove standard assembler options
9986
9987         * src/port.h: removed "PENDING" comment
9988
9989 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9990
9991         * src/device/lib/_mulint.c  : new, with assember functions
9992
9993         * src/device/lib/_mullong.c : new, with assember functions
9994
9995         * src/device/lib/_divuint.c : with assember functions
9996
9997         * src/device/lib/_divsint.c : with assember functions
9998
9999         * src/device/lib/_divulong.c: with assember functions
10000
10001         * src/device/lib/_divslong.c: with assember functions
10002
10003         * src/device/lib/_moduint.c : with assember functions
10004
10005         * src/device/lib/_modsint.c : with assember functions
10006
10007         * src/device/lib/_modulong.c: with assember functions
10008
10009         * src/device/lib/_modslong.c: with assember functions
10010
10011         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10012
10013         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10014
10015         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10016                                       replaced _mululong.c and _mulslong.c by _mullong.c
10017
10018 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10019
10020         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10021
10022 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10023
10024         * src/SDCCglue.c: test, if win32api is available for MINGW
10025
10026 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10027
10028         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10029         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10030         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10031         * support/regression/ports/host/spec.mk: removed GENERIC
10032         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10033         * support/regression/ports/z80/spec.mk: removed GENERIC
10034
10035 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10036
10037         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10038
10039         * support/regression/tests/bug-467035.c: Created.
10040
10041 2001-10-01    <johan AT FRIJA>
10042
10043         * src/SDCC.y: fixed bug #466586 part 1
10044
10045 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10046
10047         * SDCCicode.c: z80 has no generic pointers
10048         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10049
10050 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10051
10052         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10053
10054 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10055
10056         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10057
10058         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10059
10060 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10061
10062         * configure.in: Fixed up so that ucsim is only configured once.
10063
10064         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10065
10066         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10067         (getPathDifference): As above.
10068
10069         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10070
10071         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10072
10073 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10074         * .version: Updated to 2.3.1
10075
10076         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10077         Added copyright header.
10078
10079         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10080         (assemble): Added support for macro based assembler commands.
10081         (linkEdit): Added support for macro based linker commands.
10082         (preProcess): Changed the pre-processor to use macros.
10083         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10084         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10085
10086         * device/lib/z80/crt0.s: Added module name for debugging.
10087
10088 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10089
10090         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10091
10092         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10093
10094         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10095
10096         * src/Makefile.in: Added SDCCmacro and SDCCutil
10097
10098 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10099
10100         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10101
10102 2001-09-16    <johan AT FRIJA>
10103
10104         * 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.
10105
10106 2001-09-15    <johan AT FRIJA>
10107
10108         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10109         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10110
10111 2001-09-11    <johan AT FRIJA>
10112
10113         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10114
10115 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10116
10117         * support/regression/tests/bug-460444.c: Added test case.
10118
10119         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10120         (genCast): Added justification for all of the asserts.
10121
10122 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10123
10124         * support/regression/support.c: _xdata replaced by xdata
10125
10126         * support/regression/spec.mk: removed _generic
10127
10128 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10129
10130         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10131
10132         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10133         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10134
10135         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10136
10137         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10138
10139         * support/regression/tests/bug-460010.c: Added test case.
10140
10141         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10142
10143 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10144
10145         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10146
10147         * support/regression/testfwk.c: removed workaround for bug #436344
10148
10149         * support/regression/tests/bp.c: use less memory with mcs51
10150
10151         * support/regression/tests/bug-441448.c: use less memory
10152
10153         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10154
10155         * support/regression/collate-results.py: typo
10156
10157 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10158
10159         * support/regression/tests/fetchoverlap.c: Added new test case.
10160
10161         * support/regression/tests/bp.c: Added new test case.
10162
10163         * support/regression/tests/bug-448984.c: Added new test case.
10164
10165         * support/regression/tests/pow2shifts.c: Added new test case.
10166
10167         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10168         (genlshTwo): Fixed right shift for count > 8.
10169
10170         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10171
10172 2001-09-08    <johan AT FRIJA>
10173
10174         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10175
10176 2001-09-07    <johan AT FRIJA>
10177
10178         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10179
10180         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10181
10182 2001-09-06    <johan AT FRIJA>
10183
10184         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10185         * bernhard noted me at this: "() equals to (void)" (1.38)
10186
10187 2001-09-05    <johan AT FRIJA>
10188
10189         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10190
10191 2001-09-04    <johan AT FRIJA>
10192
10193         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10194
10195
10196 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10197
10198         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10199
10200 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10201
10202         * link/z80/aslink.h: Fixed path for PATH_MAX
10203
10204 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10205
10206         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10207
10208         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10209
10210         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10211
10212         * 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.
10213
10214 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10215
10216         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10217         (genCmp): Fixed up genCmp for the GB with longs.
10218
10219         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10220
10221         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10222
10223         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10224
10225         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10226
10227 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10228
10229         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10230
10231 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10232
10233         * 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.
10234
10235         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10236
10237 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10238
10239         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10240
10241         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10242
10243 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10244
10245   * sim/ucsim/configure:    little improvement of Cygwin-detection
10246   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10247   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10248   * support/regression/tests/bug-221100.c: small changes for mcs51
10249   * support/regression/tests/bug-221168.c: small changes for mcs51
10250   * support/regression/tests/bug-227710.c: small changes for mcs51
10251   * support/regression/tests/staticinit.c: small changes for mcs51
10252   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10253   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10254   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10255
10256 $Revision$