device/include/mcs51/at89c51snd1c.h: added file submitted by Weston T. Schmidt <schmi...
[fw/sdcc] / ChangeLog
1 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2
3         * device/include/mcs51/at89c51snd1c.h: added file submitted by 
4           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
5
6 2005-11-27 Borut Razem <borut.razem AT siol.net>
7
8         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
9           support/cpp2/mkdeps.h: added command line option
10           -obj-ext=<extension> to SDCPP to define object file externion, used
11           for generation of make dependencies (-M)
12         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
13
14 2005-11-26 Borut Razem <borut.razem AT siol.net>
15
16         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
17           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
18           added pic and pic16 libraries
19
20 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
21
22         * device/include/float.h: Corrected typo in prototype of __fsgt
23
24 2005-11-25 Borut Razem <borut.razem AT siol.net>
25
26         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
27           added creation of model-mcs51-stack-auto libraries
28
29 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
30
31         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
32         and fields-list too
33         * src/SDCCast.c (createIvalArray): removed obsolete comment
34
35 2005-11-24 Borut Razem <borut.razem AT siol.net>
36
37         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
38           added missing device/lib/mcs51/crt*.asm sources
39
40 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
41
42         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
43
44 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
45
46         * device/lib/_fs2schar.c,
47         * device/lib/_fs2sint.c,
48         * device/lib/_fs2slong.c: optimized inline asm
49
50 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
51
52         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
53           Better handling of floats between -1.0 and 0.0.
54
55 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
56
57         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
58           (the missing "if"s prohibited removal of redundant labels)
59
60 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
61
62         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
63           Properly convert floats between -1.0 and 0.0 to long, int, and char
64           types (max integer value of negative floats tends to zero).
65         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
66           Removed changes made so to work properly with floats between
67           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
68           and _fs2char.c
69
70 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
71
72         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
73         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
74         (genCast) cosmetic change
75         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
76         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
77         from mcs51
78         * support/regression/tests/bitfields (testSignedBitfields): added
79
80 2005-11-18 Borut Razem <borut.razem AT siol.net>
81
82         * sdcc/device/lib/Makefile.in: remove all unnecessary files
83         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
84           introduced SILENT option to make building of pic16 libraries less
85
86 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
87
88         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
89           Now they work properly with floats between -1.0 and 0.0
90         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
91
92 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
93
94         * src/SDCCicode.c (printOperand): added missing else
95
96 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
97
98         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
99         reformatted for better readability
100         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
101         signed bitfields
102
103 2005-11-17 Borut Razem <borut.razem AT siol.net>
104
105         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
106           introduced SILENT option to make building of pic16 libraries less
107           verbose - used for nightly snapshot build
108         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
109           available on Win32 platforms.
110         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
111           medium, large, pic and pic16
112
113 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
114
115         * device/lib/printf_large.c: Temporary patch for bug 1358192:
116           printf("%f"...) sets fraction to zero.
117
118 2005-11-16 Raphael Neider <rneider AT web.de>
119
120         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
121           fixes #1357221
122         * src/pic/gen.c (genIfx): implemented for CARRY bit
123         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
124           to generic pointers, fixes #1357332,
125           (pic16_movLit2f): NEW,
126           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
127
128 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
129
130         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
131
132 2005-11-11 Raphael Neider <rneider AT web.de>
133
134         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
135         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
136           compute pointer's type from operand,
137           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
138           improved single bit reads, fixes bug #1353379
139
140 2005-11-09 Borut Razem <borut.razem AT siol.net>
141
142         * support/scripts/sdcc.nsi: added lib/pic to the package
143
144 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
145
146         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
147
148 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
149
150         * support/regression/tests/bug1348008.c: added
151         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
152         * support/regression/tests/bug1337835.c: updated comment
153
154 2005-11-06 Borut Razem <borut.razem AT siol.net>
155
156         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
157           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
158           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
159           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
160           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
161           dynamic construction of cl_error_class and derivates - 2.nd try
162
163 2005-11-05 Borut Razem <borut.razem AT siol.net>
164
165         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
166           bug, which caused Bus Errors on sparc solaris
167
168 2005-11-04 Borut Razem <borut.razem AT siol.net>
169
170         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
171           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
172           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
173           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
174           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
175           and derivates to resolve the initialization problem on OSX
176
177 2005-11-02 Borut Razem <borut.razem AT siol.net>
178
179         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
180           corrected typo - #include <winsock2.h>
181
182 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
183
184         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
185           (_asxxxx_mapping): added org directive for future enhancements
186
187 2005-11-01 Borut Razem <borut.razem AT siol.net>
188
189         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
190           enabled sockets on WIN32
191         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
192
193 2005-10-31 Borut Razem <borut.razem AT siol.net>
194
195         * support/regression/generate-cases.py: escape backslashes in {testcase}:
196           WIN32 backslash path delimiters should be escaped when used in C strings
197         * support/regression/tests/bitfields.c: exclude failing assertions for
198           __CYGWIN32__ and __MINGW32__ hosts
199
200 2005-10-30 Borut Razem <borut.razem AT siol.net>
201
202         * src/SDCCutil.c: corrected double comparison typo
203
204 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
205
206         * device/lib/medium/Makefile: added for new memory model medium
207         * device/include/asm/mcs51/features.h: updated for medium/pdata
208         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
209           added Multiply & Accumulate sbit's and MAC0_PAGE define
210         * device/include/mcs51/c8051f300.h: added sfr16 definitions
211         * device/include/mcs51/c8051f310.h: added sfr16 definitions
212         * device/lib/_mullong.c: update for medium model
213         * device/lib/incl.mk: added medium model
214         * doc/sdccman.lyx: documented medium model
215         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
216         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
217         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
218         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
219           (allocParms): set SCLS and OCLS to pdata for medium model
220         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
221           for pdata,
222           (powof2): return <0 if not power of 2
223         * src/avr/gen.c (genBitWise): use updated powof2
224         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
225           (shiftR2Left2Result): small optimization in setup, save acc when storing,
226           (shiftLLeftOrResult): use B if necessary
227         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
228         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
229         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
230         * support/regression/Makefile.in: added test-mcs51-medium
231         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
232
233 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
234
235         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
236         specifier unsigned
237         * device/lib/time.c (mktime): fixed bug 1334315
238
239 2005-10-28 Raphael Neider <rneider AT web.de>
240
241         * device/include/pic/p16f_common.inc: added common declarations
242         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
243
244 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
245
246         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
247           (aopPutUsesAcc): added to predict accumulator use,
248           (assignResultValue): save acc if necessary,
249           (genMinusDec): store result if indirectly addressed,
250           (genDivOneByte):  save acc if necessary,
251           (movLeft2Result): bugfix if left already in acc,
252           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
253             attention to accumulator use (esp. pdata),
254           (genReceive): receive pdata correctly
255         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
256         * src/SDCCicode.h: added isOperandInPagedSpace prototype
257
258 2005-10-27 Raphael Neider <rneider AT web.de>
259
260         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
261
262 2005-10-27 Raphael Neider <rneider AT web.de>
263
264         * .version: changed version to 2.5.4
265         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
266         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
267           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
268             arithmetics support routines
269         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
270         * device/lib/Makefile.in: also create installdir for pic
271
272         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
273           pic14 port as well
274         * src/pic/device.c (dump_sfr): rewritten to delegate register
275           placement to the linker (use `extern sym' rather than sym EQU addr),
276           (validAddress): fixed to check last specified address
277         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
278           (popGetLit): truncate literal value to 8 bit,
279           (popGet): moved assert to more appropriate place
280           (popGetExternal): create pCode operand from and mark the according
281             symbol as being `extern'
282           (popGetAddr): added sanity check on immediate's offset, provide
283             GPOINTER tag on demand
284           (aopPut): fixed for immediates,
285           (mov2w_op): move operand's address or contents to WREG (depending on
286             operand type), safer variant of mov2w,
287           (movwf,call_libraryfunc): NEW, handy abbreviations,
288           (get_argument_pcop,get_return_val_pcop,pass_argument,
289           get_returnvalue): interface for accessing function parameters and
290             return values,
291           (assignResultValuei,genRet): use new parameter/return value interface
292           (pic14_getDataSize): back to old version handling generic pointers,
293           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
294             provided implementation and/or fixed old one,
295           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
296             calls, removed legacy 8051 reference code
297           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
298           (loadSignToC): NEW, move the operands sign bit to CARRY,
299           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
300             genRightShiftSigned, accepts negative shift counts,
301           (setup_fsr): load FSR and adjust IRP (indirect memory access),
302           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
303             generic pointers, __data pointers and __code pointers,
304           (genUnpackBits,genPackBits): rewritten to work with generic pointers
305             and signed bitfields, limit bitfields to 8 bit,
306           (genDataPointerGet): fixed number of bytes read,
307           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
308           (genPointerGet,genPointerSet): fixed handling of __code pointers,
309             pointers to constant data are no longer assumed to point to __code
310             space, removed invalid pointer types,
311           (bitpatternFromVal): retrieve the PICs representation of an integer
312             or float literal,
313           (genDataPointerSet): fixed assigning to po_immediate operands,
314           (genGenPointerSet): implemented as library call,
315           (genIfx): fixed incorrect condition,
316           (genAddrOf): limit generic pointers' addresses to 2 bytes,
317             provide GPOINTER tag according to destination's storage class,
318           (genCast): added code to handle casting to generic pointers, added
319             sign-/zero extension of the result
320           (aop_isLitLike,op_isLitLike): fixed handling of immediates
321         * src/pic/gen.h: added macros to access IRP bit in STATUS register
322         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
323           extend the result
324         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
325           address/register resides in the shared banks
326           (emitSymbolToFile): improved to handle global and `pinned' symbols,
327             put all variables into separate sections (have the linker arrange
328             them)
329           (picglue): put init code and interrupt handlers in separate sections
330         * src/pic/main.c: added port specific options table, modified to PORT
331           structure to make GPOINTERs 3 byte, added pic14_options
332           (_pic14_do_link): private linking routine (update paths to libraries,
333             add libsdcc.lib by default)
334         * src/pic/main.h: declare pic14_options
335         * src/pic/pcode.c: fixed instructions i/o relations,
336           (RegCond): reverted to correct version,
337           (newpCodeOpLit): truncate literals to 8 bit,
338           (genericPrint): added debug output,
339           (getRegFromInstruction): fixed for various operand types, simplified
340           (BuildFlow): fixed broken handling of isntructions with labels
341           (LinkFlow): start at last instruction in flow (skip trailing comments),
342             pass the flow on to the next instruction after CALL
343           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
344           (insertPCodeInstruction): fixed inserting after a skip instruction,
345           (DoBankSelect): fixed for labeled instructions
346           (OptimizepBlock): honor --nopeep switch
347           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
348         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
349         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
350           (pCodeOptime2pCodes): allow disabling this optimization via
351             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
352             but is still buggy), started implementation of a dataflow based
353             pCode optimization (CSE + dead code elimination)
354           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
355         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
356           names are independant of the stack location and therefore portable across
357           devices
358
359 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
360
361         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
362           (selectSpil): fixed bug 1337835 by not spilling bit variables
363         * support/regression/tests/bug1337835.c: added test for this bug
364         * src/mcs51/peeph.def: restart after rule 3.c,
365           addded rules 263.x to optimize loading constants
366
367 2005-10-26 Raphael Neider <rneider AT web.de>
368
369         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
370         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
371           (genAssign): emit warning when casting literals to generic pointer
372             type, also applies when taking the address of a fixed variable,
373           (genCast): improved casting to generic pointers
374         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
375           extern variables, added verbose error message
376         * device/include/pic16/{string.h,errno.h}: added #pragma library c
377
378 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
379
380         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
381         carry must be complemented too
382         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
383         could be emitted by genMinus
384         * src/SDCCval.c (constVal): fixed bug 1305065
385
386 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
387
388         * src/SDCCast.c (addCast): added promotion for bit variables
389         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
390         promotion casts + optimisation
391         (optimizeGetWord): fix warning 'i' might be used uninitialized
392         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
393         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
394
395 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
396
397         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
398         all chars are promoted to int; promotion should be handled in SDCCast.c
399
400 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
401
402         * device/lib/_strcmp.c: Fixed bug 1326457
403
404 2005-10-11 Raphael Neider <rneider AT web.de>
405
406         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
407         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
408
409 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
410
411         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
412         * support/regression/tests/sfr16.c: added test for the sfr32 bug
413
414 2005-10-04 Raphael Neider <rneider AT web.de>
415
416         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
417           device/lib/pic16/pics.all: added pic18f1320
418         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
419
420 2005-09-30 Raphael Neider <rneider AT web.de>
421
422         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
423         * src/pic16/devices.inc: NEW, provides device descriptions
424         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
425
426 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
427
428         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
429           GETHBIT
430
431 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
432
433         * doc/sdccman.lyx: updated Highest Order Bit documentation,
434           documented Any Order Bit, Higher Order Byte and Higher Order Word
435         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
436         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
437           (optimizeGetAbit): new, to get any bit, not only the high bit,
438           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
439           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
440           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
441           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
442             RIGHT_OP: also try GETBYTE, GETWORD optimization,
443             GETABIT, GETBYTE, GETWORD: decorate them,
444           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
445           (ast_print): added GETABIT, GETBYTE, GETWORD
446         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
447         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
448           (geniCodeBinary): new generic binary icode,
449           (ast2iCode): added GETABIT, GETBYTE, GETWORD
450         * src/port.h: updated comment for PORT.hasExtBitOp
451         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
452           (genGetByte): new, to get a single byte,
453           (genGetWord): new, to get a word from a long,
454           (gen51Code): added GETABIT, GETBYTE, GETWORD
455         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
456
457 2005-09-23 Raphael Neider <rneider AT web.de>
458
459         * configure.in, configure: have device/lib/pic configured
460         * device/lib/Makefile.in: added model-pic14
461         * device/lib/clean.mk: added pic/ to clean rule
462         * device/lib/pic: added rudimentary pic14 library providing support
463           functions for multiplication/division/generic pointer access
464         * src/SDCCopt.c (convilong): mark support functions as extern
465           for pic14 port as well
466         * src/pic/gen.c (genMult): added assertions,
467           (genpic14Code): emit warning on unhandled iCodes
468         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
469         * src/pic/pcode.c (pCodeOpCopy),
470         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
471           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
472           SFR_REGISTER}), made safe for future extensions
473         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
474           instructions even if preceeded by SKIP instructions (also remove
475           them); removed unused code
476         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
477           prevents leaving parts of the structure uninitialized after copying
478
479 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
480
481         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
482           ago by me
483         * support/regression/tests/addsub.c: added test for the bug
484
485 2005-09-21 Raphael Neider <rneider AT web.de>
486
487         * device/include/pic16/pic18f1220.h,
488           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
489         * device/lib/pic16/Makefile.rules: added missing opening paren
490         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
491           are provided in genutils.c,
492           (genUminusFloat,genUminus,genCmpEq): added asserts on different
493           operand/result sizes,
494           (genCmp): assert on NULL pointers first, then check deref'ed values
495         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
496           result size
497
498 2005-09-18 Raphael Neider <rneider AT web.de>
499
500         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
501           as these are now unused,
502           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
503         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
504           local, avoids uninitialized pointer dereference on r->name
505         * src/pic16/ralloc.c (newReg): fixed indentation
506
507 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
508
509         * src/SDCCval.c (constVal): fixed bug 730366
510         * support/Util/SDCCerr.c,
511         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
512
513 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
514
515         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
516
517 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
518
519         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
520
521 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
522
523         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
524           (hex2dec): made hex_digit unsigned char, removed ascii dependance
525         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
526           (hex2dec): made hex_digit unsigned char, removed ascii dependance
527         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
528         * packihx/packihx.c (hexDigit): made c unsigned char
529         * as/mcs51/lklibr.c (fndsym),
530         * link/z80/lkgb.c (gb),
531         * link/z80/lklibr.c (fndsym),
532         * link/z80/lkrloc.c (relr),
533         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
534         * src/SDCC.lex (checkCurrFile, process_pragma),
535         * src/SDCCglue.c (spacesToUnderscores),
536         * src/SDCCmain.c (setParseWithComma, processFile),
537         * src/asm.c (tvsprintf, printCLine),
538         * src/avr/gen.c (emitcode, aopPut),
539         * src/ds390/gen.c (emitcode),
540         * src/hc08/gen.c (emitcode, emitinline),
541         * src/mcs51/gen.c (emitcode, genInline),
542         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
543           tokenizeLineNode),
544         * src/pic/ralloc.c (debugLog),
545         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
546           tokenizeLineNode),
547         * src/pic16/ralloc.c (debugLog),
548         * src/z80/main.c (_process_pragma):
549            made all ctype.h function calls safe
550         * src/SDCCopt.c: include math.h for fabs
551         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
552           and used them throughout the code to make ctype.h function calls safe
553         * src/ds390/main.c (asmLineNodeFromLineNode),
554         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
555         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
556            unsigned char*
557         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
558           (newpCodeAsmDir): made ctype.h function calls safe
559         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
560           pic16_emitcode):  made lbp unsigned char*
561         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
562           (pic16_newpCodeAsmDir): made ctype.h function calls safe
563         * src/xa51/gen.c (emitcode),
564         * src/z80/gen.c (_emit2): made lbp unsigned char*
565         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
566            char*
567
568 2005-09-05 Raphael Neider <rneider AT web.de>
569
570         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
571           access bank splitpoint
572
573 2005-09-05 Raphael Neider <rneider AT web.de>
574
575         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
576
577 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
578
579         * .version: changed to version 2.5.3
580         * doc/sdccman.lyx: changed version to 2.5.3,
581           documented --codeseg and --constseg and pragma codeseg and constseg,
582           documented bit parameters (reentrant) and bit returning
583         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
584            currFunc->recvSize, but is this ok for all ports?
585           (ast2iCode): result of ~ on unsigned char must be cast to int for
586            bool to work
587         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
588           function pointers in bit space
589         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
590           (processFuncArgs): call port.reg_parm() with reentrancy info
591         * src/port.h,
592         * src/avr/main.c,
593         * src/ds390/main.c,
594         * src/hc08/main.c,
595         * src/pic/main.c,
596         * src/pic16/main.c,
597         * src/xa51/main.c,
598         * src/z80/main.c: port.reg_parm prototype extended with
599           "bool reentrant" parameter
600         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
601           options.stackAuto for allocating bit register parameters
602         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
603           (genSend): set BitBankUsed if it is,
604           (selectRegBank): factored out of genCall for use in genPcall,
605           (genCall): removed redundant dtype assignmen, use selectRegBank,
606           (genPcall): handle returning in Carry properly, save in F0 if needed,
607           (genReceive): handle bit register parameters
608         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
609           (mcs51_assignRegisters): enable bit registers for all reentrant
610            functions and don't set BitBankUsed unconditionally
611         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
612         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
613         * support/regression/tests/funptrs.c: added tests for BOOL and for return
614
615 2005-08-27 Borut Razem <borut.razem AT siol.net>
616
617         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
618         ppc-osx (Darwin) does not support -u option. It seems that it is
619         supported only on Linux - GNU cp
620
621 2005-08-25 Borut Razem <borut.razem AT siol.net>
622
623         * sim/ucsim/gui.src/serio.src/Makefile.in,
624           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
625           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
626           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
627           install and strip, since the strip at /usr/ccs/bin should be used
628           on solaris
629
630 2005-08-24 Borut Razem <borut.razem AT siol.net>
631
632         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
633
634 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
635
636         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
637         ffffffffu
638
639 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
640
641         * as/mcs51/aslink.h: completed lkrloc.c prototypes
642         * as/mcs51/lkmain.c (link_main): fixed warning
643         * device/include/stdbool.h: ds390 has no advanced bit support yet
644         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
645         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
646         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
647           and updated their macros
648         * src/SDCCval.c (constVal): updated comment for renamed b_long
649
650 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
651
652         * as/mcs51/asdata.c: changed ctype['['] to BINOP
653         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
654           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
655           (oprio): set priority for '['
656         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
657            and adb_24_bit
658         * as/mcs51/asm.h: added defines R_BIT and S_BIT
659         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
660         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
661         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
662           added overlayable BIT_BANK area
663         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
664           (summary2): explain 'T' in legenda
665         * as/mcs51/lkrloc.c: replaced old K&R style,
666           (relr): added R_BIT processing,
667           (errmsg): added "Bit-addressable relocation error",
668           (adb_bit): added for converting from byte- to bit-addressable space,
669           (adb_24_bit): added for converting from byte- to bit-addressable space
670         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
671            used in reentrant functions now even as return value
672         * device/lib/_gptrput.c (_gptrput): removed obsolete code
673         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
674           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
675         * src/SDCCglobl.h: added indicator BitBankUsed
676         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
677            the bit registers b0-b7
678         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
679           (geniCodeCast): fixed bug 1263853,
680           (geniCodeLogicAndOr): put result in bool or char,
681           (geniCodeReceive): added parameter func for accessing the return type,
682           (geniCodeFunctionBody): pass func to geniCodeReceive
683         * src/SDCCmain.c: added indicator BitBankUsed
684         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
685         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
686           (checkSClass): don't put automatic bool/bit on stack,
687           (checkFunction): removed check on function cannot return bit
688         * src/SDCCsymt.h: added newBoolLink prototype
689         * src/mcs51/gen.c (rb1regs): added bit registers,
690           (movc): created for assigning to carry,
691           (pushReg, popReg): created for pushing registers,
692           (sameRegs): check both AOP_REG and AOP_CRY types,
693           (aopOp): handle bit registers,
694           (aopPut): optimization no self-assign,
695           (saveRegisters): push reg->base (bits) only once for bit registers,
696            and use pushReg,
697           (unsaveRegisters): pop reg->base only once and use popReg,
698           (assignResultValue): added parameter func and return in carry for bits,
699           (genIpush): optimization no reload in A if not changed,
700           (genSend): bit parameters in reentrant functions are passed in bit
701            registers by first assigning to bits in B, then save registers and
702            copy B to bits,
703           (genCall): handle returning in Carry properly, save it in F0 if needed,
704           (genPcall): updated assignResultValue call, this is not safe yet for bit
705            returning function !!!
706           (genFunction): don't generate equ's for bit registers and use pushReg,
707           (genEndFunction): take care of bit returning functions and use popReg,
708           (genRet): return bit in Carry,
709           (genIfx): optimize bit registers and other directly addressable bits,
710           (genReceive): updated assignResultValue call
711         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
712           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
713            registers when using stack-auto
714         * src/mcs51/ralloc.c (_G): added allBitregs,
715           (regs8051): added the bit registers,
716           (createStackSpil): use macro IS_BIT,
717           (getRegBit): added to allocate a bit register, else spill,
718           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
719           (updateRegUsage): factored out to ease stepping while debugging,
720           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
721            also allocate bit registers,
722           (fillGaps): handle bit registers,
723           (findAllBitregs): added to create bit vector with all bit registers,
724           (mcs51_allBitregs): returns this bit vector,
725           (mcs51_assignRegisters): when using stack-auto use bit registers for
726            passing parameters and creating local variables
727         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
728
729 2005-08-22 Borut Razem <borut.razem AT siol.net>
730
731         * device/lib/Makefile.in: replaced find option -or with -o
732           to make it run on solaris
733
734 2005-08-22 Raphael Neider <rneider AT web.de>
735
736         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
737           fixes #1265442 (crash on Solaris)
738
739 2005-08-20 Borut Razem <borut.razem AT siol.net>
740
741         * configure, configure.in: added tests for libsocket and libnsl libraries,
742           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
743           from support/regression/Makefile.in
744         * support/regression/Makefile.in: added
745         * device/lib/pic16/Makefile.common.in: force make to use bash shell
746         * sim/ucsim/libtool: regenerated on sparc-solaris
747         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
748           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
749           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
750           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
751           sparc-solaris, which doesn't use GNU ld linker
752         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
753         * as/Makefile: find on sparc-solaris does not support -maxdepth option
754
755 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
756
757         * src/mcs51/peeph.def: updated comments
758
759 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
760
761         * device/lib/_gptrget.c,
762         * device/lib/_gptrput.c: slightly shorter
763         * doc/sdccman.lyx: incremented version
764         * src/mcs51/peeph.def: moved peephole comments to the line of first
765           change to better keep line correlation, reanimated 186.e
766         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
767
768 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
769
770         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
771           David Saxton with quotes around file name.
772
773 2005-08-15 Borut Razem <borut.razem AT siol.net>
774
775         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
776           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
777           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
778           make tests run on x86_64 platform
779
780 2005-08-13 Raphael Neider <rneider AT web.de>
781
782         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
783           as it might be executed DURING a build (parallel make is wonderful)
784
785 2005-08-13 Raphael Neider <rneider AT web.de>
786
787         * device/lib/Makefile.in (port-specific-objects-pic16):
788           revert to cp $(PORT)/bin/*.* $(PORTDIR)
789         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
790           dependency
791         * device/lib/pic16/Makefile.rules: build subdirs before creating
792           the library, removed builddir rule, create $(builddir) early in
793           recurse rule, use empty recurse rule for leaf directories
794         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
795           mkdir errors (race condition), removed duplicate suffix "hex"
796           from clean rules
797         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
798         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
799           prevents mkdir -p from aborting on Alpha
800
801 2005-08-12 Raphael Neider <rneider AT web.de>
802
803         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
804           db-statements in order to allow for arrays of pointers in code
805           sections to be placed without interspersed 0-padding, fixes
806           bug #1256215
807         * (emitStatistics): fixed division by zero for pic18f1220
808         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
809           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
810         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
811         * (pic16_pCodeConstString): keep track of already emitted string
812           literals to prevent "duplicate definitions of symbol _str_NR"
813         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
814           debug message
815         * device/lib/Makefile.in: ignore failing PIC16 library builds
816         * device/lib/pic16/Makefile: do not build if gputils are missing
817         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
818
819 2005-08-10 Raphael Neider <rneider AT web.de>
820
821         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
822           my last commit)
823
824 2005-08-10 Raphael Neider <rneider AT web.de>
825
826         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
827           Rokas' patch to add the new fixed point type "__fixed16x16"
828         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
829           functions for __fixed16x16 arithmetics
830         * device/lib/pic16: reimplemented the build system to support
831           a separate build directory, better handling of libio (create
832           the library in a separate subdir for each architecture) and
833           easier configuration (centralized in Makefile.common)
834
835 2005-08-07 Raphael Neider <rneider AT web.de>
836
837         * src/pic16/gen.c (genrshTwo): fixed sign extension
838         * src/pic16/device.c: added pic18f2320, 4220 and 4320
839         * device/include/pic16/pic18f2220.h: changed some bit definitions,
840           added T0CONbits
841         * device/include/pic16/pic18f4220.h: NEW, header for
842           pic18f4220 and pic18f4320
843         * device/include/pic16/pic18fregs.h: added new devices,
844           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
845         * device/include/pic16/signal.h: resolved name clashes
846           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
847           to also allow testing for interrupt enable bits, added
848           comments on how to use the macros
849         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
850         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
851           register definitions for the devices
852         * device/lib/pic16/pics.all: added new devices
853         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
854           allocated memory
855         * device/lib/pic16/libc/stdlib/memfree: do not count
856           the block header as free memory
857         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
858           simplified and added missing end-of-blocklist-marker
859           (reported by Peter Onion, fixes #1252814)
860         * (_mergeHeapBlock): fixed loop condition
861         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
862           len==0, restructured code
863         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
864           up a bit, reduced bitfield accesses, prevent endless loops
865           in case of heap corruption
866         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
867           "unreferenced arguments/must return a value" warnings
868         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
869           replaced BAUDREG with SPBRG
870         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
871           device/lib/pic16/debug/gstack/gstack.c: replaced
872           _naked, _asm, _endasm with __naked, __asm, __endasm
873
874 2005-08-05 Raphael Neider <rneider AT web.de>
875
876         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
877           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
878
879 2005-08-05 Borut Razem <borut.razem AT siol.net>
880
881         * device/lib/Makefile.in: added missing ';'
882         * configure: removed ^M characters
883
884 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
885
886         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
887           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
888           License
889
890 2005-08-04 Borut Razem <borut.razem AT siol.net>
891
892         * configure.in: pic16 libraries build 2nd try - enable running
893           configure in device/lib/pic16
894         * configure: regenerated from configure.in
895         * device/lib/Makefile.in: create $(PORT)/bin directory
896
897 2005-08-03 Raphael Neider <rneider AT web.de>
898
899         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
900           to get/set values via pointers
901         * (genUnpackBits,genPackBits): changed detection of
902           ptr->bitfield vs. sym.bitfield, fixed access via generic
903           pointers, removed dead (wrong) code for multibyte bitfields
904         * (genNearPointerGet, genGenPointerGet): removed useless code,
905           fixed bitfield detection, fixes #1250594
906         * (genNearPointerSet): removed useless code
907         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
908           and introduced macro pic16_emitpcode that conditionally emits
909           the origin of the following pCode (useful for debugging SDCC)
910         * src/pic16/pcode.c: changed (and disabled) some debug outputs
911         * (createDefmap): fixed handling of LFSR for --optimize-df
912
913 2005-08-02 Borut Razem <borut.razem AT siol.net>
914
915         * device/lib/Makefile.in: pic16 libraries build enabled since
916           gputils-0.13.2 are now localy installed at sourceforge's compile farm
917
918 2005-08-02 Raphael Neider <rneider AT web.de>
919
920         * src/pic16/gen.c (genPackBits): removed deprecated warning
921         * (genGenPointerSet): fixed bitfield detection
922
923 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
924
925         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
926
927 2005-07-31 Raphael Neider <rneider AT web.de>
928
929         * device/lib/pic16/libdev/pic18f458.c,
930           device/include/pic16/pic18f458.h: added missing T0CONbits
931
932 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
933
934         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
935
936 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
937
938         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
939
940 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
941
942         * device/include/mcs51/at89c51ed2.h: added.
943
944 2005-07-23 Raphael Neider <rneider AT web.de>
945
946         * src/pic/gen.h: added emitpcode macro for debugging
947         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
948           and replace by macro adding debug information on demand
949         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
950         * (gencjne): tried to fix; replaced with correct (slower) code
951         * (gen{Unp,P}ackBits): fixed single bit access
952         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
953         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
954           previous instruction
955         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
956           register has to be handled with care (forbidding movement
957           of assignments/uses, removing assignments completely, ...)
958         * (pCodeOptime2pCodes): make use of regIsSpecial
959         * added lots of debugging output (commented out)
960         * src/pic/rallloc.c (deassignLRs): prevent operand registers
961           from being reused as result UNLESS it is known to work
962
963 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
964
965         * support/Util/dbuf.h: include <stddef.h> for size_t
966         * .version: changed to version 2.5.2
967
968 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
969
970         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
971
972 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
973
974         * src/hc08/gen.c (genMinus): fixed bug #1241835,
975           (genModOneByte): removed needless psha/pula
976
977 2005-07-22 Raphael Neider <rneider AT web.de>
978
979         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
980           have PIC14 handled like PIC16, fixes broken pic14 linker calls
981         * src/pic/gen.c (resolveIfx): do not "invent" labels
982         * (genSkipc): changed to positive logic
983         * (genSkipCond): removed as no longer needed
984         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
985           backport from PIC16
986         * (genLeftShift): check operands are in different registers
987         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
988           INCF does not update CARRY...
989         * src/pic/main.c: fixed _linkCmd
990         * src/pic/pcode.c (unlinkpCode): added inactive code
991         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
992           alive (do not assign result and operand overlapping registers)
993
994 2005-07-22 Raphael Neider <rneider AT web.de>
995
996         * src/pic/device.c (dump_sfr): replaced register declaration with
997           call to emitSymbolToFile() to avoid duplicate symbols
998         * (assignRelocatableRegisters): do not declare external symbols
999         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1000           right (take size of type, not etype)
1001         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1002         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1003         * (packRegsForAccUse): disabled assignment of WREG as
1004           the result reg to prevent occurence of just fixed #1235003,
1005           fixes #1242954
1006         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1007           symbols (avoids duplicate symbols in .asm file)
1008         * (pic14emitRegularMap): use emitSymbolToFile()
1009         * src/pic/gen.c (aopOp): fixed spillLocation handling
1010         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1011         * (genDataPointerSet): removed unneccessary variables/output
1012
1013 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1014
1015         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1016         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1017
1018 2005-07-21 Raphael Neider <rneider AT web.de>
1019
1020         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1021           architecture cannot handle them efficiently, fixes bug #1235003
1022         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1023           check for empty sets before using them (fixes bug #1232190)
1024
1025 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1026
1027         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1028           (lnksect2): generate warnings for memory overlap
1029         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1030           constseg to set the name of these segments so you can instruct the linker
1031           to place them in banks
1032         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1033         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1034           added code_seg and const_seg to options
1035         * src/SDCCglue.c (emitMaps): use options.const_seg,
1036           (createInterruptVect): put interrupt vectors in segment HOME,
1037           (glue): put HOME before static segment and put the main glue in HOME,
1038           (glue): use options.code_seg
1039         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1040         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1041           these segments so you can instruct the linker to place them in banks
1042           (linkEdit): use code_loc for HOME segment which should be the first
1043           segment in code memory now
1044         * src/SDCCmem.c: fixed more stuff like bug 1238386
1045         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1046           (changePointer): don't change function pointers to code pointers for
1047           banked functions,
1048           (compareType): added exceptional check for banked function pointers
1049         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1050         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1051           after static in code memory
1052         * src/mcs51/gen.c: added aopLiteralLong prototype,
1053           (aopForSym): use getSize for functions,
1054           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1055           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1056           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1057           the segment,
1058           (genPcall): use call for literal function pointers and generate banked
1059           calls over the one trampoline so there's only one place for the user to
1060           modify according to his/hers hardware,
1061           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1062           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1063         * src/mcs51/main.c: added keyword banked,
1064           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1065         * support/Util/SDCCerr.c,
1066         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1067           needed for passing the bank and address to the trampoline
1068         * device/lib/mcs51/crtbank.asm: added for bankswitching
1069         * device/lib/mcs51/Makefile: added crtbank
1070
1071 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1072
1073         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1074           for fields at offset 0 of a struct or union as reported
1075           on 2005-07-07 in the developer mailing list.
1076
1077 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1078
1079         * src/SDCCmem.c: fixed bug 1238386
1080
1081 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1082
1083         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1084           (patch #1144962), added peephole 300, enabled 259.x
1085         * doc/sdccman.lyx: removed screenshot and provided link instead
1086
1087 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1088
1089         * doc/sdccman.lyx: added section about debugging with ddd
1090         * doc/figures/ddd_example.eps: screenshot of debugging session
1091
1092 2005-07-04 Raphael Neider <rneider AT web.de>
1093
1094         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1095           like CODE pointers, fixes #1115683
1096         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1097           call, fixes bugs #1232211, #1228110,
1098           fixed wrong casts to pCodeFlow from pCodeInstructions
1099
1100 2005-07-04 Raphael Neider <rneider AT web.de>
1101
1102         * src/pic/gen.c (popGet): changed assert to allow for
1103           bit operands
1104         * (popGetAddr): changed signature to provide
1105           an additional index, patched all call sites
1106         * (genCmpEq): handle literal-like operands correctly
1107         * (genAddrOf): added sanity checks on __code/__data pointers
1108         * (genAssign): added handling of symbols from __code section
1109         * (gencjne): do not generate code for comparisons whose result
1110           is neither stored nor used, fixes bug #1171114
1111         * (AccLsh, AccRsh): operate on operand instead of WREG
1112         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1113           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1114           by known count
1115         * rewrote complete shift-by-literal logic, commented unused
1116           functions out
1117         * (genConstPointerGet): get multiple bytes (if result size > 1),
1118           fixed handling of non-immediate addresses
1119         * (genPointerGet): handle CODE pointers like CONST pointers
1120         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1121         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1122           operand is to be treated as a literal or not
1123         * (mov2w,genPcall,genCmpEq),
1124           src/pic/genarith.c: use aop_isLitLike() to decide between
1125           literal/register contents
1126         * (addSign): added missing offset
1127         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1128           only emit comment in debug-mode,
1129           use {aop,op}_isLitLike throughout the file
1130         * src/pic/glue.c: fix initializers for pointers (work in progress)
1131         * src/pic/pcode.c (get_op): honor index on _const symbols
1132         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1133         * (dumppBlock): added pCode size estimation
1134         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1135           check for IS_SYMOP before OP_SYMBOL'ing
1136         * fixed indentation, compacted switch-statements
1137         * (allocReg): find free register and allocate it instead of
1138           allocating new registers all the time
1139         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1140           registers as its operands (necessary only for multibyte GETs)
1141
1142 2005-07-01 Raphael Neider <rneider AT web.de>
1143
1144         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1145           debugging .asm-output macros FENTRY + FEXIT
1146         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1147           way... I wonder...
1148         * (emitpComment): NEW, printf to pCode
1149         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1150           offset handling
1151         * (popGetAddr): NEW, variant of popGet to access an immediates
1152           high(er) bytes instead of the n'th byte of memory they reference,
1153           replaced popGet with popGetAddr where neccessary
1154         * (genDataPointerGet): reactivated and fixed implementation
1155         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1156           accesses
1157         * (genDataPointerSet): fixed multibyte assignments
1158         * (genpic14Code): fixed --i-code-in-asm handling
1159         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1160         * (genPlus): fixed index-out-of-bounds error
1161         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1162         * src/pic/ralloc.c: added debugging output macro FENTRY2
1163         * (spillThis): fixed indentation, enbraced for-body for clarity
1164         * (rematStr): commented out as now unused
1165         * (regTypeNum): commented out special spill case (overwrites
1166           arbitrary values)
1167         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1168
1169 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1170
1171         * doc/sdccman.lyx: documented sfr16/sfr32,
1172           added example for using storage class with function pointers
1173         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1174
1175 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1176
1177         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1178         * device/lib/_itoa.c,
1179         * device/lib/_ltoa.c: optimized codesize
1180         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1181           but don't know how to suppress the double warning.
1182         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1183         * support/Util/SDCCerr.c,
1184         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1185
1186 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1187
1188         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1189           fixed old K&R prototypes
1190         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1191         * device/lib/_gptrget.c,
1192         * device/lib/_gptrgetc.c,
1193         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1194           also new versions for small generic pointers and banked generic pointers
1195         * src/port.h: added const_name
1196         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1197         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1198         * src/SDCCcse.c (findPrevIc): check all associative operators
1199         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1200         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1201         * src/SDCCmem.c: updated comments,
1202           set far-space to 0 for pdata, results in optimized code
1203         * src/SDCCmem.h: added macro CONST_NAME
1204         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1205           moving the info into the highest bits, see also gptrget/gptrput
1206         * src/src.dsp: added sdcc.ico to project files
1207         * src/avr/gen.c (genCast): fixed bug 0x%d
1208         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1209         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1210           relation between ptr_type and DCL_TYPE,
1211           (genCast): fixed bug 0x%d
1212         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1213           (CODE)" for const_name
1214         * src/hc08/gen.c (genCast): fixed bug 0x%d
1215         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1216           (hc08_port): added "CONST (CODE)" for const_name
1217         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1218           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1219           between ptr_type and DCL_TYPE,
1220           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1221           operand* and took AOP() inside function so sfr-ness can be checked,
1222           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1223           new prototype,
1224           (genFunction, genEndFunction): optimized stack setup,
1225           (genMinus): optimized for literals with ending zeroes (in bytes),
1226           (genCast): fixed bug 0x%d
1227         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1228           (mcs51_port): added "CONST (CODE)" for const_name
1229         * src/mcs51/peeph.def: made rule 226 more generic
1230         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1231         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1232         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1233         * src/z80/main.c (z80_port): added NULL for const_name,
1234           (gbz80_port): added NULL for const_name
1235         * support/regression/tests/bug663539.c,
1236         * support/regression/tests/sfr16.c: new tests
1237
1238 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1239
1240         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1241
1242 2005-06-24 Raphael Neider <rneider AT web.de>
1243
1244         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1245           corrected typos...
1246         * device/include/pic16/signal.h: added USBIF
1247           and SIG_USB
1248
1249 2005-06-24 Raphael Neider <rneider AT web.de>
1250
1251         * device/lib/pic16/libdev/pic18f2455.c,
1252           device/include/pic16/pic18f2455.h: NEW
1253         * device/include/pic16/pic18fregs.h,
1254           device/lib/pic16/pics.all,
1255           src/pic16/device.c: added 18f2455
1256         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1257           device/include/pic16/{pic18f[68][567].h,usart.h}:
1258           replaced MULTIPLE_USARTS define with more relaible
1259           compatibility sfrs (for USART access)
1260
1261 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1262
1263         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1264           and the output asm file line is printed on two lines.
1265
1266 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1267
1268         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1269           BGT, BLE, BHI, and BLS instructions
1270         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1271           genCmpEq): removed
1272         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1273           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1274           fixes bug #1216342
1275         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1276
1277 2005-06-15 Raphael Neider <rneider AT web.de>
1278
1279         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1280         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1281         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1282           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1283           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1284
1285 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1286
1287         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1288           Marcel Telka in bug #1215704
1289
1290 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1291
1292         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1293           located in shared memory bank.
1294
1295 2005-05-31 Raphael Neider <rneider AT web.de>
1296
1297         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1298           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1299           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1300
1301 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1302
1303         * device/lib/_strncpy.c: fixed the fix
1304
1305 2005-05-26 Raphael Neider <rneider AT web.de>
1306
1307         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1308           initializers with \0, bug #1208187
1309         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1310           intializers with \0, bug #1208187
1311
1312 2005-05-26 Raphael Neider <rneider AT web.de>
1313
1314         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1315           initializers with \0, bug #1208187
1316         * src/pic16/main.c (_process_pragma): added sanity checks
1317           for stack position and size, emit warnings when appropriate
1318
1319 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1320
1321         * device/lib/_strncpy.c: fixed not filling with \0
1322
1323 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1324
1325         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1326           createFunction),
1327         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1328           compound_statement),
1329         * src/SDCCsymt.h,
1330         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1331
1332 2005-05-24 Raphael Neider <rneider AT web.de>
1333
1334         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1335
1336 2005-05-24 Raphael Neider <rneider AT web.de>
1337
1338         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1339           TRISE definitions, closes bug #1162453
1340
1341 2005-05-22 Raphael Neider <rneider AT web.de>
1342
1343         * src/pic16/main.c (_process_pragma): check for missing
1344           arguments to pragmas code and udata
1345         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1346           consistency fixes to match other headers (thanks to Jim Paris)
1347         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1348
1349 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1350
1351         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1352
1353 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1354
1355         * support/regression/tests/bug1198642.c: new test
1356         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1357         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1358         * support/scripts/resource.h,
1359         * support/scripts/resource.rc,
1360         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1361         * support/scripts/sdcc.ico: added 32x32 icon
1362
1363 2005-05-18 Raphael Neider <rneider AT web.de>
1364
1365         * device/lib/pic16/libdev/pic18f*.c,
1366         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1367           keywords to "__sfr" and "__at (X)"
1368         * device/include/pic16/pic18fregs.h: added pic18f4520
1369         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1370           #1203088 (MPLAB compatibility)
1371
1372 2005-05-17 Raphael Neider <rneider AT web.de>
1373
1374         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1375         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1376         * device/lib/pic16/pics.all: added new devices
1377         * src/pic16/device.c: added support for pic18f4520
1378
1379 2005-05-16 Raphael Neider <rneider AT web.de>
1380         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1381         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1382         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1383           convenience function for bit access
1384
1385 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1386
1387         * device/lib/printf_large.c: fixed bug 1193299
1388         * support/regression/tests/bug1057979.c: added test %3.3s
1389
1390 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1391
1392         * device/include/mcs51/8051.h,
1393         * device/include/mcs51/8052.h: made parseable with lint
1394         * device/include/mcs51/lint.h: added include file for (sp)lint
1395         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1396         * doc/cdbfileformat.lyx,
1397         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1398
1399 2005-05-14 Raphael Neider <rneider AT web.de>
1400
1401         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1402         * device/lib/pic16/libc/stdlib/itoa.c (new)
1403         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1404         * device/lib/pic16/libio/Makefile: exclude subdir according to
1405           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1406         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1407         * src/pic16/gen.c (genFunction): prevent annoying warning
1408         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1409           nameclashes on BeOS
1410         * support/cpp2/cppmain.c (cpp_output_string): new
1411         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1412           fixes bug 1116802
1413
1414 2005-05-13 Borut Razem <borut.razem AT siol.net>
1415
1416         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1417
1418 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1419
1420         * .version: changed to version 2.5.1; back to bleeding edge development
1421
1422 2005-05-11 Borut Razem <borut.razem AT siol.net>
1423
1424         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1425           generate PDF version 1.3 documents
1426
1427 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1428
1429         * .version: changed to version 2.5.0
1430
1431 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1432
1433         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1434
1435 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1436
1437         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1438         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1439         well as many smaller updates.
1440         * .version: changed to version 2.5.0-pre1
1441
1442 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1443
1444         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1445
1446 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1447
1448         * support/regression/tests/bug1185672.c: added
1449         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1450           bug 1185672
1451         * src/mcs51/gen.c (genCall): added comments, made it look safer
1452         * src/mcs51/gen.c (genEndFunction): simplified
1453
1454 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1455
1456         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1457
1458 2005-04-14 Borut Razem <borut.razem AT siol.net>
1459
1460         * fixed bug 1045046 - SIGSEGV with really simple code?:
1461           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1462           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1463
1464 2005-04-14 Borut Razem <borut.razem AT siol.net>
1465
1466         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1467           src/pic16/device.h: temporarily disabled experimental #inline pragma
1468           for 2.5.0 release
1469
1470 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1471
1472         * device/include/z80/stdio.h,
1473         * device/include/z80/string.h: removed these highly incomplete files so
1474           SDCC can use the default ones in device/include/
1475
1476 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1477
1478         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1479         gcc warning.
1480         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1481         fix sdcpp warnings.
1482
1483 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1484
1485         * device/include/malloc.h: removed redundant __reentrant prototypes
1486         * device/lib/_mullong.c: added working xstack variant in asm (C version
1487           doesn't pass regression tests)
1488         * device/lib/bpx.c: used __data and made bpx char for mcs51
1489         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1490           (createFunction): fixed bug with xstackPtr
1491         * src/SDCCcse.c: corrected comments
1492         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1493           (killDeadCode, eBBlockFromiCode): removed unused code
1494         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1495           corrected comments
1496         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1497           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1498           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1499           (genModOneByte): fixed warning in MSVC
1500         * src/mcs51/main.c (): added comments
1501         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1502
1503 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1504
1505         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1506
1507 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1508
1509         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1510
1511 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1512
1513         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1514         characters arrays of larger size than the declared one.
1515
1516 2005-04-10 Borut Razem <borut.razem AT siol.net>
1517
1518         * src/pic/gen.c (genInline),
1519           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1520           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1521           (findNextInstruction), (findPrevInstruction),
1522           (findInstructionUsingLabel),
1523           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1524         * src/pic/pcode.c (findLabel): added missing '\n'
1525         * src/src.dsp: added SDCCdwarf2.c to the project
1526
1527 2005-04-09 Borut Razem <borut.razem AT siol.net>
1528
1529         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1530
1531 2005-04-08 Raphael Neider <rneider AT web.de>
1532
1533         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1534           into the chain after a given one) and mergeDefmapSymbols (combine
1535           defmap entries for each symbol per pcode)
1536         * (createDefmap): have defmap entries merged in the end
1537         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1538           a symbol before replacing one access type's symbol, merge symbols in
1539           the end (replacement symbol might already have an entry)
1540         * (assignValnums): keep reference to written WREG intact
1541
1542 2005-04-08 Raphael Neider <rneider AT web.de>
1543
1544         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1545           Alpha)
1546
1547 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1548
1549         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1550         bytes
1551
1552 2005-04-07 Raphael Neider <rneider AT web.de>
1553
1554         * device/include/pic16/usart.h: added compatibility defines for
1555           devices with more than one USART
1556         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1557
1558 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1559
1560         * device/lib/Makefile.in: updated for port specific include
1561
1562 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1563
1564         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1565
1566 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1567
1568         * device/include/8051.h,
1569         * device/include/8052.h,
1570         * device/include/at89S8252.h,
1571         * device/include/at89c55.h,
1572         * device/include/at89x051.h,
1573         * device/include/at89x51.h,
1574         * device/include/at89x52.h,
1575         * device/include/mcs51reg.h,
1576         * device/include/reg51.h,
1577         * device/include/reg764.h,
1578         * device/include/regc515c.h,
1579         * device/include/sab80515.h: (re)moved these 12 files
1580         * device/include/mcs51/8051.h,
1581         * device/include/mcs51/8052.h,
1582         * device/include/mcs51/at89S8252.h,
1583         * device/include/mcs51/at89c55.h,
1584         * device/include/mcs51/at89x051.h,
1585         * device/include/mcs51/at89x51.h,
1586         * device/include/mcs51/at89x52.h,
1587         * device/include/mcs51/mcs51reg.h,
1588         * device/include/mcs51/reg51.h,
1589         * device/include/mcs51/reg764.h,
1590         * device/include/mcs51/regc515c.h,
1591         * device/include/mcs51/sab80515.h: and added them here
1592
1593 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1594
1595         * device/include/stdarg.h: changed SDCC specific keywords to double
1596           underlined form.
1597         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1598           mcs51 and ds390.
1599         * device/include/hc08/mc68hc908gp32.h,
1600         * device/include/hc08/mc68hc908jb8.h,
1601         * device/include/hc08/mc68hc908jkjl.h,
1602         * device/include/hc08/mc68hc908qy.h: fixed comments
1603         * device/include/mcs51/README: updated
1604         * device/include/mcs51/c8051f120.h: added PINRSF
1605         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1606         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1607           amidst code. Also inline is not supported.
1608
1609 2005-04-06 Raphael Neider <rneider AT web.de>
1610
1611         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1612         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1613           callers stack/frame pointers
1614
1615 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1616
1617         * device/include/pic16/usart.h: added, missing in previous commit,
1618         * device/include/pic16/adc.h: fixed typo,
1619         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1620         commit,
1621         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1622         <p18fxxx.inc>
1623         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1624         uninitialized because a bug appears with gplink
1625         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1626         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1627         complains for unrecognised option
1628
1629 2005-04-05 Raphael Neider <rneider AT web.de>
1630
1631         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1632           structs as well (using memcpy)
1633         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1634           on ISRs (GOTO has no label)
1635         * src/pic16/device.h: added OF_OPTIMIZE_DF
1636         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1637           new data flow analysis/optimization
1638         * src/pic16/pcode.c: added (prototypes for and implementation of)
1639           dataflow analysis functions, fixed pCodeInstructions' inCond and
1640           outCond values, made RCALL a branch instruction
1641         * (pic16_unlinkpCode): keep C line if possible
1642         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1643           C line moved if possible
1644         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1645         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1646           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1647         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1648           new flow)
1649         * (pic16_getJumptabpCode): NEW, needed in...
1650         * (LinkFlow): fixed handling of jumptables, calls and conditional
1651           branches
1652         * (pic16_InsertCommentAfter): NEW
1653         * (pic16_pCodeReplace): made verbose and flow preserving
1654         * (AnalyzeFlow): added call to data flow analysis
1655         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1656         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1657         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1658
1659 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1660
1661         * src/SDCCast.c (decorateType): fixed bug #1105626
1662
1663 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1664
1665         * device/include/asm/pic16/features.h,
1666         * pic18f*.h headers,
1667         * device/include/pic16/adc.h,
1668         * device/include/pic16/delay.h,
1669         * device/include/pic16/i2c.h,
1670         * device/include/pic16/malloc.h,
1671         * device/include/pic16/stdio.h,
1672         * device/include/pic16/stdlib.h,
1673         * device/include/pic16/string.h,
1674         * device/lib/pic16/libc/stdio/printf_tiny.c,
1675         * device/lib/pic16/libc/stdio/printf_small.c,
1676         * device/lib/pic16/libc/stdio/strmgpsim.c,
1677         * device/lib/pic16/libc/stdio/strmmssp.c,
1678         * device/lib/pic16/libc/stdio/strmusart.c,
1679         * device/lib/pic16/libc/stdio/vfprintf.c,
1680         * device/lib/pic16/libc/stdlib/ltoa.c,
1681         * device/lib/pic16/libc/stdlib/putchar.c,
1682         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1683         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1684         * device/lib/pic16/libc/stdlib/memchrram.c,
1685         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1686         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1687         * device/lib/pic16/libio/adc/adcbusy.c,
1688         * device/lib/pic16/libio/adc/adcread.c,
1689         * device/lib/pic16/libio/adc/adcsetch.c,
1690         * device/lib/pic16/libio/usart/ubaud.c,
1691         * device/lib/pic16/libio/usart/ubusy.c,
1692         * device/lib/pic16/libio/usart/udrdy.c,
1693         * device/lib/pic16/libio/usart/uopen.c,
1694         * device/lib/pic16/libio/usart/uputc.c,
1695         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1696         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1697         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1698         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1699         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1700         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1701         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1702         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1703         specific keywords to double underlined form,
1704         * device/lib/pic16/libc/Makefile.rules,
1705         * device/lib/pic16/libsdcc/Makefile.rules,
1706         * device/lib/pic16/libm/Makefile,
1707         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1708         to compile with C standard set in Makefile.common
1709         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1710         rand.c and crc.c in compilation process,
1711         * device/lib/pic16/libsdcc/int/divuint.c,
1712         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1713         `c' from signed to unsigned,
1714         * device/lib/pic16/startup/crt0.c,
1715         * device/lib/pic16/startup/crt0i.c,
1716         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1717         keywords to double underlined form, bug fixes in _do_cinit function
1718         which prevented the correct initialization of the .idata segment,
1719         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1720         core to enter a infinite loop
1721         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1722
1723 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1724
1725         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1726
1727 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1728
1729         * device/include/Makefile.in: add support for hc08 subdirectory
1730         * device/include/hc08/: new subdirectory
1731         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1732         Lucas Loizaga, thanks!
1733         * device/include/hc08/mc68hc908qy.h,
1734         * device/include/hc08/mc68hc908gp32.h,
1735         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1736         their own directory. Changed internal macro names to use the compiler
1737         reserved namespace. Changed SDCC specific keywords to double
1738         underlined form.
1739         * device/include/math.h,
1740         * device/include/malloc.h,
1741         * device/include/stdarg.h,
1742         * device/include/stdbool.h
1743         * device/include/string.h,
1744         * device/include/tinibios.h,
1745         * device/include/ds400rom.h,
1746         * device/include/8051.h,
1747         * device/include/8052.h,
1748         * device/include/80c51xa.h,
1749         * device/include/at89c55.h,
1750         * device/include/at89S8252.h,
1751         * device/include/at89x51.h,
1752         * device/include/at89x52.h,
1753         * device/include/ds80c390.h,
1754         * device/include/reg764.h,
1755         * device/include/regc515c.h,
1756         * device/include/sab80515.h,
1757         * device/include/mcs51/c8051f000.h,
1758         * device/include/mcs51/c8051f018.h,
1759         * device/include/mcs51/c8051f020.h,
1760         * device/include/mcs51/c8051f040.h,
1761         * device/include/mcs51/c8051f060.h,
1762         * device/include/mcs51/c8051f120.h,
1763         * device/include/mcs51/c8051f300.h,
1764         * device/include/mcs51/c8051f310.h,
1765         * device/include/mcs51/c8051f320.h,
1766         * device/include/mcs51/c8051f330.h,
1767         * device/include/mcs51/c8051f350.h,
1768         * device/include/z180.h: Changed SDCC specific keywords to double
1769         underlined form.
1770
1771 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1772
1773         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1774         18F4455,
1775         * (pic16_assignConfigWordValue): disable testing of configuration
1776         register value with config mask,
1777         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1778         function with port->fun_prefix,
1779         * (genFunction): when generating a naked interrupt function never
1780         create an absolute segment placed in interrupt vector address, place
1781         the actual interrupt function at IVA instead, when an interrupt
1782         function is generated with unspecified interrupt then do not create
1783         the absolute section,
1784         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1785         code for generating a call to generic pointer get/put function with
1786         a call to function pic16_callGenericPointer(),
1787         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1788         the call to the generic pointer get/put functions with prefixing the
1789         function name with port->fun_prefix,
1790         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1791         * src/pic16/main.c (_process_pragma): prefix function with
1792         port->fun_prefix,
1793         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1794         calling assembler, old 18Fxxxx macro is deprecated,
1795         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1796         PC_ASMDIR in while condition,
1797         * (findInstruction): add PC_ASMDIR in while condition,
1798         * (buildCallTree): prefix main with port->fun_prefix,
1799         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1800         identifier for variable with banked access in instructions BTFSS,
1801         BTFSC, BCF, BSF, BTG
1802         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1803         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1804         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1805         perform optimization when enviroment variable NO_REG_OPT is set,
1806         * (insideLRBlock): NEW, return 1 if register is inside an
1807         INF_LOCALREGS block,
1808         * (RemoveRegFromLRBlock): remove a register that is completely
1809         eliminated by register optimization, but it is still left in local
1810         register store/restore in/from stack block,
1811         * (Remove2pcodes): after removing register, check to see if it
1812         should be removed from local register store/restore in/from stack
1813         block,
1814         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1815         DUMMY_READ_VOLATILE,
1816
1817         * device/include/pic16/adc.h: minor prototype modifications and
1818         update,
1819         * device/include/pic16/malloc.h: added GPL notice various
1820         modifications,
1821         * device/include/pic16/stdint.h: NEW, standard header for ints
1822         * device/include/pic16/delay.h: NEW, header for delay functions,
1823         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1824         delay1mtcy,
1825         * device/include/pic16/signal.h: NEW, header providing helper macros
1826         for implementing signal handlers,
1827         * device/include/pic16/stdio.h: added prototypes for functions,
1828         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1829         prototypes for stdin and stdout, added macro PUTCHAR to
1830         automatically implement putchar function prototype,
1831         * device/include/pic16/usart.h: modified and updated USART library,
1832         * device/lib/pic16/libio/adc/,
1833         * device/lib/pic16/libio/i2c: some modifications to improve library
1834         performance,
1835         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1836         family of functions,
1837         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1838         family of functions and other sources,
1839         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1840         of the PIC18Fxx[28] devices,
1841         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1842         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1843         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1844         _do_cinit function, because the previous failed when local variables
1845         where not placed in the same memory bank,
1846         * device/lib/pic16/libsdcc/char/: various modifications to improve
1847         library performance,
1848         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1849         information on the new functions of the c library and more...
1850
1851 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1852
1853         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1854
1855 2005-03-26 Raphael Neider <rneider AT web.de>
1856
1857         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1858           if condition == CARRY)
1859         * (genCmp): adapted to new genSkipc semantics
1860         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1861           on rIfx (genCmp was broken)
1862
1863 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1864
1865         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1866         * src/z80/main.c (_keywords[]),
1867         * src/SDCCglobal.h (struct options),
1868         * src/SDCC.y,
1869         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1870         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1871         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1872         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1873         always available in leading double underscore form. The C99 support is
1874         mostly missing, but it's a start.
1875         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1876         reserved identifier "__data".
1877
1878 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1879
1880         * src/mcs51/peeph.def: fixed bug 1170013
1881
1882 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1883
1884         * device/include/mcs51reg.h: fixed bug 842007
1885
1886 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1887
1888         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1889         last time.
1890
1891 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1892
1893         * src/port.h (struct PORT),
1894         * src/avr/ralloc.c (avr_assignRegisters),
1895         * src/avr/main.c,
1896         * src/ds390/ralloc.c (ds390_assignRegisters),
1897         * src/ds390/main.c,
1898         * src/hc08/ralloc.c (hc08_assignRegisters),
1899         * src/hc08/main.c,
1900         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1901         * src/mcs51/main.c,
1902         * src/pic/ralloc.c (pic14_assignRegisters),
1903         * src/pic/main.c,
1904         * src/pic16/ralloc.c (pic16_assignRegisters),
1905         * src/pic16/main.c,
1906         * src/xa51/ralloc.c (xa51_assignRegisters),
1907         * src/xa51/main.c,
1908         * src/z80/ralloc.c (z80_assignRegisters),
1909         * src/z80/ralloc.h,
1910         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1911         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1912         * src/SDCCcse.h,
1913         * src/SDCCdflow.c (computeDataFlow),
1914         * src/SDCCdflow.h,
1915         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1916         * src/SDCCloop.h,
1917         * src/SDCCcflow.c (*),
1918         * src/SDCCcflow.h,
1919         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1920         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1921         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1922         immedDom() returning wrong block; probably fixes bug #1160833)
1923
1924 2005-03-20 Borut Razem <borut.razem AT siol.net>
1925
1926         * support/scripts/inc2h.pl: WIN32 port
1927
1928 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1929
1930         * device/lib/makefile.in: added abs.c and labs.c
1931
1932 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1933
1934         * device/include/stdint.h: added
1935         * device/lib/abs.c: added
1936         * device/lib/labs.c: added
1937         * device/include/stdlib.h: added abs() and labs() prototypes
1938         * device/lib/libsdcc.lib: added abs and labs
1939         * device/include/float.h,
1940         * device/lib/_fsmul.c,
1941         * device/lib/printf_fast.c,
1942         * device/lib/printf_tiny.c: updated comments
1943
1944 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1945
1946         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1947         bug #1164313
1948
1949 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1950
1951         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1952         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1953
1954 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1955
1956         * device/lib/printf_large.c: removed inline assembly for portability and
1957           readability. Use printf_fast if speed or size are more important.
1958         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1959         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1960
1961 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1962
1963         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1964         prevent compiler warning
1965
1966 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1967
1968         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1969         moved to level 0 and declared as static. Also they are explicit
1970         placed in access bank. This was necessery because some times they
1971         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1972         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1973         optimizations. Currently only compare to unsigned char is implemented,
1974         * src/pic16/gen.c: added fReturnIdx array,
1975         * (struct resolvedIfx) is moved to gen.h and made public,
1976         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1977         * (aopForSym): added an optimization to directly store in stack of
1978         the operand of a SEND iCode,
1979         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1980         but as registers instead (AOP_REG) using the fReturnIdx array,
1981         * (pic16_freeAsmop): remove the freed register from the
1982         _G.sregsAlloc field,
1983         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1984         a compare of 'WREG',
1985         * (pic16_popGetTempRegCond): changed function prototype, now
1986         function takes also a bitVector argument v which holds the current
1987         set of registers that are allocated for stack access by aopForSym,
1988         registers allocated in aopForSym for accessing stack symbols are not
1989         any more part of the functions usedRegs field,
1990         * (genCall): some times aopOp is called for a stack variable to be
1991         send, aopForSym might perform the push, if this is true make sure
1992         that genCall doesn't push the variable twice by testing _G.resDirect,
1993         * (genFunction): changed testing for unspecified interrupt number
1994         from 256 to INTNO_UNSPEC,
1995         * modified selection scheme of frame pointer generation. Previously
1996         if function did use local registers a frame pointer was generated,
1997         now a frame pointer is generated only if function has arguments
1998         (that need PLUSW2 register access), or has stack arguments, or the
1999         compiler is not instructed to omit the frame pointer,
2000         * (genEndFunction): before restoring local registers that were saved
2001         in the function preamble, also restore the registers that *might*
2002         have been allocated for stack access,
2003         * (genRet): removed some old comments,
2004         * (genCmp, the active (RN's) version): added a call to the
2005         pic16_genCmp_special function to perform the compare with a more
2006         robust and optimized way,
2007         * (genInline): a feature has been added in inline code generation,
2008         which allows a wildcard variable substitution when writing inline
2009         assembly. Code is incomplete and experimental therefore undocumented,
2010         * (genCast): changed order of aopOp for result and right to allow
2011         aopForSym to directly load the result if possible,
2012         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2013         perform an optimized compare on some selected special occasions,
2014         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2015         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2016         generate an IVT any more,
2017         * src/pic16/main.c (pic16_optionsTable): added command line option
2018         --optimize-cmp,
2019         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2020         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2021         macros,
2022         * src/pic16/NOTES: Raphael Neider added in list of active developers
2023         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2024         jumptable_end to prevent bug #,
2025         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2026         inCond and outCond fields,
2027         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2028         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2029         turn off register spilling,
2030         * (packRegsForOneUse): synced with other ports' versions although it
2031         is not used currently,
2032         * (pic16_packRegisters): added an optimization while reading
2033         structure bitfields, some registers may be saved (malloc code is
2034         decreased by 80 bytes)
2035
2036 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2037
2038         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2039         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2040         this can be optimized more?
2041
2042 2005-03-10 Raphael Neider <rneider AT web.de>
2043
2044         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2045           genNearPointerGet): (hopefully) fixed access to bitfields via
2046           pointers (p->bitN = x; and x = p->bitN; failed)
2047
2048 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2049
2050         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2051
2052 2005-03-09 Raphael Neider <rneider AT web.de>
2053
2054         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2055
2056 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2057
2058         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2059         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2060           (regTypeNum): set REG_BIT type if necessary
2061         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2062         * support/regression/tests/critical.c: check bug 1144613
2063
2064 2005-03-02 Raphael Neider <rneider AT web.de>
2065
2066         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2067
2068 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2069
2070         * src/avr/ralloc.c (serialRegAssign),
2071         * src/ds390/ralloc.c (serialRegAssign),
2072         * src/hc08/ralloc.c (serialRegAssign),
2073         * src/mcs51/ralloc.c (serialRegAssign),
2074         * src/pic/ralloc.c (serialRegAssign),
2075         * src/pic16/ralloc.c (serialRegAssign),
2076         * src/xa51/ralloc.c (serialRegAssign),
2077         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2078
2079 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2080
2081         * src/SDCCast.c (decorateType): fixed bug 1124787
2082
2083 2005-02-20 Hubert Sack <sack AT digiplan.de>
2084         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2085
2086         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2087         patch #1121755
2088
2089 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2090
2091         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2092         to keep the correct label reference count when adding/removing references
2093         to labels. A peephole file using this is appended to patch #1144962.
2094
2095 2005-02-14 Raphael Neider <rneider AT web.de>
2096
2097         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2098         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2099         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2100           retrievals of result operand's value on assignment
2101
2102 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2103
2104         * device/include/pic16/string.h: modified prototype for memccpy()
2105         to memccpy(void *, void *, char, size_t)
2106         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2107         check whether to omit frame pointer or not,
2108         * (genInline): convert all occurences of "\n" to LF in inline
2109         assembler blocks, this helps formatting the inline text,
2110         * (pic16_loadFSR0): modified prototype,
2111         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2112         removed some 8051 legacy code,
2113         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2114         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2115         before allocating temporary registers in functions,
2116
2117 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2118
2119         * support/regression/tests/bitvars.c: corrected the "fix"
2120
2121 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2122
2123         * support/regression/tests/bitvars.c,
2124         * support/regression/tests/bitwise.c,
2125         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2126
2127 2005-02-10 Raphael Neider <rneider AT web.de>
2128
2129         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2130           different size for Alpha
2131         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2132
2133 2005-02-09 Raphael Neider <rneider AT web.de>
2134
2135         * src/SDCC.lex(doPragma) : save and restore warning options as well
2136           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2137         * have #pragma less_pedantic set the errorlevel to WARNING
2138           (fixes #1117001)
2139         * (cloneOptimize) : fixed wrong malloc's size
2140         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2141           facilitate correct handling of #pragma (save|restore)
2142
2143 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2144
2145         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2146
2147 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2148
2149         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2150
2151 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2152
2153         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2154
2155 2005-02-02 Raphael Neider <rneider AT web.de>
2156
2157         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2158         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2159         * (pic16_storeForReturn): fixed to allow returning function pointers
2160         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2161         * device/include/pic16/{stddef.h,stdbool.h}: added
2162
2163 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2164
2165         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2166
2167 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2168
2169         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2170         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2171          appeared to be required
2172
2173 2005-01-31 Borut Razem <borut.razem AT siol.net>
2174
2175         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2176           include/mcs51 and include/z80 directories to the package
2177
2178 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2179
2180         * src/hc08/gen.c (genFunction): fixed bug #1112752
2181
2182 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2183
2184         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2185
2186 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2187
2188         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2189
2190 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2191
2192         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2193
2194 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2195
2196         * device/include/c8051fxxx.h: removed these 6 files
2197         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2198
2199 2005-01-26 Raphael Neider <rneider AT web.de>
2200
2201         * src/pic16/gen.c (genAssign): fixed assignment from longs
2202           in codespace (were cut to three bytes)
2203         * (genDummyRead): implemented (except for CODESPACE...),
2204           fixed bug #1108575
2205         * src/pic16/glue.c (emitStatistics): beautified
2206         * device/lib/pic16/libm/Makefile: added include path
2207
2208 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2209
2210         * src/z80/gen.c (aopPut): fixed bug #1103902
2211
2212 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2213
2214         * device/lib/expf.c: fixed bug #1095792
2215
2216 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2217
2218         * device/lib/pic16/libm: added Math library sources
2219
2220 2005-01-24 Raphael Neider <rneider AT web.de>
2221
2222         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2223           to enable upcast to pCodeOpReg2 (there is no type tag to
2224           differenciate the two and pic16_popGet2p cast into PCOR2)
2225         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2226           (sizeof(sectNames) changed to sizeof(sectName))
2227           Both patches fix segfaults under MinGW.
2228
2229 2005-01-23 Raphael Neider <rneider AT web.de>
2230
2231         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2232           Safe_[mc]?alloc()'ed variables
2233         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2234           of (byte sized) temporaries (assign them to WREG for now)
2235         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2236           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2237           this might fix SIGSEGVs on MinGW...
2238         * src/SDCCopt.c (killDeadCode): restored original behaviour
2239           (volatile operands might get thrown away though)
2240
2241 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2242
2243         * src/pic16/gen.c: fixed bug #1106975,
2244         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2245         pointer update, INTCON is saved, global interrupts are disabled and
2246         restored after updateing TOS.
2247         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2248         * added function attribute 'shadowregs' to take advantage of shadow
2249         registers,
2250         * added function attribute 'wparam' as an alternative to the wparam
2251         pragma,
2252         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2253         user declares a non-ISR function as 'shadowregs',
2254         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2255
2256 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2257
2258         * .version: bumped version number to 2.4.8
2259         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2260         pic16 port,
2261         * device/lib/pic16/libio/i2c/: I2C module support library,
2262         * device/include/pic16/i2c.h: I2C support library header,
2263         * device/lib/pic16/libc/stdio/: standard IO support sources,
2264         * (printf_small.c): printf_small() source, supports float print,
2265         * (printf_tiny.c): printf_tiny() source, does not support floats,
2266         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2267         enable global optimizations for entire library source, other
2268         Makefiles in the source tree are also modified to reflect this,
2269         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2270         function,
2271         * doc/sdccman.lyx: updated to reflect new changes,
2272         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2273         sym->onStack if-case,
2274         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2275         sbit, idata, _idata, xdata, _xdata,
2276         * added pragma library, to link an external library, (see doc),
2277         * removed command line options, --pomit-config-words, --pomit-ivt,
2278         --pleave-reset-vector,
2279         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2280         when calling assembler to reflect memory model used, also define
2281         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2282         reflect stack model used,
2283         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2284         on stack return NULL,
2285
2286 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2287
2288         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2289           of the operands is volatile. Fixes #1020220
2290
2291 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2292
2293         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2294         * (OptimizeRegUsage): make sure that there is really no other flow where
2295           the first pCode is used
2296
2297 2005-01-22 Raphael Neider <rneider AT web.de>
2298
2299         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2300           to fix #1106967 (pCode->seq are not set up correctly)
2301
2302 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2303
2304         * src/SDCCglue.c (glue): make sure code area is declared before the
2305         static initialization area.
2306
2307 2005-01-21 Raphael Neider <rneider AT web.de>
2308
2309         * device/lib/Makefile.in: fixed test for pic16 install dir
2310         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2311           optimizations
2312         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2313           added --optimize-goto compiler switch and pragma wparam documentation
2314         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2315         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2316           and PRODH closing bug #1071770 (peephole optimizer)
2317
2318 2005-01-19 Raphael Neider <rneider AT web.de>
2319
2320         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2321           cmdLine buffers (used when calling sdcpp...) are large enough
2322           (MAX_PATH=256 truncates arguments leading to system halts when
2323           used in MinGW...)
2324         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2325         * (genUminus): rewritten to for efficiency
2326         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2327           used uninitialized in some cases)
2328         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2329           copy the third byte from the int -- now assumes 0x80 (data memory)
2330         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2331           operands (genAddLit expects the iCode's operands to swapped as
2332           well), fixed leftover bytes (crashed for short left operands)
2333         * (pic16_genMinusDec): performance improvements, removed false
2334           PIC14 emitSKPNCs
2335         * (pic16_genMinus): fixed to cope with differently sized operands
2336         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2337           for --obanksel > 1
2338         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2339         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2340           new banksel optimization
2341         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2342           analysis for temporary registers (segfaults...)
2343         * src/pic16/peeph.def: added rule
2344
2345 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2346
2347         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2348         which converts a float number to its ASCII representation
2349         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2350         functions to convert the fractional and integer part of a float to ASCII,
2351         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2352         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2353         ram
2354         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2355         _STATMEM macros,
2356         * device/include/pic16/adc.h: added GPL info,
2357         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2358         a pCodeOp as tested operand,
2359         * (genNearPointerGet): optimized bit testing, does not use
2360         intermediate register for bit value, test directly instead with
2361         BTFSS, BTFSC, works only for single bits,
2362         * (genpic16Code): dump the name of the iCode in the asm,
2363         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2364         renamed to pic16_decodeOp,
2365         * (serialRegAssign): do not allocate a temporary register for iCode
2366         sequences that test a single bit for 1/0
2367
2368 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2369
2370         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2371         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2372         access stack and frame pointers. They are initially assigned to
2373         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2374         accessing SFRs. Updated all occurences of modification of stack or
2375         frame pointer in gen.c and pcode.c,
2376         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2377         assigning of a literal value to pointers,
2378         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2379         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2380         selected
2381
2382 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2383
2384         * doc/sdccman.lyx: update documentation about stack pragma, added
2385         some info for stack memory models
2386
2387 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2388
2389         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2390
2391 2005-01-08 Raphael Neider <rneider AT web.de>
2392
2393         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2394           udata sections to fix bug #1097823
2395
2396 2005-01-05 Raphael Neider <rneider AT web.de>
2397
2398         * src/pic16/gen.c (genGenericShift): added handling of differently
2399           sized left operand and result
2400
2401 2005-01-04 Raphael Neider <rneider AT web.de>
2402
2403         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2404         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2405           to hold the condition bit)
2406         * added new version of genCmp (old code available via #define)
2407         * added new version of genShiftLeft/genShiftRight in a generic
2408           way, now supports shifting by negative values
2409         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2410           shiftCount (expected by genGenericShift)
2411         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2412         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2413           dump
2414         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2415           is an invalid literal too...)
2416
2417 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2418
2419         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2420         from Raphael Neider,
2421         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2422         for 8-bit literals. This fixes some literal operands which are sign
2423         extended to 16-bits ints when instruction needs only 8-bits.
2424
2425 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2426
2427         * device/lib/logf.c: added mcs51 assembly version
2428         * device/lib/expf.c: added mcs51 assembly version
2429         * device/lib/_logexpf.c: new shared asm code for expf and logf
2430         * device/include/math.h: add defines for assembly math library
2431         * device/lib/Makefile.in: build new _logexpf.c
2432         * device/lib/libfloat.lib: use new _logexpf.c
2433
2434 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2435
2436         * src/pic/device.c
2437         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2438           device types which have less than 0x7f registers.
2439
2440 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2441
2442         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2443
2444 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2445
2446         * device/lib/printf_fast.c: only build on supported arch.
2447         * device/lib/printf_tiny.c: only build on supported arch.
2448         * device/lib/printf_fast_f.c: only build if asm float lib
2449         * device/lib/_fsget1arg.c: only build if asm float lib
2450         * device/lib/_fsget2args.c: only build if asm float lib
2451         * device/lib/_fsnormalize.c: only build if asm float lib
2452         * device/lib/_fsreturnval.c: only build if asm float lib
2453         * device/lib/_fsrshift.c: only build if asm float lib
2454         * device/lib/_fsswapargs.c: only build if asm float lib
2455         * device/include/stdio.h: don't provide print_fast,
2456           print_fast_f, print_tiny prototypes if --xstack used
2457
2458 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2459
2460         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2461         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2462           to the SOURCES
2463
2464 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2465
2466         * device/lib/printf_fast_f.c: same as printf_fast, but
2467           with floating point enabled
2468         * device/lib/printf_fast.c: minor tweaks
2469         * device/include/stdio.h: add printf_fast_f
2470
2471 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2472
2473         * src/SDCCmain.c: make --float-reent default for mcs51
2474         * device/lib/_fsadd.c: added mcs51 assembly version
2475         * device/lib/_fssub.c: added mcs51 assembly version
2476         * device/lib/_fsmul.c: added mcs51 assembly version
2477         * device/lib/_fsdiv.c: added mcs51 assembly version
2478         * device/lib/_fseq.c: added mcs51 assembly version
2479         * device/lib/_fsneq.c: added mcs51 assembly version
2480         * device/lib/_fsgt.c: added mcs51 assembly version
2481         * device/lib/_fslt.c: added mcs51 assembly version
2482         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2483         * device/lib/Makefile.in: add _fscmp to build
2484         * device/lib/libfloat.lib: add _fscmp to build
2485
2486 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2487
2488         * device/lib/_fs2slong.c: added mcs51 assembly version
2489         * device/lib/_fs2sint.c: added mcs51 assembly version
2490         * device/lib/_fs2schar.c: added mcs51 assembly version
2491         * device/lib/_fs2ulong.c: added mcs51 assembly version
2492         * device/lib/_fs2uint.c: added mcs51 assembly version
2493         * device/lib/_fs2uchar.c: added mcs51 assembly version
2494         * device/lib/_slong2fs.c: added mcs51 assembly version
2495         * device/lib/_sint2fs.c: added mcs51 assembly version
2496         * device/lib/_schar2fs.c: added mcs51 assembly version
2497         * device/lib/_ulong2fs.c: added mcs51 assembly version
2498         * device/lib/_uint2fs.c: added mcs51 assembly version
2499         * device/lib/_uchar2fs.c: added mcs51 assembly version
2500         * device/include/float.h: added #define to select asm vs c
2501
2502 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2503
2504         * device/lib/printf_fast.c: improvements to float output
2505         * device/include/float.h: add defines for assembly float library
2506         * device/lib/_fsget1arg.c: receive 1 float arg
2507         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2508         * device/lib/_fsnormalize.c: normalize a float
2509         * device/lib/_fsreturnval.c: return float, various helper routines
2510         * device/lib/_fsrshift.c: right shift a float's mantissa
2511         * device/lib/_fsswapargs.c: swap 2 floats
2512         * device/lib/Makefile.in: build these 6 new files for mcs51
2513         * device/lib/libfloat.lib: add these 6 files to the library
2514
2515 2004-12-26 Borut Razem <borut.razem AT siol.net>
2516
2517         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2518           built by gcc 3.4.2
2519
2520 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2521
2522         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2523           and fully reentrant and register bank neutral.
2524         * device/lib/printf_fast.c: added float (not enabled by default),
2525           added compact/slower integer (also not enabled by default),
2526           improved size/speed of fast integer code, other minor changes
2527         * device/include/stdio.h, device/lib/Makefile.in,
2528           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2529
2530 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2531
2532         * src/pic16/pcode.c: declaring variables other than at the start of a
2533           block is not supported in C by VC6.
2534
2535 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2536
2537         * applied a previous patch from Raphael Neider that wasn't included
2538         in the previous commits, which fixes infinite loops within jumptable
2539         improvements,
2540         * made some fixes that previous patches introduced
2541
2542 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2543
2544         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2545         that fixes an issue with AOP_PCODE asmop's offset,
2546         * (pic16_popCopyReg): update instance field too,
2547         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2548         function of pic port,
2549         * (genCmp, genAnd, genAssign),
2550         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2551
2552 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2553
2554         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2555         variables initial values to idata section,
2556         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2557         variables in some functions. This utilizes parmBytes field of iCode
2558         structure to hold the offset of the variable in stack. (might be
2559         able to use the stack field too?)
2560         * applied patch from Raphael Neider # ### , # ###
2561         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2562         variable initial values in idata section,
2563         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2564         for static variables with initial value
2565         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2566         applied fix in while loop from Raphael Neider.
2567
2568 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2569
2570         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2571         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2572         * src/ds390/ralloc.c (serialRegAssign): spill bits
2573         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2574         * support/Util/SDCCerr.c,
2575         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2576         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2577         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2578
2579 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2580
2581         * device/include/sdcc-lib.h: inserted LGPL, added includes
2582           asm/ds390/features.h and asm/mcs51/features.h
2583         * device/include/asm/default/features.h,
2584         * device/include/asm/gbz80/features.h,
2585         * device/include/asm/z80/features.h: added empty _AUTOMEM
2586           and _STATMEM
2587         * device/include/asm/ds390/features.h,
2588         * device/include/asm/mcs51/features.h: added files with defines for
2589           _AUTOMEM and _STATMEM indicating automatic and static storage class
2590         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2591         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2592         * src/SDCCicode.c (geniCodeCast),
2593         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2594         * src/SDCCloop.c (loopInduction): removed unused variable lr
2595         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2596           to convertToFcall to include char modulo (RFE 1065037), added check
2597           if left operand is unsigned and use abs of literal value
2598         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2599           as it doesn't work after conversion from peephole.def to peephole.rul
2600         * src/mcs51/gen.c (toBoolean): added check for size,
2601           (genModOneByte): optimized code for signed char modulo a literal
2602           power of 2 (thanks to Hubert Sack),
2603           (genRRC): removed unnecessary "clr c",
2604           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2605         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2606           jump optimization,
2607           swapped rules 256.c and 256.d,
2608           extended 256.d by using new multiple checks (thanks Erik),
2609           added rules 256.e and 256.f,
2610           updated rule 261.a and 261.b to new generated code
2611         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2612
2613 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2614
2615         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2616           induction related bugs, including first part of bug #1074377
2617
2618 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2619
2620         * applied patch from bug-report #1076292,
2621         * applied patches for genAnd and Goto-optimizations for Raphael
2622         Neider,
2623         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2624         dump a less iCode information,
2625         * src/pic16/device.h (pic16_options_t): added field debgen,
2626         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2627         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2628         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2629         puclic,
2630         * (various functions): added macros FENTRY and FENTRY2 to functions,
2631         to emit function prologue,
2632         * (various functions): fixed indentation,
2633         * (genNearPointerGet): fixed loading of FSR0,
2634         * (genPackBits): applied patch from Raphael Neider to fix updating
2635         of FSR0 and touching only the modified bits,
2636         * src/pic16/genarith.c (various functions): added macros FENTRY to
2637         emit function prologue in comments,
2638         * src/pic16/pcode.h: added functions debugf2, debugf3,
2639         * src/pic16/ralloc.c: partial fix for packForPush caused
2640         segmentation fault,
2641
2642 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2643
2644         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2645           <stsp AT users.sourceforge.net> with reversed byte order
2646         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2647
2648 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2649
2650         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2651           bug #1074377
2652         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2653         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2654
2655 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2656
2657         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2658
2659 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2660
2661         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2662           conditions,
2663           (setFromConditionArgs): friendly operand parser for peephole rules,
2664           (operandBaseName, operandsNotRelated): new peephole condition
2665           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2666           architecture specific register naming into account, handles n-way
2667           comparisons, and supports quoted literals
2668         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2669
2670 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2671
2672         * src/mcs51/peeph.def: fixed bug #1076940
2673
2674 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2675
2676         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2677
2678 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2679
2680         Adding support for replacing ljmps with sjmps in jumptables
2681         generated for switch statements. For now you need to set the
2682         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2683         Now 4 algorithms for mcs51 jumptable generation are used:
2684         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2685         addresses loaded pc-relative for up to 112 cases and stack-pushing
2686         target addresses loaded with offset from dptr for up to 256 cases.
2687
2688         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2689         * src/mcs51/main.c: adapted constants for switch table generation
2690         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2691
2692 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2693
2694         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2695         * support/regression/tests/bug1057979.c: added test for bug 1073386
2696
2697 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2698
2699         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2700         compilers
2701
2702 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2703
2704         * src/pic16/device.h,
2705         * src/pic16/genarith.c,
2706         * src/pic16/glue.c,
2707         * src/pic16/main.c,
2708         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2709
2710 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2711
2712         Large cummulative patch for pic16 port.
2713         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2714         to call when a stack overflow occurs,
2715         * (malloc.h): added CVS Id tag,
2716         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2717         variable,
2718         * added libc directory. The current version of LibC contains string
2719         functions, ctype functions and macros and some functions of the
2720         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2721         be extensively tested in the future. Standard disclaimer here.
2722         Library is not automatically build yet. But one can build it by
2723         invoking 'make' inside the libc directory.
2724         * added ADC library under libio. Preliminary version yet.
2725
2726         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2727         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2728         aopForRemat() now and not by pic16_aopOp(),
2729         * (pic16_popGetTempReg): removed warning messgae when allocating
2730         temporary registers, its a buggy feature and will be removed,
2731         * (pic16_popGet): set register instance field in AOP_CRY,
2732         * (pic16_outBitC): fixed for results in size greater than 1,
2733         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2734         * (pic16_storeForReturn): optimized return of 0,
2735         * (genCmp): experimental code for new genCmp which uses PIC18's
2736         special compare&skip instructions. Initial tests fail some times
2737         with variables grater than 1 byte in size, so new code is disabled,
2738         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2739         a single bit,
2740         * (genCast): began a fix to optimize the casting of a bit to another
2741         bit, now assigning a bitfield to another bitfield will fail, sorry,
2742         * src/pic16/main.c: disabled the use of lr-support feature,
2743         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2744         * added some function prototypes, added function _debugf prototype,
2745         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2746         bits with offset (case PO_GPR_BIT),
2747         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2748         command line,
2749         * (isBankInstruction): modified to return 0 for no banking instruction,
2750         and 1 for banking instruction,
2751         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2752         caused stop processing pCodes after a inline assembly block,
2753         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2754         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2755         registers when it shouldn't,
2756         * src/pic16/ralloc.c (allocReg): add preliminary support for
2757         supporting a limited set of temporary registers,
2758
2759 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2760
2761         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2762           genDataPointerSet): ensure assignments always copy in MSB to LSB
2763           order,
2764           (loadRegFromAop): recognize CLRH optimization,
2765           (genFunction): optimize RECEIVE iCodes in reentrant functions
2766
2767 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2768
2769         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2770           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2771           selected.
2772         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2773         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2774           contiguous with data
2775
2776 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2777
2778         * device/lib/_gptrget.c (_gptrget),
2779         * device/lib/_gptrgetc.c (_gptrgetc),
2780         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2781           instead of sjmp to ret
2782         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2783           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2784
2785 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2786
2787         * .version: bumped version to 2.4.7
2788         * device/lib/_gptrget.c (_gptrget): is now _naked
2789         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2790         * device/lib/_gptrput.c (_gptrput): is now _naked
2791         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2792           (createFunction): fixed xstack
2793         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2794         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2795           or bit either,
2796           (geniCodeCritical): store original interrupt state in an iTemp bit
2797           var unless stack-auto
2798         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2799         * src/SDCCmain.c (setIncludePath): added include/target to search path
2800         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2801         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2802           prototype,
2803           (processFuncArgs): put bit vars in bit area
2804         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2805           unsaveRBank): fixed xstack,
2806           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2807           (genFunction, genEndFunction): fixed xstack,
2808           (genAssign): optimization don't walk backwards through mem
2809         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2810         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2811         * support/regression/Makefile: also make library (for stack-auto) when
2812           making "all" and added "test-mcs51-xstack-auto"
2813         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2814         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2815         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2816         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2817         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2818           make-library by MAKE_LIBRARY
2819         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2820           regression tests for xstack
2821         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2822         * support/regression/tests/critical.c: test for critical on mcs51
2823
2824 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2825
2826         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2827           built version of sdcc instead of installed version
2828
2829 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2830
2831         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2832         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2833           vprintf.c now
2834         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2835         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2836           WARNING: remove device/lib/build/z80/printf.o by hand when
2837           updating from previous build!
2838         * device/lib/z80/printf.c: updated comment
2839         * support/regression/tests/bug1057979.c: test all ports now
2840         * support/regression/tests/bug1065458.c: file added
2841
2842 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2843
2844         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2845           *_start and *_end symbols for static functions
2846
2847 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2848
2849         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2850           and search crt0.o in all library paths,
2851           (setIncludePath): proper handling of --nostdinc,
2852           (setLibPath): proper handling of --nostdlib
2853         * support/regression/Makefile,
2854         * support/regression/ports/ds390/spec.mk,
2855         * support/regression/ports/gbz80/spec.mk,
2856         * support/regression/ports/hc08/spec.mk,
2857         * support/regression/ports/mcs51/spec.mk,
2858         * support/regression/ports/mcs51-large/spec.mk,
2859         * support/regression/ports/mcs51-stack-auto/spec.mk,
2860         * support/regression/ports/z80/spec.mk: use include and lib files from
2861           built version of sdcc instead of installed version
2862         * doc/sdccman.lyx: fixed typo in --nostdinc
2863
2864 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2865
2866         * src/pic/pcode.c,
2867         * src/pic/device.c,
2868         * src/pic/ralloc.c,
2869         * src/pic/gen.c : added support to generate code for struct bit fields.
2870
2871 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2872
2873         * as/xa51/xa_version.h,
2874         * device/include/errno.h,
2875         * device/include/regc515c.h,
2876         * device/lib/_itoa.c,
2877         * device/lib/_ltoa.c,
2878         * device/lib/ser_ir_cts_rts.c,
2879         * sim/ucsim/xa.src/glob.cc,
2880         * sim/ucsim/xa.src/inst_gen.cc,
2881         * sim/ucsim/xa.src/xa_bit.cc,
2882         * sim/ucsim/xa.src/xa_sfr.cc,
2883         * sim/ucsim/z80.src/inst_dd.cc,
2884         * sim/ucsim/z80.src/inst_fdcb.cc,
2885         * support/scripts/keil2sdcc.pl,
2886         * src/pic16/pic16.dsp,
2887         * src/pic16/pic16a.dsp: corrected cvs line endings
2888         * device/lib/printf_large.c: fixed bug 1057979
2889         * src/pic16/gen.c: fixed non-C standard code
2890         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2891         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2892         * support/regression/ports/mcs51/support.c: reload T1 asap
2893         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2894           pdata use and clear idata startup behaviour
2895         * support/regression/tests/bug1057979.c: added
2896
2897 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2898
2899         * device/examples/ds390/ow390/ad26.h,
2900         * device/examples/ds390/ow390/cnt1d.h,
2901         * device/examples/ds390/ow390/crcutil.c,
2902         * device/examples/ds390/ow390/ownet.h,
2903         * device/examples/ds390/ow390/owsesu.c,
2904         * device/examples/ds390/ow390/swt12.h,
2905         * device/examples/ds390/ow390/swtoper.c,
2906         * device/examples/ds390/ow390/temp10.h,
2907         * device/examples/ds390/ow390/thermodl.c,
2908         * device/examples/ds390/tinitalk/tinitalk.dsp,
2909         * device/examples/ds390/tinitalk/tinitalk.dsw,
2910         * device/examples/mcs51/clock/hw.h,
2911         * device/examples/mcs51/simple2/go.bat,
2912         * device/examples/serialcomm/windows/serial.h,
2913         * device/examples/xa51/dummy.c,
2914         * device/examples/xa51/hello.c,
2915         * device/include/80c51xa.h,
2916         * device/include/at89x051.h: corrected cvs line endings
2917
2918 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2919
2920         * src/pic16/main.c (options): added command line --gstack, to trace
2921         stack over/under flows,
2922         * added pragma 'wparam' to allow passing first byte of function
2923         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2924         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2925         call to __gstack_test function and sets up the symbol as extern,
2926         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2927         * popaop): added call to pic16_testStackOverflow,
2928         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2929         wparamList list,
2930         * (genCall, genPcall): now all parameters are passed via stack
2931         except in functions that are pass to wparam pragma in which WREG is
2932         used too,
2933         * (genPcall): REENTRANT flag is checked to see if variable prototype
2934         contains reentrant keyword, don't call a non-reentrant function, via
2935         a reentrant function pointer or vice versa, functions are never
2936         passed via WREG,
2937         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2938         D.Winkler,
2939         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2940         SIGSEGV when accessing a NULL register stucture,
2941         * (pic16_printGPointerType): modified to handle UPPER modifier for
2942         function initializers, changed prototype of function to simpler one,
2943         * (pic16_printIvalFuncPtr): check to see if function is already
2944         added in externs list,
2945         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2946         optimized a move from W to SFR with a move to the same register
2947         later after a CALL,
2948         * device/lib/pic16/debug: NEW directory, contains debug features
2949         which are enabled when linking with libdebug.lib, currently command
2950         line option --gstack enables stack pointer tracing for over/under
2951         flow, corresponding sources are in debug/gstack
2952
2953 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2954
2955         * doc/sdccman.lyx: updated SDCC version,
2956         * (PIC16 port): update list of command line options,
2957         * src/pic16/device.h (structure pic16_options_t): added field gstack
2958         to enable stack overflow tracing on push/pops,
2959         * src/pic16/device.c (statistics structure): added statistics
2960         structure,
2961         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2962         pic16_dump_int_registers): increase statistics counters for each
2963         * variable which is encountered
2964         * (pic16_dump_usection): emit each .udata variable to its own udata
2965         section,
2966         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2967         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2968         parameters via stack, otherwise use old scheme,
2969         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2970         assembler output file,
2971         * src/pic16/main.c: added command line options --gstack to enable
2972         push/pop tracing for stack overflow,
2973         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2974         instructions): added size of each instruction,
2975         * (pic16_countInstruction): estimate size of instructions in
2976         the_pFile list, inline assembly blocks are not counted,
2977         * (pic16_FixRegisterBanking): trace previous register usage, when
2978         banksel optimizations is greater than 0, don't emit a redudant
2979         banksel directive,
2980
2981 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2982
2983         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2984         * src/pic16/ralloc.c : applied same fix for pic16.
2985         * src/pic/gen.c : tidied it up a little.
2986
2987 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2988
2989         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2990         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2991
2992 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2993
2994         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2995
2996 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2997
2998         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2999         non-reentrant function __modsint in the interrupt function (thus
3000         corrupting math operations during serial I/O)
3001         * device/lib/ser_ir.c: as above, changed buffersize
3002         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3003         256.c,d for zeroing
3004         * doc/Makefile: added option -t for rsync
3005
3006 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3007
3008         * src/SDCCast.h (struct ast),
3009         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3010
3011 2004-10-20 Borut Razem <borut.razem AT siol.net>
3012
3013         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3014         package
3015
3016 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3017
3018         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3019         makefile targets,
3020         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3021         support functions to replace long sequences of MOVFF's from access
3022         bank registers to stack and vice versa,
3023         * src/pic16/device.h: added new field opt_flags, where optimization
3024         flags can be set to enable certain features,
3025         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3026         * pBlock, (genFunction, genEndFunction): surroung loop for
3027         saving/loading used registers in stack with PC_INFO pCodes,
3028         INF_LREGS. Code in between can then be optimized by pCode optimizer
3029         to support function calls,
3030         * (genDataPointerSet): fixed bug which loaded float fields in
3031         structures with corrupt data,
3032         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3033         in a standard way debug info on stderr. Feature used for developing
3034         and debugging only,
3035         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3036         obsolete chunks of code,
3037         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3038         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3039         * pic16/src/pcode.c (pic16_newpCodeInfo,
3040         * (pic16_newpCodeOpLocalRegs),
3041         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3042         feature,
3043         * (pic16_pCodeConstString): printing of the initial value of a
3044         symbol as a comment is inhibited since parsing was already done by
3045         copyStr and output is corrupt,
3046         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3047
3048 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3049
3050         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3051
3052 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3053
3054         * as/mcs51/lkarea.c: removed old K&R style,
3055           (lnksect): changed check on boundary error,
3056           (lnksect2): changed check on boundary error,
3057           (lnksect2): extend XSTK to end of page if size = 1
3058         * as/mcs51/lkmain.c: removed old K&R style,
3059           (Areas51): create l_IRAM symbol
3060         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3061         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3062           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3063         * device/lib/_mullong.c: added version to be compiled with xstack
3064         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3065         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3066         * device/lib/mcs51/crtxstack.asm: fixed comment
3067         * src/SDCCglue.c: maxInterrupts defaults to 0,
3068           (emitMaps): added pdata,
3069           (createInterruptVect): (re)moved default,
3070           (glue): added pdata,
3071           (glue): moved __start__xstack to XSTK with default size 1
3072         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3073           and options.float_rent when options.stackAuto is set,
3074           (linkEdit): only write XDATA_NAME if provided on command line
3075         * src/SDCCmem.h,
3076         * src/SDCCmem.c: added pdata
3077         * src/port.h: added pdata_name to PORT
3078         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3079           (saveRegisters, unsaveRegisters): removed usage of B,
3080           (genMinus): fixed accumulator clash,
3081           (genJumpTab): added comment, this needs another look
3082         * src/mcs51/gen.c: added check for "B in use" paranoia,
3083           added pushB() and popB()
3084         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3085           chance
3086         * src/avr/main.c,
3087         * src/ds390/main.c,
3088         * src/hc08/main.c,
3089         * src/mcs51/main.c,
3090         * src/pic/main.c,
3091         * src/pic16/main.c,
3092         * src/xa51/main.c,
3093         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3094           added PSEG (PAG,XDATA) or NULL to port specifier
3095         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3096         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3097           (_mcs51_genInitStartup): removed __start__xstack equ,
3098           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3099         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3100         * src/z80/gen.c (_rleAppend): fixed warnings
3101         * support/regression/tests/zeropad.c: added pdata test
3102         * .version: bumped to 2.4.6
3103
3104 2004-10-17 Borut Razem <borut.razem AT siol.net>
3105
3106         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3107         as a part of nightly build
3108
3109 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3110
3111         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3112         WREG holds the first byte function parameters,
3113         * (aopForSym): take special case for symbols which are in FARSPACE
3114         but in CODESPACE too,
3115         * (assignResultValue): modified to take into account _G.useWreg,
3116         * (genCall): don't use wreg for parameter passing when function is
3117         declared as reentrant, too, added optimization INCF to stack
3118         pointer when stack parameter count is 1,
3119         * (genFunction, genEndFunction): refurnished and fixed to not using
3120         wreg for passing parameters when function has varargs or is
3121         reentrant, fixed bug with symbol name compare for generating
3122         functions in absolute address,
3123         * (pic16_storeForReturn): refurnished,
3124         * (genCmp): began writing a new version of the function, not ready
3125         yet, therefore it is disabled,
3126         * (genAssign): do not read code memory when assigning a function to
3127         a pointer function,
3128         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3129         array of characters, not pointer,
3130         * (pic16initialComments): in debug mode emit an .ident directive for
3131         the assembler,
3132         * (_process_pragma): emit a new warning type (internal to pic16)
3133         when setting stack to default length, emit a similar warning when
3134         placing a function at absolute address and address is not word aligned
3135         * (_pic16_parseOptions): added 'return TRUE' statement,
3136         * (_pic16_linkEdit): if compiling a source, then add the source's
3137         file object, first in the list of objects to link,
3138
3139 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3140
3141         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3142         * src/pic/main.c : removed VC warning.
3143         * src/pic/gen.c : changed comment.
3144
3145 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3146
3147         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3148         reference to a deprecated symbol _GPTRREG was causing failure to
3149         link. Thanks G. M. Gallant for the info.
3150
3151 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3152
3153         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3154         comments for Bugs item #954788.
3155
3156 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3157
3158         * src/pic16/device.c (pic16_dump_gsection,
3159         * pic16_groupRegistersInSection): handle symbols declared to be in
3160         access bank differently,
3161         * src/pic16/gen.c (struct _G): added field resDirect,
3162         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3163         send values read from stack directly to result and don't allocate
3164         temporary values,
3165         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3166         same registers,
3167         * (pic16_sameRegsOfs): NEW,
3168         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3169         free because they were not allocated from temporary pool,
3170         * pic16_popRegFromString): workaround to fix a problem with
3171         allocating variables twice or never,
3172         * (genGenPointerGet): using PRODL instead of FSR0H,
3173         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3174         instead of FSR0H,
3175         * (genAssign): take advantage of the _G.resDirect flag,
3176         * (genCast): around line 11844, use mov2f instead of directly
3177         MOVFF'ing between operands to account for literal values,
3178         * src/pic16/genutils.c: some new debug functions for gpsim have been
3179         added,
3180         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3181         float with integer part only,
3182         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3183         place variables in access bank
3184         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3185         updated sources to reflect recent changes in gen.c
3186
3187 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3188
3189         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3190         sources that searched for headers in installation path, now the
3191         device/include/pic16 is used,
3192         * src/pic16/glue.c (pic16glue),
3193         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3194         .line directives if not in debug mode, this suppresses assembler's
3195         warnings for ignored directives
3196
3197 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3198
3199         * src/port.h: made reset_regparms prototype void parameter explicit.
3200         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3201         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3202         * doc/sdccman.lyx: documented warning disabling and how to use
3203           printf_large to make it print floats.
3204         * device/include/stdbool.h: NEW
3205         * device/lib/_atof.c,
3206         * device/lib/_divuint.c,
3207         * device/lib/_divulong.c,
3208         * device/lib/expf.c,
3209         * device/lib/printf_large.c,
3210         * device/lib/sincosf.c,
3211         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3212         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3213           a completely reentrant lib.
3214
3215 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3216
3217         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3218         * device/include/pic16/stdio.h: fixed bug with colon
3219
3220 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3221
3222         * device/include/pic16/stdio.h,
3223         * device/include/pic16/stdlib.h,
3224         * device/include/pic16/math.h: NEW
3225         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3226         declared as _naked to reduce overhead
3227         * device/lib/Makefile.in (target port-specific-objects-pic16):
3228         changed * to *.* so to ignore the CVS directory,
3229         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3230         stacked variables back in stack,
3231         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3232         corruption
3233
3234 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3235
3236         * .version: bumped version number to 2.4.5
3237         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3238         * support/Util/SDCCerr.c (messages structure): added entry for
3239         W_POSSBUG2
3240
3241         Large cumulative patch for pic16 port and libraries.
3242         * device/include/pic16/sdcc-lib.h,
3243         * device/include/pic16/stdarg.h,
3244         * device/include/asm/pic16/features.h,
3245         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3246         * device/include/pic16/float.h: changes reentrant keyword with
3247         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3248         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3249         updated target build-libraries to include objects from gptr,
3250         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3251         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3252         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3253         all function headings,
3254         * src/SDCCmain.c: added global parameter userIncDirsSet,
3255         * (parseCmdLine): when option -I is encountered add directory to
3256         userIncDirsSet too,
3257         * src/version.awk: added space between control and long,
3258         * src/pic16/NOTES: added some notes for the port,
3259         * src/pic16/gen.c: added prototype for mov2fp function,
3260         * (fReturnpic16[]): properly named return value registers,
3261         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3262         * (aopForSym): added code to handle symbols with onStack flag set,
3263         symbols onStack are allocated PTRSIZE bytes,
3264         * (aopFreeAsmop): handles special case where asmops are stack objects,
3265         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3266         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3267         added argument lock to trace flaws in allocating temporary registers
3268         when developing port,
3269         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3270         * (pic16_popRegFromString): reenabled allocating a direct register
3271         from string,
3272         * (assignResultValue): various beautifications,
3273         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3274         referenced function argument,
3275         * (genIpush): reenabled to allow stacked arguments, handles only
3276         ic->parmPush iCodes,
3277         * (genCall, genPcall): major changes to allow for variable argument
3278         functions, fixed a bug with falsely restoring stack pointer after
3279         returning from call,
3280         * (genFunction): pending code for critical function,
3281         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3282         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3283         * (genNearPointerGet): fixed bug with indirect reading, was always
3284         reading from INDF0
3285         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3286         pointers,
3287         * (genAddrOf): rewrote code to take address of a stacked function parameter
3288         * (genCast): fixed casting to generic pointer type,
3289         * src/pic16/gen.h: added AOP_STA,
3290         * (struct asmop): added field stk,
3291         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3292         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3293         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3294         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3295         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3296         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3297         generic pointers,
3298         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3299         and library paths,
3300         * (pic16_port structure): generic pointer size is set to 3,
3301         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3302         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3303         compiler warning,
3304         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3305         operand is an iTemp,
3306
3307 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3308
3309         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3310         * debugger/mcs51/simi.c: addapt new syntax of s51
3311
3312 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3313
3314         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3315         * src/pic16/pcode.c: commented out some calls to free() in order to
3316         fix bug #989576,
3317
3318 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3319
3320         * src/SDCCicode.h,
3321         * src/SDCCicode.c (isiCodeInFunctionCall),
3322         * src/avr/ralloc.c (selectSpil),
3323         * src/pic/ralloc.c (selectSpil),
3324         * src/pic16/ralloc.c (selectSpil),
3325         * src/ds390/ralloc.c (selectSpil),
3326         * src/hc08/ralloc.c (selectSpil),
3327         * src/xa51/ralloc.c (selectSpil),
3328         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3329         stack in the middle of a function call sequence (fixes bug #1020268)
3330         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3331         costs associated with the minimum switch case.
3332
3333 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3334
3335         * src/SDCC.lex: fixed bug #1030549
3336
3337 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3338
3339         * src/SDCCcse.h (struct cseDef),
3340         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3341         over a function call if the CSE is derived from a symbol whose
3342         address has been taken (fixes bug #1029883)
3343         * support/regression/tests/bug-1029883: a new regression test for
3344         this bug
3345
3346 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3347
3348         * src/hc08/gen.c (emitinline): fixed bug #1029778
3349         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3350         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3351         and starts toward RFE #905167)
3352
3353 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3354
3355         * src/pic16/gen.c (mov2f): New function to move an operand to
3356         another without considering if it is a literal or a register,
3357         * (pic16_sameRegs): don't check if they are both AOP_REG,
3358         * (AccRsh): removed andmask=0 lines,
3359         * (genLeftShift): duplicated to be improved in future versions,
3360         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3361         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3362         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3363         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3364         * (insertBankSwitch): fixed inserting banksel directives algorithm
3365         for instructions that follow a skip instruction, this fixes a report
3366         for broken subtraction code generation,
3367         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3368         iCode is a left op, just in case result and right share the same
3369         registers
3370
3371 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3372
3373         * src/hc08/main.c,
3374         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3375         preservation of HX
3376         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3377         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3378         on 2004-09-12; it was buggy
3379
3380 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3381
3382         * src/SDCCsymt.h: removed RESULT_CHECK
3383         * src/SDCCast.c,
3384         * src/SDCCglue.c,
3385         * src/SDCCval.c,
3386         * src/pic/glue.c,
3387         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3388
3389 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3390
3391         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3392         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3393         configuration values no more rejected by compiler, they are assigned
3394         to configuration registers with a warning message instead,
3395         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3396         the for-loop so last conf register is emitted too,
3397         * (_pic16_initPaths): link library libsdcc.lib by default,
3398         * (_hasNativeMulFor): modified test for multiplication according to
3399         Raphael Neider's remarks. Integer multiplication is also done with
3400         support functions,
3401         * device/include/pic16/pic18fregs.h: corrected type error in while
3402         testing and including 18f6720 header file
3403
3404 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3405
3406         * src/pic16/device.h (pic16_options): removed field use_crt,
3407         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3408         until an optimization to handle single bits is added,
3409         * (pic16_loadFSR0): moved before genUnpackBits,
3410         * (genAnd): some white lines removed,
3411         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3412         leave_reset flags in pic16_options when using crt modules,
3413
3414 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3415
3416         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3417           for bugs 898889 & 979599. Also used some safer print instructions.
3418
3419 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3420
3421         * src/pic16/device.h (pic16_options_t): added field use_crt,
3422         crt_name, no_crt,
3423         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3424         catch a probable future bug,
3425         * src/pic16/gen.c: aopIdx function commented out,
3426         * (genAssign): commented out old code which used aopIdx,
3427         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3428         code, added if conditionals to take into account the --use-crt
3429         command line options,
3430         * src/pic16/main.c (pic16_optionsTable): added new command line
3431         options, --use-crt= and --no-crt,
3432         * (_pic16_linkEdit): now the proper crt object is added in the
3433         linker command line except than when --no-crt is specified,
3434         * src/pic16/pcode.c,
3435         * src/pic16/pcode.h: added some structures and functions for a new
3436         optimization scheme to compansate for instruction overhead between
3437         same iCodes, this scheme is currently under development and is not
3438         working in any way,
3439         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3440         to && operator,
3441         * device/lib/pic16/startup/crt0i.c,
3442         * device/lib/pic16/startup/crt0iz.c: added global char variable
3443         __uflags to force the generation of an idata section
3444
3445 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3446
3447         * doc/Makefile,
3448         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3449         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3450
3451 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3452
3453         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3454         Frieder) and clarified the default code optimization mode
3455
3456 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3457
3458         * src/SDCC.lex (doPragma, process_pragma),
3459         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3460         "opt_code_size", and "opt_code_balanced"
3461         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3462         regrouped options by category, added support for category headers
3463         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3464         and "--opt-code-size"
3465         * doc/sdccman.lyx: documented these new options and pragmas
3466         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3467         preference into account
3468
3469 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3470
3471         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3472           geniCodePreDec): Fixed bug 904237 by generating a warning
3473         * src/SDCCerr.h,
3474         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3475
3476 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3477
3478         * src/pic/device.c : When no max ram set validate full memory range.
3479         * src/pic/pcode.c,
3480         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3481
3482 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3483
3484         * device/lib/_gptrget.c,
3485         * device/lib/_gptrput.c: updated comment
3486         * device/lib/calloc.c,
3487         * device/lib/free.c,
3488         * device/lib/malloc.c,
3489         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3490         * src/SDCCcse.c (cseBBlock),
3491         * src/SDCCicode.c (printOperand, geniCodeArray),
3492         * src/SDCCicode.h (struct operand): fixed bug 868103
3493         * support/regression/tests/bug-868103.c: added
3494         * src/SDCCast.c (searchLitOp),
3495         * src/SDCCcse.h (struct cseDef),
3496         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3497         * src/SDCCicode.h (struct operand),
3498         * src/SDCCsymt.h (struct sym_link),
3499         * src/avr/gen.c (hasInc),
3500         * src/ds390/gen.c (hasInc),
3501         * src/hc08/gen.c (genPlusIncr, hasInc),
3502         * src/mcs51/gen.c (hasInc),
3503         * src/pic16/glue.c (pic16_printIvalChar),
3504         * src/pic16/ralloc.c (regWithIdx),
3505         * src/xa51/gen.c (hasInc) : removed warnings
3506         * src/SDCCast.c (createBlock): added comment ???
3507         * src/hc08/ralloc.c: updated comments
3508
3509 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3510
3511         * doc/sdccman.lyx: updated section on switch statements, added
3512         section about semaphore locking
3513         * doc/Makefile: added option -info for latex2html
3514         * device/lib/_gptrget.c,
3515         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3516
3517 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3518
3519         * src/pic/device.h,
3520         * src/pic/device.c,
3521         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3522          maxram is less than 0x100.
3523
3524 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3525
3526         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3527
3528 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3529
3530         * src/port.h,
3531         * src/mcs51/main.c,
3532         * src/ds390/main.c,
3533         * src/z80/main.c,
3534         * src/hc08/main.c,
3535         * src/pic/main.c,
3536         * src/pic16/main.c,
3537         * src/avr/main.c,
3538         * src/xa51/main.c
3539         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3540         a jump table is the best form for a switch statement, including
3541         automatic insertion of missing cases to make the case range
3542         continuous. Developed in collaboration with Frieder Ferlemann.
3543
3544 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3545
3546         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3547         accumulator result if it needs sign extension
3548
3549 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3550
3551         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3552
3553 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3554
3555         * device/lib/gbz80/printf.c,
3556         * device/lib/z80/printf.c: removed define for NULL
3557
3558 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3559
3560         * as/xa51/xa_link.c,
3561         * device/examples/ds390/ow390/ad26.c,
3562         * device/examples/ds390/ow390/cnt1d.c,
3563         * device/examples/ds390/ow390/counter.c,
3564         * device/examples/ds390/ow390/ds2480.h,
3565         * device/examples/ds390/ow390/ds2480ut.c,
3566         * device/examples/ds390/ow390/findtype.c,
3567         * device/examples/ds390/ow390/gethumd.c,
3568         * device/examples/ds390/ow390/owllu.c,
3569         * device/examples/ds390/ow390/ownetu.c,
3570         * device/examples/ds390/ow390/swt12.c,
3571         * device/examples/ds390/ow390/swtloop.c,
3572         * device/examples/ds390/ow390/temp.c,
3573         * device/examples/ds390/ow390/temp10.c,
3574         * device/examples/ds390/ow390/thermo21.c,
3575         * device/examples/ds390/ow390/tinilnk.c,
3576         * device/examples/ds390/ow390/tstfind.c,
3577         * device/examples/serialcomm/windows/serial.cpp,
3578         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3579         * device/include/reg51.h: fixed line endings for cvs
3580
3581 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3582
3583         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3584         packRegsForAccUse, packRegisters): new accumulator register
3585         packing algorithm
3586         * support/regression/ports/hc08/support.c (_putchar): suppress
3587         warning of unused variable
3588         * src/SDCCicode.c: added SWAP entry to codeTable
3589
3590 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3591
3592         * device/lib/sprintf.c: forgot to add this file before previous commit
3593
3594 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3595
3596         * src/pic16/gen.c (genPackBits): added operand right in function
3597         parameters, load result directly if p_type is POINTER (that is
3598         called by genNearPointerSet)
3599         * (genUnPackBits): added operand left in function parameters,
3600         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3601         FSR0 if accessing bitfields,
3602
3603 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3604
3605         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3606           _print_format; updated printf, sprintf, vsprintf
3607         * device/include/asm/default/features.h: corrected comment/define
3608         * device/lib/Makefile.in: added sprintf.c
3609         * device/lib/libsdcc.lib: added sprintf module
3610         * device/lib/printf_large.c,
3611         * device/lib/vprintf.c,
3612         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3613           into these 3 files
3614         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3615         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3616         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3617           hc08 test
3618         * support/regression/tests/zeropad.c: define idata as data for hc08
3619
3620 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3621
3622         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3623         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3624         labels are referenced at least once (even if a reference is not found)
3625         * src/hc08/gen.c (emitcode): set isComment flag for comments
3626         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3627         loads), rules 6a..6b (optimize jumps to return)
3628
3629 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3630
3631         * device/lib/acosf.c (acosf),
3632         * device/lib/asinf.c (asinf),
3633         * device/lib/atanf.c (atanf),
3634         * device/lib/ceilf.c (ceilf),
3635         * device/lib/cosf.c (cosf),
3636         * device/lib/coshf.c (coshf),
3637         * device/lib/cotf.c (cotf),
3638         * device/lib/fabsf.c (fabsf),
3639         * device/lib/floorf.c (floorf),
3640         * device/lib/log10f.c (log10f),
3641         * device/lib/logf.c (logf),
3642         * device/lib/sinf.c (sinf),
3643         * device/lib/sinhf.c (sinhf),
3644         * device/lib/sqrtf.c (sqrtf),
3645         * device/lib/tanf.c (tanf),
3646         * device/lib/tanhf.c (tanhf),
3647         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3648         replaced all instances of "reentrant" in the library functions
3649         defined in math.h with this macro.
3650         * support/regression/tests/float_trans.c: reenabled test for hc08
3651
3652 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3653
3654         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3655         erroneously deleted
3656
3657 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3658
3659         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3660         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3661         multi-byte volatile operands are used
3662         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3663         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3664         initialization to area GSINIT0 so that it would always precede
3665         any static initializers in GSINIT
3666         * support/regression/tests/zeropad.c: fixed idata define for hc08
3667         * support/regression/tests/bug-927659.c,
3668         * support/regression/tests/float_trans.c: disabled tests for hc08
3669         pending missing library routines
3670         * .version: increased version number to 2.4.4 - hc08 port now passes
3671         regression tests
3672
3673
3674 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3675
3676         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3677         * Makefile.common.in,
3678         * as/Makefile,
3679         * as/hc08/Makefile.in,
3680         * as/mcs51/Makefile.in,
3681         * as/z80/Makefile.in,
3682         * debugger/mcs51/Makefile.in,
3683         * device/include/Makefile.in,
3684         * device/lib/Makefile.in,
3685         * doc/Makefile,
3686         * link/Makefile,
3687         * link/z80/Makefile.in,
3688         * packihx/Makefile.in,
3689         * sim/ucsim/main_in.mk,
3690         * sim/ucsim/avr.src/Makefile.in,
3691         * sim/ucsim/doc/Makefile.in,
3692         * sim/ucsim/gui.src/serio.src/Makefile.in,
3693         * sim/ucsim/hc08.src/Makefile.in,
3694         * sim/ucsim/s51.src/Makefile.in,
3695         * sim/ucsim/xa.src/Makefile.in,
3696         * sim/ucsim/z80.src/Makefile.in,
3697         * src/Makefile.in,
3698         * support/cpp2/Makefile.in,
3699         * support/librarian/Makefile,
3700         * support/makebin/Makefile: added DESTDIR to the install path proposed
3701         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3702         * doc/sdccman.lyx: added DESTDIR documentation
3703
3704 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3705
3706         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3707         instruction for interrupt handlers, use fast returns when returning
3708         from high priority interrupts
3709
3710 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3711
3712         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3713         code generation
3714         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3715         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3716         bugs, ported much of Bernhard's code from mcs51
3717         * src/mcs51/gen.c (genSend),
3718         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3719         than one when calling a reentrant function
3720         * device/lib/_mullong.c: defined an alternate struct layout for big
3721         endian ports (hc08)
3722
3723 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3724
3725         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3726         test
3727
3728 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3729
3730         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3731         are sane and complete before asking the port its prefered parameter
3732         passing method (fixes bug #1017633)
3733         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3734         and _ret3
3735
3736 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3737
3738         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3739         problem in bitfields >= 8 bits.
3740
3741 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3742
3743         * src/SDCCsymt.c: undid changes that were not meant to be committed
3744
3745 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3746
3747         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3748
3749 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3750
3751         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3752           copied and wrong bit got inverted
3753
3754 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3755
3756         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3757         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3758         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3759         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3760         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3761         assignments to bitfields at known addresses
3762         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3763         reads from bitfields at known addresses
3764         * src/hc08/ralloc.c (packRegisters),
3765         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3766         genhc08Code): optimize pointer get values used as conditionals
3767         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3768         and branch
3769
3770 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3771
3772         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3773         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3774         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3775         as conditionals
3776
3777 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3778
3779         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3780
3781 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3782
3783         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3784         related problems
3785
3786 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3787
3788         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3789
3790 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3791
3792         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3793         mcs51 port
3794
3795 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3796
3797         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3798
3799 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3800
3801         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3802         cases use more compact code.
3803
3804 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3805
3806         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3807
3808 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3809
3810         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3811
3812 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3813
3814         * src/SDCCsymt.h,
3815         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3816         parameter of changePointer() from symbol* to sym_link*
3817         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3818         * src/SDCCsymt.c (compareType): void* type is castable to other
3819         pointers, but not necesarily an exact match.
3820         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3821         is no longer blindly treated as an exact match.
3822         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3823
3824 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3825
3826         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3827
3828 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3829
3830         * src/pic/gen.c,
3831         * src/pic/pcode.c,
3832         * src/pic/ralloc.h,
3833         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3834
3835 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3836
3837         * src/pic/device.c,
3838         * src/pic/device.h,
3839         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3840
3841 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3842
3843         * src/mcs51/gen.c (emitcode): fixed bug #992819
3844
3845 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3846
3847         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3848           there's no need to make it worse
3849
3850 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3851
3852         * src/mcs51/ralloc.c (deassignLR),
3853         * src/ds390/ralloc.c (deassignLR),
3854         * src/hc08/ralloc.c (deassignLR),
3855         * src/z80/ralloc.c (deassignLR),
3856         * src/pic/ralloc.c (deassignLR),
3857         * src/pic16/ralloc.c (deassignLR),
3858         * src/avr/ralloc.c (deassignLR),
3859         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3860         rlivePoint): fixed another part of bug #971834
3861
3862 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3863
3864         * src/z80/main.c: enabled "critical" keyword
3865         * src/z80/mappings.i,
3866         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3867         functions (fixes bug #979646)
3868         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3869
3870 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3871
3872         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3873           such as c:\mydir.
3874
3875 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3876
3877         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3878           doesn't disable too much optimizations
3879
3880 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3881
3882         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3883
3884 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3885
3886         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3887
3888 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3889
3890         * src/pic/gen.c tidied up tabs
3891         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3892         * src/pic/main.c tidied up tabs
3893         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3894         * src/pic/pcoderegs.c tidied up tabs
3895         * src/pic/ralloc.c tidied up tabs
3896
3897 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3898
3899         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3900         to S_FIXED for pic16 port and when symbol is not in level 0,
3901         allocate for S_REGISTER storage class and pic16 port, too,
3902         * src/pic16/device.h: prototype for checkSym,
3903         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3904         * (pic16_assignConfigWordValue): test the value and the mask to
3905         validate that the value is suitable for the configuration word,
3906         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3907         collect extern declared symbols, don't emit symbol twice, check
3908         first if symbol is in publics set first,
3909         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3910         * added command line '--fstack' which enables an experimental
3911         feature for stack access, too buggy to be used yet...
3912         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3913         * (pic16_allocDirReg): when register has storage class S_REGISTER
3914         allocate in pic16_dynAccessRegs,
3915         * device/include/pic16/pic18f????.h: modified configuration word
3916         naming convention, words started as CONFIG0H but should be CONFIG1H
3917
3918 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3919
3920         * device/include/mcs51reg.h: fixed bug 970993
3921
3922 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3923
3924         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3925         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3926         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3927         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3928         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3929         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3930           error/warning numbers,
3931           added function setWarningDisabled()
3932         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3933         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3934           _memcmp.c _memmove.c calloc.c realloc.c free.c
3935         * support/regression/tests/malloc.c: added tests for new functionality
3936         * support/regression/tests/zeropad.c: added tests for truncated initializers
3937           and initialized char arrays starting with '\x0'
3938         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3939
3940 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3941
3942         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3943
3944 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3945
3946         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3947         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3948         peephole 177.e. Thanks to anonymous
3949
3950 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3951
3952         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3953         function isn't used in the source but referenced as a
3954         variable initializer then declare it as extern in .asm file
3955
3956 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3957
3958         * .version: increased version number to 2.4.3
3959
3960         Adding version extension according to ChangeLog CVS revision
3961         * src/Makefile.in (target all): added dependency 'version.h'
3962         * (rule version.h): added rule to create version.h from ChangeLog,
3963         * (rule dep): added dependency version.h,
3964         * src/version.awk: AWK script to create version.h
3965         * src/SDCCdwarf2.c (dwWriteModule),
3966         * src/SDCCglue.c (initialComments),
3967         * src/SDCCmain.c (printVersionInfo): modified to write after
3968         version string the version extension number,
3969         * src/SDCCutil.c: included "version.h"
3970         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3971         number,
3972         * src/SDCCutil.h: added prototype for getBuildNumber
3973
3974         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3975         includeDirsSet, too,
3976         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3977         const char [] is found in function prototype...
3978
3979         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3980         moving to WREG with source is already in WREG,
3981         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3982         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3983         * (aopForSym): stack'ed symbols are partially supported, added
3984         if-clause to support symbols in FARSPACE,
3985         * (sameRegs): added test for AOP_ACC to see if registers are same,
3986         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3987         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3988         * (pic16_popRegFromString): will not allocate a new register if it
3989         doesn't find one by name, bug may have introduced...
3990         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3991         * (genIpush): revived to use pic16 port's stack,
3992         * (genAddrOf): added incomplete case for stack'ed operand,
3993         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3994         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3995         can handle multibyte operands,
3996         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3997         * (pic16initialComments): added message for MPLAB compatibility
3998         mode enabled,
3999         * src/pic16/main.h: prototype for pic16_mplab_comp,
4000         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4001         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4002         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4003         because of increased complexity of procedure,
4004         * (_process_pragma): stack pragma changed to format 'stack pos len',
4005         emit symbol '_stack_end' to conform with gplink,
4006         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4007         to search for register,
4008         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4009         PO_GPR_REGISTER,
4010         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4011         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4012         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4013         case for PO_GPR_REGISTER,
4014         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4015         dies, the new era is ahead !...
4016         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4017         pic16_dynInternalRegs,
4018         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4019         * (pic16_allocDirReg): minor optimizations and bug fixes,
4020         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4021
4022         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4023         load stack and frame pointer with address of 'stack_end' symbol
4024
4025 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4026
4027         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4028         without source code but only variable initializers
4029
4030 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4031
4032         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4033         external are not declared as extern to reduce overhead while linking
4034
4035 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4036
4037         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4038
4039 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4040
4041         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4042           Yee Keat for the patch
4043         * src/SDCCast.c (decorateType): fixed bug #979599
4044         * src/ds390/gen.h: removed local fReturnSizeDS390
4045         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4046         * src/ds390/gen.c (genAnd, genOr, genXor),
4047         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4048
4049 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4050
4051         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4052         add relFilesSet to $3, manipulate $2 to handle linking of object
4053         files without source files in command line,
4054         * device/include/pic16 (all headers): added ID location macros,
4055         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4056         entries for ID location bytes,
4057         * (pic16_assignIdByteValue): NEW,
4058         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4059         added field dumpcalltree to pic16_options_t,
4060         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4061         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4062         emitting rFalseIfx label after check_carry label,
4063         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4064         pic16_emitDIRegs), NEW
4065         * (pic16glue): dump .calltree file when option --calltree found,
4066         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4067         * (_pic16_genAssemblerPreamble): emit ID locations after
4068         configuration registers,
4069         * (pic16_linkCmd): modifications of the link command,
4070         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4071         * (pic16_pCodeInitRegisters): don't init stack registers,
4072         * (pic16_findPrevInstruction): fixed bug,
4073         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4074         bug with immediate registers,
4075         * (buildCallTree): traces stack push and pop,
4076         * (pct2): dump also stack usage for each function,
4077         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4078         * (pic16_allocDirReg): various modifications,
4079         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4080         fixed to 1,
4081
4082 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4083
4084         * src/pic16/pcode.c: removed buggy double colon
4085
4086 2004-07-01 Borut Razem <borut.razem AT siol.net>
4087
4088         * support/scripts/sdcc.nsi: added include/pic16 to setup
4089
4090 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4091
4092         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4093         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4094         target 'clean',
4095         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4096         specific command line arguments. Also added sample lkr script
4097         for placing a variable at a specific memory bank.
4098         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4099         at a specific memory bank,
4100         * (pic16_dump_isection): fixed bug which caused string literals to
4101         be omitted when dumping idata section,
4102         * (pic16_groupRegistersInSection): added code to handle registers
4103         in specific memory banks,
4104         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4105         public, all references are renamed too,
4106         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4107         AOP_DPTR2,
4108         * (pic16_storeForReturn): added case to handle when dest is WREG,
4109         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4110         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4111         pic16_rel_udata, check to see if that register is marked as being
4112         a member of a specific memory bank,
4113         * (pic16_printIvalCharPtr): added code to add string literals either
4114         to code or the idata sections,
4115         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4116         also accept the 'udata' pragma,
4117         * src/pic16/main.h: new structure types sectName and sectSym
4118         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4119         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4120         * (pic16_findPrevInstruction): fixed, it returned nothing,
4121         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4122         instruction combinations,
4123         * (pic16_FixRegisterBanking): heavily reorganised,
4124         * (pic16_AnalyzeBanking): if generating banksel directives is
4125         disabled, then don't call FixRegisterBanking at all,
4126         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4127         completely removed,
4128         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4129
4130 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4131
4132         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4133         Phuah Yee Keat <yk.phuah AT nestac.com>
4134
4135 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4136
4137         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4138         correctly the IVT even if it is relocated to some other location
4139
4140 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4141
4142         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4143         * device/include/pic16/pic18f2220.h: NEW,
4144         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4145         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4146         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4147         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4148         nodefaultlibs, ivt_loc is the location of the interrupt vector
4149         table, and nodefaultlibs signs that default libraries should not be
4150         linked in link stage,
4151         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4152         according to --ivt-loc argument,
4153         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4154         when pragma stack is found,
4155
4156 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4157
4158         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4159         256 (range check), 257 (do while), 258.a-f (bit banging
4160         f.e. on 3-wire SPI bus)
4161
4162 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4163
4164         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4165         variables used exclusively within a loop
4166
4167 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4168
4169         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4170
4171 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4172
4173         * src/SDCClrange.c (computeClash): fixed bug #971834
4174
4175 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4176
4177         * src/mcs51/gen.c (genCmp): fixed bug #975903
4178         * src/hc08/gen.c (operandsEqu),
4179         * src/ds390/gen.c (operandsEqu),
4180         * src/z80/gen.c (operandsEqu),
4181         * src/pic/gen.c (operandsEqu),
4182         * src/pic16/gen.c (operandsEqu),
4183         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4184         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4185
4186 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4187
4188         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4189
4190 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4191
4192         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4193         default case in switch statement,
4194         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4195         to eliminate problem with initialisation of pointers, but problem
4196         still exists,
4197         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4198         * (emitStaticSegment): removed various lines emitting debug info,
4199         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4200         added processor registers for utilizing EEPROM,
4201         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4202         configurable and set 8
4203
4204 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4205
4206         * .version: increased version number to 2.4.2,
4207
4208         Cumulative patch for pic16 port
4209         * src/pic16/device.c: changed scheme to dump initial values for
4210         variables in idata segment, all print_idata* functions were removed,
4211         now the pic16_printIval* will be called,
4212         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4213         * _pic16_printPointerType, pic16_printPointerType,
4214         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4215         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4216         NEW, similar to the respective functions in SDCCglue.c,
4217         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4218         way, emitting hex bytes,
4219         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4220
4221 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4222
4223         * src/avr/ralloc.c (serialRegAssign),
4224         * src/xa51/ralloc.c (serialRegAssign),
4225         * src/pic/ralloc.c (serialRegAssign),
4226         * src/pic16/ralloc.c (serialRegAssign),
4227         * src/hc08/ralloc.c (serialRegAssign),
4228         * src/z80/ralloc.c (serialRegAssign),
4229         * src/ds390/ralloc.c (serialRegAssign),
4230         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4231
4232 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4233
4234         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4235         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4236
4237 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4238
4239         Cumulative patch for pic16 port:
4240         * src/pic16/device.h (typedef PIC16_device) modified fields for
4241         defining microcontrollers,
4242         * src/pic16/device.c: added new info for all devices in Pics16 array,
4243         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4244         to be optimised out by the pCode optimiser,
4245         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4246         specially, bug reported by G.M. Gallant,
4247         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4248         as force'd so that cannot be optimised out by pCode optimiser,
4249         * src/pic16/pcode.c,
4250         * src/pic16/pcodepeeph.c,
4251         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4252         they are disabled by default, but can be enabled explicit with
4253         command argument --denable-peeps, for testing,
4254         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4255         --pomit-ivt in COMPILE_FLAGS
4256
4257 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4258
4259         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4260           compilation on MSVC
4261
4262 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4263
4264         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4265
4266 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4267
4268         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4269         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4270
4271 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4272
4273         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4274         would only assign 0x300001 register.
4275
4276 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4277
4278         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4279         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4280
4281 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4282
4283         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4284         for ds80c400
4285         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4286         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4287         added peephole 254 (left shift), 255 (jump table)
4288
4289 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4290
4291         * device/lib/Makefile.in: removed comment line with model-pic16,
4292         * (target port-specific-objects-pic16): the libraries and objects
4293         are copied to the build directory form the device/lib/pic16/bin
4294         directory
4295
4296         Cumulative patch concerning pic16 port:
4297         * library directory has been re-organized,
4298         * added support for PIC18F1220,
4299         * added headers and library sources for chips 18f1220,18f6520,
4300         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4301
4302         * configuration registers setting has changed, now each supported
4303         device has a complete description of the registers it uses,
4304         * all initialisations are moved to idata sections, these section
4305         can be absolute or relocatable,
4306         * fixed initialisation of codespace variables,
4307         * fixed warning about PCLATU and gpsim,
4308         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4309         * (genAssign): use table reads when assigning from variables in codespace,
4310         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4311         char/int variables placed in codespace,
4312         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4313         registers set in .asm file, no need for --pomit-config-words anymore,
4314         * (pic16glue): some 8051 legacy segments are commented out
4315         (to be removed completely),
4316         * added support for alternative assembler and linker with --asm=
4317         and --link= command line arguments,
4318         * peepholes are disabled automatically in the port, no need to
4319         specify on command line,
4320         * port supports natively char/int/long multiplication, but converts
4321         all divisions to support functions,
4322         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4323         to the file set in variable $2,
4324         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4325         strings in ASCII format and not in hex,
4326         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4327         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4328         allocate proper register if iCodes aren't temporary,
4329
4330 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4331
4332         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4333
4334 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4335
4336         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4337         is commented out
4338
4339 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4340
4341         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4342         computed address is reused
4343         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4344         multi-byte bitfields
4345
4346 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4347
4348         * src/z80/gen.c: (genArrayInit): must check for pointers too
4349
4350 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4351
4352         * support/regression/tests/zeropad.c: never meant to commit the
4353           nestedstruct test: removed, added check for GCC version
4354
4355 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4356
4357         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4358         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4359         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4360           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4361           bugs 928906 and 954082 half-empty initializers
4362         * src/SDCCsymt.h,
4363         * src/SDCCsymt.c (getAllocSize): added for above fix
4364         * src/z80/gen.c (genArrayInit): fixed bug 741044
4365         * support/regression/tests/zeropad.c: added tests
4366
4367 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4368
4369         * src/pic16/device.c (pic16_dump_section): corrected bug which
4370         caused some symbols of the libraries to be misplaced
4371
4372 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4373
4374         * src/pic16/glue.c,
4375         * src/pic16/ralloc.h,
4376         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4377         to fix conflict with pic port
4378
4379 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4380
4381         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4382         externs configuration variables,
4383         * src/pic16/ralloc.h,
4384         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4385         prototype in header, commented out some debug messages
4386
4387 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4388
4389         * src/pic16/glue.c,
4390         * src/pic16/main.c,
4391         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4392         for gpasm COFF object generation. Thanks to D. Hawkins for
4393         his patch info
4394
4395 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4396
4397         * src/ds390/main.c,
4398         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4399         Brock for spotting this)
4400         * src/ds390/gen.c (genEndFunction),
4401         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4402         interrupt handler and critical. Disable push/pop optimizations when
4403         peephole optimizations disabled.
4404
4405 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4406
4407         Updated pic16 library sources and headers.
4408         * device/lib/pic16/pic18f*/ ,
4409         * device/include/pic16/*.h: modified to handle structured SFR
4410         definitions
4411
4412 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4413
4414         * src/port.h (PORT structure): added hook initPaths, now each
4415         port can declare its own default search paths,
4416         which can been seen with the --print-search-dirs option,
4417         see pic16 port for example,
4418         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4419         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4420         * (doPrintSearchDirs): NEW, replaces in a central manner the
4421         printing of search dirs which was split in set*Paths functions,
4422         * (main): added call to port->initPaths and doPrintSearchDirs,
4423         * src/avr/main.c,
4424         * src/ds390/main.c,
4425         * src/hc08/main.c,
4426         * src/izt/i186.c,
4427         * src/izt/tlcs900h.c,
4428         * src/mcs51/main.c,
4429         * src/pic/main.c,
4430         * src/pic16/main.c: modified port structures to reflect addition of
4431         initPaths hook,
4432
4433         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4434         * (pic16_dump_section): for registers in same address reserve memory once,
4435         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4436         to no_banksel,
4437         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4438         result is greater in size than right or left,
4439         * (pic16_genUMult8X8_8): there are some cases where the result can
4440         be 16 bits size, so handle these,
4441         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4442         * (pic16_outBitC): modified to emit pcodes,
4443         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4444         or not,
4445         * (genDivOneByte): implemented algorithm to divide 8-bits,
4446         * (genCmp): uncommented goto, but issues still exist,
4447         * (genAnd): fixed a bug with variables >8bits,
4448         * (genPackBits): optimization added that uses BCF/BSF to change a
4449         single bit,
4450         * (genAssign): fixed bug when assigning floating point literals,
4451         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4452         __sdcc_gsinit_startup label,
4453         * src/pic16/main.c (_pic16_init): removed search directory
4454         initialisations,
4455         * (_pic16_initPaths): NEW, used to initialise search directories,
4456         * (_hasNativeMulFor): support functions for all except char/int
4457         multiplication, and char division,
4458         * (PIC16_port struct): modified entry for native mul support,
4459         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4460         no_banksel option,
4461         * (buildCallTree): call to register_usage is ifdef'ed out,
4462
4463 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4464
4465         * device/include/string.h: applied Stas Sergeev's patch to make this
4466         header file compatible with the preprocessor -Wundef option
4467         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4468         failure (fixes bug #941458)
4469
4470 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4471
4472         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4473         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4474         that the variable, not the function, should be static
4475         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4476         to be consistent with non-literal case
4477
4478 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4479
4480         * src/SDCCast.c (isConformingBody): fixed bug #949967
4481         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4482         convilong): fixed bug #952086
4483
4484 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4485
4486         * src/SDCCmem.c (allocVariables): fixed bug #955321
4487
4488 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4489
4490         * src/hc08/main.c (_hc08_genAssemblerEnd),
4491         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4492         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4493         completely eliminated the use of a temporary file
4494         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4495         when more than one file linked
4496         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4497
4498 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4499
4500         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4501         which fixes bug #543481
4502         * support/regression/tests/bug-751703.c: fixed comments left from a
4503         cut and paste error
4504         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4505         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4506         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4507         scopes
4508         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4509         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4510         are now changed to underscores in moduleName
4511
4512 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4513
4514         * as/mcs51/lkmem.c: better fix for bug #954173
4515
4516 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4517         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4518
4519         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4520         * device/include/c8051f000.h,
4521         * device/include/c8051f120.h,
4522         * device/include/c8051f300.h,
4523         * device/include/c8051f310.h,
4524         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4525         PWM16) and detab'ed
4526
4527 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4528
4529         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4530         and mailing lists, doc'ed --no-peep-comments, removed reference
4531         to knoppix (newest version has no LyX/LaTeX), other minor changes
4532         * src/SDCCglue.c (glue): save 2 bytes stack space with
4533         option --main-return. The ljmp could probably be avoided too
4534
4535 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4536
4537         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4538
4539 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4540
4541         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4542         * src/SDCCopt.c (isLocalWithoutDef),
4543         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4544         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4545         (credit to Maarten Brock for patch #949363, on which this is based)
4546         * support/regression/tests/bug-751703.c: some test cases of extern used
4547         within inner scopes.
4548
4549 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4550
4551         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4552         SPEC_STRUCT
4553         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4554         struct definitions
4555         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4556         dwWriteLabel): fix to create valid debugger symbols even when
4557         the module name has non-alphanumeric symbols in it
4558         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4559         when a variable's allocation has been optimized away
4560
4561
4562 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4563
4564         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4565         * src/hc08/main.c,
4566         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4567         * src/mcs51/main.c,
4568         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4569         * src/ds390/main.c,
4570         * src/z80/gen.c (z80_emitDebuggerSymbol),
4571         * src/z80/main.c,
4572         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4573         * src/pic/main.c,
4574         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4575         * src/pic16/main.c,
4576         * src/avr/gen.c (avr_emitDebuggerSymbol),
4577         * src/avr/main.c,
4578         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4579         * src/xa51/main.c,
4580         * src/SDCCdebug.c (emitDebuggerSymbol),
4581         * src/SDCCdebug.h,
4582         * src/port.h: added a debugger struct to the port struct. Added a
4583         callback for defining debugger symbols
4584
4585         * src/SDCCast.c (createLabel),
4586         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4587         with isitmp = 1
4588         * src/SDCCicode.h,
4589         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4590         iCode back to the ast for the function
4591
4592         * src/hc08/ralloc.c (hc08_assignRegisters),
4593         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4594         unneeded fields from the regs struct.
4595         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4596         pushReg() & pullReg() functions instead of emitcode()
4597
4598         * src/hc08/gen.c (genLabel, genhc08Code),
4599         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4600
4601         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4602         debugger hooks
4603
4604         * src/hc08/gen.c (genEndFunction, genhc08Code),
4605         * src/hc08/gen.h,
4606         * src/mcs51/gen.c (genEndFunction, gen51Code),
4607         * src/mcs51/gen.h,
4608         * src/ds390/gen.c (genEndFunction, gen390Code),
4609         * src/ds390/gen.h,
4610         * src/z80/gen.c (genEndFunction, genZ80Code),
4611         * src/z80/gen.h,
4612         * src/z80/z80.h,
4613         * src/pic/gen.c (genEndFunction, genpic14Code),
4614         * src/pic/gen.h,
4615         * src/pic16/gen.c (genEndFunction, genpic16Code),
4616         * src/pic16/gen.h,
4617         * src/avr/gen.c (genEndFunction, genAVRCode),
4618         * src/avr/gen.h,
4619         * src/xa51/gen.c (genEndFunction, genXA51Code),
4620         * src/xa51/gen.h,
4621         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4622         specific code to cdbFile.c and out of the backend code generators
4623
4624         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4625         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4626         starting address is now 0
4627
4628         * as/hc08/asm.h,
4629         * as/hc08/m08pst.c,
4630         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4631         assembler directive for DWARF support
4632         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4633
4634         * src/src.dsp,
4635         * src/Makefile.in,
4636         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4637
4638 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4639
4640         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4641         and inappropriate peephole optimization in jump tables
4642
4643 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4644
4645         * as/hc08/m08pst.c,
4646         * src/SDCCglue.c: sdccopt works for the hc08 port now
4647
4648 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4649
4650         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4651
4652 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4653
4654         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4655
4656 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4657
4658         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4659         rules
4660         * src/SDCCmain.c,
4661         * src/SDCCglobl.h,
4662         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4663         comments from the peephole optimizer replacement rules
4664         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4665         symbols
4666         * src/SDCCcse.c (updateSpillLocation),
4667         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4668         equivalents
4669         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4670         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4671         objects far pointers
4672
4673 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4674
4675         * src/SDCCsymt.h: a missing part of my last change
4676         * src/pic/ralloc.c (regTypeNum),
4677         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4678
4679 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4680
4681         * src/SDCCicode.h,
4682         * src/SDCCicode.c (aggrToPtrDclType),
4683         * src/SDCCptropt.h,
4684         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4685         ptrPseudoSymConvert),
4686         * src/pic/ralloc.c (regTypeNum),
4687         * src/pic16/ralloc.c (regTypeNum),
4688         * src/hc08/ralloc.c (regTypeNum),
4689         * src/ds390/ralloc.c (regTypeNum),
4690         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4691         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4692
4693 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4694
4695         * link/z80/lkmain.c (afile),
4696         * as/hc08/lkmain.c (afile),
4697         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4698         prevent a pointer problem when a filename has no directory and
4699         no extension specified.
4700
4701 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4702
4703         * link/z80/lkmain.c (afile): allow periods in directory names
4704         * link/z80/lkmain.c (afile),
4705         * as/mcs51/lkmain.c (afile),
4706         * as/hc08/lkmain.c (afile): allow linker script file to have an
4707         extension other than ".lnk"
4708         * link/z80/lklex.c (getfid),
4709         * link/z80/lkmain.c (parse),
4710         * as/mcs51/lklex.c (getfid),
4711         * as/mcs51/lkmain.c (parse),
4712         * as/hc08/lklex.c (getfid),
4713         * as/hc08/lkmain.c (parse): Support comments in the linker script
4714         file on lines by themselves and after filenames
4715
4716 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4717
4718         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4719
4720 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4721
4722         * src/z80/peeph-z80.def: removed some peephole rules that don't
4723         work with multibyte arithmetic (fixed bug #937126)
4724         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4725         to registers and not global variables
4726         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4727         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4728         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4729         checking for assignments not internally generated (fixed bug #931895)
4730         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4731         structure member (fixed bug #930072)
4732
4733 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4734
4735         * src/SDCCmain.c (linkEdit),
4736         * src/hc08/main.c (_hc08_parseOptions),
4737         * as/hc08/Makefile.in,
4738         * as/hc08/aslink.h,
4739         * as/hc08/asm.h,
4740         * as/hc08/m08pst.c,
4741         * as/hc08/lkrloc.c (relr, rele),
4742         * as/hc08/lkarea.c (lnkarea)
4743         * as/hc08/lkmain.c (afile, parse),
4744         * as/hc08/lkelf.c: support for ELF output
4745         * as/hc08/lks19.c (s19),
4746         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4747
4748 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4749
4750         * as/mcs51/lkihx.c: Fixed bug #899105.
4751
4752 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4753
4754         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4755         .dsp files from Unix to DOS.
4756
4757 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4758
4759         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4760         function pointers; we have been compliant for several months now.
4761         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4762         change that was accidently commented out
4763         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4764         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4765         bug #922319
4766
4767 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4768
4769         * src/hc08/gen.c: output of all of the internal debugging information
4770         is now controlled by the D() macro; it is disabled by default
4771
4772 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4773
4774         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4775         harder to keep the same registers during a CAST iCode
4776         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4777         long via int can be done in a single cast, if the signedness is
4778         correct.
4779         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4780         putchar() in tinibios.c in ds390's library
4781
4782 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4783
4784         * src/SDCCast.c (decorateType): fixed bug #898889,
4785         cast result of a literal complement too
4786         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4787         fixed check for bitfields
4788
4789 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4790
4791         * src/SDCCicode.c (geniCodeLogic): made it static,
4792         (geniCodeLogicAndOr): added in order to fix bug #905492,
4793         (ast2iCode): fixed bug #905492
4794         * support/regression/tests/bug-905492.c: added
4795         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4796         (processParms): fixed bug #927659: don't copy parms, this will clear
4797         decorated flag
4798         * support/regression/tests/bug-927659.c: added
4799
4800 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4801
4802         * src/SDCCast.c (addCast): don't cast float to char
4803         * device/lib/libsdcc.lib: added _memmove
4804
4805 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4806
4807         * device/lib/large/Makefile: fixed parallel execution by
4808         replacing `make` by `$(MAKE)`
4809
4810 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4811
4812         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4813         offsets (fixes bug #923936)
4814
4815 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4816
4817         * device/lib/small/Makefile: fixed parallel execution by
4818         replacing `make` by `$(MAKE)`
4819
4820 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4821
4822         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4823
4824 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4825
4826         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4827         * src/regression/Makefile: Regression test was not running.
4828
4829 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4830
4831         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4832         complement if possible
4833         * src/SDCCval.c (valComplement),
4834         * src/SDCCicode.c (operandOperation): fixed complement of literal
4835         * support/regression/tests/onebyte.c (testComplement): added
4836
4837 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4838
4839         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4840         return an optimized tree; actually replace actParm with the new tree
4841         * src/SDCCast.h: added some parantheses to remove side effects
4842         * support/regression/tests/bug-920866.c
4843
4844 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4845         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4846         Bit operands were not being handled properly in the pic14 port.
4847         (now src/regression/add.c passes again).
4848
4849 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4850
4851         * src/SDCC.y (labeled_statement): case and default no longer require
4852         a following statement (RFE #893037)
4853
4854 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4855
4856         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4857         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4858         disabled (fixes bug #916294)
4859         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4860         "mov a,acc"; patch provided by Lenny Story
4861         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4862
4863 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4864
4865         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4866         functions
4867         * src/ds390/gen.c (genFunction, genEndFunction),
4868         * src/ds390/ralloc.c (ds390_assignRegisters),
4869         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4870         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4871         pushed if there are parameters passed on the stack. Also, a cleaner
4872         way to decide if r0/r1 should be pushed/popped. (Together they fix
4873         bug #918693)
4874
4875 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4876
4877         * doc/sdccman.lyx,
4878         * device/lib/mcs51/crtpagesfr.asm,
4879         * device/lib/mcs51/crtxinit.asm,
4880         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4881         to avoid confusion with Si Lab's SFRPAGE register.
4882
4883 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4884
4885         * src/SDCCglue.c (emitMaps): allow public sfr variables
4886         * src/SDCCglue.c (initialComments): include compiler build date
4887         with compiler version and put the timestamp of the generated
4888         assembly file on a serperate line to be less confusing.
4889         * src/port.h: added genInitStartup hook
4890         * src/avr/main.c,
4891         * src/ds390/main.c,
4892         * src/hc08/main.c,
4893         * src/pic/main.c,
4894         * src/pic16/main.c,
4895         * src/xa51/main.c,
4896         * src/z80/main.c: genInitStartup initialize as NULL (default to
4897         historical behaviour)
4898         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4899         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4900         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4901         library instead of hard coding it into the compiler.
4902         * support/regression/ports/mcs51-stack-auto/spec.mk,
4903         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4904         * device/lib/mcs51/Makefile,
4905         * device/lib/small/Makefile,
4906         * device/lib/large/Makefile,
4907         * device/lib/mcs51/crtpagesfr.asm,
4908         * device/lib/mcs51/crtstart.asm,
4909         * device/lib/mcs51/crtxclear.asm,
4910         * device/lib/mcs51/crtxinit.asm,
4911         * device/lib/mcs51/crtclear.asm,
4912         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4913         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4914         and into user configurable files.
4915         * device/lib/clean.mk: clean mcs51 directory too
4916         * support/regression/tests/longlit.c: added static to T1 declaration
4917         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4918         accesses in the initialization code
4919
4920 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4921
4922         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4923         OSCTRIMVAL as noted in bug #916008
4924
4925 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4926
4927         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4928         in loops with multiple exits (reported as incorrect registers
4929         used by Martin Helmling in Sdcc-user list)
4930
4931 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4932
4933         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4934         made ds390 register extensions look less like error messages
4935
4936 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4937
4938         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4939         reported by Adam Wozniak in Sdcc-user list
4940
4941 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4942
4943         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4944         arithmetic optimizations, added debug output
4945
4946 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4947
4948         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4949         * sdcc.spec: updated and split sdcc into 3 rpms
4950         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4951         needed for literals of LEFT_OP and '+'
4952         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4953         introduced RESULT_TYPE_NOPROM
4954         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4955         left shift
4956         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4957         limited promotion to int only for '*'
4958         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4959
4960 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4961
4962         * src/pic16/gen.c (genSkip),
4963         (genc16bit2lit), (gencjneshort): commented out
4964         (is_LitOp): new helper function, checks operand type
4965         (genCmpEq): rewritten
4966
4967 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4968
4969         * support/regression/tests/bug-908454.c: added
4970
4971 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4972
4973         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4974         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4975         (geniCodeCast): cosmetic, don't preserve bit storage class
4976         (geniCodeLeftShift): added promotion
4977         (geniCodeLogic): fixed regression
4978         * src/SDCCsymt.c (computeTypeOr): accept bits too
4979         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4980
4981 2004-03-07  Borut Razem <borut.razem AT siol.net>
4982
4983         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4984
4985 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4986
4987         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4988         version of pic16_genPackRegisters which does not check if ic is a
4989         CAST operator,
4990         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4991         function cause string1.c regression test fails
4992
4993 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4994
4995         * sim/ucsim/configure.in,
4996         * sim/ucsim/configure,
4997         * sim/ucsim/doc/Makefile.in: use docdir
4998         * src/SDCC.y: fixed sbit atrributes
4999         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5000         * src/SDCCast.c (decorateType): |^& need special promotion handling
5001         * src/SDCCast.h,
5002         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5003         * src/SDCCsymt.h (computeType),
5004         * src/SDCCicode.c: computeType() needs op
5005         * src/SDCCsymt.c (checkTypeSanity),
5006         * doc/sddman.lyx: "plain" bitfields are unsigned
5007         * src/SDCCsymt.c (computeTypeOr): added
5008         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5009         |^& ops
5010         * src/SDCCval.c (val*): computeType() needs op
5011         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5012         * support/regression/tests/onebyte.c: added tests for |^&
5013
5014 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5015
5016         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5017         for writing icode into asm output.
5018
5019 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5020
5021         * src/pic16/device.c: added some debug lines enabled
5022         with macro DEBUG_CHECK,
5023         * src/pic16/genarith.c: more debug in genPlus,
5024         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5025         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5026         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5027         * (aopForSym): onStack symbols are re-placed in data memspace,
5028         and onStack flag is cleared,
5029         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5030         copy temporary pcodeop,
5031         * (genPcall): added warning for not updating PCLATU,
5032         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5033         always true for pic16 port,
5034         * (genMultOneWord): NEW, supports integer multiplication,
5035         * (genMult): modified to call genMultOneWord,
5036         * (ifxForOp): added warning when return NULL,
5037         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5038         flag is set before call to operandFromSymbol for implicit
5039         added structures,
5040         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5041         options.intlong_rent are set by default,
5042         * (_hasNativeMulFor): modified to allow port generation of integer
5043         multiplication,
5044         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5045         set regtype to REG_SFR for all registers, restricting seting the
5046         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5047
5048 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5049
5050         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5051         more than 500 times in the regression tests
5052
5053 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5054
5055         * support/Util/SDCCerr.h,
5056         * support/Util/SDCCerr.c,
5057         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5058         enumerator_list),
5059         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5060         for symbol conflicts.
5061         * support/valdiags/tests/enum.c,
5062         * support/valdiags/tests/tentdecl.c,
5063         * support/valdiags/tests/struct.c: expect possible error messages
5064         referring to original symbol definitions.
5065         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5066         * src/SDCCsymt.h,
5067         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5068
5069 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5070
5071         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5072
5073 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5074
5075         * src/pic16/ralloc.c (newReg): fixed bug #908929
5076
5077 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5078
5079         * src/ds390/gen.c: added missing #include "main.h"
5080
5081 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5082
5083         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5084         checking if symbol is already in set,
5085         * src/pic16/device.h: prototype for checkAddSym,
5086         * src/pic16/gen.c: (_G): added entry interruptvector,
5087         * (assignResultValue): removed some commented out lines,
5088         * (genFunction): check for ISR via sym->type, absolute section for
5089         interrupt code is created via a new pBlock, the goto instruction is
5090         placed now correctly at the interrupt vector position, changed all
5091         references from ivec to _G.interruptvector,
5092         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5093         is the interrupt is a high priority one, same for return from ISR,
5094         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5095         externs to calls of checkAddSym,
5096         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5097         pic16_pcode_verbose flag is set,
5098         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5099         * src/pic16/pcoderegs.c: message about how many registers are saved
5100         will only be emitted if pic16_pcode_verbose flag is set,
5101
5102 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5103
5104         * src/ds390/ralloc.h,
5105         * src/ds390/ralloc.c (ds390_regWithIdx),
5106         * src/ds390/gen.c (emitcode),
5107         * src/ds390/main.h,
5108         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5109         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5110         ds390operandCompare, getRegsRead, getRegsWritten,
5111         initializeAsmLineNode): customized instruction size calculation for
5112         ds390, started basis for some register optimizations
5113         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5114         corresponding assembly output
5115         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5116         missing push/pop of r0/r1. Optimized push/pops
5117
5118 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5119
5120         * src/mcs51/main.c (instructionSize): fixed ACALL size
5121         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5122
5123 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5124
5125         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5126         the sorting of rlist with NULL elements
5127         * (print_idataType, print_idata): NEW to create idata sections
5128         * src/pic16/device.h: idataSymSet new variable
5129         * src/pic16/gen.c (genFunction): fixed some bugs in string
5130         comparing, improved the absolute section creation for ISRs,
5131         added FSR0L/FSR0H in registers that are saved in an ISR,
5132         * (genInline): fixed the processing of inline snippets,
5133         now they undergo no process by the peephole optimizer
5134         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5135         are placed in idataSymSet,
5136         * (pic16emitStaticSeg): extern symbols are added in externs,
5137         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5138         switching when aboslute variables are placed in access bank memory
5139         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5140         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5141         commented out with #if,
5142         * (pic16_packRegisters): reintroduce the check for CAST because some
5143         symbols are not correctly handled,
5144         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5145         pCodeInstruction instead of pCode,
5146         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5147         pCodeAsmDir definition,
5148         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5149         directive, then the argument directive is emitted without the leading
5150         tab, hack for inline labels which must be in the first column,
5151         * (compareLabel,pic16_findNextInstruction),
5152         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5153         * (insertBankSwitch): modified for the new pCodeAsmDir,
5154
5155 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5156         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5157
5158         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5159         instance,
5160         * (pushSide): commented out with #if,
5161         * (assignResultValue): fixed some typos in saving
5162         registers,
5163         * (genPcall): FIXED and sync'ed with genCall,
5164         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5165         * (genNearPointerGet): fixed to handle some more cases,
5166         implementation scheme via table reads,
5167         * (genConstPointerGet): modified to access code memory correct,
5168         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5169         and improved to handle some cases
5170         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5171         instead of "RETLW" for init data
5172         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5173         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5174         variables are placed in access bank memory (<0x80 and >=0xf80),
5175         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5176         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5177         TBLWT_POSTDEC,TBLWT_PREINC
5178         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5179         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5180         directives
5181         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5182         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5183         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5184         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5185
5186 2004-02-29  Borut Razem <borut.razem AT siol.net>
5187
5188         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5189         support/Util/findme.h, support/Util/system.h: enhance binary relative
5190         search for lib and include by using findProgramPath()
5191
5192 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5193
5194         * src/SDCCpeeph.h,
5195         * src/SDCCpeeph.c (pcDistance),
5196         * src/port.h,
5197         * src/mcs51/ralloc.h,
5198         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5199         * src/mcs51/main.h,
5200         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5201         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5202         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5203         size calculation port specific, started basis for some register
5204         optimizations
5205         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5206         missing push/pop of r0/r1. Optimized push/pops
5207         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5208         * device/lib/_modsint.c (_modsint),
5209         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5210         and stack version so regression tests pass
5211
5212 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5213
5214         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5215         * src/SDCCast.c (decorateType): catch another small optimization
5216         with '?' operator
5217         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5218         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5219         modified to finally use computeType() all over SDCC,
5220         see Feature Request #877103
5221         * src/SDCCval.h: cosmetic
5222         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5223         valCompare(); regression tested in muldiv.c
5224         * support/regression/tests/muldiv.c (testMod): mod sign follows
5225         dividend only
5226
5227 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5228
5229         * src/SDCCast.c (decorateType): fixed bug #902362
5230         * doc/INSTALL.txt: fixed install instructions for win32
5231
5232 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5233
5234         * device/include/Makefile.in (install): fixed by replacing spaces
5235         by tabs
5236         * doc/README.txt,
5237         * doc/INSTALL.txt: updated for release
5238         * doc/sdccman.lyx: added warning for --xstack being buggy
5239
5240 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5241
5242         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5243         to eliminate build warnings.
5244         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5245
5246 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5247            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5248
5249         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5250         removed -penable-stack, added comment for stack pragma, added
5251         warning for not initializing the stack/frame registers, removed
5252         comment at interrupts section
5253
5254         Stack is made permanent, there is no ability to disable stack usage.
5255         * src/pic16/device.h,
5256         * src/pic16/device.c: removed all references to USE_STACK macro,
5257         * src/pic16/device.c (pic16_dump_section): when no elements in
5258         rlist, free rlist before return,
5259         * (pic16_dump_int_registers): NEW, internal registers are a new set
5260         of general purpose registers reused by each function,
5261         * (checkAddReg): returns 1 if registers is added to set,
5262         * (pic16_groupRegistersInSection): when a registers is of type
5263         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5264         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5265         SRCASECMP macro is moved here from device.c
5266         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5267         PO_PCLATU, PO_PRODL, PO_PRODH,
5268         * (pic16_pCodeOpType, genMinus,
5269         changed compares to "a" register, with AOP_ACC,
5270         * (pic16_genPlus): fixed some bugs and indented properly,
5271         * (pic16_addSign): changed size to size+offset in the MOVWF
5272         instruction,
5273         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5274         multiply 8-bit operand by literal, result is 8-bit,
5275         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5276         multiply 2 8-bit operand, result is 8-bit,
5277         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5278         genUMult8X*_16,
5279         * src/pic16/gen.c: changed accUse to contain WREG only,
5280         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5281         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5282         true, do not use immediate addressing any more unless sym is a
5283         pointer in codespace,
5284         * (aopForRemat): do not use immediate addressing when symbol not in
5285         codespace and when symbol's address is requested,
5286         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5287         accUse size (= 1),
5288         * (aopGet): added case for AOP_ACC and don't return "accumulator
5289         bug" but WREG instead,
5290         * (popGetTempReg): pushes contents of temporary register in stack,
5291         * (popReleaseTempReg): pops contents of temporary register from
5292         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5293         * (pic16_popGet): separated case AOP_ACC to return register WREG
5294         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5295         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5296         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5297         the use of immediate pointers to certain cases only.
5298
5299         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5300         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5301         * (assignResultValue, genCall, genRet): modified to use the new
5302         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5303         genPcall is still broken,
5304         * (genFunction): added code to create 'A' type pBlocks when
5305         interrupt functions are generated, code not extensively tested yet,
5306         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5307         * (genEndFunction): modified so ISRs pop stored registers from stack,
5308         * (genMultOneByte): cleanup,
5309         * (AccRsh): added flag andmask, to and result with appropriate mask,
5310         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5311         * (genDataPointerGet): fixed and reenabled its use,
5312         * (genNearDataPointerGet): bugs fixed,
5313         * (genDataPointerSet): bugs fixed,
5314         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5315         pic16_DumpSymbol, pic16_DumpOp,
5316         * src/pic16/genutils.h: function prototypes for the above functions,
5317         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5318         pointers,
5319         * (pic16emitRegularMap): many many many improvements, but needs a
5320         major cleanup,
5321         * src/pic16/main.c: enable_stack in pic16_options is removed,
5322         * (_pic16_parseOptions): removed command line options -penable-stack,
5323         * (_process_pragma): emit stack symbol only when stack pragma is
5324         processed,
5325         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5326         redirected to FSR0L/FSR0H pair,
5327         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5328         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5329         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5330         for immediates,
5331         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5332         * (dumpPicOptype): NEW,
5333         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5334         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5335         with movff instruction,
5336         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5337         added pic16_int_regs, some packRegsFor* functions are commented out,
5338         because produce errors,
5339         * src/pic16/NOTES: minor modifications
5340
5341 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5342
5343         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5344         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5345         --pack-iram.
5346         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5347         * as/mcs51/lkaomf51.c: fixed bug #895763
5348
5349 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5350
5351         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5352
5353 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5354
5355         * doc/sdccman.lyx: added details about the HC08 storage classes and
5356         interrupts, fixed the register usage info for z80 & gbz80
5357
5358 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5359
5360         * doc/sdccman.lyx: added more pic16 port documentation
5361         * device/include/pic16/: added header pic18fregs.h
5362
5363 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5364
5365         * doc/sdccman.lyx: added Vangelis' contribution
5366
5367 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5368
5369         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5370         extend to the next CALL or PCALL, not just to the next CALL.
5371
5372 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5373
5374         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5375
5376 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5377
5378         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5379         bug #895752 and a better fix for bug #716790
5380
5381 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5382
5383         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5384
5385 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5386
5387         * doc/sdccman.lyx: minor changes, minor changed
5388
5389 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5390
5391         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5392         which can't handle SDCC_NEWONEBYTEOPS,
5393         (geniCodeMultiply): removed conversion from mult to shift for pic14
5394         and pic16
5395
5396 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5397
5398         * src/hc08/gen.h,
5399         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5400         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5401         thus fixing bug #895406
5402
5403 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5404
5405         * device/lib/_modsint.c,
5406         * device/lib/_modslong.c: sign follows divisor only
5407         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5408         signs or signedness can be ignored
5409         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5410         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5411         added optimization for IFX,
5412         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5413         arguments;
5414         reenabled optimization for IFX, which was removed on 2004-01-11
5415         * src/SDCCast.h: added return type IFX
5416         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5417         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5418         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5419         SDCC_OLDONEBYTEOPS selects the old behaviour
5420         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5421         changed again and commented promotion rule
5422         * src/SDCCval.c (valDiv): promotion no longer necessary
5423         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5424         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5425         rewritten
5426         * support/regression/tests/onebyte.c: added
5427
5428 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5429
5430         * gen.c (genInline): reverted to old code for assemnling inline
5431         code because of bug reported James Chadd
5432
5433 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5434
5435         * ralloc.h: missing declarations from previous patch,
5436         seems that patch for ralloc.h was never applied, fixed
5437
5438 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5439            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5440
5441         * pcode.c,
5442         * pcode.h,
5443         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5444         indirect addressing. Marked FSR0 as deprecated
5445         * gen.c (pointerCode): commented out, not needed now
5446         (pic16_popGet2p): new MOVFF helper function
5447         (genGenPointerGet),
5448         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5449         (shiftRLong): removed duplicate debugging info
5450
5451 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5452
5453         * src/ds390/gen.c (genNearPointerGet),
5454         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5455         optimization with bits, but not bitfields.
5456         * src/ds390/ralloc.c (packRegisters),
5457         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5458
5459 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5460
5461         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5462
5463 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * src/SDCCsymt.h,
5466         * src/SDCCicode.c (operandFromSymbol),
5467         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5468         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5469         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5470         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5471         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5472         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5473         bug #892038
5474         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5475         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5476         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5477         * src/SDCCsymt.c (newSymbol),
5478         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5479         enumerator_list),
5480         * src/SDCCval.h,
5481         * src/SDCCval.c (newiList): fixed bug #885705
5482
5483 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5484
5485         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5486         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5487
5488 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5489
5490         * device/include/c8051f120.h,
5491         * device/include/c8051f300.h,
5492         * device/include/c8051f310.h: added/updated header files for Silicon
5493         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5494         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5495         in new section Submitting patches
5496
5497 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5498
5499         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5500         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5501         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5502         genGenPointerSet),
5503         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5504         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5505         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5506         genGenPointerSet),
5507         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5508         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5509         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5510         genGenPointerSet),
5511         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5512         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5513         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5514         genGenPointerSet): fixed bug #892400
5515         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5516         to eliminate build warnings.
5517         * src/SDCCast.c (processParms),
5518         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5519         fixed bug 751859
5520         * support/valdiag/valdiag.py: added GCC to the list of defines active
5521         when compiling with gcc
5522
5523 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5524
5525         * support/Util/SDCCerr.h,
5526         * support/Util/SDCCerr.c,
5527         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5528         with an incomplete type (fixed bug #883734)
5529         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5530
5531 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5532
5533         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5534
5535 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5536
5537         * src/SDCCast.c (decorateType),
5538         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5539         function pointer implementation
5540         * support/regression/tests/funptrs.c: added tests to verify both forms
5541         of function pointers work correctly. Added tests to verify parameters
5542         are passed in the correct order.
5543
5544 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5545
5546         * device.c (regCompare): registers are sorted by ascending
5547         address and increasing size,
5548         * main.c (_pic16_finaliseOptions): removed the declaration
5549         of compiler macro MCU. Now a macro of the format pic18fxxxx
5550         will be defined from the command line
5551
5552 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5553             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5554
5555         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5556         PCOP_RLCF was overwritten!
5557         * gen.c (genSkip): commented out calls to pic16_emitcode,
5558         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5559         * (genlshTwo),
5560         * (genRRC): added debugging info,
5561         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5562         overwritten while shifting,
5563         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5564         overwritten while shifting,
5565         * (AccLsh),
5566         * (AccRsh),
5567         * (shiftLLeftOrResult),
5568         * (shiftRLeftOrResult),
5569         * (shiftRLong),
5570         * (shiftLLong): Implemented with pic16_emitpcode
5571         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5572         * (genLeftShift): Fixed bug, operand for shift by variable always
5573         was "and"ed with 0x0f,
5574         * (genLeftShiftLiteral),
5575         * (genrshTwo),
5576         * (genRightShiftLiteral): added debugging info,
5577         * (genrshFour): added comment,
5578         * (genRightShift): determined signedness from operand "left"
5579         instead of "result"
5580
5581 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5582
5583         * src/SDCCicode.c (geniCodeParms),
5584         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5585         function pointers, fixed function pointer bugs #861242 and #861896
5586
5587 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5588
5589         * device/include/c8051f000.h,
5590         * device/include/c8051f120.h,
5591         * device/include/c8051f300.h: added header files for Silicon
5592         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5593
5594 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5595
5596         * src/SDCCast.c (processParams): added new type flow and restructured
5597         (gatherAutoInit): added new type flow
5598         (addCast): cosmetic changes
5599         (getLeftResultType): added new type flow for array indices, patch
5600         provided by Stas, see FR #877103
5601         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5602         array index patch by Stas
5603         * src/SDCCast.h: added prototype getResultTypeFromType()
5604         * src/SDCCval.h,
5605         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5606         * src/pic/glue.c (pic14emitStaticSeg),
5607         * src/pic16/glue.c (pic16emitStaticSeg),
5608         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5609         for initialization of symbols
5610         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5611         * support/Util/SDCCerr.h:
5612         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5613         * .version: bumped version number to 2.3.8
5614         * device/include/Makefile.in (install),
5615         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5616         avoid warnings
5617
5618 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5619
5620         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5621         Slade Rich fixed an optimization bug
5622         * src/pic/pcodepeep.c,
5623         * src/pic/pcoderegs.c
5624         * doc/Makefile (install): added test for directory
5625
5626 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5629         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5630         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5631         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5632         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5633         * as/mcs51/asexpr.c (term),
5634         * as/hc08/asexpr.c (term): fixed bug #887146
5635
5636 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5637
5638         * src/z80/gen.c (genMult): handle single byte result product
5639         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5640         DUMMY_READ_VOLATILE (fixed bug #886367)
5641
5642 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5643
5644         * support/regression/tests/libmullong.c: fixed logic, on little endian
5645         hosts we ended without a mullong_wrapper()
5646
5647 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5648
5649         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5650         virus/worm forged address usage.
5651
5652 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5653
5654         Fixed promotion, it should be done on AST level:
5655         * src/SDCCast.c (addCast): added promotion to int
5656         (decorateType): updated call to upCast()
5657         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5658         usualUnaryConversions()
5659
5660 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5661
5662         * support/regression/tests/literalop.c (mulWrapper): Added a
5663         wrapper to remove integer overflow warnings.
5664
5665         * support/regression/tests/float_trans.c: Made work on host.
5666
5667         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5668         location of sz80.
5669
5670         * support/regression/generate-cases.py (main): Changed from inline
5671         to a main method.
5672
5673         * doc/Makefile (install): Changed to depth first to get rid of
5674         missing directory install warning.
5675
5676         * as/Makefile (install-doc): Made work on Mac.
5677
5678 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5679
5680         * src/SDCCast.c: added an additional type flow in decorateType() of
5681         opposite direction, see feature request #860006; it's enabled at runtime
5682         by setting the environment variable SDCC_NEWTYPEFLOW
5683         * src/SDCCast.h: changed prototype of decorateType()
5684         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5685         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5686         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5687         see feature request #877103
5688         * src/SDCCval.c: updated call of decorateType()
5689         (valBitwise): fixed bug #882876
5690         (valMinus): added promotion
5691         (valLogicAndOr): result is unsigned
5692         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5693         * src/SDCCsymt.c (computeType),
5694         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5695         must not cause an unsigned operation
5696         * src/pic/glue (pic14emitRegularMap),
5697         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5698
5699 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5700
5701         * src/pic/pcode.c (PCodeID): commented out left over debug code
5702
5703 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5704
5705         * support/valdiag/tests/overflow.c: added shift tests
5706         * src/pic/device.c,
5707         * src/pic/gen.c,
5708         * src/pic/gen.h,
5709         * src/pic/glue.c,
5710         * src/pic/main.c,
5711         * src/pic/pcode.c,
5712         * src/pic/pcode.h,
5713         * src/pic/pcodepeep.c,
5714         * src/pic/pcoderegs.c,
5715         * src/pic/ralloc.c,
5716         * src/pic/ralloc.h: applied patch from Slade Rich;
5717         added support for multiple code pages and multiple RAM banks on the
5718         PIC 14 port. The ASM files now no longer simply assume all the
5719         code / RAM are in the same page / bank. This means the linker can
5720         safely allocate code/RAM of separate ASM files to different pages/banks.
5721         * doc/sdccman.lyx: added Slade's tips
5722         * src/mcs51/peeph.def: fixed bug #880768
5723
5724 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5725
5726         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5727         * src/SDCCast.c (decorateType): fixed bug #880197
5728
5729 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5730
5731         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5732         getopt.h.
5733
5734         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5735         strtof is not part of C89 and isn't included with Mac OS X.
5736
5737 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5738
5739         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5740         shiftL2Left2Result): fixed bug #879326
5741         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5742         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5743         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5744         address fetch for clr instruction
5745         * device/lib/hc08/_mulint.c: created optimized assembly version
5746         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5747
5748 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5749
5750         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5751         proposed in FR #877103
5752
5753 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5754
5755         * src/SDCCval.c (cheapestVal): added missing checks
5756         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5757         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5758
5759 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5760
5761         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5762         equal operands
5763
5764 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5765
5766         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5767         loaded with the linker search paths (-L arguments) and the libraries
5768         to be linked with the current source (-l arguments). Changes
5769         currently will affect only the pic16 port.
5770         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5771         include path the port specific paths and port specific libraries,
5772         * gplink command now contains the $3 argument,
5773         * src/pic16/device.h,
5774         * src/pic16/device.c,: structure PIC_device is made public and
5775         renamed to PIC16_device, the same for variable Pics which is renamed
5776         to Pics16. Updated all references to them.
5777         * src/pic16/glue.c (pic16glue): corrected bug with code
5778         initialization which bypassed the variable initializations block.
5779
5780         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5781         COMPILE_FLAGS and added the --nostdinc option
5782
5783 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5784
5785         * device/include/mc68hc908jb8.h: Register defs for another member
5786         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5787
5788 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5789
5790         Documenting changes from previous commits.
5791         * configure.in (version 1.56),
5792         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5793         when generating output files to configure the pic16 library,
5794         but now I've commented it out, since gputils aren't installed in the
5795         SF compile farm, so library won't compile
5796
5797         * device/lib/Makefile.in (version 1.56): initially I've added in
5798         target 'all' the prerequestive 'model-pic16' so it compiled the
5799         pic16 library, but now I've commented it out for the same reasons
5800         above,
5801         * added targets 'model-pic16' and 'objects-pic16' to compile the
5802         library
5803         * added target 'port-specific-objects-pic16' to handle the
5804         generated libraries and copy them into the build/ directory
5805         * added target 'clean-intermediate-pic16' to clean intermediate
5806         files into pic16 directory
5807         * in target 'installdirs' added line to create directory pic16 in
5808         the installation path
5809
5810         * device/include/Makefile.in (version 1.11): in target 'install'
5811         added lines to copy all header files to installation path,
5812         * in target 'installdirs' added line create directory for pic16
5813         headers in the installation path
5814
5815 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5816
5817         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5818          a function call
5819
5820 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5821
5822         * configure,
5823         * device/lib/configure.in,
5824         * device/lib/configure: fixed for autoconf 2.57
5825
5826 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5827
5828         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5829         option so that it actually works. Made it specific to the z80, since
5830         the gbz80 doesn't have these kinds of I/O ports.
5831
5832 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5833
5834         * device/include/z180.h,
5835         * device/lib/_memcpy.c,
5836         * device/lib/_memmove.c,
5837         * device/lib/_mulint.c,
5838         * device/lib/ser_ir.c,
5839         * device/lib/ser_ir_cts_rts.c,
5840         * device/lib/_strcmp.c,
5841         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5842         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5843         portmode; added deprecation warning for bank= and protmode= forms.
5844         Also, guard against buffer overflow.
5845         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5846
5847 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5848
5849         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5850         changed interrupt vector table generation to only emit declared vectors.
5851         * device/include/Makefile.in: added missing backslash
5852         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5853
5854 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5855
5856         Mainly changes to support compilation of the device libraries
5857         * src/pic16/device.c: stack is allocated via symbol and not
5858         via literal number. The symbol is placed in the corresponding
5859         position of the data ram
5860         * (pic16_dump_section): relocatable and absolute uninitialized
5861         data are now emitted in sorted order to reduce section naming,
5862         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5863         weren't marked as being in the access bank,
5864
5865 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5866
5867         Added portion of GNU PIC Library under the directory
5868         device/include/pic16 and device/lib/pic16. These files
5869         contain the declarations of SFRs for the PIC18Fxx2 devices.
5870         The directory is initialized via configure from toplevel.
5871
5872 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5873
5874         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5875         the spilllocations to be compared correctly
5876
5877 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5878
5879         * src/SDCCast.c (decorateType): fixed bug introduced today
5880
5881 2004-01-12  Borut Razem <borut.razem AT siol.net>
5882
5883         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5884         doc/sdccman.lyx: upper case pragmas are deprecated
5885
5886 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5887
5888         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5889         in simpler and even better code
5890
5891 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5892
5893         * src/SDCCicode.c (operandOperation): fixed bug #874819
5894         * src/SDCCast.c (decorateType): fixed
5895         char foo (unsigned long ul) { return ul > 0; }
5896
5897 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5898
5899         * doc/sdccman.lyx: Moved and added some sections, small changes
5900         all over. Telling LaTeX to be less strict with word spacing
5901         to better keep the right margin. Changed some notes about
5902         maintainance of the ports in section 3.2.1 - is it OK like this?
5903
5904 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5905
5906         SDCC source changes:
5907         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5908         convilong): modified to inform the pic16 port that builtin functions
5909         are external
5910
5911         PIC16 PORT specific changes:
5912         * src/pic16/device.c pic16_dump_equates() added,
5913         processor registers declared internally by the port are emitted in
5914         the translation as equates,
5915         * src/pic16/gen.c: inline code is passed unprocessed to the
5916         translation,
5917         * (pic16_popGetLit2): fnuction modified to take second operand as
5918         pCodeOp pointer and not as literal,
5919         * (popRegFromIdx): prefixed with pic16_,
5920         * (pic16_popCombine2): modified to receive already allocated pCode
5921         operands,
5922         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5923         * (genFunction): initializes local stack frame and pushes on stack
5924         all the registers used by this function,
5925         * (genEndFunction): restores all registers from stack and restores
5926         stack frame,
5927         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5928         improvements,
5929         * (pic16glue): changed the program startup sequence,
5930         * added new dbName code 'A' for functions placed in absolute section
5931         * src/pic16/main.c: added function attribute _naked,
5932         * added pragma 'code' to place a fnuction at an absolute address,
5933         * added command line arguments --debug-ralloc and --pcode-verbose,
5934         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5935         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5936         * (pic16_newpCodeOpLit2): modified to take the second operand as
5937         pCodeOp pointer,
5938         * (pic16_printpBlock): modified to emit each function in a separate
5939         section,
5940         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5941         UPPER for immediate operands,
5942         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5943         instruction,
5944         * src/pic16/peeph.def: all peepholes with movff are commented out,
5945         because there is a problem in the pcode peep optimizer,
5946         * src/pic16/ralloc.c: the register allocator can now reuse local
5947         function symbols for another function. This saves register usage.
5948         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5949
5950         Added file src/pic16/NOTES with information about program writing on
5951         the current port version.
5952
5953 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5954
5955         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5956         and peephole 252 (array access)
5957
5958 2004-01-09  Borut Razem <borut.razem AT siol.net>
5959
5960         * src/SDCCmain.c : fixed #872250: -l command line defined library
5961           files are scanned before standard library files
5962
5963 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5964
5965         * src/SDCCast.c (decorateType): fixed bug #874046
5966
5967 2004-01-09  Borut Razem <borut.razem AT siol.net>
5968
5969         * support/scripts/sdcc.nsi: remove previous installation
5970
5971 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5972
5973         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5974         bytes for last interrupt vector (mcs51)
5975         * sdcc.spec: fixed typo
5976
5977 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5978
5979         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5980         gen51Code): more efficient parameter receive for --model-large
5981         ("bug" #845294)
5982
5983 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5984
5985         * src/ds390/main.c,
5986         * src/z80/main.c: added missed needLinkerScript flags (more than
5987         one port structure defined in these file)
5988         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5989         bug #795325
5990
5991 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5992
5993         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5994         * src/port.h: added flag needLinkerScript in port->linker
5995         structure to inform whether to create a .lnk file or not,
5996         * src/avr/main.c,
5997         * src/ds390/main.c,
5998         * src/hc08/main.c,
5999         * src/mcs51/main.c,
6000         * src/pic/main.c,
6001         * src/pic16/main.c,
6002         * src/xa51/main.c,
6003         * src/z80/main.c: changed appropriately to configure
6004         needLinkerScript flag
6005         * src/pic/gen.c,
6006         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6007         * src/pic/glue.c: added variable udata_section_name to
6008         override default uninitialized data segment definition for
6009         devices only with SHAREBANK memory (reported from Erik Epetrich)
6010         * (pic14emitOverlay): modified to emit a commented overlay segment
6011         directive when no overlay data exist
6012         * (picglue): modified to emit uninitialized data segment
6013         according to udata_section_name
6014         * src/pic/main.c (_pic14_parseOptions): added command line
6015         options --udata-section-name=[name] to override default
6016         udata definition name
6017         * modified _linkCmd and _asmCmd to include compiler passed
6018         arguments via -W option
6019         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6020         object file from '.rel' to '.o' in port->linker structure,
6021         changed size of fptr from 2 to 3 in port structure
6022
6023 2004-01-07  Borut Razem <borut.razem AT siol.net>
6024
6025         * support/scripts/sdcc.nsi: update PATH
6026         * support/scripts/sdcc.ico: craeted
6027
6028 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6029
6030         * device/include/Makefile.in: fix install
6031         * doc/Makefile: fix install
6032
6033 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6036         in bug #860505
6037         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6038         how the function variable allocation summary is displayed; also
6039         include information about variables allocated to the overlay
6040         segment
6041
6042 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6043
6044         * as/mcs51/lkmain.c: Help about -Y option
6045         * as/mcs51/lkarea.c: Fixed gcc warnings
6046
6047 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6048
6049         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6050         fixed warning
6051         * support/valdiag/tests/overflow.c: added
6052         * src/SDCCast.c (decorateType),
6053         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6054         LEFT_OP (left shift)
6055
6056 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6057
6058         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6059         (default behaviour).
6060
6061 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6062
6063         A python script to validate compiler diagnostic messages. It can be
6064         used to verify that sdcc complains about bad c source code and
6065         gives a good location of the error.
6066         * support/valdiag/Makefile,
6067         * support/valdiag/valdiag.py,
6068         * support/valdiag/tests/*
6069
6070 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6071
6072         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6073         * src/SDCCsymt.c (newEnumType),
6074         * src/SDCCsymt.h
6075         * support/Util/SDCCerr.c,
6076         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6077         enum related bugs.
6078         * support/regression/tests/enum.c: added test for enum values that
6079         require at least 2 bytes of storage.
6080
6081 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6082
6083         * src/common.h: added ifndef/define/endif macros
6084         around the header file.
6085         Bug reported from Jesus Calvino-Fraga
6086
6087 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6088
6089         * sdcc.spec: updated
6090         * device/include/Makefile.in: don't install CVS directories
6091         * device/lib/Makefile.in: added removal of CVS directories after install
6092         * doc/Makefile: fixed install, added local_icons
6093         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6094         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6095         * src/ds390/gen.c (genRightShift): fixed bug #870788
6096         * src/SDCCast.c (decorateType): fixed bug #870781
6097
6098 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6099
6100         PIC16 port related changes:
6101         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6102         added variable stackPos,
6103
6104         * gen.c: genCall, assignResultValue: added support for
6105         pushing/retrieving function parameters to/from stack,
6106         genFunction,genEndFunction: setup stack frame for the
6107         generated function,
6108         genAddrOf: will be changed according to bug 863624
6109
6110         * added files genutils.c and genutils.h which contain gen*
6111         debugged and optimised functions extracted from gen.c
6112
6113         * glue.c: added variable 'externs' which holds extern symbols,
6114         pic16emitRegularMap: is modified to properly handle relocatable
6115          symbols under the new scheme,
6116         pic16createInterruptVect: is modified
6117         pic16printPublics: is modified to emit 'global' assembler directives,
6118         added pic16_printExterns to print extern symbols,
6119         pic16glue: initializes stack/frame pointer in the beginning of
6120         the assembly output. Temporary hack, will be corrected later,
6121         because gplink yet does not support stack and SDCC does not
6122         yet support a type of crt0.o object to create the final binary.
6123
6124         * Removed many lines that contain 8051 legacy code.
6125         * The code is finally placed under a 'code' directive.
6126         * Added port specific options.
6127
6128         * _process_pragma: simplified since now we do not need *special*
6129         include file to define SFR registers. But a separate header
6130         will be needed. This will be developed later.
6131         * _pic16_parseOptions: added, parses port specific options:
6132         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6133         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6134         --preplace-udata-with=
6135
6136         * _pic16_setDefaultOptions: modified to initialize section names,
6137         but hack is temporarly out of order since it needs improvement.
6138         * _pic16_genAssemblerPreamble: configuration words are emitted by
6139         their address instead of their name. This part is incomplete and
6140         supports only the 18Fxx2 devices. Other devices will emit an error
6141         during assembly since they do not contain the same set of config
6142         registers
6143         * _pic16_genIVT: is modified,
6144
6145         * pcode.c: added definitions for some hardware registers that are needed
6146         for stack support
6147         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6148         All PCI entries are updated. Now LFSR is supported.
6149         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6150         * added pic16_newpCodeOpLit2 to support instructions with
6151         two literal arguments
6152         * pic16_pCode2str: corrected code that emits assembler instructions
6153         with two literal operands and those that have an access bit modifier
6154         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6155         this fixes a bug which caused some labels to be lost, when an
6156         assembler directive was added, i.e. banksel,
6157         * pic16_FixRegisterBanking: improved logic that causes the insertion
6158         of bank switching,
6159         * InlineFunction: functions that are called once, are not any more
6160         inlined. This can be a port option in the future,
6161
6162         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6163
6164         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6165         hold the corresponding uninitialized symbols,
6166         * pic16_allocProcessorRegister: registers have explicit marked the
6167         accessBank field,
6168         * pic16_allocInternalRegister: registers are explicit marked as
6169         not used,
6170         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6171         processing list, so bit registers were lost,
6172         *
6173
6174         * ralloc.h: added field 'accessBank' and original symbol operand
6175         in register definition,
6176         * removed the field isMapped from register definition,
6177
6178         ** Several functions have been removed from various sources:
6179         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6180         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6181         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6182         pic16_assignRelocatableRegisters
6183
6184         ** others have been introduced:
6185         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6186         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6187
6188 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6189
6190         * support/scripts/inc2h.pl: changed definition of BIT_AT
6191         to emit 'sbit at' instead of 'bit at'. This was a request.
6192
6193         PIC16 port related preliminary changes:
6194         * gen.c: prefixed function popRegFromString with
6195         pic16_ and all references to it corrected
6196         * pcode.c: all pic16_pc_* hardware registers prefixed
6197         with underscore (_),
6198         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6199         * ralloc.c: newReg(): when register is REG_SFR then
6200         set address to rIdx,
6201         pic16_allocProcessorRegister(): marks register wasUsed=0
6202         pic16_writeUsedRegs(): added a call to assign processor
6203         registers via pic16_assignFixedRegisters
6204
6205 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6206
6207         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6208         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6209         variables in unused register banks.  Also the SSEG is placed
6210         wherever there is enough space for it, and IDATA can be anywhere
6211         in internal RAM.  For now compile using -Wl-Y[stack_size].
6212         The mem file is different for this option as well, since it
6213         makes no sense of talking about DSEG lenght.
6214
6215 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6216
6217         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6218         in certain cases, e.g. when ROM assignment, patch provided
6219         from Albert den Haan.
6220
6221 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6222
6223         Many signedness and type propagation fixes:
6224         * src/SDCCicode.c: made geniCodeCast() static
6225         replaced SPEC_ by IS_ (cosmetic)
6226         (operandOperation): fixed div and mod operation
6227         (usualBinaryConversions): added support for promotion of char
6228         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6229         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6230         (geniCodeAdd): an array index will stay unsigned, even if promoted
6231         from char to int
6232         (geniCodeArray): ditto
6233         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6234         * src/SDCCsymt.c (computeType): added more support for char;
6235         promotion of char is selectable by promoteCharToInt, fixed signedness
6236         for all cases
6237         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6238         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6239         * src/SDCCval (val*): replaced signedness calculation by
6240         computeType()
6241         rearranged if-branches (cosmetic)
6242         (valShift): added warning W_SHIFT_CHANGED
6243         (valCompare): fixed problem with different types
6244         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6245         * support/regression/tests/literalop.c: added many cases
6246         * support/regression/tests/ast_constant_folding.c: changed finally to
6247         'unsigned int'
6248         * .version: new year, new version: 2.3.7
6249         * src/SDCCmain.c (main): applied patch #866468
6250         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6251         provided by Scott Bronson
6252         * doc/sdccman.lyx: updated documentation for sdcdb
6253         updated and added chapter tips
6254
6255 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6256
6257         * src/SDCCsymt.h: missing from yesterday's commits
6258
6259 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6260
6261         * src/SDCC.y (struct_or_union_specifier),
6262         * support/Util/SDCCerr.c,
6263         * support/Util/SDCCerr.h: verify that struct & union tags are used
6264         as declared.
6265
6266 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6267
6268         * src/SDCCglobl.h: missing from yesterday's commits
6269
6270 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6271
6272         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6273         sft_attributes, struct_declaration, parameter_declaration,
6274         type_name, start_block, declaration_list),
6275         * src/SDCC.lex (check_type): support redefinition of typedef names
6276
6277 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6278
6279         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6280         aligned xdata arrays. Erik helped me with the if clause.
6281
6282 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6283
6284         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6285         warning
6286
6287 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6288
6289         * src/SDCCast.h,
6290         * src/SDCCast.c (newAst_),
6291         * src/SDCCicode.h,
6292         * src/SDCCicode.c (ast2iCode, newiCode),
6293         * src/SDCCglobl.h,
6294         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6295         expr, statement, expression_statement, selection_statement,
6296         iteration_statement, expr_opt, jump_statement): foundation for tracking
6297         sequence points
6298         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6299         point code too)
6300
6301 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6302
6303         * support/Util/SDCCerr.c,
6304         * src/SDCCast.h,
6305         * src/SDCCast.c (createCase, createDefault, decorateType),
6306         * src/SDCClabel.c (labelUnreach),
6307         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6308         to error messages.
6309         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6310         (with thanks to Stas Sergeev)
6311         * device/include/time.h,
6312         * device/lib/time.c (CheckTime): suppress unreachable code warning
6313
6314 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6315
6316         * src/SDCCast.c (createIvalCharPtr),
6317         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6318         bug #753752)
6319         * support/regression/tests/nullstring.c: tests for these two bugs
6320
6321 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6322
6323         * support/Util/SDCCerr.h,
6324         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6325         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6326         about storage class and 'at' used inside struct or union
6327         * src/SDCCBBlock.c (iCodeFromeBBlock),
6328         * src/SDCCcse.c (ifxOptimize),
6329         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6330         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6331         printIval, emitStaticSeg, emitOverlay),
6332         * src/SDCClabel.c (deleteIfx),
6333         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6334         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6335         gatherAutoInit, processParms),
6336         * support/Util/SDCCerr.h,
6337         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6338         reporting for post-parse errors.
6339
6340 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6341
6342         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6343         implicit casts via union; they don't work on big endian systems
6344         (possible fix for bug #861138)
6345
6346 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6347
6348         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6349         * src/mcs51/main.c: fixed the fix for bug #737001
6350
6351 2003-12-15  Borut Razem <borut.razem AT siol.net>
6352
6353         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6354
6355 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6356
6357         * support/makebin/makebin.c: put output in binary mode
6358
6359 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6360
6361         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6362         xdata and data memory on startup. Set the environment variable
6363         SDCC_NOGENRAMCLEAR to disable this.
6364         * src/mcs51/peephole.def,
6365         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6366         (allows non-interrupt and interrupt code to safely compete for a resource
6367         without the non-interrupt code having to disable interrupts)
6368
6369 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6370
6371         * src/SDCCicode.c (geniCodeAdd),
6372         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6373         with valFromType if type might be a pointer and host is big endian).
6374         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6375         types, not just integer types.
6376         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6377         multiply defined with mismatching "at" address.
6378
6379 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6380
6381         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6382         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6383         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6384         with embedded nulls (fixed bug #753752)
6385
6386 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6387
6388         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6389         Apparently this did not see much testing (endless loop)
6390
6391 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6392
6393         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6394
6395 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6396
6397         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6398         gracefully handle NULL memmap pointers
6399
6400 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6401
6402         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6403         instead of deleting the iCode when an operand is volatile
6404         * src/z80/gen.c (genDummyRead),
6405         * src/mcs51/gen.c (genDummyRead),
6406         * src/ds390/gen.c (genDummyRead),
6407         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6408         not just IC_RIGHT
6409         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6410         * src/SDCC.y: fixed bug #850420
6411
6412 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6413
6414         Applied z80 i/o port patch from Peter Townson and fixed some operators
6415         to better handle operands in A register.
6416         * device/include/z180.h
6417         * src/SDCC.y
6418         * src/SDCCglue.c
6419         * src/z80/gen.c
6420         * src/z80/gen.h
6421         * src/z80/main.c
6422         * src/z80/peeph-z80.def
6423         * src/z80/peeph.def
6424         * src/z80/z80.h
6425
6426 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6429
6430 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * device/lib/hc08/_mullong.c: Removed extra #endif
6433
6434 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6435
6436         * sim/ucsim/hc08.src/inst.cc,
6437         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6438         carries from x to h
6439         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6440         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6441         * device/include/stdarg.h: fixed varargs for hc08
6442         * device/lib/Makefile.in,
6443         * device/lib/hc08/Makefile,
6444         * device/lib/hc08/_mulint.c,
6445         * device/lib/hc08/_mullong.c: fixed some endian problems
6446
6447 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6448
6449         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6450         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6451         * device/lib/_gptrget.c,
6452         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6453
6454 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6455
6456         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6457         * src/SDCCast.c (astErrors): fixed bug #846007
6458         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6459
6460 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6461
6462         * src/SDCCast.c (decorateType): disabled a transformation I added in
6463         revision 1.188 (access to fields of a structure at an absolute address);
6464         it breaks with bitfields, extern declarations, and gcse analysis.
6465         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6466         could be assigned through a pointer, so don't complain.
6467         * src/SDCCast.c (astErrors),
6468         * src/SDCCast.h,
6469         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6470
6471 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6472
6473         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6474         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6475         output of __config directives, since gpasm now supports them
6476         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6477         pre-processor macro, i.e. -DMCU=p18f452
6478         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6479         and modified to handle 'cast' icode similarly to '=' icode
6480         * src/pic16/device.h (typedef struct PIC_device): added field
6481         'extMIface' to indicate that chip has external memory interface
6482         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6483         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6484         18F8720
6485
6486 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6487
6488         * src/SDCC.y (pointer): fixed bug #846006
6489         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6490         * src/SDCCast.c (decorateType): fixed bug #846009
6491         * src/ds390/peeph.def,
6492         * src/ds390/gen.c (genAnd, genOr),
6493         * src/mcs51/peeph.def,
6494         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6495
6496 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6497
6498         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6499         * src/SDCCdflow.c
6500         * src/SDCCcse.c
6501         * src/SDCCcse.h
6502         * src/SDCCBBlock.h
6503         * src/SDCCBBlock.c
6504
6505 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6506
6507         fixed bug #845089
6508         * src/SDCCbitv.h,
6509         * src/SDCCbitv.c: added function to free a bitvector
6510         * src/SDCClrange.h,
6511         * src/SDCClrange.c: added function to recompute the liveranges
6512         * src/avr/ralloc.c,
6513         * src/ds390/ralloc.c,
6514         * src/hc08/ralloc.c,
6515         * src/mcs51/ralloc.c,
6516         * src/pic/ralloc.c,
6517         * src/pic16/ralloc.c,
6518         * src/xa51/ralloc.c,
6519         * src/z80/ralloc.c: recompute the liveranges after register packing
6520
6521 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6522
6523         * src/SDCCloop.c (newInduction): fixed bug #845630
6524
6525 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6526
6527         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6528         inadvertantly left behind from my 2003-11-12 change
6529
6530 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6531
6532         Updated headers I neglected to commit yesterday.
6533         * src/SDCClrange.h,
6534         * src/SDCCicode.h
6535
6536 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6537
6538         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6539         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6540         * src/SDCCopt.c (eBBlockFromiCode),
6541         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6542         the creation of the key hash table from the sequencing so it can be used
6543         earlier (for some GCSE bug fixes still pending)
6544
6545 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6546
6547         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6548         * support/regression/tests/addsub.c: testing genPlus shortcut
6549
6550 2003-11-15  Borut Razem <borut.razem AT siol.net>
6551
6552         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6553
6554 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6555
6556         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6557         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6558         ordering is immaterial.
6559         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6560
6561 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6562
6563         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6564         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6565         (SIGSEV) of bug #840381
6566         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6567         unlink new file before rename if new and old filenames are the same)
6568
6569 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6570
6571         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6572         uninitialized variables) for the mcs51. Set environment variable
6573         SDCC_GENRAMCLEAR to test.
6574         xdata initialization slightly shorter
6575
6576 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6577
6578         * src/SDCCsymt.h,
6579         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6580         #838241 & 780691 (basicly the same bug)
6581         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6582         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6583
6584 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6585
6586         * src/SDCCmain.c (linkEdit): "fix" #834252
6587
6588 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6589
6590         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6591         * src/SDCCast.h,
6592         * src/SDCC.y: fixed bug #819403
6593
6594 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6595
6596         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6597         the reentrant attribute.
6598         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6599         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6600         simulation
6601         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6602         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6603         erroneously reduced to a literal.
6604         * src/hc08/ralloc.c (packRegisters, rematStr),
6605         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6606         some cases
6607
6608 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6609
6610         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6611         * doc/sdccman.lyx: changed from 'article' to 'book'
6612         * doc/Makefile: readded test_suite_spec and cdbfileformat
6613
6614 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6615
6616         * device/include/stdlib.h: include malloc.h to comply with ANSI
6617         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6618
6619 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6620
6621         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6622         * doc/clean.mk: also remove *.out files
6623         * doc/sdccman.lyx: some additions, larger top/bottom margins
6624
6625 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6626
6627         * src/SDCC.y: fixed bug #837365
6628         * support/regression/tests/bitopcse.c
6629         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6630         a symbol (might be valop instead)
6631         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6632         * device/lib/clean.mk: added hc08 to the cleaning list
6633
6634 2003-11-04  Borut Razem <borut.razem AT siol.net>
6635
6636         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6637           made 2003-11-04
6638         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6639           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6640           malloc is declared in standard stdlib.h
6641
6642 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6643
6644         * device/lib/hc08/Makefile: need to clean .rel not .o files
6645         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6646
6647 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6648
6649         * src/port.h,
6650         * src/hc08/main.c,
6651         * src/mcs51/main.c,
6652         * src/ds390/main.c,
6653         * src/z80/main.c,
6654         * src/avr/main.c,
6655         * src/pic/main.c,
6656         * src/pic16/main.c,
6657         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6658         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6659         tests (which uses the port's oclsExpense function)
6660         * src/SDCC.y,
6661         * src/SDCCast.c,
6662         * src/SDCCicode.c,
6663         * src/hc08/gen.c,
6664         * src/ds390/gen.c,
6665         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6666
6667 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/SDCCcse.c (ifxOptimize),
6670         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6671         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6672         deleting the IFX iCode.
6673         * src/hc08/ralloc.c: reduced unneeded slocs
6674         * src/hc08/gen.c: fixed bug in asmopToBoolean
6675
6676 2003-11-04  Borut Razem <borut.razem AT siol.net>
6677
6678         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6679           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6680           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6681           transferred to configure
6682
6683 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6684
6685         Use headers defined in the C[++] standards:
6686         * sim/ucsim/gui.src/serio.src/fileio.cc
6687         * sim/ucsim/gui.src/serio.src/frontend.cc
6688         * sim/ucsim/gui.src/serio.src/main.cc
6689         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6690         * support/Util/NewAlloc.c
6691         * as/hc08/lklibr.c
6692         * as/mcs51/lklibr.c
6693         * as/z80/aslist.c
6694         * as/z80/assym.c
6695
6696 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6697
6698         * Added MSVC projects for hc08 assembler and linker:
6699         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6700         /as/hc08/link_hc08.dsp
6701
6702 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6703
6704         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6705
6706 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6707
6708         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6709
6710 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6711
6712         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6713
6714 2003-10-31  Borut Razem <borut.razem AT siol.net>
6715
6716         * support/cpp2/cpplib.h,
6717           support/cpp2/cpplib.c,
6718           support/cpp2/cpplex.c,
6719           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6720           to switch _asm block preprocessing on / off. Default is
6721           #pragma preproc_asm +
6722
6723 2003-10-31  Borut Razem <borut.razem AT siol.net>
6724
6725         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6726           when outputting comment blocks (when executed with -C option) and
6727           _asm (SDCPP specific) blocks
6728
6729 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6730
6731         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6732
6733 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6734
6735         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6736
6737 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6738
6739         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6740         * src/SDCCast.c (decorateType): fixed bug #832664
6741
6742 2003-10-31  Borut Razem <borut.razem AT siol.net>
6743
6744         * support\cpp2\cpplex.c: fixed for SDCPP:
6745           comments(when executed with -C option) and _asm blocks
6746           were included even if they where in skipped #if block.
6747           Applied solution from GCC cpp 3.3.2
6748
6749 2003-10-31  Borut Razem <borut.razem AT siol.net>
6750
6751         * src/SDCC.lex: sdcc now understands both formats:
6752           '# <line_number> <file_name>' and
6753           '#line <line_number> <file_name>'
6754         * support/cpp2/cppmain.c: sdcpp now generates the standard
6755           '# <line_number> <file_name>' instead of former
6756           '#line <line_number> <file_name>'
6757
6758 2003-10-30  Borut Razem <borut.razem AT siol.net>
6759
6760         * support/cpp2/cpphash.h,
6761         * support/cpp2/cpplib.h
6762         * support/cpp2/cpplex.c,
6763         * support/cpp2/cppmain.c,
6764         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6765
6766 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         Fixed a number of problems revealed by bug #827883.
6769         * src/SDCCloop.c (loopInvariants): Spill location of the
6770         result operand should be recomputed if extracted from
6771         a loop. Also, don't extract assignments of an iTemp
6772         from a literal.
6773         * src/SDCCast.c (isConformingBody): loop reversal should
6774         not occur if the control variable is involved with a
6775         relational operator.
6776
6777 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6778
6779         * .version: bumped to 2.3.6 to reflect the big improvements
6780         made by Erik and Klaus. Thanks!
6781
6782 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6783
6784         Replaced the livrange code.
6785         * src/SDCClrange.c: added new LR code
6786         * src/SDCCloop.c,
6787         * src/SDCCBBlock.h: removed remainig parts from old LR code
6788         * src/ds390/ralloc.c,
6789         * src/ds390/gen.c: minor fixes to make it work with new code
6790
6791 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6792
6793         * as/hc08/asm.h,
6794         * as/hc08/lkrloc.c,
6795         * src/hc08/gen.c,
6796         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6797         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6798         (tweaked fix for bug #818696)
6799
6800 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6801
6802         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6803
6804 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6805
6806         * src/SDCCmain.c,
6807         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6808         * src/mcs51/gen.c (gencjneshort),
6809         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6810         more efficient (per Scott Bronson's suggestion)
6811
6812 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6813
6814         Extended the semantics of the critical keyword to include
6815         individual statements. See RFE #827755 and #799831
6816         * src/SDCC.y
6817         * src/SDCCicode.c
6818         * src/SDCCopt.c
6819         * src/SDCCast.c
6820         * support/Util/SDCCerr.c
6821         * support/Util/SDCCerr.h
6822         * src/mcs51/gen.c
6823         * src/ds390/gen.c
6824         * src/hc08/gen.c
6825
6826 2003-10-19  Borut Razem <borut.razem AT siol.net>
6827
6828         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6829
6830 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6831
6832         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6833         Fixed bug #818696
6834         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6835         and predecrement operand is displayed
6836
6837 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6838
6839         * src/SDCCval.c (valMinus): fixed bug #826041
6840
6841 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6842
6843         Some hc08 related updates that I missed earlier
6844         * sim/ucsim/stypes.h
6845         * support/regression/ports/hc08/spec.mk
6846
6847 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6848
6849         New target "hc08" for the Motorola 68hc08 family of micros
6850
6851         * configure
6852         * configure.in
6853         * Makefile
6854         * src/hc08/*
6855         * src/SDCCmain.c
6856         * src/port.h
6857         * sim/ucsim/hc08.src/*
6858         * sim/ucsim/configure.in
6859         * src/ucsim/configure
6860         * sim/ucsim/packages_in.mk
6861         * as/hc08/*
6862         * as/Makefile
6863         * device/include/mc68hc908qy.h
6864         * device/lib/hc08/*
6865         * device/lib/Makefile.in
6866         * support/regression/ports/hc08/*
6867         * support/regression/Makefile
6868
6869 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6870
6871         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6872         regression test
6873         * src/ds390/gen.c (genCast): fixed bug #821957
6874
6875 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6876
6877         * device/lib/logf.c: "fixed" overlay bug
6878         * support/regression/ports/host/spec.mk: added m library
6879         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6880         * support/regression/tests/float_trans: added (for Eric)
6881
6882 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6883
6884         * src/mcs51/gen.c (genCpl): fixed bug
6885         http://sf.net/mailarchive/message.php?msg_id=6263915
6886
6887 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6888
6889         * src/SDCCast.c (decorateType): added extended constant folding
6890         * src/SDCCsymt.c (computeType): cleanup
6891         * src/SDCCval.c (valShift): minor optimization
6892         * support/regression/tests/ast_constant_folding.c: added
6893
6894 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6895
6896         * src/SDCCmain.c: removed some unintended changes
6897
6898 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6899
6900         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6901         * src/z80/gen.c: fixed part of bug #817589
6902         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6903
6904 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6905
6906         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6907         * src/SDCCcflow.c
6908         * src/SDCCcse.c
6909         * src/SDCCdflow.c
6910         * src/SDCClabel.c
6911         * src/SDCClrange.c
6912         * src/SDCCmem.c
6913         * src/SDCCopt.c
6914         * src/SDCCpeeph.c
6915         * src/SDCCset.c
6916         * src/avr/ralloc.c
6917         * src/ds390/ralloc.c
6918         * src/izt/ralloc.c
6919         * src/mcs51/ralloc.c
6920         * src/pic/ralloc.c
6921         * src/pic16/ralloc.c
6922         * src/xa51/ralloc.c
6923         * src/z80/ralloc.c
6924         * src/z80/gen.c: removed unused label "release:"
6925
6926 2003-10-06  Borut Razem <borut.razem AT siol.net>
6927
6928         * src/SDCC.lex: removed definition of unused variables
6929           save_optimize and save_options
6930
6931 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6932
6933         * clean.mk: removed '=' in "-maxdepth=1"
6934         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6935         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6936
6937 2003-10-06  Borut Razem <borut.razem AT siol.net>
6938
6939         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6940           my_unput() replaced by unput()
6941
6942 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6943
6944         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6945         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6946         type-punned pointer will break strict-aliasing rules"
6947         Old LR behaviour is again default; Klaus' LR can be choosen by
6948         defining the environment variable LRKLAUS
6949         * src/SDCCBBlock.h
6950         * src/SDCCloop.c
6951         * src/SDCClrange.c
6952         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6953         * clean.mk: fixed removal of files in bin/CVS/
6954         * device/lib/clean.mk: fixed removal of directories small and large
6955         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6956         * src/SDCCicode.c,
6957         * src/SDCCval.c: removed superflous test for pedantic
6958
6959 2003-10-05  Borut Razem <borut.razem AT siol.net>
6960
6961         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6962           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6963           message "unmatched #pragma SAVE and #pragma RESTORE"
6964
6965 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6966
6967         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6968           assembly, critical functions, atomic, nojtbound)
6969
6970 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6971
6972         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6973         * src/SDCCBBlock.h
6974         * src/SDCCloop.c
6975         * src/SDCCloop.h
6976         * src/SDCClrange.c
6977
6978 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6979
6980         * src/z80/gen.h,
6981         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6982         * src/mcs51/gen.h
6983         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6984         * src/ds390/gen.h
6985         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6986         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6987         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6988
6989 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6990
6991         * src/z80/gen.c (genRet): fixed bug #524753
6992         * src/z80/gen.c (genCast): fixed internal error on cast from
6993         pointer to long
6994         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6995         fix for bug #477835 to the z80
6996         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6997         for tracking iCodes in the peephole optimizer for z80
6998
6999 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7000
7001         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7002         the other part of bug #814548
7003         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7004
7005 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7006
7007         * src/SDCCcse.c: fixed part of bug #814548
7008
7009 2003-09-28  Borut Razem <borut.razem AT siol.net>
7010
7011         * src/asm.c: rewrite of printILine() to use temporary file instead
7012           a pipe
7013         * src/xa51/main.c: commented out declaration of int rewinds
7014
7015 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7016
7017         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7018
7019 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7020
7021         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7022         * src/asm.c (printILine): Fixed bug #811015
7023
7024 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7025
7026         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7027         freeing.
7028
7029 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7030
7031         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7032         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7033         to correctly handle general case of AOP_PAIRPTR
7034         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7035
7036 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7037
7038         * src/mcs51/ralloc.c (fillGaps),
7039         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7040         register positioning bug)
7041
7042 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7043
7044         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7045
7046 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7047
7048         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7049         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7050         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7051         (ralloc doesn't intentionally do this now, but perhaps later)
7052         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7053         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7054         register positioning bugs (Fixed bug #762602 and #795325)
7055         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7056         (Fixed bug #808779)
7057         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7058         lines that --i-code-in-asm generates
7059
7060 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7061
7062         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7063         trying to fclose a FILE* that was already closed.
7064
7065 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7066
7067         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7068         of const struct should be treated as if const themselves)
7069
7070 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7071
7072         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7073
7074 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7075
7076         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7077         Unix (/n) and DOS (/r/n) line terminations.
7078
7079 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7080
7081         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7082         bug #613775
7083
7084 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7085
7086         * src/mcs51/gen.c (genFunction, genEndFunction),
7087         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7088         and restore of EA so that stack offsets to parameters are
7089         correct when using both critical and reentrant/stack-auto.
7090         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7091         size (can be triggered in error if sloc is shared between
7092         different sized objects)
7093         * device/include/float.h: fixed macros to explicitly use
7094         unsigned long where needed
7095
7096 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7097
7098         Feature req. 799831: added code to allow nesting of critical functions
7099         * src/mcs51/gen.c (genFunction, genEndFunction)
7100         * src/ds390/gen.c (genFunction, genEndFunction)
7101
7102 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7103
7104         * src/SDCCsymt.c (sclsFromPtr),
7105         * src/SDCCsymt.h,
7106         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7107         support for standard C idiom of memory mapped variables; for
7108         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7109         to xdata int at 0x1234 tempvar = 1.
7110         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7111         provided by Akiya ISHIDA
7112
7113 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7114
7115         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7116         * src/SDCCval.c (constVal): added reduction from int to char
7117         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7118         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7119         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7120         to ignore the sign
7121         * support/regression/tests/shifts.c: fixed
7122
7123 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7124
7125         * src/z80/gen.c (genXor): Fixed bug #805445
7126
7127 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7128
7129         Fixed bug #621531 (const & volatile confusion in the type chain).
7130         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7131         refer to the const or volatile state of the pointer itself.
7132
7133         * src/SDCCast.c
7134         * src/SDCCglue.c
7135         * src/SDCCicode.c
7136         * src/SDCCsymt.c
7137         * src/SDCCval.c
7138         * src/SDCC.y
7139         * src/SDCCsymt.h
7140         * src/pic/gen.c
7141         * src/pic/ralloc.c
7142         * src/pic16/gen.c
7143         * src/pic16/ralloc.c
7144         * support/regression/tests/const.c
7145
7146 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7147
7148         When checking for duplicated modules, use absolute paths
7149         instead of relative paths.  Files changed:
7150
7151         * as/mcs51/lklib.c
7152         * link/z80/lklib.c
7153
7154 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7155
7156         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7157
7158 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         * device/include/string.h: added size_t typedef, changed
7161         prototypes to use size_t, eliminated separate reentrant and
7162         non-reentrant declarations, added _memmove declaration
7163         * device/lib/_memcpy.c: changed to use size_t instead of int,
7164         changed /4 to >>2 to avoid division library call
7165         * device/lib/_memcmp.c,
7166         * device/lib/_memset.c,
7167         * device/lib/_strncat.c,
7168         * device/lib/_strncpy.c,
7169         * device/lib/_strncmp.c: changed to use size_t instead of int
7170         * device/lib/_memmove.c: new file (fixed bug #772294)
7171         * device/lib/Makefile.in: added _memmove.c
7172         * device/lib/z80/asm_strings.s: fixed bug #772290
7173         * support/regression/tests/bitfields.c: attempt to fix host assertion
7174         failure on amd64-unknown-linux2.2
7175
7176 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7177
7178         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7179         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7180         * as/z80/asmain.c (main): fixed bug #801766
7181
7182 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7183
7184         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7185         compilers
7186
7187 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7188
7189         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7190         reported in bug #800609
7191
7192 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7193
7194         * Top header beautifications in src/pic16 directory:
7195           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7196           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7197           pcoderegs.h, ralloc.c, ralloc.h
7198         * main.c: added top header and GPL license notice
7199         * pcode.c: fixed the if-conditional warning
7200
7201 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7202
7203         * device/lib/_mullong.c: replaced int by short for gcc
7204
7205 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7206
7207         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7208         and JUMPTABLE iCodes properly now (worked by accident before)
7209         * src/mcs51/gen.c (leftRightUseAcc),
7210         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7211         iCode properly now. Use getSize instead of nRegs since a & b
7212         aren't part of the nRegs tally.
7213
7214 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7215
7216         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7217         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7218           before instructions that use the _STATUS register
7219
7220 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7221
7222         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7223         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7224         fetching of the pointer
7225         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7226         copied from genNearPointerSet()
7227         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7228         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7229         If they pop r0/r1 they must be called in the opposite order than aopOp().
7230         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7231         (resp. --stack-auto), prepared for --xstack
7232
7233 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7234
7235         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7236
7237 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7238
7239         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7240         these ports have their own __sdcc_external_start()
7241
7242 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7243
7244         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7245         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7246         type for bits was changed. It resulted in bit variables becoming
7247         global, which is not permitted in PIC 14 assembly output.
7248
7249 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7250
7251         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7252
7253 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7254
7255         Z80 and MCS51 linkers complaint if a public symbol is defined
7256         in more than one library module:
7257
7258         * as/mcs51/lklib.c
7259         * link/z80/lklib.c
7260         * as/mcs51/Makefile.in
7261
7262 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7263
7264         A few small changes that speed up the peephole optimizer.
7265
7266         * src/SDCCpeeph.c
7267
7268 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7269
7270         Try to make the peephole optimizer smarter by maintaining
7271         an association between the assembly source code and the
7272         iCodes that originated them. Put this information to use
7273         with a new peephole rule condition "notVolatile" so that
7274         the rules can be aggressive yet still safe.
7275
7276         * src/SDCCpeeph.c
7277         * src/SDCCpeeph.h
7278         * src/mcs51/gen.c
7279         * src/mcs51/peeph.def
7280
7281 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7282
7283         Fixed bug #741761
7284
7285         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7286         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7287         if the left or right operand symbols have the accuse flag set.
7288
7289 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7290
7291         Changed the type of the result of the ! (NOT) operator to char;
7292         previously it returned the same type as the source. This allows
7293         us to eliminate all the genFloatNot functions (all of its target
7294         implementations were very buggy) since !float can use the same
7295         code as !long now.
7296
7297         * src/SDCCicode.c (ast2iCode): ! returns char
7298         * src/mcs51/gen.c (genNot, genNotFloat),
7299         * src/ds390/gen.c (genNot, genNotFloat),
7300         * src/z80/gen.c (genNot, genNotFloat),
7301         * src/pic/gen.c (genNot, genNotFloat),
7302         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7303
7304 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7305
7306         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7307         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7308            during interrupts. Ensure WSAVE is located at a shared bank address.
7309         2. Fixed page selection in some places
7310         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7311            the registers name strings.
7312         4. Fixed "signed / unsigned compare" compiler warnings.
7313         5. The PIC port manages its own allocation of the general purpose
7314            registers, but makes no attempt to reuse them. As a result when
7315            compiling it soon runs out of general purpose registers. Some
7316            additional code was added to the files pcode.c and device.c to walk
7317            through the function call tree and rename the registers so that they
7318            get reused.
7319
7320         * src/pic/device.c
7321         * src/pic/gen.c
7322         * src/pic/glue.c
7323         * src/pic/pcode.c
7324         * src/pic/pcode.h
7325         * src/pic/ralloc.c
7326         * src/pic/ralloc.h
7327         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7328         genPlus() & genMinus() when the result is the same as left or right
7329
7330 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7331
7332         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7333
7334 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7335
7336         Made bitfield a distinct type from bit so that bitfields
7337         convert as per ANSI C and bits retain their traditional
7338         boolean style behaviour. Implemented bitfield support in
7339         the z80 port.
7340
7341         * src/SDCCsymt.h,
7342         * src/SDCCsymt.c,
7343         * src/SDCCast.c,
7344         * src/cdbFile.c,
7345         * src/mcs51/gen.c,
7346         * src/ds390/gen.c: bit v bitfield split
7347         * src/z80/gen.c: New support for bitfields
7348         * support/regression/tests/bitfields.c: reenabled z80,
7349         added more tests
7350
7351 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7352
7353         Rules 246.x, 247.x relate to bitfields, the others speed up
7354         access to xdata mapped I/O devices.
7355
7356         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7357
7358 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7359
7360         Cleaned up genPackBits and genUnpackBits and added two helper
7361         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7362         for literal assignments in genPackBits (thanks to Frieder for
7363         reminding me).
7364
7365         * src/mcs51/gen.c
7366         * src/ds390/gen.c
7367
7368 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7369
7370         Fixed bug #748310 (pointer to function type mishandled when the
7371         function name is omitted). Also fixed a SIGSEGV when a function
7372         attribute (reentrant, etc) is used on a non-function or on a
7373         function but misplaced before the parameter list.
7374
7375         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7376         bug #748310
7377         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7378         * support/Util/SDCCerr.h,
7379         * support/Util/SDCCerr.c: Added func attr misuse error msg
7380
7381 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7382
7383         Fixed bug #787649 by anonymous
7384         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7385         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7386
7387 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7388
7389         Fixed numerous bitfield problems.
7390
7391         * src/SDCC.y: More bitfield related error checking
7392         * src/SDCCsymt.h,
7393         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7394         * support/Util/SDCCerr.h,
7395         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7396         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7397         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7398         * support/regression/tests/bitfields.c: tests added
7399
7400 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7401
7402         Made the constant following the "interrupt" keyword optional. If
7403         omitted, the function will not automatically be given an entry
7404         in the interrupt vector table (similar to #pragma NOIV, but
7405         less syntacticly kludgy). The interrupt number is also now
7406         range checked. Also fixed a bug in the high order bit example
7407         in the manual.
7408
7409         * src/SDCC.y
7410         * src/SDCCmem.c
7411         * src/SDCCglue.c
7412         * src/SDCCsymt.h
7413         * support/Util/SDCCerr.c
7414         * support/Util/SDCCerr.h
7415         * doc/sdccman.lyx
7416
7417 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7418
7419         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7420         * src/SDCCicode.c (operandOperation): rewritten some ops
7421         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7422         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7423         other type
7424         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7425         be re-activated by defining REDUCE_LITERALS)
7426         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7427         unsigned, but are signed by default
7428         * src/SDCCval.c (constVal): rearranged
7429         * src/SDCCval.c (valMod): preliminary fix
7430         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7431         * support/regression/literalop.c: added, work in progress
7432
7433 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7434
7435         Generate warnings for useless declarations like "char data;"
7436         that don't do what new users expect.
7437
7438         * src/SDCC.y
7439         * support/Util/SDCCerr.h
7440         * support/Util/SDCCerr.c
7441
7442 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7443
7444         * src/SDCCval.c (valMult): fix overflow detection of negative int
7445
7446 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7447
7448         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7449
7450         Changes to support big endian targets:
7451
7452         * src/ports.h
7453         * src/SDCCglue.c
7454         * src/avr/main.c
7455         * src/ds390/main.c
7456         * src/izt/i186.c
7457         * src/mcs51/main.c
7458         * src/pic/main.c
7459         * src/pic16/main.c
7460         * src/xa51/main.c
7461         * src/z80/main.c
7462
7463 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7464
7465         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7466         * device/lib/time.c: fixed warning "integer overflow in expression"
7467
7468 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7469
7470         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7471         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7472         constants are unsigned; added recognition of "u" flag for unsigned
7473         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7474         * src/SDCCval.c (valDiv, valMod): fixed signdness
7475         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7476         signedness of modulo, left and right shift
7477         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7478         * support/Util/SDCCerr.h: added warning W_INT_OVL
7479         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7480         * src/SDCCast.c (ast_print): improved output of constants
7481
7482 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7483
7484         Fixed some warnings when building with MSVC:
7485
7486         * as\mcs51\asdata.c
7487         * as\z80\asdata.c
7488         * as\mcs51\asm.h
7489         * as\z80\asm.h
7490         * link\z80\aslink.h
7491         * link\z80\lkdata.c
7492         * link\z80\lkeval.c
7493         * link\z80\lkgb.c
7494         * link\z80\lkihx.c
7495         * link\z80\lks19.c
7496         * link\z80\lksym.c
7497         * support\cpp2\cpplib.c
7498         * src\ds390\gen.c
7499         * src\mcs51\gen.c
7500
7501 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7502
7503         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7504
7505 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7506
7507         * support\librarian\clean.mk: Do not remove Makefile.
7508         * support\librarian\Makefile: added.
7509
7510 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7511
7512         Added librarian to MSVC build:
7513         * all.dsp
7514         * sdcc.dsw
7515         * support\librarian\librarian.dsp
7516
7517         'configure' not needed for librarian, removed:
7518         * support\librarian\configure
7519         * support\librarian\configure.in
7520         * support\librarian\config_in.h
7521         * support\librarian\Makefile.in
7522
7523         Hopefully these ones built the librarian and the rest of sdcc properly:
7524         * Makefile
7525         * Makefile.common.in
7526
7527         Messed up 'configure', so revert to previous version:
7528         * configure
7529         * configure.in
7530
7531 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7532
7533         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7534         there, while the mantissa of a double is "only" 53 bits wide.
7535
7536 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7537
7538         Adding sdcclib to the build.  MSVC project coming soon.
7539         Files added/changed:
7540
7541         * support\librarian\clean.mk
7542         * support\librarian\configure
7543         * support\librarian\configure.in
7544         * support\librarian\config_in.h
7545         * support\librarian\Makefile.bcc
7546         * support\librarian\Makefile.in
7547         * support\librarian\sdcclib.c
7548         * Makefile.bcc
7549         * Makefile
7550         * Makefile.common.in
7551         * configure
7552         * configure.in
7553
7554 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7555
7556         Linker now complaints if linked modules have conflicting options, for
7557         example, one compiled using --model-large and another one compiled with
7558         --model-small.  The following files were modified:
7559
7560         * as\mcs51\asdata.c
7561         * as\mcs51\aslink.h
7562         * as\mcs51\asm.h
7563         * as\mcs51\asmain.c
7564         * as\mcs51\asout.c
7565         * as\mcs51\i51pst.c
7566         * as\mcs51\lkdata.c
7567         * as\mcs51\lklibr.c
7568         * as\mcs51\lkmain.c
7569         * as\z80\asdata.c
7570         * as\z80\asm.h
7571         * as\z80\asmain.c
7572         * as\z80\asout.c
7573         * as\z80\z80pst.c
7574         * link\z80\aslink.h
7575         * link\z80\lkdata.c
7576         * link\z80\lklibr.c
7577         * link\z80\lkmain.c
7578         * src\SDCCglue.c
7579
7580 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7581
7582         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7583         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7584
7585 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7586
7587         * src/z80/mappings.i: fix _mul[us][int,long] entries
7588
7589 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7590
7591         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7592
7593 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7594
7595         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7596         * support/regression/tests/bitopcse.c: added
7597         fixed warning:
7598         * src/avr/gen.c:
7599         * src/pic/gen.c:
7600         * src/pic16/gen.c:
7601         * src/z80/gen.c:
7602         * src/xa51/gen.c:
7603
7604 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7605
7606         added support for new library format to z80, gbz80 linkers:
7607         *link/z80/aslink.h
7608         *link/z80/lklex.c
7609         *link/z80/lklib.c
7610         *link/z80/lklist.c
7611
7612 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7613
7614         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7615         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7616
7617 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7618
7619         added DUMMY_READ_VOLATILE:
7620         * src/SDCC.y:
7621         * src/avr/gen.c:
7622         * src/xa51/gen.c:
7623         * src/z80/gen.c:
7624         * src/pic/gen.c:
7625         * src/pic16/gen.c:
7626         * src/mcs51/gen.c:
7627         * src/ds390/gen.c:
7628         * src/SDCCcse.c (algebraicOpts): many improvements
7629         * src/SDCCcse.h: removed algebraicOpts()
7630         * src/SDCCicode.c (picDummyRead): added
7631
7632 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7633
7634         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7635         "Insufficient space in data memory".
7636
7637 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7638
7639         * src/mcs51/gen.c: fixed bug #771358
7640         * src/z80/gen.c: fixed bug #759087
7641
7642 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7643
7644         * src/pic16/glue.c: minor cleanup by Vangelis
7645
7646 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7647
7648         * device/include/regc515c.h: fixed #758477
7649         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7650         * device/lib/_gptrput.c: saved a few bytes
7651         * my tab spacing is 8, yours too?)
7652         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7653         * device/lib/serial.c: process RX bytes earlier than TX bytes
7654         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7655
7656 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7657
7658         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7659
7660 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7661
7662     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7663
7664 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7665
7666         * device/lib/Makefile.in: bad fix, reverted to 1.43
7667
7668 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7669
7670         * device/lib/Makefile.in: added missing z80 object files
7671
7672 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7673
7674         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7675         pic16 progress by Vangelis:
7676         * src/SDCCglobl.h:
7677         * src/SDCCmain.c:
7678         * src/pic/Makefile:
7679         * src/pic:
7680         * pic/Makefile:
7681         * pic16/device.c:
7682         * pic16/device.h:
7683         * pic16/gen.c:
7684         * pic16/gen.h:
7685         * pic16/genarith.c:
7686         * pic16/glue.c:
7687         * pic16/main.c:
7688         * pic16/pcode.c:
7689         * pic16/pcode.h:
7690         * pic16/pcodepeep.c:
7691         * pic16/peeph.def:
7692
7693 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7694
7695     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7696
7697 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7698
7699     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7700     added gbz80 build to MSVC project.
7701     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7702     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7703     from 8051 stuff and setup so it links using a .lnk file.
7704
7705 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7706
7707     * support/librarian/sdcclib.c: sdcc librarian.
7708     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7709     with sdcclib.
7710
7711 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7712
7713     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7714
7715 2003-07-02  Borut Razem <borut.razem AT siol.net>
7716
7717         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7718         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7719         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7720         src/xa51/main.c, src/z80/main.c:
7721         virtualization of glue() function: each port has it's own glue function,
7722         which is accessed by do_glue function pointer in PORT.general structure
7723
7724 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7725
7726         * DS800C400 fun, improved ROM interface and tinibios.
7727
7728 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7729
7730         * More support for DS80C400. Now includes beginning of interface to ROM.
7731
7732 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7733
7734         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7735
7736 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7737
7738         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7739
7740 2003-06-19  Borut Razem <borut.razem AT siol.net>
7741
7742         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7743
7744 2003-06-19  Borut Razem <borut.razem AT siol.net>
7745
7746         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7747         fixed Z80 port - crt0.o: cannot open.
7748
7749 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7750
7751         * support/Util/MySystem.c (merge_command): revert bad fix
7752
7753 2003-06-18  Borut Razem <borut.razem AT siol.net>
7754
7755         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7756
7757 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7758
7759         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7760         option --use-stdout sends errors to stdout instead of stderr.
7761
7762 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7763
7764         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7765
7766 2003-06-15  Borut Razem <borut.razem AT siol.net>
7767
7768         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7769         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7770         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7771         fixed width array of pointers replaced with sets;
7772         multiple include and lib paths ared transferred to preprocessor and linker
7773         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7774         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7775         fixed width array of pointers
7776         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7777         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7778         fixupPath(), getPathDifference()
7779         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7780         fixed width array of pointers
7781
7782 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7783
7784         * src/pic16/ralloc.c: fix warnings
7785         * src/pic16/pcode.c: fix warning
7786
7787 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7788
7789          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7790         know all the details, but essentially this set of changes enable
7791         the pic16 port to generate movff instructions and generate assembler
7792         directives,
7793         * src/SDCCmain.c:
7794         * src/pic16/gen.c:
7795         * src/pic16/glue.c:
7796         * src/pic16/pcode.c:
7797         * src/pic16/device.c:
7798         * src/pic16/main.c:
7799         * src/pic16/pcode.h:
7800         * src/pic16/pcoderegs.c:
7801         * src/pic16/ralloc.c:
7802         * src/pic16/ralloc.h:
7803
7804 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7805
7806         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7807         added option --vc, so sdcc errors and warnings are compatible with
7808         Microsoft Visual Studio.
7809
7810 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7811
7812         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7813           device/lib/libfloat.lib: added atof function.
7814
7815 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7816
7817         * doc/sdccman.lyx: updated to Lyx 1.3
7818         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7819         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7820         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7821
7822 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7823
7824         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7825
7826 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7827
7828         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7829           additions to the "related tools/documentation" section
7830
7831 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7832
7833         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7834
7835 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7836
7837         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7838         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7839
7840 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7841
7842         * doc/sdccman.lyx: fix double dash and other minor things
7843         * doc/Makefile: fix double dash
7844
7845 2003-05-28  Karl Bongers(patches from Martin Helmling)
7846         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7847           condition and ignore commands.
7848
7849 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7850
7851         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7852           is in parts still quite out of date, I did changes as far as I felt makes sense
7853           for a non-native english speaker.
7854           Please feel free to add to the manual or to correct my changes.
7855         * doc/Makefile: undid touching the date of intermediate tex files.
7856
7857 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7858
7859         * doc/sdccman.lyx: Manual has an index now
7860
7861 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7862
7863         Finalize muluint/mulsint and mululong/mulslong merging:
7864         * device/lib/_mulint.c
7865         * device/lib/_mullong.c
7866         * device/lib/gbz80/mul.s
7867         * device/lib/gbz80/stubs.s
7868         * device/lib/z80/mul.s
7869         * device/lib/z80/stubs.s
7870         * src/SDCCsymt.c (initCSupport)
7871
7872 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7873
7874         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7875         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7876           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7877           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7878           instead of /Zm500.
7879
7880 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7881
7882         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7883           the regression tests I'm not brave enough to enable 245.b, 245.c
7884         * doc/sdccman.lyx: added latex preamble for hyperref package.
7885           Using pdflatex this will give you a hyperlinked pdf file with
7886           bookmarks. (prepend '%' before /usepackage if this breaks something)
7887
7888 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7889
7890          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7891
7892 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7893
7894         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7895
7896 2003-05-21    <johan AT balder>
7897
7898         * src/SDCCglue.c (printIval): fixed bug #739934
7899
7900 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7901
7902         Applied patch from bug 737905 (renamed yylineo to mylineno):
7903         * src/altlex.c
7904         * src/SDCCast.c
7905         * src/SDCglobl.h
7906         * src/SDCC.lex
7907         * src/SDCCsymt.c
7908         * src/SDCCval.c
7909         * src/pic16/pcode.c: Cleaned warnings
7910         * src/pic16/pcodeflow.c: Cleaned warnings
7911         * src/pic16/pcoderegs.c: Cleaned warnings
7912
7913 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7914
7915         * src/pic16/pcode.c: Cleaned warnings
7916         * src/pic16/pcodepeep.c: Cleaned warnings
7917         * src/pic16/ralloc.c: Cleaned warnings
7918
7919 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7920
7921         * doc/sdccman.lyx: fixed bug 739745
7922         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7923
7924 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7925
7926         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7927         it can be defined with CFLAGS when running configure
7928         * src/SDCCmain.c: fixed compiling + linking with object files
7929
7930 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7931
7932         * configure.in: configure for pic16 port,
7933             added --disable-pic16-port
7934         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7935         * src/SDCCmain.c: linkOptions is changed to set *,
7936             added if/endif conditional macros to remove options help
7937             messages from optionsTable when a port is not configured, added
7938             support for the PIc16 port in the ports table, when executing
7939             the compiler with no port specified on command line, a default
7940             port is selected with the new macro DEFAULT_PORT which is
7941             defined in port.h, in setDefaultOptions() linkOptions is removed
7942             from initialization assignment, since now it is a set,
7943             parseCmdLine uses setParseWithComma for linkOptions, in
7944             linkEdit() linkOptions are accessed with new function indexSet()
7945             which returns the i'th item of a set variable. See SDCCset.c, in
7946             linkEdit() when calling buildCmdLine(), added linkOptions as
7947             last argument. Now users can pass arguments to gplink via the
7948             -Wl option, main() uses pic16glue() to glue up pic16 programs
7949         * src/SDCCpeeph.c: various changes to support pic16
7950         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7951             return the i'th item of the set
7952         * src/SDCCset.h: added function prototype for indexSet()
7953         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7954         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7955         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7956             added macro DEFAULT_PORT
7957         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7958         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7959             generated
7960         * src/pic16/glue.c: commented out some error producing lines
7961         * src/pic16/main.c: __config directives are commented out to stop
7962             gpasm complaining and test the linkage with gplink, _linkCmd and
7963             _asmCmd changed to be more gplink and gpasm friendly
7964         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7965             produced an error when parsed, peep rule 12 is added to utilize
7966             movff, but it is commented out since the pCode does not support
7967             yet a command with 2 address arguments
7968
7969 2003-05-18    <johan AT balder>
7970
7971         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7972         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7973 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7974
7975         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7976   Added feature to script commands from file.
7977
7978 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7979
7980         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7981         * src/SDCCutil.c: include ctype.h for win32
7982
7983 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7984
7985         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7986
7987 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7988
7989         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7990   Fixed so you can set breakpoints prior to run, run does not stop
7991   on entry now.  Add tbreak.  Other enhancements and fixes for use
7992   with ddd.
7993
7994 2003-05-12  Borut Razem <borut.razem AT siol.net>
7995
7996         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7997
7998 2003-05-11  Borut Razem <borut.razem AT siol.net>
7999
8000         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8001         the path of bin directory, so that PATH is the only env. variable, which has to be set
8002         in case of standard installation.
8003         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8004         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8005         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8006
8007 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8008
8009         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8010         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8011         temp files are in the port dir; clean the gen/test directory when
8012         generating new test.c
8013         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8014         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8015         * support/regression/tests/zeropad.c: added
8016
8017 2003-05-09    <johan AT balder>
8018
8019         * src/SDCCglue.c: fixed bug #597940
8020
8021 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8022
8023         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8024   cache sfr, optimize next,step, fix off by one sourceline,
8025   support ddd list function.
8026         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8027
8028 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8029
8030         * support/regression/HTMLgen.py: added compare_s2f()
8031         * support/regression/Makefile: redo 1.27
8032         * support/regression/generate-cases.py: redo 1.5
8033
8034 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8035
8036         * support/regression/tests/float.c: workaround 33 bit hex constant
8037         * support/regression/tests/simplefloat.c: fix division for host
8038
8039 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8040
8041         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8042         that tame's the PIC's over-aggressive optimizer.
8043
8044 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8045
8046          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8047          support for MSVC.
8048
8049 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8050
8051         Initial support for DS80C400. "Hello world" runs on TINIm400
8052         (with polled I/O).
8053
8054 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8055
8056          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8057          * Some notes on ddd usage added in debugger/README
8058          Martin Helmling adding more features and fixes for ddd GUI debugger.
8059          Code added for nexti, stepi, up, down, and other adjustments.
8060
8061 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8062
8063         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8064         * src/pic/peeph.def Added two rules to optimize carry manipulation
8065         * src/pic/* removed debug printfs
8066
8067 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8068
8069         * debugger/mcs51/cmd.c: added header newalloc.h
8070
8071 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8072
8073         * as/Makefile: new EXEEXT
8074         * as/z80/Makefile: remove trailing slash of BUILDIR
8075         * as/z80/clean.mk: new EXEEXT
8076         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8077         * support/cpp2/Makefile.in: new EXEEXT
8078         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8079
8080 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8081
8082         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8083         EXEEXT was introduced to fix all related problems with targets
8084         "clean", "install" and "uninstall"; a couple of further flaws
8085         especially with "clean" have been fixed too
8086         * as/mcs51/Makefile.in
8087         * as/mcs51/clean.mk
8088         * as/z80/Makefile
8089         * Makefile
8090         * clean.mk
8091         * debugger/mcs51/Makefile.in
8092         * debugger/mcs51/clean.mk
8093         * link/z80/Makefile
8094         * link/z80/Makefile.in
8095         * link/z80/clean.mk
8096         * link/Makefile
8097         * packihx/Makefile.in
8098         * packihx/clean.mk
8099         * sim/ucsim/Makefile
8100         * sim/ucsim/clean.mk
8101         * sim/ucsim/avr.src/Makefile.in
8102         * sim/ucsim/avr.src/clean.mk
8103         * sim/ucsim/s51.src/Makefile.in
8104         * sim/ucsim/s51.src/clean.mk
8105         * sim/ucsim/xa.src/Makefile.in
8106         * sim/ucsim/xa.src/clean.mk
8107         * sim/ucsim/z80.src/Makefile.in
8108         * sim/ucsim/z80.src/clean.mk
8109         * sim/ucsim/main_in.mk
8110         * sim/ucsim/packages_in.mk
8111         * sim/ucsim/gui.src/Makefile.in
8112         * sim/ucsim/gui.src/serio.src/Makefile.in
8113         * sim/ucsim/gui.src/serio.src/clean.mk
8114         * src/Makefile.in
8115         * src/clean.mk
8116         * support/cpp2/Makefile.in
8117         * support/cpp2/clean.mk
8118         * support/makebin/Makefile
8119         * support/makebin/clean.mk
8120         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8121         * doc/sdccman.lyx: --program-suffix no longer needed
8122
8123 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8124
8125          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8126          Martin Helmling added support for ddd GUI debugger.
8127          Code added to display assembly, set variables, and other commands
8128          to interface to ddd.
8129
8130 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8131
8132         * as/Makefile: fix target clean
8133         * as/clean.mk: fix target clean
8134         * as/z80/clean.mk: fix target clean
8135
8136 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8137
8138         * Makefile.common.in: added  AT EXEEXT AT
8139         * configure.in: removed all mingw32 stuff
8140         * configure: rebuilt from configure.in
8141         * doc/sdccman.lyx: updated section "installation"
8142         * support/scripts/sdcc_mingw32: adapted to configure
8143         * support/scripts/sdcc_cygwin_mingw32: added
8144
8145 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8146
8147         * src/pic Added object file support for the PIC port
8148         * src/pic Applied patch from Craig Franklin (this started the object file support)
8149         * src/regression Updated the PIC regression tests for object files
8150
8151 2003-04-20  Borut Razem <borut.razem AT siol.net>
8152
8153         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8154           lklex.c: In function `getfid':
8155           lklex.c:203: warning: array subscript has type `char'
8156         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8157           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8158         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8159           stack handling macros
8160
8161 2003-04-19  Borut Razem <borut.razem AT siol.net>
8162
8163         * "handling space characters in file path" task:
8164         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8165         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8166         * support/Util/MySystem.h: make it self-sufficient
8167         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8168           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8169           handling space characters in file path
8170         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8171           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8172         * support/Util/MySystem.c: handling space characters in executable's path
8173
8174 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8175
8176         * as/z80/Makefile: fix permanent rebuild of z80
8177         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8178         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8179
8180 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8181
8182         * src/SDCCopt.c: add special case optimization to replace modulo by
8183           a power of two with a bitwise AND.
8184
8185 2003-04-18    <johan AT balder>
8186
8187         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8188
8189 2003-04-17    <johan AT balder>
8190
8191         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8192         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8193
8194 2003-04-13  Borut Razem <borut.razem AT siol.net>
8195
8196         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8197         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8198           fixed mingw problem in adl_NORMALIZE_PATH
8199
8200 2003-04-12  Borut Razem <borut.razem AT siol.net>
8201
8202         * fixed "#pragma SAVE/RESTORE can not be nested":
8203         * src/SDCC.lex: reworked pragma handling functions
8204         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8205         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8206
8207 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8208
8209         * src/SDCCutil.c (pathEquivalent): defined but not used
8210         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8211         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8212         * configure: rebuilt from configure.in
8213         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8214         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8215         * device/include/Makefile.in: replace sdcc_datadir
8216         * device/lib/Makefile.in: replace sdcc_datadir
8217         * Makefile.common.in: add LDFLAGS from configure
8218         * packihx/Makefile.in: use LDFLAGS
8219         * src/Makefile.in: use LDFLAGS
8220         * support/cpp2/Makefile.in: add LDFLAGS from configure
8221         * support/makebin/Makefile: use LDFLAGS
8222         * .version: bumped version number to 2.3.5
8223
8224 2003-04-12  Borut Razem <borut.razem AT siol.net>
8225
8226         * completed "different paths" task:
8227         * src/SDCCmacro.c: fixed bug in handling quotes
8228         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8229         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8230
8231 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8232
8233         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8234
8235 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8236
8237         * ds390/gen.c ds390/peeph.def: fix bug 706781
8238
8239 2003-04-11  Borut Razem <borut.razem AT siol.net>
8240
8241         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8242
8243 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8244
8245         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8246         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8247          set - this bit used to not be set...).
8248         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8249           bad code in PIC Port
8250         * src/regression/and2.c added to test bug 609268
8251         * src/regression/Makefile added and2.c to regression test
8252
8253
8254 2003-04-08    <johan AT CP255758-A>
8255
8256         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8257         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8258         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8259
8260 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8261
8262         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8263         fix bug #487815
8264         * support/cpp2/Makefile.in: fix bug #487815
8265         * configure: rebuilt from configure.in
8266         * Makefile.common.in: docdir changed, new path suffixes
8267         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8268         * sdcc_vc_in.h: reflect changes from sdccconf.h
8269         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8270         * src/SDCCutil.h: remove BINDIR hack
8271         * doc/sdccman.lyx: update new path hierarchy
8272
8273 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8274
8275         * src/SDCCpeeph.c: added okToRemoveSLOC test
8276
8277 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8278
8279         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8280
8281 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8282
8283         * src/SDCCpeeph.c: added labelIsReturnOnly test
8284         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8285
8286 2003-04-05    <johan AT balder>
8287
8288         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8289         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8290         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8291         * src/SDCCast.c: fixed a warning
8292         * src/SDCCast.h: fixed a warning
8293         * src/SDCCicode.c (operandFromAst): fixed a warning
8294
8295 2003-04-04    <johan AT balder>
8296
8297         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8298         * src/SDCCast.c (decorateType): fixed bug #715076
8299         * src/SDCC.y: fixed bug #702907
8300
8301 2003-04-03    <johan AT balder>
8302
8303         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8304         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8305         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8306         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8307         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8308
8309 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8310
8311         * _decdptr.c: fix return values
8312         * _gptrget.c: fix return values
8313         * _gptrgetc.c: fix return values
8314         * _gptrput.c: fix return values
8315         * _mulint.c: fix return values
8316         * as/z80/Makefile: fix 'make -j' problem
8317
8318 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8319
8320         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8321         * configure.in: big cleanup, updated to autoconf 2.5x
8322         * configure: rebuilt from configure.in
8323         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8324         * sdcc_vc_in.h: reflect changes from sdccconf.h
8325         * doc/Makefile: fixed a flaw in "make install"
8326
8327 2003-04-02    <johan AT balder>
8328
8329         * src/ds390/gen.c (genCmp): no comments
8330         * src/mcs51/gen.c (genCmp): no comments
8331         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8332         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8333
8334 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8335
8336         * support/regression/generate-cases.py: place generated file in given sub directory
8337         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8338         * support/regression/Makefile: improvements for 'make -j';
8339         side effect: it's simpler and faster now
8340
8341 2003-03-31  Borut Razem <borut.razem AT siol.net>
8342
8343         * src/z80/main.c: link-{port} and as-{port} defined without path
8344         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8345
8346 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8347
8348         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8349
8350 2003-03-30  Borut Razem <borut.razem AT siol.net>
8351
8352         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8353           changed type of list parameter to set
8354         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8355         * src/port.h: changed type of do_assemble() parameter to set
8356         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8357           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8358           definition of "cppoutfilename" macro with NULL value in preProcess()
8359         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8360         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8361         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8362           replaced with set *binPathSet
8363         * shash_add() deallocates the item, if allready exsists, before adding the new one
8364         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8365
8366 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8367
8368         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8369           a nested for loop bug in the PIC port
8370         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8371           for loops
8372
8373 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8374
8375         * support/Util/dbuf.h: remove C++ stuff to make it portable
8376
8377 2003-03-28  Borut Razem <borut.razem AT siol.net>
8378
8379         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8380           literal strings in stringLiteral()
8381         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8382         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8383           to the project
8384
8385 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8386
8387         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8388
8389 2003-03-26    <johan AT balder>
8390
8391         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8392         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8393         * src/SDCCast.c (decorateType): fixed " -v < 3"
8394
8395 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8396
8397         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8398         Added Lenny Story's debug infrastructure changes:
8399         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8400         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8401         * src/cdbFile.c: added
8402         * src/SDCCdebug.c: added
8403         * src/SDCCdebug.h: added
8404         * src/SDCCast.c (createFunction)
8405         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8406         * src/SDCCmain.c (parseCmdLine, main)
8407         * src/SDCCmem.c (redoStackOffsets)
8408         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8409         * src/SDCCsymt.h
8410         * src/common.h
8411         * src/avr/gen.c (genAVRCode)
8412         * src/ds390/gen.c (gen390Code)
8413         * src/mcs51/gen.c (gen51Code)
8414         * src/pic/gen.c (genpic14Code)
8415         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8416         * src/xa51/gen.c (genXA51Code)
8417         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8418
8419 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8420
8421         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8422         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8423
8424 2003-03-22    <johan AT balder>
8425
8426         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8427
8428 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8429
8430         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8431         * doc/cdbfileformat.lyx: added, written by Lenny Story
8432         * doc/Makefile: added cdbfileformat.lyx
8433         * doc/clean.mk: added cdbfileformat.lyx
8434
8435 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8436
8437         * src/mcs51/peeph.def: fix bug #705773
8438
8439 2003-03-20    <johan AT balder>
8440
8441         An sfr/sbit can have an "at #" AND an initializer
8442         * src/SDCCsymt.c (checkSClass):
8443         * src/SDCCmem.c (allocGlobal):
8444         * src/SDCCmem.c (allocLocal):
8445         * src/SDCCast.c (createBlock):
8446
8447 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8448
8449         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8450
8451 2003-03-16    <johan AT balder>
8452
8453         Undid the hackup of const and volatile, the problem is much bigger
8454         * src/SDCC.y:1.65
8455         * src/SDCCast.c:1.171
8456         * src/SDCCglue.c:1.138
8457         * src/SDCCicode.c:1.146
8458         * src/SDCCsymt.c:1.150
8459         * src/SDCCval.c:1.65
8460
8461 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8462
8463         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8464         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8465
8466 2003-03-13    <johan AT balder>
8467
8468         Hackup const and volatile modifiers in type chains a bit:
8469         * src/SDCC.y:1.63
8470         * src/SDCCast.c:1.169
8471         * src/SDCCglue.c:1.136
8472         * src/SDCCicode.c:1.143
8473         * src/SDCCsymt.c1.146
8474         * src/SDCCsymt.h1.59
8475         * src/SDCCval.c:1.63
8476
8477 2003-03-12    <johan AT balder>
8478
8479         * src/SDCCBBlock.h: more LRH debugging junk
8480         * src/SDCCcflow.h: more LRH debugging junk
8481         * src/SDCCloop.c: more LRH debugging junk
8482         * src/SDCC.y (struct_declaration): fixed bug #697590
8483         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8484         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8485         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8486
8487 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8488         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8489         test function names must now match exactly).
8490         * src/SDCCcse.c: added special case in findCheaperOp to allow
8491         extending a short integer. Makes less awful code for bug 700121 test case.
8492
8493 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8494
8495         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8496         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8497
8498 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8499
8500         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8501         actually called (operandsNotEqual() was called for all
8502         operandsNotEqualX tests).
8503
8504 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8505
8506         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8507         with shorter literals. Fixes bug 700121.
8508
8509 2003-03-11    <johan AT balder>
8510
8511         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8512
8513 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8514
8515         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8516         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8517
8518 2003-03-10  Borut Razem <borut.razem AT siol.net>
8519
8520         * src/SDCCmain.c: pipe preprocessor's output
8521         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8522         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8523         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8524         which closes all pipes in pipeSet set
8525         * src/SDCCset.c: free deleted item in function deleteSetItem()
8526         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8527         moved from z80 to src subproject
8528         * .version: increased version number to 2.3.4
8529
8530 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8531
8532         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8533         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8534         * support/regression/ports/xa51/spec.mk: fix typo
8535
8536 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8539
8540 2003-03-09  Borut Razem <borut.razem AT siol.net>
8541
8542         * src/SDCCmain.c: pipe preprocessor's output
8543         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8544         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8545         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8546         which closes all pipes in pipeSet set
8547         * src/SDCCset.c: free deleted item in function deleteSetItem()
8548         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8549         moved from z80 to src subproject
8550
8551 2003-03-09  Borut Razem <borut.razem AT siol.net>
8552
8553         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8554         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8555         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8556         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8557         * src/SDCCglobl.h: unification of WIN32 native definitions
8558
8559 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8560
8561         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8562
8563 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8564
8565         * src/configure.in:   check for endianess (even while cross-compiling)
8566         * src/configure:      check for endianess (even while cross-compiling)
8567         * src/configure_in.h: check for endianess (even while cross-compiling)
8568         * src/avr/gen.c:        remove old endianess stuff
8569         * src/mcs51/gen.c:      remove old endianess stuff
8570         * src/ds390/gen.c:      remove old endianess stuff
8571         * src/pic/gen.c:        remove old endianess stuff
8572         * src/pic/genarith.c:   remove old endianess stuff
8573         * src/pic/glue.c:       fix endianess check
8574         * src/pic16/gen.c:      remove old endianess stuff
8575         * src/pic16/genarith.c: remove old endianess stuff
8576         * src/pic16/glue.c:     fix endianess check
8577         * src/xa51/gen.c:       remove old endianess stuff
8578         * src/z80/gen.c:        fix endianess check
8579         * src/SDCCglue.c:       fix endianess check
8580         * src/ds390/peeph.def: fix bug 700036
8581
8582 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8583
8584         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8585         * src/configure: find appropriate data-types on host for SDCC's int and long
8586         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8587         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8588         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8589
8590 2003-03-07    <johan AT balder>
8591
8592         Just a big NOOP:
8593                 some minor cleanups before the big shot
8594                 OP_DEFS and OP_USES now use Kevin's protection
8595                 new option --nolabelopt
8596
8597         * src/SDCCBBlock.c:
8598         * src/SDCCast.c,:
8599         * src/SDCCcflow.c:
8600         * src/SDCCcse.c:
8601         * src/SDCCicode.c:
8602         * src/SDCCicode.h:
8603         * src/SDCClabel.c:
8604         * src/SDCCloop.c:
8605         * src/SDCCmain.c:
8606         * src/ds390/ralloc.c:
8607         * src/mcs51/ralloc.c:
8608         * src/pic/ralloc.c:
8609         * src/xa51/ralloc.c:
8610         * src/z80/ralloc.c:
8611
8612 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8613
8614         * src/pic/pcode.c (get_op): fix 64 bit warnings
8615         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8616         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8617         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8618         * support/regression/tests/malloc.c: fix 64 bit warnings
8619
8620 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8621
8622         * src/mcs51/gen.c (genMinus): fixed bug 696436
8623
8624 2003-03-02  Borut Razem <borut.razem AT siol.net>
8625
8626         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8627
8628 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8629
8630         * configure.in: test for mkstemp
8631         * sdccconf_in.h: add HAVE_MKSTEMP
8632
8633 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8634
8635         * device/include/ctype.h: removed warning while using --stack-auto
8636         * device/include/malloc.h: removed warning while using --stack-auto
8637         * device/include/string.h: removed warning while using --stack-auto
8638
8639 2003-02-23  Borut Razem <borut.razem AT siol.net>
8640
8641         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8642         because NDEBUG is defined (see man assert)
8643         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8644
8645 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8646
8647         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8648         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8649
8650 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8651
8652         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8653         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8654
8655 2003-02-18    <johan AT balder>
8656
8657         * as/mcs51/asmain.c (asmbl): module can start with a digit
8658         * as/z80/asmain.c (asmbl): module can start with a digit
8659
8660 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8661
8662         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8663         * src/asm.c: fix pipe() for Mingw32
8664
8665 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8666
8667         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8668         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8669         make -V work again; --c1mode reads now from stdin
8670         * doc/sdccman.lyx: added --c1mode
8671         * support/Util/SDCCerr.c: new messages for c1 mode
8672         * support/Util/SDCCerr.h: new messages for c1 mode
8673         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8674
8675 2003-02-15    <johan AT balder>
8676
8677         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8678
8679 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8680
8681         * doc/sdccman.lyx: Environment variables, -o and other minor things
8682
8683 2003-02-14    <johan AT balder>
8684
8685         * src/xa51/main.c: before anyone really tries to use it :)
8686
8687         * Install doc's in share/sdcc/doc
8688         * removed some obsolete files
8689         * Do a proper make distclean and uninstall
8690         M Makefile.common.in
8691         R sdccbuild.sh
8692         M as/Makefile
8693         M device/include/Makefile.in
8694         M device/lib/Makefile.in
8695         M doc/sdccman.lyx
8696         M link/Makefile
8697         M sim/ucsim/doc/Makefile.in
8698         M src/clean.mk
8699         R src/avr/peeph.rul
8700         R src/xa51/peeph.rul
8701         M support/cpp2/Makefile.in
8702         M support/makebin/Makefile
8703
8704
8705 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8706
8707         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8708
8709 2003-02-10  Borut Razem <borut.razem AT siol.net>
8710
8711         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8712         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8713         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8714         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8715         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8716         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8717         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8718         src/z80/Makefile.bcc: Borland Makefile cleanup
8719         * as/z80/Makefile.bcc: Added Borland Makefile
8720         * support/cpp2/borland.h: Removed
8721
8722 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8723
8724         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8725         * src/SDCC.lex: new pragma NOIV
8726         * src/SDCCglobl.h: new pragma NOIV
8727         * src/SDCCmem.c: new pragma NOIV
8728
8729 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8730
8731         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8732
8733 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8734
8735         * src/SDCCmain.c: signal handling is switched off by --debug
8736         * doc/Makefile: small fix for install; use clean.mk again
8737         * doc/clean.mk: clean *.pdf and *.html too
8738
8739 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8740
8741         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8742         * device/lib/printfl.c: fix a ds390 bug by making it portable
8743         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8744         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8745         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8746         * debugger/mcs51/cmd.c: converted multi-line string literals
8747         * sim/ucsim/globals.cc: converted multi-line string literals
8748         * src/SDCCmain.c: introduced signal handler to remove temp files
8749         * doc/Makefile: small tweaks, implement clean
8750         * doc: removed generated files
8751
8752 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8753
8754         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8755         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8756         Address Record is not correctly generated for DS390."
8757
8758 2003-02-02  Borut Razem <borut.razem AT siol.net>
8759
8760         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8761         * as/mcs51/asm.h: fixed compilation with Borland C
8762         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8763         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8764         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8765         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8766         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8767         src/z80/Makefile.bcc: delete $(LIB) only if exist
8768         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8769
8770 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8771
8772         * device/include/malloc.h: introduced NULL
8773         * device/include/string.h: introduced NULL
8774         * device/include/stdlib.h: introduced NULL
8775         * device/lib/_memcpy.c: removed NULL
8776         * device/lib/_strcat.c: removed NULL
8777         * device/lib/_strchr.c: removed NULL
8778         * device/lib/_strcmp.c: removed NULL
8779         * device/lib/_strcpy.c: removed NULL
8780         * device/lib/_strcspn.c: removed NULL
8781         * device/lib/_strlen.c: removed NULL
8782         * device/lib/_strncat.c: removed NULL
8783         * device/lib/_strncmp.c: removed NULL
8784         * device/lib/_strncpy.c: removed NULL
8785         * device/lib/_strpbrk.c: removed NULL
8786         * device/lib/_strrchr.c: removed NULL
8787         * device/lib/_strspn.c: removed NULL
8788         * device/lib/_strstr.c: removed NULL
8789         * device/lib/_strtok.c: removed NULL
8790         * device/lib/malloc.c: removed NULL, include own header
8791
8792 2003-02-02    <johan AT balder>
8793
8794         * 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
8795         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8796         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8797         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8798         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8799         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8800
8801 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8802
8803         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8804         area 'DATA'"
8805
8806 2003-02-01    <johan AT balder>
8807
8808         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8809
8810 2003-01-31    <johan AT CP255758-A>
8811
8812         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8813
8814 2003-01-30    <johan AT balder>
8815
8816         * src/SDCCBBlock.c: automatic bug detection
8817         * src/SDCCicode.c: automatic bug detection
8818
8819 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8820
8821         * src/SDCCglobl.h:   now --xram-size 0 works
8822         * src/SDCCmain.c:    now --xram-size 0 works
8823
8824 2003-01-29    <johan AT balder>
8825
8826         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8827
8828 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8829
8830         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8831         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8832         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8833         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8834         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8835         * src/SDCCmain.c:    Added options --xram-size and --code-size
8836
8837 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8838
8839         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8840         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8841
8842 2003-01-27    <johan AT balder>
8843
8844         * src/SDCC.y: fixed bug #613764
8845
8846 2003-01-26    <johan AT balder>
8847
8848         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8849         * src/SDCCsymt.h: fixed bug #673374
8850         * src/SDCCglue.c: fixed bug #661910
8851         * src/SDCCast.c: fixed bug #458099 and 673374
8852
8853 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8854
8855         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8856         * as/mcs51/strcmpi.h: added
8857         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8858         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8859         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8860         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8861         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8862         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8863         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8864         * as/mcs51/Makefile.aslink: new module strcmpi
8865         * as/mcs51/Makefile.asx8051: new module strcmpi
8866         * as/mcs51/Makefil.bcc: new module strcmpi
8867         * as/mcs51/Makefile.in: new module strcmpi
8868         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8869
8870 2003-01-26    <johan AT balder>
8871
8872         * src/SDCCglue.c: reverted back to 1.124
8873         * src/SDCCast.c: reverted back to 1.156
8874         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8875
8876 2003-01-25    <johan AT balder>
8877
8878         * src/SDCCglue.c: A better fix for bug #661910
8879         * src/SDCCast.c: A better fix for bug #661910
8880         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8881
8882 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8883
8884         * src/Makefile.in: remove spawn.o
8885         * src/SDCCmain.c: remove spawn.h
8886         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8887         * src/spawn.c: removed
8888         * src/spawn.h: removed
8889         * support/regression/ports/ds390/spec.mk: link with -r
8890
8891 2003-01-24    <johan AT CP255758-A>
8892
8893         * src/ds390/gen.c (aopOp): fixed bug #667458
8894         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8895         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8896         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8897
8898 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8899
8900         * src/mcs51/peeph.def: better assembler identation by Frieder
8901         * src/mcs51/gen.c: better assembler identation by Frieder
8902
8903 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8904
8905         * as/z80/string.h: removed for gcc 3.2
8906         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8907         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8908
8909 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8910
8911         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8912         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8913         * support/regression/Makefile: separate temp files for ports
8914         * support/regression/generate-cases.py: separate temp files for ports
8915         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8916         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8917
8918 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8919
8920         * moved tinitalk to device/examples/ds390
8921
8922 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8923
8924         * as/mcs51/lkmem.c: rflag is for DS390
8925         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8926         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8927                          (linkEdit): move mem- and map-files the same way as ihx-files
8928         * src/z80/main.c (_setDefaultOptions): removed --generic
8929         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8930         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8931         * src/pic/glue.c (picglue): --c1mode works again
8932         * src/pic16/glue.c (pic16glue): --c1mode works again
8933         * src/asm.c (printCLine): fix #660034
8934
8935 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8936
8937         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8938         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8939         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8940         * as/mcs51/lkmem (summary): better fix for sp problem
8941         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8942         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8943         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8944                                               remove --stack-after-data
8945
8946 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8947
8948         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8949         * src/SDCCutil.c (join): ugly bug: missing '\0'
8950         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8951
8952 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8953
8954         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8955         * src/port.h: typo
8956         * src/pic/main.c (_asmCmd): gpasm supports -o
8957         * src/z80/main.c: more general macros
8958         * device/lib/Makefile.in: remove intermediate files
8959
8960 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8961
8962         * .version: Bumped version number to 2.3.3
8963         * src/SDCCBBlock.c: new option -o
8964         * src/SDCCglobl.h: new option -o
8965         * src/SDCCglue.c: new option -o
8966         * src/SDCCmain.c: new option -o
8967         * src/asm.c: new option -o
8968         * src/ds390/main.c: new option -o
8969         * src/pic/glue.c: new option -o
8970         * src/pic/pcode.c: new option -o
8971         * src/pic/ralloc.c: new option -o
8972         * src/pic16/glue.c: new option -o
8973         * src/pic16/pcode.c: new option -o
8974         * src/pic16/ralloc.c: new option -o
8975         * src/z80/main.c: new option -o
8976         * device/lib/Makefile.in: use -o
8977         * support/regression/ports/ds390/spec.mk: use -o
8978         * support/regression/ports/gbz80/spec.mk: use -o
8979         * support/regression/ports/mcs51/spec.mk: use -o
8980         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8981         * support/regression/ports/z80/spec.mk: use -o
8982         * support/regression/ports/ucz80/spec.mk: use -o
8983         * support/regression/ports/xa51/spec.mk: use -o
8984         * support/regression/fwk/lib/timeout.c: fix usage string
8985
8986 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8987         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8988
8989 2003-01-07    <johan AT balder>
8990
8991         * src/SDCCast.c (decorateType): fixed bug #600035
8992
8993 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8994         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8995         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8996         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8997         * src/pic/pcode.c: outcommented unused variable to remove warnings
8998         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8999
9000 2003-01-06    <karl AT turbobit.com>
9001         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9002    regression tests.
9003
9004 2003-01-06    <johan AT balder>
9005
9006         * src/SDCCicode.c: fixed array add
9007
9008 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9009         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9010         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9011
9012 2003-01-04    <johan AT balder>
9013
9014         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9015
9016 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9017         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9018
9019 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9020         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9021         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9022
9023 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9024         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9025
9026 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9027         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9028
9029 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9030         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9031
9032 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9033
9034     * in \sdcc\as\mcs51\ changed these files in order to create an
9035     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9036     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9037     following files to include the previous two files: aslink.dsp,
9038     Makefile.aslink, Makefile.bcc, and Makefile.in.
9039
9040     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9041     .adb instead of .cdb
9042
9043 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9044
9045         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9046         value from option --iram-size.
9047
9048 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9049
9050         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9051         dram[] array.
9052
9053 2002-09-18    <wiml AT hhhh.org>
9054
9055         * SDCClrange.h: exposed setFromRange() and setToRange()
9056         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9057           packRegsForAccUse() (bug 542397)
9058         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9059           multiple times and emitting the fetch operations more than once
9060           added aopGetUsesAcc() function to allow binary operators to
9061           fetch their operands in the correct order; made genMinus() emit
9062           compact code for X = LITERAL - Y
9063
9064 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9065         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9066         sprintf() in line 1267.
9067
9068 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9069         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9070         like ports.
9071
9072 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9073         Changes to aslink (All the changes are marked with 'JCF'):
9074
9075         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9076         summary().
9077
9078         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9079         area BSEG.  Also moves, if possible, the DATA area down into the internal
9080         ram so more space is available.
9081
9082         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9083         sflag.
9084
9085         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9086         not bytes.  Function summary() which creates a memory usage summary
9087         file with extension .mem.  Reports of overlaping stack and small stack
9088         size.  If the space for the stack is less than 16 bytes aslink trows a
9089         warning.
9090
9091         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9092         the 8051.  Option 'y' for memory summary output file.
9093
9094         Changes to sdcc (All the changes are marked with 'JCF'):
9095
9096         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9097
9098         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9099         overlaying area for it (uses RegBankUsed[4]).
9100
9101         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9102         bank zero as used by default.  By default aslink locates the stack
9103         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9104         the creation of the .mem file.  Delegates the allocation of data area
9105         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9106         the begining of the stack area to aslink.
9107
9108         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9109         glue() in SDCCglue.c creates an area for it.
9110
9111 2002-09-03  Borut Razem <borut.razem AT siol.net>
9112         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9113         sdcc/src/pic/glue.c:
9114         introduced atexit() handler for teporay files removal in case of
9115         errors, assertions, ...
9116
9117 2002-08-29  Borut Razem <borut.razem AT siol.net>
9118         * sdcc/support/cpp2/auto-host_vc_in.h:
9119         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9120         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9121         Maybe there is a similar problem with BORLANDC? It should be checked!
9122
9123         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9124         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9125         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9126         was not executed, and the compiler (cl) launched a warning:
9127         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9128
9129 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9130         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9131
9132 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9133         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9134
9135         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9136           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9137           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9138           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9139           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9140           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9141           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9142         - added Release configuration in VS projects
9143         - review of compiler an linker options
9144         - VC .exe files are generated in bin_vc directory, not to interfere
9145           with binaries generated from other projects (cygwin, mingw, bcc ...)
9146
9147         * sdcc/src/yacc.dsp: added
9148
9149         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9150         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9151         and insert the version number definitions from .version
9152
9153         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9154
9155         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9156         added - genarate auto-host.h using auto-host_vc_in.h as template
9157
9158         * sdcc/sdcc_vc.h,
9159         removed from CVS, generated automatically
9160
9161 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9162         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9163
9164 2002-08-11  Borut Razem <borut.razem AT siol.net>
9165         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9166
9167 2002-08-10  Borut Razem <borut.razem AT siol.net>
9168         * src/SDCCmain.c (main):
9169         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9170         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9171         The consequence was that some temporary files were not removed.
9172
9173         * src/SDCCglue.c:
9174         unification of code in functions tempfilename() and tempfile():
9175         function tempnam() is defined in Visual Studio 6.0 and .NET
9176
9177         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9178
9179         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9180           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9181         - removed compiler command line option /WX: Treats all warnings as errors
9182         - update a list of source files, included into the project
9183
9184         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9185           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9186         changed project type to Generic Project so that can be correcly converted to VS.NET project
9187
9188         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9189
9190         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9191
9192         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9193
9194         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9195         added return 0 statements after assert() to make compiler happy
9196
9197         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9198         added newline in the def file to keep MSC compiler satisfied
9199
9200         * sdcc/src/z80/gen.c:
9201         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9202           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9203         - solved MSC error in function aopDump()
9204
9205         * sdcc_vc.h: define PREFIX as "\\sdcc"
9206
9207 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9208         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9209
9210 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9211         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9212         - Rewrote the register banking algorithm.
9213         - Added pCode live-range analysis to registers (for now, only non-used and
9214         singly-used registers optimized away)
9215
9216         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9217
9218         * 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.
9219
9220 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9221         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9222
9223 2002-04-22  Michael Hope  <michaelh AT vroom>
9224
9225         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9226
9227         * configure.in (DD_COPT): Added include support required for gbdk.
9228
9229         * .version: Bumped version number just to increase it.
9230
9231         * src/SDCCmain.c: Added -nostdinc to the default options.
9232
9233 2002-04-15  Michael Hope  <michaelh AT vroom>
9234
9235         * device/lib/z80/printf.c (sprintf): Added.
9236
9237         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9238
9239         * src/z80/peeph.def: Added transpose redundent load rule.
9240
9241         * src/z80/main.c: Added force callee saves for jaune.
9242
9243         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9244
9245         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9246
9247 2002-03-28  Johan Knol  <johan AT balder>
9248
9249         * src/SDCCval.c: fixed bug #532436
9250
9251 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9252         * /src/port.h:
9253         Added "char *Processor" field to the port structure.
9254
9255         * /src/SDCCmain.c:
9256         Added -p option. Allows port dependent processor to be specified.
9257
9258         * all ports:
9259         Initialized the new field char *Processor field to NULL in all ports
9260
9261         * /src/pic/*:
9262         Compiler generated registers for interrupt context saving
9263         were not getting allocated.
9264
9265 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9266
9267         * /src/SDCCast.c:
9268         Fixed left shift. Will promote the left side of a left shift
9269         if a) left shifting more than size of operand or b) when assigned
9270         to something size > size of left side
9271
9272 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9273         * src/pic/*
9274         tons of changes. Register allocation has been
9275         rewritten. Added customization for the various PICs. Flow
9276         analysis is restructured. ...
9277
9278         * src/pic/device.h:
9279         Added
9280
9281         * src/pic/device.c:
9282         Added. device.c is a PIC port hack to accomodate variations
9283         in PIC devices.
9284
9285 2002-03-13  Michael Hope  <michaelh AT vroom>
9286
9287         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9288
9289 2002-03-04  johanknol  <johanknol AT manik>
9290
9291         * /src/SDCCval.c: fixed
9292
9293         const unsigned char arr[][2] = { { 0, 1 } };
9294         t18.c:1: error: Initializer element is not constant
9295
9296 2002-03-04  bela  <bela AT manik>
9297
9298         * /device/include/mcs51reg.h:
9299         ds89c420 register definition update
9300
9301 2002-03-03    <johan AT FRIJA>
9302
9303         * support/Util/SDCCerr.c: did something, but don't no why anymore
9304
9305         * support/regression/tests/bug-524691.c: made it a little less shy
9306
9307         * src/SDCCast.c (decorateType): fixed bug #524697
9308
9309         * src/SDCCast.c: made some lineno improvements
9310
9311         * src/SDCCval.c (getNelements): changed warning to error
9312
9313         * src/SDCCglue.c (printIvalArray): changed warning to error
9314
9315         * src/SDCCicode.c: fixed a warning for mingw
9316
9317         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9318
9319         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9320
9321 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9322
9323         * src/ds390/peeph.def:
9324         Added some more peephole rules
9325
9326         * src/ds390/gen.c: Various fixes & enhancements
9327
9328         * src/SDCClrange.c, src/SDCClrange.h:
9329         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9330
9331         * src/ds390/ralloc.c:
9332         various fixes & enhancements (ds390) specific
9333
9334         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9335         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9336         from rallocs.
9337
9338         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9339
9340 2002-03-02    <johan AT FRIJA>
9341
9342         * src/SDCCast.c (decorateType): fixed bug #524708
9343
9344         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9345
9346         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9347
9348 2002-03-01  Michael Hope  <michaelh AT vroom>
9349
9350         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9351
9352         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9353
9354 2002-03-01    <johan AT FRIJA>
9355
9356         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9357
9358         * src/SDCCast.c (decorateType): fixed bug #524209
9359
9360         * src/SDCCval.c (valNot): fixed bug #524195
9361
9362 2002-02-26    <johan AT balder>
9363
9364         * src/xa51/gen.c: fixed a warning
9365
9366         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9367
9368         * src/SDCCast.c (decorateType): fixed bug #522534
9369
9370 2002-02-23    <johan AT balder>
9371
9372         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9373
9374 2002-02-22    <johan AT balder>
9375
9376         * src/SDCCast.c: fixed bug #514865
9377
9378         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9379
9380 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9381
9382         * sdcc/src/SDCCloop.c:
9383         Previous fix was not good. basic blocks that have "break" or "return" are
9384         not really partof a loop , but live ranges used in these blocks should
9385         be live thru the entire loop, so set partOfLoop but don't add them to
9386         loop region
9387
9388 2002-02-21    <johan AT FRIJA>
9389
9390         * src/SDCCcse.c: fixed bug #514308
9391
9392 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9393
9394         * src/SDCCloop.c:
9395         Fixed BUG #519583. If a conditional block ended in a return/break
9396         statement inside a loop, it was not being considered part of the loop.
9397
9398         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9399
9400 2002-02-10  Karl Bongers <karl AT turbobit.com>
9401
9402         * debugger/*:
9403         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9404         with lots of comments and notes.
9405
9406         * device/examples/test2.c:
9407         Fix bug, "red" variable not being initialized(compiler complained).
9408
9409         * device/examples/Makefile, examples/test3.c:
9410         Add Makefile in device/examples folder, compiles test3.c
9411         for use as a multiple module SDCDB test case.
9412
9413         * sim/ucsim/cmd.src/cmdset.cc:
9414         Took out debug printfs in ucsim "next" command.
9415
9416         * sim/ucsim/xa.src:
9417         Karl and Johan start ucsim XA support.  Most dissassembly working,
9418         about 75% emulation done(plenty of work remaining).
9419
9420         * sim/ucsim/z80.src:
9421         Add Z80 support to ucsim, add test-ucz80 regression test,
9422         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9423         Notice z80 compiler fails on examples/test3.c/crc code.
9424
9425 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9426
9427         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9428         Added support for --parms-in-bank1
9429
9430         * src/ds390/peeph.def:
9431         added a few more peephole optimzations
9432
9433         * src/ds390/main.c:
9434         1) added __builtin_inp & __builtin_outp used to read in data of given length
9435            from a memory mapped port
9436         2) added __builtin_memcmp
9437         3) added __builtin_swapw swap bytes of a short
9438
9439         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9440         1) handle multiple send & receives from register bank1
9441         2) ralloc can now allocate DPTR1 to some liveRanges
9442
9443         * src/SDCCsymt.c, src/SDCCsymt.h:
9444         changes to handle multiple sends & receives
9445
9446         * src/SDCCptropt.h:
9447         added some pointer arithmetic optimization
9448
9449         * src/SDCCptropt.c:
9450         added some pointer arithmetic optimizations but not stable yet so not
9451         called from anywhere (will get this working shortly)
9452
9453         * src/SDCCopt.c: fixed for multiple sends & receives
9454
9455         * src/SDCCmain.c:
9456         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9457         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9458            set preprocessor defines (depending on options)
9459
9460         * src/SDCCicode.c, src/SDCCicode.h:
9461         changes made to handle multiple sends & receives
9462
9463         * src/SDCCglobl.h:
9464         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9465
9466         * src/SDCCcse.c, src/SDCCcse.h:
9467         added function findbackward def (to be used in upcoming optimization)
9468
9469         * src/SDCCcflow.c, src/SDCCcflow.h:
9470         added function returnAtEnd - to determine if a basic block terminates with
9471         a RETURN iCode
9472
9473         * src/SDCCast.c, src/SDCCast.h:
9474         added option parms-in-bank1
9475
9476         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9477         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9478         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9479         adjusted for --parms-in-bank1 option
9480
9481         * device/include/string.h:
9482         donot redefine "reentrant" keyword
9483
9484         * device/include/ds80c390.h: Added some more SFRs
9485
9486 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9487
9488         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9489
9490 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9491
9492         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9493
9494 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9495
9496         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9497
9498 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9499
9500         * Added --xram-movc option
9501
9502 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9503
9504         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9505
9506 2002-01-11  Johan Knol
9507
9508         * Added math lib of Jesus Calvino-Fraga
9509
9510 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9511
9512         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9513         * support/regression/Makefile: new target test-mcs51-stack-auto
9514         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9515
9516 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9517
9518         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9519
9520 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9521
9522         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9523
9524 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9525
9526         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9527
9528         * src/SDCCglue.h: add definition for printIvalChar()
9529
9530 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9531
9532         * src/SDCCast.c: fix #498138 by Johan
9533
9534         * src/SDCCglue.c: fix #498138 by Johan
9535
9536 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9537
9538         * support/regression/Makefile: fix clean
9539
9540         * support/regression/ports/ds390/support.c: fix transmission of last character
9541
9542 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9543
9544         * /sdcc/src/ds390/gen.c:
9545         a) improved computing address of stack variable
9546         b) took out some #if 0 code
9547         c) improved parmBytes adjustment
9548         d) improved genPlusIncr & genMinusIncr
9549         e) genCmp could generate bad code (when left assigned to DPTR)
9550         f) Fixed bug in hasInc
9551
9552         * /sdcc/src/ds390/ralloc.c:
9553         a) packRegsForSupport could mess up live information (Fixed)
9554         b) packRegsDPTRuse could be incorrect for left & right shift
9555
9556         * /sdcc/src/mcs51/ralloc.c:
9557         packRegsForSupport could mess up the live information (Fixed)
9558
9559         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9560
9561         * /sdcc/src/SDCCast.c:
9562         can reverse a loop even if function call is present as long
9563         as the loop control variable is local & is not passed as parameter
9564
9565 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9566
9567         * /sdcc/ChangeLog: *** empty log message ***
9568
9569         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9570         More builtin function additions for TININative
9571
9572         * /sdcc/src/ds390/ralloc.c:
9573         Had broken the regression testsuite
9574
9575         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9576
9577         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9578         Added funcattr hasStackParms will be set for reentrant functions when there
9579         are paramteres on the stack, this helps in minimizing frame pointer generation
9580         typeFromStr can handle function pointers now
9581
9582         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9583         *** empty log message ***
9584
9585 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9586
9587         * /src/ds390/gen.c, /src/ds390/main.c:
9588         More builtin function additions for TININative
9589
9590         * /src/ds390/ralloc.c:
9591         Had broken the regression testsuite
9592
9593         * /src/SDCCast.c: Fixed a bug in dumptree
9594
9595         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9596         Added funcattr hasStackParms will be set for reentrant functions when there
9597         are paramteres on the stack, this helps in minimizing frame pointer generation
9598         typeFromStr can handle function pointers now
9599
9600         * /doc/builtins.txt, /doc/TININative.txt:
9601         *** empty log message ***
9602
9603
9604 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9605
9606         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9607         ALPHA version for -mTININative
9608
9609         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9610         updated to reflect changes in the port structure
9611
9612         * /src/port.h:
9613         added function do_assemble (similar to do_link) if non-null this function
9614         will be called to do assembly (-mTININative) requires a multi command
9615         assembly
9616         added function genAssemblerEnd will be called to generate assembler Epilogue
9617
9618         * /src/SDCCsymt.c:
9619         added _JavaNative to debug info printing
9620
9621         * /src/SDCCmain.c: added option --tini-libid
9622         added port->do_assemble function (-mTININative) has a multi command assemble
9623
9624         * /src/SDCCglue.c: Disabled "constExpr" check
9625         added port->genAssemblerEnd function
9626
9627         * /src/SDCCglobl.h: Added option --tini-libid value
9628
9629         * /src/SDCCast.h:
9630         tookout optimizeCompare from the header (has no external references)
9631
9632         * /src/SDCCast.c: made one more function "static"
9633
9634 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9635
9636         * src/z80/mappings.i: Added z80asm support.
9637
9638         * src/z80/main.c: Added z80asm support on --asm=z80asm
9639
9640         * src/z80/gen.c: Fixed asm portability issues.
9641
9642         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9643
9644         * src/SDCCglue.c (printExterns): Added global/extern split.
9645
9646 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9647
9648         * support/regression/Makefile: added test for mcs51 model large
9649
9650         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9651
9652         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9653
9654 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9655
9656         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9657
9658 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9659
9660         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9661
9662         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9663
9664 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9665
9666         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9667
9668         * support/regression/tests/simplefloat.c: Port to mcs51.
9669
9670 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9671         * support/regression/tests/bug-485362.c: Added.
9672
9673         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9674
9675         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9676
9677         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9678
9679         * src/z80/gen.c (aopDump): Added a dump function.
9680
9681 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9682         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9683
9684         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9685
9686         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9687
9688         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9689
9690         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9691
9692         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9693
9694         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9695
9696         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9697
9698         * support/regression/ports/ds390/support.c: Use tinibios.
9699
9700         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9701
9702 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9703
9704         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9705         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9706
9707         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9708
9709         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9710
9711 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9712
9713         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9714
9715         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9716         (packRegsForIYUse): Created and optimised.
9717
9718 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9719
9720         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9721 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9722
9723         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9724
9725         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9726
9727         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9728
9729 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9730
9731         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9732
9733         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9734
9735 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9736
9737         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9738
9739         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9740
9741         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9742
9743 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9744
9745         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9746         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9747         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9748
9749         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9750
9751         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9752         (genNotFloat): Added.
9753         (genUminusFloat): Added.
9754
9755         * device/lib/z80/Makefile: Added floating pt stubs.
9756
9757         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9758
9759         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9760
9761         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9762
9763 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9764
9765         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9766
9767         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9768
9769         * sdcc/support/regression/Makefile: Add port ds390.
9770
9771         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9772
9773         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9774
9775         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9776
9777         * sdcc/support/regression/ports/ds390/support.c: Added.
9778
9779         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9780
9781         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9782
9783         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9784
9785 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9786
9787         * device/include/malloc.h: Added z80 and gbz80 support.
9788
9789         * device/lib/gbz80/heap.s: Added.
9790
9791         * device/lib/z80/heap.s: Added.
9792
9793         * device/lib/malloc.c: Added z80 and gbz80 support.
9794
9795         * support/regression/tests/malloc.c (testMalloc): Added.
9796
9797         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9798
9799         * support/regression/tests/bug-478094.c: Added.
9800
9801         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9802
9803 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9804
9805         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9806
9807         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9808
9809         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9810
9811         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9812
9813         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9814
9815 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9816
9817         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9818
9819 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9820
9821         * support/regression/tests/bug-477927.c: Added.
9822
9823         * src/z80/peeph.def: Added minor rules.
9824
9825         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9826
9827         * src/z80/peeph.def: Added jump optimisation modification.
9828
9829 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9830
9831         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9832
9833 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9834
9835         * support/regression/tests/funptrs.c: Added.
9836
9837 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9838
9839         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9840
9841 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9842
9843         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9844
9845         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9846
9847         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9848         (movLeft2ResultLong): Created.
9849
9850         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9851         (joinPushes): Added.  Joins two char pushes into a word push.
9852
9853 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9854
9855         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9856
9857         * support/makebin/Makefile (install): Added creation of dest dir.
9858
9859 2001-10-24 Karl Bongers <karl AT turbobit.com>
9860
9861         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9862
9863 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9864
9865         * src/z80/ralloc.c: Turned off faulty pack for one use.
9866
9867         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9868
9869         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9870
9871 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9872
9873         * support/regression/Makefile: Improved clean
9874
9875         * support/regression/ports/gbz80/spec.mk: Added clean
9876
9877         * support/regression/ports/host/spec.mk: Added clean
9878
9879         * support/regression/ports/z80/spec.mk: Added clean
9880
9881         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9882
9883         * support/regression/ports/mcs51/timeout.c: little improvements
9884
9885 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9886
9887         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9888
9889         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9890
9891         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9892
9893 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9894
9895         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9896
9897         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9898
9899 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9900         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9901
9902         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9903
9904         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9905
9906         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9907
9908         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9909
9910         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9911
9912         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9913
9914         * support/regression/tests/longor.c: Added.
9915
9916 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9917
9918         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9919
9920         * as/mcs51/aslink.h: define PATH_MAX
9921
9922         * as/mcs51/asm.h: define PATH_MAX
9923
9924         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9925
9926         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9927
9928         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9929
9930         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9931
9932         * src/SDCCglobl.h: define PATH_MAX
9933
9934         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9935
9936         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9937
9938 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9939
9940         * src/z80/gen.c (gencjneshort): Fixed
9941
9942         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9943
9944 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9945
9946         * support/regression/tests/bug-469671.c: Added.
9947
9948         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9949
9950 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9951
9952         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9953
9954         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9955
9956 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9957
9958         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9959
9960         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9961
9962         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9963
9964         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9965
9966         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9967
9968         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9969
9970         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9971
9972 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9973
9974         * 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.
9975
9976         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9977
9978         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9979
9980 2001-10-07    <johan AT FRIJA>
9981
9982         * device/lib/gets.c (gets): fixed the return value.
9983
9984 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9985         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9986
9987         * 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.
9988
9989         * 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.
9990
9991         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9992
9993         * src/pic/gen.c: Removed Safe_strdup.
9994
9995         * configure.in: Added option to enable libgc support.
9996
9997         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9998         (bitVectUnion): Optimised.
9999         (bitVectIntersect): Optimised.
10000         (bitVectBitsInCommon): Optimised.
10001         (bitVectCplAnd): Optimised.
10002
10003         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10004
10005 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10006
10007         * src/SDCCmain.c: distinguish between assembler debug and plain options
10008
10009         * src/avr/main.c:   remove standard assembler options
10010
10011         * src/ds390/main.c: remove standard assembler options
10012
10013         * src/mcs51/main.c: remove standard assembler options
10014
10015         * src/port.h: removed "PENDING" comment
10016
10017 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10018
10019         * src/device/lib/_mulint.c  : new, with assember functions
10020
10021         * src/device/lib/_mullong.c : new, with assember functions
10022
10023         * src/device/lib/_divuint.c : with assember functions
10024
10025         * src/device/lib/_divsint.c : with assember functions
10026
10027         * src/device/lib/_divulong.c: with assember functions
10028
10029         * src/device/lib/_divslong.c: with assember functions
10030
10031         * src/device/lib/_moduint.c : with assember functions
10032
10033         * src/device/lib/_modsint.c : with assember functions
10034
10035         * src/device/lib/_modulong.c: with assember functions
10036
10037         * src/device/lib/_modslong.c: with assember functions
10038
10039         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10040
10041         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10042
10043         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10044                                       replaced _mululong.c and _mulslong.c by _mullong.c
10045
10046 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10047
10048         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10049
10050 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10051
10052         * src/SDCCglue.c: test, if win32api is available for MINGW
10053
10054 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10055
10056         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10057         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10058         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10059         * support/regression/ports/host/spec.mk: removed GENERIC
10060         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10061         * support/regression/ports/z80/spec.mk: removed GENERIC
10062
10063 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10064
10065         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10066
10067         * support/regression/tests/bug-467035.c: Created.
10068
10069 2001-10-01    <johan AT FRIJA>
10070
10071         * src/SDCC.y: fixed bug #466586 part 1
10072
10073 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10074
10075         * SDCCicode.c: z80 has no generic pointers
10076         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10077
10078 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10079
10080         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10081
10082 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10083
10084         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10085
10086         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10087
10088 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10089
10090         * configure.in: Fixed up so that ucsim is only configured once.
10091
10092         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10093
10094         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10095         (getPathDifference): As above.
10096
10097         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10098
10099         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10100
10101 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10102         * .version: Updated to 2.3.1
10103
10104         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10105         Added copyright header.
10106
10107         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10108         (assemble): Added support for macro based assembler commands.
10109         (linkEdit): Added support for macro based linker commands.
10110         (preProcess): Changed the pre-processor to use macros.
10111         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10112         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10113
10114         * device/lib/z80/crt0.s: Added module name for debugging.
10115
10116 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10117
10118         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10119
10120         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10121
10122         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10123
10124         * src/Makefile.in: Added SDCCmacro and SDCCutil
10125
10126 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10127
10128         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10129
10130 2001-09-16    <johan AT FRIJA>
10131
10132         * 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.
10133
10134 2001-09-15    <johan AT FRIJA>
10135
10136         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10137         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10138
10139 2001-09-11    <johan AT FRIJA>
10140
10141         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10142
10143 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10144
10145         * support/regression/tests/bug-460444.c: Added test case.
10146
10147         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10148         (genCast): Added justification for all of the asserts.
10149
10150 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10151
10152         * support/regression/support.c: _xdata replaced by xdata
10153
10154         * support/regression/spec.mk: removed _generic
10155
10156 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10157
10158         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10159
10160         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10161         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10162
10163         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10164
10165         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10166
10167         * support/regression/tests/bug-460010.c: Added test case.
10168
10169         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10170
10171 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10172
10173         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10174
10175         * support/regression/testfwk.c: removed workaround for bug #436344
10176
10177         * support/regression/tests/bp.c: use less memory with mcs51
10178
10179         * support/regression/tests/bug-441448.c: use less memory
10180
10181         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10182
10183         * support/regression/collate-results.py: typo
10184
10185 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10186
10187         * support/regression/tests/fetchoverlap.c: Added new test case.
10188
10189         * support/regression/tests/bp.c: Added new test case.
10190
10191         * support/regression/tests/bug-448984.c: Added new test case.
10192
10193         * support/regression/tests/pow2shifts.c: Added new test case.
10194
10195         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10196         (genlshTwo): Fixed right shift for count > 8.
10197
10198         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10199
10200 2001-09-08    <johan AT FRIJA>
10201
10202         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10203
10204 2001-09-07    <johan AT FRIJA>
10205
10206         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10207
10208         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10209
10210 2001-09-06    <johan AT FRIJA>
10211
10212         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10213         * bernhard noted me at this: "() equals to (void)" (1.38)
10214
10215 2001-09-05    <johan AT FRIJA>
10216
10217         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10218
10219 2001-09-04    <johan AT FRIJA>
10220
10221         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10222
10223
10224 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10225
10226         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10227
10228 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10229
10230         * link/z80/aslink.h: Fixed path for PATH_MAX
10231
10232 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10233
10234         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10235
10236         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10237
10238         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10239
10240         * 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.
10241
10242 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10243
10244         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10245         (genCmp): Fixed up genCmp for the GB with longs.
10246
10247         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10248
10249         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10250
10251         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10252
10253         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10254
10255 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10256
10257         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10258
10259 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10260
10261         * 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.
10262
10263         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10264
10265 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10266
10267         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10268
10269         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10270
10271 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10272
10273   * sim/ucsim/configure:    little improvement of Cygwin-detection
10274   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10275   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10276   * support/regression/tests/bug-221100.c: small changes for mcs51
10277   * support/regression/tests/bug-221168.c: small changes for mcs51
10278   * support/regression/tests/bug-227710.c: small changes for mcs51
10279   * support/regression/tests/staticinit.c: small changes for mcs51
10280   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10281   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10282   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10283
10284 $Revision$