* src/SDCC.y: fixed bug #716242, exchanged pointer and function declarator in the...
[fw/sdcc] / ChangeLog
1 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
4         declarator in the symbol chain
5         * src/SDCCsymt.h,
6         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
7         parameter list for function pointers
8         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
9         * support/regression/tests/bug-716242.c: added
10
11 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
12
13         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
14         offset if possible
15         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
16
17 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
18
19         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
20         inifinitely recurseable, added static   
21         * support/regression/tests/bug-1408066.c: added
22
23 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
24
25         * src/SDCCicode.h,
26         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
27         renamed, added possibility to create "postLoopLbl"-labels
28         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
29         newiTempLoopHeaderLabel
30         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
31         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
32         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
33         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
34         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
35         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
36         (basicInduction): fixed bug #136564, made static,
37         (loopInduction): changed parameter of basicInduction, made static,
38         (addPostLoopBlock): added
39         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
40         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
41         findLoopEndSeq
42         * support/regression/tests/bug-136564.c: added
43         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
44         --std-sdcc99 to LIBSDCCFLAGS
45
46 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
47
48         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
49         while loop
50         * support/regression/tests/bug-1406131.c: added
51
52 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
53
54         * src/SDCCast.c (decorateType): fix promotion of unary minus
55         * src/SDCCsymt.c (computeType): beautified
56         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
57         (valUnaryPM, valComplement): fix sign and promotion,
58         (valNot): ANSI: result type is int (SDCC: unsigned char)
59         * support/regression/tests/uminus.c: speedup by removing superflous
60         test case 'int'
61         * support/regression/tests/onebyte.c: added promotion and signedness
62         tests for unary minus
63         * support/regressions/tests/bug-477927.c: disable warning about
64         uninitialized variables
65         * support/regression/tests/not.c: added
66
67 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
68
69         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
70         * src/mcs51/gen.c (gen51Code): show final register usage after
71         fillGaps in asm with --i-code-in-asm
72         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
73         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
74         incUsed, rliveClear, adjustIChain): made static,
75         (setFromRange): excluded because it's unused,
76         (findPrevUseSym, markWholeLoop): added,
77         (findPrevUse): rewritten; fixes bug 895992; now a complete search
78         through all branches of predecessors enables sdcc to emit the warning
79         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
80         (rlivePoint): made static, added parameter emitWarnings which is only
81         true during the first run out of two,
82         (findRecursiveSucc, findRecursivePred): removed,
83         (computeLiveRanges): made static, added parameter emitWarnings,
84         (dumpIcRlive): added for debugging only
85         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
86         removed prototype of setFromRange()
87         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
88         in call of computeLiveRanges()
89         * support/regression/tests/bug-895992.c: added
90         * support/regression/tests/bug-971834.c: added
91         * support/valdiag/tests/bug-895992.c: added
92         * support/valdiag/tests/bug-971834.c: added
93
94 2005-12-18 Raphael Neider <rneider AT web.de>
95
96         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
97           (genUnpackBits): improved code for direct operands,
98           (genPackBits): improved code for literal assignment to bitfields
99             and for direct destination operands (no FSR indirection),
100             prevented redundant AND, fixes #1362800,
101           (AccLsh): added parameter to disable masking of the result
102         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
103           skip instructions with side-effects (like incfsz),
104           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
105         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
106         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
107           fixes #1375263
108
109 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
110
111         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
112         volatile variables as spill location
113
114 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
115
116         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
117         replacing literals
118         * support/regression/tests/bug-1376320.c: added
119
120 2005-12-08 Raphael Neider <rneider AT web.de>
121
122         * src/pic/device.c: renamed is_shared to pic14_is_shared
123         * src/pic/gen.c (genIfx): re-enabled handling of sbits
124         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
125           (is_valid_identifier): added for above workaround
126
127 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
128
129         * device/lib/Makefile.in: fixed to enable port-specific-objects
130         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
131           char, thanks Hubert Sack
132         * doc/sdccman.lyx: documented --xstack-loc,
133           elaborated a bit more on interrupts and pitfalls,
134           removed "setjmp/longjmp unsupported",
135           documented some unsupported C99 features
136         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
137         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
138           if, thanks Hubert Sack
139         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
140         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
141           make make_library
142         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
143           regression tests can report resource usage (rfe 700441)
144         * support/regression/collate-results.py: report resource usage
145         * support/regression/ports/ds390/spec.mk,
146         * support/regression/ports/hc08/spec.mk,
147         * support/regression/ports/mcs51/spec.mk,
148         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
149         * support/regression/ports/ds390/uCsim.cmd,
150         * support/regression/ports/hc08/uCsim.cmd,
151         * support/regression/ports/mcs51/uCsim.cmd,
152         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
153         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
154           library, use the default one
155         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
156           building the library
157
158 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
159
160         * config.dsp: added dependency on .version and configure_vc.awk
161         * device/include/setjmp.h: updated for --stack-auto and --xstack
162         * device/include/mcs51/at89c51snd1c.h: corrected line endings
163         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
164         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
165         * device/lib/libsdcc.lib: added _setjmp
166         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
167           (decorateType): fixed bug 1372851,
168           (optimizeGetHbit): fixed warning
169         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
170           array initialisation
171         * support/regression/tests/bug1057979.c: added test for bug 1358192
172         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
173
174 2005-12-03 Borut Razem <borut.razem AT siol.net>
175
176         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
177           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
178
179 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
180
181         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
182         createIval): implement symbol independant "flexible array member",
183         (createIvalCharPtr): implemented flexible array initialisation with a
184         string
185         * src/SDCCsymt.c (copyStruct): removed,
186         (getSize): fixed misleading comment,
187         (getAllocSize): removed, the additional allocation size is now in
188         sym->flexArrayLength,
189         (checkStructFlexArray): new, syntax checks for flexible array members,
190         (compStructSize): added syntax checks for "flexible array members"
191         (copyStruct): removed,
192         (copyLinkChain): removed inefficient fix for bug 770487
193         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
194         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
195         symbol->flexArrayLength
196         * src/SDCCerr.c,
197         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
198         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
199         * support/regression/tests/structflexarray.c: added
200         * support/valdiag/tests/structflexiblearray.c: added
201
202 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
203
204         * src/SDCCast.c (decorateType): fixed bug 1368489
205         * support/Util/SDCCerr.c,
206         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
207
208 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
209
210         * device/include/mcs51/at89c51snd1c.h: added file submitted by
211           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
212
213 2005-11-27 Borut Razem <borut.razem AT siol.net>
214
215         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
216           support/cpp2/mkdeps.h: added command line option
217           -obj-ext=<extension> to SDCPP to define object file externion, used
218           for generation of make dependencies (-M)
219         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
220
221 2005-11-26 Borut Razem <borut.razem AT siol.net>
222
223         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
224           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
225           added pic and pic16 libraries
226
227 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
228
229         * device/include/float.h: Corrected typo in prototype of __fsgt
230
231 2005-11-25 Borut Razem <borut.razem AT siol.net>
232
233         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
234           added creation of model-mcs51-stack-auto libraries
235
236 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
237
238         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
239         and fields-list too
240         * src/SDCCast.c (createIvalArray): removed obsolete comment
241
242 2005-11-24 Borut Razem <borut.razem AT siol.net>
243
244         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
245           added missing device/lib/mcs51/crt*.asm sources
246
247 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
248
249         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
250
251 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
252
253         * device/lib/_fs2schar.c,
254         * device/lib/_fs2sint.c,
255         * device/lib/_fs2slong.c: optimized inline asm
256
257 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
258
259         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
260           Better handling of floats between -1.0 and 0.0.
261
262 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
263
264         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
265           (the missing "if"s prohibited removal of redundant labels)
266
267 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
268
269         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
270           Properly convert floats between -1.0 and 0.0 to long, int, and char
271           types (max integer value of negative floats tends to zero).
272         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
273           Removed changes made so to work properly with floats between
274           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
275           and _fs2char.c
276
277 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
278
279         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
280         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
281         (genCast) cosmetic change
282         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
283         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
284         from mcs51
285         * support/regression/tests/bitfields (testSignedBitfields): added
286
287 2005-11-18 Borut Razem <borut.razem AT siol.net>
288
289         * sdcc/device/lib/Makefile.in: remove all unnecessary files
290         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
291           introduced SILENT option to make building of pic16 libraries less
292
293 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
294
295         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
296           Now they work properly with floats between -1.0 and 0.0
297         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
298
299 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
300
301         * src/SDCCicode.c (printOperand): added missing else
302
303 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
304
305         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
306         reformatted for better readability
307         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
308         signed bitfields
309
310 2005-11-17 Borut Razem <borut.razem AT siol.net>
311
312         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
313           introduced SILENT option to make building of pic16 libraries less
314           verbose - used for nightly snapshot build
315         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
316           available on Win32 platforms.
317         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
318           medium, large, pic and pic16
319
320 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
321
322         * device/lib/printf_large.c: Temporary patch for bug 1358192:
323           printf("%f"...) sets fraction to zero.
324
325 2005-11-16 Raphael Neider <rneider AT web.de>
326
327         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
328           fixes #1357221
329         * src/pic/gen.c (genIfx): implemented for CARRY bit
330         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
331           to generic pointers, fixes #1357332,
332           (pic16_movLit2f): NEW,
333           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
334
335 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
336
337         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
338
339 2005-11-11 Raphael Neider <rneider AT web.de>
340
341         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
342         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
343           compute pointer's type from operand,
344           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
345           improved single bit reads, fixes bug #1353379
346
347 2005-11-09 Borut Razem <borut.razem AT siol.net>
348
349         * support/scripts/sdcc.nsi: added lib/pic to the package
350
351 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
352
353         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
354
355 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
356
357         * support/regression/tests/bug1348008.c: added
358         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
359         * support/regression/tests/bug1337835.c: updated comment
360
361 2005-11-06 Borut Razem <borut.razem AT siol.net>
362
363         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
364           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
365           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
366           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
367           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
368           dynamic construction of cl_error_class and derivates - 2.nd try
369
370 2005-11-05 Borut Razem <borut.razem AT siol.net>
371
372         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
373           bug, which caused Bus Errors on sparc solaris
374
375 2005-11-04 Borut Razem <borut.razem AT siol.net>
376
377         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
378           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
379           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
380           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
381           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
382           and derivates to resolve the initialization problem on OSX
383
384 2005-11-02 Borut Razem <borut.razem AT siol.net>
385
386         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
387           corrected typo - #include <winsock2.h>
388
389 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
390
391         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
392           (_asxxxx_mapping): added org directive for future enhancements
393
394 2005-11-01 Borut Razem <borut.razem AT siol.net>
395
396         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
397           enabled sockets on WIN32
398         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
399
400 2005-10-31 Borut Razem <borut.razem AT siol.net>
401
402         * support/regression/generate-cases.py: escape backslashes in {testcase}:
403           WIN32 backslash path delimiters should be escaped when used in C strings
404         * support/regression/tests/bitfields.c: exclude failing assertions for
405           __CYGWIN32__ and __MINGW32__ hosts
406
407 2005-10-30 Borut Razem <borut.razem AT siol.net>
408
409         * src/SDCCutil.c: corrected double comparison typo
410
411 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
412
413         * device/lib/medium/Makefile: added for new memory model medium
414         * device/include/asm/mcs51/features.h: updated for medium/pdata
415         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
416           added Multiply & Accumulate sbit's and MAC0_PAGE define
417         * device/include/mcs51/c8051f300.h: added sfr16 definitions
418         * device/include/mcs51/c8051f310.h: added sfr16 definitions
419         * device/lib/_mullong.c: update for medium model
420         * device/lib/incl.mk: added medium model
421         * doc/sdccman.lyx: documented medium model
422         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
423         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
424         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
425         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
426           (allocParms): set SCLS and OCLS to pdata for medium model
427         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
428           for pdata,
429           (powof2): return <0 if not power of 2
430         * src/avr/gen.c (genBitWise): use updated powof2
431         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
432           (shiftR2Left2Result): small optimization in setup, save acc when storing,
433           (shiftLLeftOrResult): use B if necessary
434         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
435         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
436         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
437         * support/regression/Makefile.in: added test-mcs51-medium
438         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
439
440 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
441
442         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
443         specifier unsigned
444         * device/lib/time.c (mktime): fixed bug 1334315
445
446 2005-10-28 Raphael Neider <rneider AT web.de>
447
448         * device/include/pic/p16f_common.inc: added common declarations
449         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
450
451 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
452
453         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
454           (aopPutUsesAcc): added to predict accumulator use,
455           (assignResultValue): save acc if necessary,
456           (genMinusDec): store result if indirectly addressed,
457           (genDivOneByte):  save acc if necessary,
458           (movLeft2Result): bugfix if left already in acc,
459           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
460             attention to accumulator use (esp. pdata),
461           (genReceive): receive pdata correctly
462         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
463         * src/SDCCicode.h: added isOperandInPagedSpace prototype
464
465 2005-10-27 Raphael Neider <rneider AT web.de>
466
467         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
468
469 2005-10-27 Raphael Neider <rneider AT web.de>
470
471         * .version: changed version to 2.5.4
472         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
473         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
474           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
475             arithmetics support routines
476         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
477         * device/lib/Makefile.in: also create installdir for pic
478
479         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
480           pic14 port as well
481         * src/pic/device.c (dump_sfr): rewritten to delegate register
482           placement to the linker (use `extern sym' rather than sym EQU addr),
483           (validAddress): fixed to check last specified address
484         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
485           (popGetLit): truncate literal value to 8 bit,
486           (popGet): moved assert to more appropriate place
487           (popGetExternal): create pCode operand from and mark the according
488             symbol as being `extern'
489           (popGetAddr): added sanity check on immediate's offset, provide
490             GPOINTER tag on demand
491           (aopPut): fixed for immediates,
492           (mov2w_op): move operand's address or contents to WREG (depending on
493             operand type), safer variant of mov2w,
494           (movwf,call_libraryfunc): NEW, handy abbreviations,
495           (get_argument_pcop,get_return_val_pcop,pass_argument,
496           get_returnvalue): interface for accessing function parameters and
497             return values,
498           (assignResultValuei,genRet): use new parameter/return value interface
499           (pic14_getDataSize): back to old version handling generic pointers,
500           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
501             provided implementation and/or fixed old one,
502           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
503             calls, removed legacy 8051 reference code
504           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
505           (loadSignToC): NEW, move the operands sign bit to CARRY,
506           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
507             genRightShiftSigned, accepts negative shift counts,
508           (setup_fsr): load FSR and adjust IRP (indirect memory access),
509           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
510             generic pointers, __data pointers and __code pointers,
511           (genUnpackBits,genPackBits): rewritten to work with generic pointers
512             and signed bitfields, limit bitfields to 8 bit,
513           (genDataPointerGet): fixed number of bytes read,
514           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
515           (genPointerGet,genPointerSet): fixed handling of __code pointers,
516             pointers to constant data are no longer assumed to point to __code
517             space, removed invalid pointer types,
518           (bitpatternFromVal): retrieve the PICs representation of an integer
519             or float literal,
520           (genDataPointerSet): fixed assigning to po_immediate operands,
521           (genGenPointerSet): implemented as library call,
522           (genIfx): fixed incorrect condition,
523           (genAddrOf): limit generic pointers' addresses to 2 bytes,
524             provide GPOINTER tag according to destination's storage class,
525           (genCast): added code to handle casting to generic pointers, added
526             sign-/zero extension of the result
527           (aop_isLitLike,op_isLitLike): fixed handling of immediates
528         * src/pic/gen.h: added macros to access IRP bit in STATUS register
529         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
530           extend the result
531         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
532           address/register resides in the shared banks
533           (emitSymbolToFile): improved to handle global and `pinned' symbols,
534             put all variables into separate sections (have the linker arrange
535             them)
536           (picglue): put init code and interrupt handlers in separate sections
537         * src/pic/main.c: added port specific options table, modified to PORT
538           structure to make GPOINTERs 3 byte, added pic14_options
539           (_pic14_do_link): private linking routine (update paths to libraries,
540             add libsdcc.lib by default)
541         * src/pic/main.h: declare pic14_options
542         * src/pic/pcode.c: fixed instructions i/o relations,
543           (RegCond): reverted to correct version,
544           (newpCodeOpLit): truncate literals to 8 bit,
545           (genericPrint): added debug output,
546           (getRegFromInstruction): fixed for various operand types, simplified
547           (BuildFlow): fixed broken handling of isntructions with labels
548           (LinkFlow): start at last instruction in flow (skip trailing comments),
549             pass the flow on to the next instruction after CALL
550           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
551           (insertPCodeInstruction): fixed inserting after a skip instruction,
552           (DoBankSelect): fixed for labeled instructions
553           (OptimizepBlock): honor --nopeep switch
554           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
555         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
556         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
557           (pCodeOptime2pCodes): allow disabling this optimization via
558             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
559             but is still buggy), started implementation of a dataflow based
560             pCode optimization (CSE + dead code elimination)
561           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
562         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
563           names are independant of the stack location and therefore portable across
564           devices
565
566 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
567
568         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
569           (selectSpil): fixed bug 1337835 by not spilling bit variables
570         * support/regression/tests/bug1337835.c: added test for this bug
571         * src/mcs51/peeph.def: restart after rule 3.c,
572           addded rules 263.x to optimize loading constants
573
574 2005-10-26 Raphael Neider <rneider AT web.de>
575
576         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
577         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
578           (genAssign): emit warning when casting literals to generic pointer
579             type, also applies when taking the address of a fixed variable,
580           (genCast): improved casting to generic pointers
581         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
582           extern variables, added verbose error message
583         * device/include/pic16/{string.h,errno.h}: added #pragma library c
584
585 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
586
587         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
588         carry must be complemented too
589         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
590         could be emitted by genMinus
591         * src/SDCCval.c (constVal): fixed bug 1305065
592
593 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
594
595         * src/SDCCast.c (addCast): added promotion for bit variables
596         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
597         promotion casts + optimisation
598         (optimizeGetWord): fix warning 'i' might be used uninitialized
599         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
600         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
601
602 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
603
604         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
605         all chars are promoted to int; promotion should be handled in SDCCast.c
606
607 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
608
609         * device/lib/_strcmp.c: Fixed bug 1326457
610
611 2005-10-11 Raphael Neider <rneider AT web.de>
612
613         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
614         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
615
616 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
617
618         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
619         * support/regression/tests/sfr16.c: added test for the sfr32 bug
620
621 2005-10-04 Raphael Neider <rneider AT web.de>
622
623         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
624           device/lib/pic16/pics.all: added pic18f1320
625         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
626
627 2005-09-30 Raphael Neider <rneider AT web.de>
628
629         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
630         * src/pic16/devices.inc: NEW, provides device descriptions
631         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
632
633 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
634
635         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
636           GETHBIT
637
638 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
639
640         * doc/sdccman.lyx: updated Highest Order Bit documentation,
641           documented Any Order Bit, Higher Order Byte and Higher Order Word
642         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
643         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
644           (optimizeGetAbit): new, to get any bit, not only the high bit,
645           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
646           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
647           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
648           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
649             RIGHT_OP: also try GETBYTE, GETWORD optimization,
650             GETABIT, GETBYTE, GETWORD: decorate them,
651           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
652           (ast_print): added GETABIT, GETBYTE, GETWORD
653         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
654         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
655           (geniCodeBinary): new generic binary icode,
656           (ast2iCode): added GETABIT, GETBYTE, GETWORD
657         * src/port.h: updated comment for PORT.hasExtBitOp
658         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
659           (genGetByte): new, to get a single byte,
660           (genGetWord): new, to get a word from a long,
661           (gen51Code): added GETABIT, GETBYTE, GETWORD
662         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
663
664 2005-09-23 Raphael Neider <rneider AT web.de>
665
666         * configure.in, configure: have device/lib/pic configured
667         * device/lib/Makefile.in: added model-pic14
668         * device/lib/clean.mk: added pic/ to clean rule
669         * device/lib/pic: added rudimentary pic14 library providing support
670           functions for multiplication/division/generic pointer access
671         * src/SDCCopt.c (convilong): mark support functions as extern
672           for pic14 port as well
673         * src/pic/gen.c (genMult): added assertions,
674           (genpic14Code): emit warning on unhandled iCodes
675         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
676         * src/pic/pcode.c (pCodeOpCopy),
677         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
678           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
679           SFR_REGISTER}), made safe for future extensions
680         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
681           instructions even if preceeded by SKIP instructions (also remove
682           them); removed unused code
683         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
684           prevents leaving parts of the structure uninitialized after copying
685
686 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
687
688         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
689           ago by me
690         * support/regression/tests/addsub.c: added test for the bug
691
692 2005-09-21 Raphael Neider <rneider AT web.de>
693
694         * device/include/pic16/pic18f1220.h,
695           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
696         * device/lib/pic16/Makefile.rules: added missing opening paren
697         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
698           are provided in genutils.c,
699           (genUminusFloat,genUminus,genCmpEq): added asserts on different
700           operand/result sizes,
701           (genCmp): assert on NULL pointers first, then check deref'ed values
702         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
703           result size
704
705 2005-09-18 Raphael Neider <rneider AT web.de>
706
707         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
708           as these are now unused,
709           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
710         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
711           local, avoids uninitialized pointer dereference on r->name
712         * src/pic16/ralloc.c (newReg): fixed indentation
713
714 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
715
716         * src/SDCCval.c (constVal): fixed bug 730366
717         * support/Util/SDCCerr.c,
718         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
719
720 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
721
722         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
723
724 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
725
726         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
727
728 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
729
730         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
731           (hex2dec): made hex_digit unsigned char, removed ascii dependance
732         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
733           (hex2dec): made hex_digit unsigned char, removed ascii dependance
734         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
735         * packihx/packihx.c (hexDigit): made c unsigned char
736         * as/mcs51/lklibr.c (fndsym),
737         * link/z80/lkgb.c (gb),
738         * link/z80/lklibr.c (fndsym),
739         * link/z80/lkrloc.c (relr),
740         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
741         * src/SDCC.lex (checkCurrFile, process_pragma),
742         * src/SDCCglue.c (spacesToUnderscores),
743         * src/SDCCmain.c (setParseWithComma, processFile),
744         * src/asm.c (tvsprintf, printCLine),
745         * src/avr/gen.c (emitcode, aopPut),
746         * src/ds390/gen.c (emitcode),
747         * src/hc08/gen.c (emitcode, emitinline),
748         * src/mcs51/gen.c (emitcode, genInline),
749         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
750           tokenizeLineNode),
751         * src/pic/ralloc.c (debugLog),
752         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
753           tokenizeLineNode),
754         * src/pic16/ralloc.c (debugLog),
755         * src/z80/main.c (_process_pragma):
756            made all ctype.h function calls safe
757         * src/SDCCopt.c: include math.h for fabs
758         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
759           and used them throughout the code to make ctype.h function calls safe
760         * src/ds390/main.c (asmLineNodeFromLineNode),
761         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
762         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
763            unsigned char*
764         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
765           (newpCodeAsmDir): made ctype.h function calls safe
766         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
767           pic16_emitcode):  made lbp unsigned char*
768         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
769           (pic16_newpCodeAsmDir): made ctype.h function calls safe
770         * src/xa51/gen.c (emitcode),
771         * src/z80/gen.c (_emit2): made lbp unsigned char*
772         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
773            char*
774
775 2005-09-05 Raphael Neider <rneider AT web.de>
776
777         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
778           access bank splitpoint
779
780 2005-09-05 Raphael Neider <rneider AT web.de>
781
782         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
783
784 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
785
786         * .version: changed to version 2.5.3
787         * doc/sdccman.lyx: changed version to 2.5.3,
788           documented --codeseg and --constseg and pragma codeseg and constseg,
789           documented bit parameters (reentrant) and bit returning
790         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
791            currFunc->recvSize, but is this ok for all ports?
792           (ast2iCode): result of ~ on unsigned char must be cast to int for
793            bool to work
794         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
795           function pointers in bit space
796         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
797           (processFuncArgs): call port.reg_parm() with reentrancy info
798         * src/port.h,
799         * src/avr/main.c,
800         * src/ds390/main.c,
801         * src/hc08/main.c,
802         * src/pic/main.c,
803         * src/pic16/main.c,
804         * src/xa51/main.c,
805         * src/z80/main.c: port.reg_parm prototype extended with
806           "bool reentrant" parameter
807         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
808           options.stackAuto for allocating bit register parameters
809         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
810           (genSend): set BitBankUsed if it is,
811           (selectRegBank): factored out of genCall for use in genPcall,
812           (genCall): removed redundant dtype assignmen, use selectRegBank,
813           (genPcall): handle returning in Carry properly, save in F0 if needed,
814           (genReceive): handle bit register parameters
815         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
816           (mcs51_assignRegisters): enable bit registers for all reentrant
817            functions and don't set BitBankUsed unconditionally
818         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
819         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
820         * support/regression/tests/funptrs.c: added tests for BOOL and for return
821
822 2005-08-27 Borut Razem <borut.razem AT siol.net>
823
824         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
825         ppc-osx (Darwin) does not support -u option. It seems that it is
826         supported only on Linux - GNU cp
827
828 2005-08-25 Borut Razem <borut.razem AT siol.net>
829
830         * sim/ucsim/gui.src/serio.src/Makefile.in,
831           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
832           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
833           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
834           install and strip, since the strip at /usr/ccs/bin should be used
835           on solaris
836
837 2005-08-24 Borut Razem <borut.razem AT siol.net>
838
839         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
840
841 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
842
843         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
844         ffffffffu
845
846 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
847
848         * as/mcs51/aslink.h: completed lkrloc.c prototypes
849         * as/mcs51/lkmain.c (link_main): fixed warning
850         * device/include/stdbool.h: ds390 has no advanced bit support yet
851         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
852         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
853         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
854           and updated their macros
855         * src/SDCCval.c (constVal): updated comment for renamed b_long
856
857 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
858
859         * as/mcs51/asdata.c: changed ctype['['] to BINOP
860         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
861           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
862           (oprio): set priority for '['
863         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
864            and adb_24_bit
865         * as/mcs51/asm.h: added defines R_BIT and S_BIT
866         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
867         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
868         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
869           added overlayable BIT_BANK area
870         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
871           (summary2): explain 'T' in legenda
872         * as/mcs51/lkrloc.c: replaced old K&R style,
873           (relr): added R_BIT processing,
874           (errmsg): added "Bit-addressable relocation error",
875           (adb_bit): added for converting from byte- to bit-addressable space,
876           (adb_24_bit): added for converting from byte- to bit-addressable space
877         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
878            used in reentrant functions now even as return value
879         * device/lib/_gptrput.c (_gptrput): removed obsolete code
880         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
881           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
882         * src/SDCCglobl.h: added indicator BitBankUsed
883         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
884            the bit registers b0-b7
885         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
886           (geniCodeCast): fixed bug 1263853,
887           (geniCodeLogicAndOr): put result in bool or char,
888           (geniCodeReceive): added parameter func for accessing the return type,
889           (geniCodeFunctionBody): pass func to geniCodeReceive
890         * src/SDCCmain.c: added indicator BitBankUsed
891         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
892         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
893           (checkSClass): don't put automatic bool/bit on stack,
894           (checkFunction): removed check on function cannot return bit
895         * src/SDCCsymt.h: added newBoolLink prototype
896         * src/mcs51/gen.c (rb1regs): added bit registers,
897           (movc): created for assigning to carry,
898           (pushReg, popReg): created for pushing registers,
899           (sameRegs): check both AOP_REG and AOP_CRY types,
900           (aopOp): handle bit registers,
901           (aopPut): optimization no self-assign,
902           (saveRegisters): push reg->base (bits) only once for bit registers,
903            and use pushReg,
904           (unsaveRegisters): pop reg->base only once and use popReg,
905           (assignResultValue): added parameter func and return in carry for bits,
906           (genIpush): optimization no reload in A if not changed,
907           (genSend): bit parameters in reentrant functions are passed in bit
908            registers by first assigning to bits in B, then save registers and
909            copy B to bits,
910           (genCall): handle returning in Carry properly, save it in F0 if needed,
911           (genPcall): updated assignResultValue call, this is not safe yet for bit
912            returning function !!!
913           (genFunction): don't generate equ's for bit registers and use pushReg,
914           (genEndFunction): take care of bit returning functions and use popReg,
915           (genRet): return bit in Carry,
916           (genIfx): optimize bit registers and other directly addressable bits,
917           (genReceive): updated assignResultValue call
918         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
919           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
920            registers when using stack-auto
921         * src/mcs51/ralloc.c (_G): added allBitregs,
922           (regs8051): added the bit registers,
923           (createStackSpil): use macro IS_BIT,
924           (getRegBit): added to allocate a bit register, else spill,
925           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
926           (updateRegUsage): factored out to ease stepping while debugging,
927           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
928            also allocate bit registers,
929           (fillGaps): handle bit registers,
930           (findAllBitregs): added to create bit vector with all bit registers,
931           (mcs51_allBitregs): returns this bit vector,
932           (mcs51_assignRegisters): when using stack-auto use bit registers for
933            passing parameters and creating local variables
934         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
935
936 2005-08-22 Borut Razem <borut.razem AT siol.net>
937
938         * device/lib/Makefile.in: replaced find option -or with -o
939           to make it run on solaris
940
941 2005-08-22 Raphael Neider <rneider AT web.de>
942
943         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
944           fixes #1265442 (crash on Solaris)
945
946 2005-08-20 Borut Razem <borut.razem AT siol.net>
947
948         * configure, configure.in: added tests for libsocket and libnsl libraries,
949           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
950           from support/regression/Makefile.in
951         * support/regression/Makefile.in: added
952         * device/lib/pic16/Makefile.common.in: force make to use bash shell
953         * sim/ucsim/libtool: regenerated on sparc-solaris
954         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
955           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
956           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
957           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
958           sparc-solaris, which doesn't use GNU ld linker
959         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
960         * as/Makefile: find on sparc-solaris does not support -maxdepth option
961
962 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
963
964         * src/mcs51/peeph.def: updated comments
965
966 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
967
968         * device/lib/_gptrget.c,
969         * device/lib/_gptrput.c: slightly shorter
970         * doc/sdccman.lyx: incremented version
971         * src/mcs51/peeph.def: moved peephole comments to the line of first
972           change to better keep line correlation, reanimated 186.e
973         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
974
975 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
976
977         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
978           David Saxton with quotes around file name.
979
980 2005-08-15 Borut Razem <borut.razem AT siol.net>
981
982         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
983           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
984           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
985           make tests run on x86_64 platform
986
987 2005-08-13 Raphael Neider <rneider AT web.de>
988
989         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
990           as it might be executed DURING a build (parallel make is wonderful)
991
992 2005-08-13 Raphael Neider <rneider AT web.de>
993
994         * device/lib/Makefile.in (port-specific-objects-pic16):
995           revert to cp $(PORT)/bin/*.* $(PORTDIR)
996         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
997           dependency
998         * device/lib/pic16/Makefile.rules: build subdirs before creating
999           the library, removed builddir rule, create $(builddir) early in
1000           recurse rule, use empty recurse rule for leaf directories
1001         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1002           mkdir errors (race condition), removed duplicate suffix "hex"
1003           from clean rules
1004         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1005         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1006           prevents mkdir -p from aborting on Alpha
1007
1008 2005-08-12 Raphael Neider <rneider AT web.de>
1009
1010         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1011           db-statements in order to allow for arrays of pointers in code
1012           sections to be placed without interspersed 0-padding, fixes
1013           bug #1256215
1014         * (emitStatistics): fixed division by zero for pic18f1220
1015         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1016           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1017         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1018         * (pic16_pCodeConstString): keep track of already emitted string
1019           literals to prevent "duplicate definitions of symbol _str_NR"
1020         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1021           debug message
1022         * device/lib/Makefile.in: ignore failing PIC16 library builds
1023         * device/lib/pic16/Makefile: do not build if gputils are missing
1024         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1025
1026 2005-08-10 Raphael Neider <rneider AT web.de>
1027
1028         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1029           my last commit)
1030
1031 2005-08-10 Raphael Neider <rneider AT web.de>
1032
1033         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1034           Rokas' patch to add the new fixed point type "__fixed16x16"
1035         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1036           functions for __fixed16x16 arithmetics
1037         * device/lib/pic16: reimplemented the build system to support
1038           a separate build directory, better handling of libio (create
1039           the library in a separate subdir for each architecture) and
1040           easier configuration (centralized in Makefile.common)
1041
1042 2005-08-07 Raphael Neider <rneider AT web.de>
1043
1044         * src/pic16/gen.c (genrshTwo): fixed sign extension
1045         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1046         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1047           added T0CONbits
1048         * device/include/pic16/pic18f4220.h: NEW, header for
1049           pic18f4220 and pic18f4320
1050         * device/include/pic16/pic18fregs.h: added new devices,
1051           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1052         * device/include/pic16/signal.h: resolved name clashes
1053           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1054           to also allow testing for interrupt enable bits, added
1055           comments on how to use the macros
1056         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1057         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1058           register definitions for the devices
1059         * device/lib/pic16/pics.all: added new devices
1060         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1061           allocated memory
1062         * device/lib/pic16/libc/stdlib/memfree: do not count
1063           the block header as free memory
1064         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1065           simplified and added missing end-of-blocklist-marker
1066           (reported by Peter Onion, fixes #1252814)
1067         * (_mergeHeapBlock): fixed loop condition
1068         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1069           len==0, restructured code
1070         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1071           up a bit, reduced bitfield accesses, prevent endless loops
1072           in case of heap corruption
1073         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1074           "unreferenced arguments/must return a value" warnings
1075         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1076           replaced BAUDREG with SPBRG
1077         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1078           device/lib/pic16/debug/gstack/gstack.c: replaced
1079           _naked, _asm, _endasm with __naked, __asm, __endasm
1080
1081 2005-08-05 Raphael Neider <rneider AT web.de>
1082
1083         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1084           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1085
1086 2005-08-05 Borut Razem <borut.razem AT siol.net>
1087
1088         * device/lib/Makefile.in: added missing ';'
1089         * configure: removed ^M characters
1090
1091 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1092
1093         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1094           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1095           License
1096
1097 2005-08-04 Borut Razem <borut.razem AT siol.net>
1098
1099         * configure.in: pic16 libraries build 2nd try - enable running
1100           configure in device/lib/pic16
1101         * configure: regenerated from configure.in
1102         * device/lib/Makefile.in: create $(PORT)/bin directory
1103
1104 2005-08-03 Raphael Neider <rneider AT web.de>
1105
1106         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1107           to get/set values via pointers
1108         * (genUnpackBits,genPackBits): changed detection of
1109           ptr->bitfield vs. sym.bitfield, fixed access via generic
1110           pointers, removed dead (wrong) code for multibyte bitfields
1111         * (genNearPointerGet, genGenPointerGet): removed useless code,
1112           fixed bitfield detection, fixes #1250594
1113         * (genNearPointerSet): removed useless code
1114         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1115           and introduced macro pic16_emitpcode that conditionally emits
1116           the origin of the following pCode (useful for debugging SDCC)
1117         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1118         * (createDefmap): fixed handling of LFSR for --optimize-df
1119
1120 2005-08-02 Borut Razem <borut.razem AT siol.net>
1121
1122         * device/lib/Makefile.in: pic16 libraries build enabled since
1123           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1124
1125 2005-08-02 Raphael Neider <rneider AT web.de>
1126
1127         * src/pic16/gen.c (genPackBits): removed deprecated warning
1128         * (genGenPointerSet): fixed bitfield detection
1129
1130 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1131
1132         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1133
1134 2005-07-31 Raphael Neider <rneider AT web.de>
1135
1136         * device/lib/pic16/libdev/pic18f458.c,
1137           device/include/pic16/pic18f458.h: added missing T0CONbits
1138
1139 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1140
1141         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1142
1143 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1144
1145         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1146
1147 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1148
1149         * device/include/mcs51/at89c51ed2.h: added.
1150
1151 2005-07-23 Raphael Neider <rneider AT web.de>
1152
1153         * src/pic/gen.h: added emitpcode macro for debugging
1154         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1155           and replace by macro adding debug information on demand
1156         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1157         * (gencjne): tried to fix; replaced with correct (slower) code
1158         * (gen{Unp,P}ackBits): fixed single bit access
1159         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1160         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1161           previous instruction
1162         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1163           register has to be handled with care (forbidding movement
1164           of assignments/uses, removing assignments completely, ...)
1165         * (pCodeOptime2pCodes): make use of regIsSpecial
1166         * added lots of debugging output (commented out)
1167         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1168           from being reused as result UNLESS it is known to work
1169
1170 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1171
1172         * support/Util/dbuf.h: include <stddef.h> for size_t
1173         * .version: changed to version 2.5.2
1174
1175 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1176
1177         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1178
1179 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1180
1181         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1182           (genModOneByte): removed needless psha/pula
1183
1184 2005-07-22 Raphael Neider <rneider AT web.de>
1185
1186         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1187           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1188         * src/pic/gen.c (resolveIfx): do not "invent" labels
1189         * (genSkipc): changed to positive logic
1190         * (genSkipCond): removed as no longer needed
1191         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1192           backport from PIC16
1193         * (genLeftShift): check operands are in different registers
1194         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1195           INCF does not update CARRY...
1196         * src/pic/main.c: fixed _linkCmd
1197         * src/pic/pcode.c (unlinkpCode): added inactive code
1198         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1199           alive (do not assign result and operand overlapping registers)
1200
1201 2005-07-22 Raphael Neider <rneider AT web.de>
1202
1203         * src/pic/device.c (dump_sfr): replaced register declaration with
1204           call to emitSymbolToFile() to avoid duplicate symbols
1205         * (assignRelocatableRegisters): do not declare external symbols
1206         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1207           right (take size of type, not etype)
1208         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1209         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1210         * (packRegsForAccUse): disabled assignment of WREG as
1211           the result reg to prevent occurence of just fixed #1235003,
1212           fixes #1242954
1213         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1214           symbols (avoids duplicate symbols in .asm file)
1215         * (pic14emitRegularMap): use emitSymbolToFile()
1216         * src/pic/gen.c (aopOp): fixed spillLocation handling
1217         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1218         * (genDataPointerSet): removed unneccessary variables/output
1219
1220 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1221
1222         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1223         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1224
1225 2005-07-21 Raphael Neider <rneider AT web.de>
1226
1227         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1228           architecture cannot handle them efficiently, fixes bug #1235003
1229         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1230           check for empty sets before using them (fixes bug #1232190)
1231
1232 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1233
1234         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1235           (lnksect2): generate warnings for memory overlap
1236         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1237           constseg to set the name of these segments so you can instruct the linker
1238           to place them in banks
1239         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1240         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1241           added code_seg and const_seg to options
1242         * src/SDCCglue.c (emitMaps): use options.const_seg,
1243           (createInterruptVect): put interrupt vectors in segment HOME,
1244           (glue): put HOME before static segment and put the main glue in HOME,
1245           (glue): use options.code_seg
1246         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1247         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1248           these segments so you can instruct the linker to place them in banks
1249           (linkEdit): use code_loc for HOME segment which should be the first
1250           segment in code memory now
1251         * src/SDCCmem.c: fixed more stuff like bug 1238386
1252         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1253           (changePointer): don't change function pointers to code pointers for
1254           banked functions,
1255           (compareType): added exceptional check for banked function pointers
1256         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1257         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1258           after static in code memory
1259         * src/mcs51/gen.c: added aopLiteralLong prototype,
1260           (aopForSym): use getSize for functions,
1261           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1262           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1263           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1264           the segment,
1265           (genPcall): use call for literal function pointers and generate banked
1266           calls over the one trampoline so there's only one place for the user to
1267           modify according to his/hers hardware,
1268           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1269           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1270         * src/mcs51/main.c: added keyword banked,
1271           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1272         * support/Util/SDCCerr.c,
1273         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1274           needed for passing the bank and address to the trampoline
1275         * device/lib/mcs51/crtbank.asm: added for bankswitching
1276         * device/lib/mcs51/Makefile: added crtbank
1277
1278 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1279
1280         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1281           for fields at offset 0 of a struct or union as reported
1282           on 2005-07-07 in the developer mailing list.
1283
1284 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1285
1286         * src/SDCCmem.c: fixed bug 1238386
1287
1288 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1289
1290         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1291           (patch #1144962), added peephole 300, enabled 259.x
1292         * doc/sdccman.lyx: removed screenshot and provided link instead
1293
1294 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1295
1296         * doc/sdccman.lyx: added section about debugging with ddd
1297         * doc/figures/ddd_example.eps: screenshot of debugging session
1298
1299 2005-07-04 Raphael Neider <rneider AT web.de>
1300
1301         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1302           like CODE pointers, fixes #1115683
1303         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1304           call, fixes bugs #1232211, #1228110,
1305           fixed wrong casts to pCodeFlow from pCodeInstructions
1306
1307 2005-07-04 Raphael Neider <rneider AT web.de>
1308
1309         * src/pic/gen.c (popGet): changed assert to allow for
1310           bit operands
1311         * (popGetAddr): changed signature to provide
1312           an additional index, patched all call sites
1313         * (genCmpEq): handle literal-like operands correctly
1314         * (genAddrOf): added sanity checks on __code/__data pointers
1315         * (genAssign): added handling of symbols from __code section
1316         * (gencjne): do not generate code for comparisons whose result
1317           is neither stored nor used, fixes bug #1171114
1318         * (AccLsh, AccRsh): operate on operand instead of WREG
1319         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1320           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1321           by known count
1322         * rewrote complete shift-by-literal logic, commented unused
1323           functions out
1324         * (genConstPointerGet): get multiple bytes (if result size > 1),
1325           fixed handling of non-immediate addresses
1326         * (genPointerGet): handle CODE pointers like CONST pointers
1327         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1328         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1329           operand is to be treated as a literal or not
1330         * (mov2w,genPcall,genCmpEq),
1331           src/pic/genarith.c: use aop_isLitLike() to decide between
1332           literal/register contents
1333         * (addSign): added missing offset
1334         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1335           only emit comment in debug-mode,
1336           use {aop,op}_isLitLike throughout the file
1337         * src/pic/glue.c: fix initializers for pointers (work in progress)
1338         * src/pic/pcode.c (get_op): honor index on _const symbols
1339         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1340         * (dumppBlock): added pCode size estimation
1341         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1342           check for IS_SYMOP before OP_SYMBOL'ing
1343         * fixed indentation, compacted switch-statements
1344         * (allocReg): find free register and allocate it instead of
1345           allocating new registers all the time
1346         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1347           registers as its operands (necessary only for multibyte GETs)
1348
1349 2005-07-01 Raphael Neider <rneider AT web.de>
1350
1351         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1352           debugging .asm-output macros FENTRY + FEXIT
1353         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1354           way... I wonder...
1355         * (emitpComment): NEW, printf to pCode
1356         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1357           offset handling
1358         * (popGetAddr): NEW, variant of popGet to access an immediates
1359           high(er) bytes instead of the n'th byte of memory they reference,
1360           replaced popGet with popGetAddr where neccessary
1361         * (genDataPointerGet): reactivated and fixed implementation
1362         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1363           accesses
1364         * (genDataPointerSet): fixed multibyte assignments
1365         * (genpic14Code): fixed --i-code-in-asm handling
1366         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1367         * (genPlus): fixed index-out-of-bounds error
1368         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1369         * src/pic/ralloc.c: added debugging output macro FENTRY2
1370         * (spillThis): fixed indentation, enbraced for-body for clarity
1371         * (rematStr): commented out as now unused
1372         * (regTypeNum): commented out special spill case (overwrites
1373           arbitrary values)
1374         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1375
1376 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1377
1378         * doc/sdccman.lyx: documented sfr16/sfr32,
1379           added example for using storage class with function pointers
1380         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1381
1382 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1383
1384         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1385         * device/lib/_itoa.c,
1386         * device/lib/_ltoa.c: optimized codesize
1387         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1388           but don't know how to suppress the double warning.
1389         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1390         * support/Util/SDCCerr.c,
1391         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1392
1393 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1394
1395         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1396           fixed old K&R prototypes
1397         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1398         * device/lib/_gptrget.c,
1399         * device/lib/_gptrgetc.c,
1400         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1401           also new versions for small generic pointers and banked generic pointers
1402         * src/port.h: added const_name
1403         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1404         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1405         * src/SDCCcse.c (findPrevIc): check all associative operators
1406         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1407         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1408         * src/SDCCmem.c: updated comments,
1409           set far-space to 0 for pdata, results in optimized code
1410         * src/SDCCmem.h: added macro CONST_NAME
1411         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1412           moving the info into the highest bits, see also gptrget/gptrput
1413         * src/src.dsp: added sdcc.ico to project files
1414         * src/avr/gen.c (genCast): fixed bug 0x%d
1415         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1416         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1417           relation between ptr_type and DCL_TYPE,
1418           (genCast): fixed bug 0x%d
1419         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1420           (CODE)" for const_name
1421         * src/hc08/gen.c (genCast): fixed bug 0x%d
1422         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1423           (hc08_port): added "CONST (CODE)" for const_name
1424         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1425           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1426           between ptr_type and DCL_TYPE,
1427           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1428           operand* and took AOP() inside function so sfr-ness can be checked,
1429           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1430           new prototype,
1431           (genFunction, genEndFunction): optimized stack setup,
1432           (genMinus): optimized for literals with ending zeroes (in bytes),
1433           (genCast): fixed bug 0x%d
1434         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1435           (mcs51_port): added "CONST (CODE)" for const_name
1436         * src/mcs51/peeph.def: made rule 226 more generic
1437         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1438         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1439         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1440         * src/z80/main.c (z80_port): added NULL for const_name,
1441           (gbz80_port): added NULL for const_name
1442         * support/regression/tests/bug663539.c,
1443         * support/regression/tests/sfr16.c: new tests
1444
1445 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1446
1447         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1448
1449 2005-06-24 Raphael Neider <rneider AT web.de>
1450
1451         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1452           corrected typos...
1453         * device/include/pic16/signal.h: added USBIF
1454           and SIG_USB
1455
1456 2005-06-24 Raphael Neider <rneider AT web.de>
1457
1458         * device/lib/pic16/libdev/pic18f2455.c,
1459           device/include/pic16/pic18f2455.h: NEW
1460         * device/include/pic16/pic18fregs.h,
1461           device/lib/pic16/pics.all,
1462           src/pic16/device.c: added 18f2455
1463         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1464           device/include/pic16/{pic18f[68][567].h,usart.h}:
1465           replaced MULTIPLE_USARTS define with more relaible
1466           compatibility sfrs (for USART access)
1467
1468 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1469
1470         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1471           and the output asm file line is printed on two lines.
1472
1473 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1474
1475         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1476           BGT, BLE, BHI, and BLS instructions
1477         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1478           genCmpEq): removed
1479         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1480           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1481           fixes bug #1216342
1482         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1483
1484 2005-06-15 Raphael Neider <rneider AT web.de>
1485
1486         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1487         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1488         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1489           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1490           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1491
1492 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1493
1494         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1495           Marcel Telka in bug #1215704
1496
1497 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1498
1499         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1500           located in shared memory bank.
1501
1502 2005-05-31 Raphael Neider <rneider AT web.de>
1503
1504         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1505           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1506           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1507
1508 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1509
1510         * device/lib/_strncpy.c: fixed the fix
1511
1512 2005-05-26 Raphael Neider <rneider AT web.de>
1513
1514         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1515           initializers with \0, bug #1208187
1516         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1517           intializers with \0, bug #1208187
1518
1519 2005-05-26 Raphael Neider <rneider AT web.de>
1520
1521         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1522           initializers with \0, bug #1208187
1523         * src/pic16/main.c (_process_pragma): added sanity checks
1524           for stack position and size, emit warnings when appropriate
1525
1526 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1527
1528         * device/lib/_strncpy.c: fixed not filling with \0
1529
1530 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1531
1532         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1533           createFunction),
1534         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1535           compound_statement),
1536         * src/SDCCsymt.h,
1537         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1538
1539 2005-05-24 Raphael Neider <rneider AT web.de>
1540
1541         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1542
1543 2005-05-24 Raphael Neider <rneider AT web.de>
1544
1545         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1546           TRISE definitions, closes bug #1162453
1547
1548 2005-05-22 Raphael Neider <rneider AT web.de>
1549
1550         * src/pic16/main.c (_process_pragma): check for missing
1551           arguments to pragmas code and udata
1552         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1553           consistency fixes to match other headers (thanks to Jim Paris)
1554         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1555
1556 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1557
1558         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1559
1560 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1561
1562         * support/regression/tests/bug1198642.c: new test
1563         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1564         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1565         * support/scripts/resource.h,
1566         * support/scripts/resource.rc,
1567         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1568         * support/scripts/sdcc.ico: added 32x32 icon
1569
1570 2005-05-18 Raphael Neider <rneider AT web.de>
1571
1572         * device/lib/pic16/libdev/pic18f*.c,
1573         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1574           keywords to "__sfr" and "__at (X)"
1575         * device/include/pic16/pic18fregs.h: added pic18f4520
1576         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1577           #1203088 (MPLAB compatibility)
1578
1579 2005-05-17 Raphael Neider <rneider AT web.de>
1580
1581         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1582         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1583         * device/lib/pic16/pics.all: added new devices
1584         * src/pic16/device.c: added support for pic18f4520
1585
1586 2005-05-16 Raphael Neider <rneider AT web.de>
1587         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1588         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1589         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1590           convenience function for bit access
1591
1592 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1593
1594         * device/lib/printf_large.c: fixed bug 1193299
1595         * support/regression/tests/bug1057979.c: added test %3.3s
1596
1597 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1598
1599         * device/include/mcs51/8051.h,
1600         * device/include/mcs51/8052.h: made parseable with lint
1601         * device/include/mcs51/lint.h: added include file for (sp)lint
1602         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1603         * doc/cdbfileformat.lyx,
1604         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1605
1606 2005-05-14 Raphael Neider <rneider AT web.de>
1607
1608         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1609         * device/lib/pic16/libc/stdlib/itoa.c (new)
1610         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1611         * device/lib/pic16/libio/Makefile: exclude subdir according to
1612           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1613         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1614         * src/pic16/gen.c (genFunction): prevent annoying warning
1615         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1616           nameclashes on BeOS
1617         * support/cpp2/cppmain.c (cpp_output_string): new
1618         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1619           fixes bug 1116802
1620
1621 2005-05-13 Borut Razem <borut.razem AT siol.net>
1622
1623         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1624
1625 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1626
1627         * .version: changed to version 2.5.1; back to bleeding edge development
1628
1629 2005-05-11 Borut Razem <borut.razem AT siol.net>
1630
1631         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1632           generate PDF version 1.3 documents
1633
1634 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1635
1636         * .version: changed to version 2.5.0
1637
1638 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1639
1640         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1641
1642 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1643
1644         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1645         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1646         well as many smaller updates.
1647         * .version: changed to version 2.5.0-pre1
1648
1649 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1650
1651         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1652
1653 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1654
1655         * support/regression/tests/bug1185672.c: added
1656         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1657           bug 1185672
1658         * src/mcs51/gen.c (genCall): added comments, made it look safer
1659         * src/mcs51/gen.c (genEndFunction): simplified
1660
1661 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1662
1663         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1664
1665 2005-04-14 Borut Razem <borut.razem AT siol.net>
1666
1667         * fixed bug 1045046 - SIGSEGV with really simple code?:
1668           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1669           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1670
1671 2005-04-14 Borut Razem <borut.razem AT siol.net>
1672
1673         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1674           src/pic16/device.h: temporarily disabled experimental #inline pragma
1675           for 2.5.0 release
1676
1677 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1678
1679         * device/include/z80/stdio.h,
1680         * device/include/z80/string.h: removed these highly incomplete files so
1681           SDCC can use the default ones in device/include/
1682
1683 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1684
1685         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1686         gcc warning.
1687         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1688         fix sdcpp warnings.
1689
1690 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1691
1692         * device/include/malloc.h: removed redundant __reentrant prototypes
1693         * device/lib/_mullong.c: added working xstack variant in asm (C version
1694           doesn't pass regression tests)
1695         * device/lib/bpx.c: used __data and made bpx char for mcs51
1696         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1697           (createFunction): fixed bug with xstackPtr
1698         * src/SDCCcse.c: corrected comments
1699         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1700           (killDeadCode, eBBlockFromiCode): removed unused code
1701         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1702           corrected comments
1703         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1704           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1705           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1706           (genModOneByte): fixed warning in MSVC
1707         * src/mcs51/main.c (): added comments
1708         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1709
1710 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1711
1712         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1713
1714 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1715
1716         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1717
1718 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1719
1720         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1721         characters arrays of larger size than the declared one.
1722
1723 2005-04-10 Borut Razem <borut.razem AT siol.net>
1724
1725         * src/pic/gen.c (genInline),
1726           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1727           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1728           (findNextInstruction), (findPrevInstruction),
1729           (findInstructionUsingLabel),
1730           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1731         * src/pic/pcode.c (findLabel): added missing '\n'
1732         * src/src.dsp: added SDCCdwarf2.c to the project
1733
1734 2005-04-09 Borut Razem <borut.razem AT siol.net>
1735
1736         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1737
1738 2005-04-08 Raphael Neider <rneider AT web.de>
1739
1740         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1741           into the chain after a given one) and mergeDefmapSymbols (combine
1742           defmap entries for each symbol per pcode)
1743         * (createDefmap): have defmap entries merged in the end
1744         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1745           a symbol before replacing one access type's symbol, merge symbols in
1746           the end (replacement symbol might already have an entry)
1747         * (assignValnums): keep reference to written WREG intact
1748
1749 2005-04-08 Raphael Neider <rneider AT web.de>
1750
1751         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1752           Alpha)
1753
1754 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1755
1756         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1757         bytes
1758
1759 2005-04-07 Raphael Neider <rneider AT web.de>
1760
1761         * device/include/pic16/usart.h: added compatibility defines for
1762           devices with more than one USART
1763         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1764
1765 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1766
1767         * device/lib/Makefile.in: updated for port specific include
1768
1769 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1770
1771         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1772
1773 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1774
1775         * device/include/8051.h,
1776         * device/include/8052.h,
1777         * device/include/at89S8252.h,
1778         * device/include/at89c55.h,
1779         * device/include/at89x051.h,
1780         * device/include/at89x51.h,
1781         * device/include/at89x52.h,
1782         * device/include/mcs51reg.h,
1783         * device/include/reg51.h,
1784         * device/include/reg764.h,
1785         * device/include/regc515c.h,
1786         * device/include/sab80515.h: (re)moved these 12 files
1787         * device/include/mcs51/8051.h,
1788         * device/include/mcs51/8052.h,
1789         * device/include/mcs51/at89S8252.h,
1790         * device/include/mcs51/at89c55.h,
1791         * device/include/mcs51/at89x051.h,
1792         * device/include/mcs51/at89x51.h,
1793         * device/include/mcs51/at89x52.h,
1794         * device/include/mcs51/mcs51reg.h,
1795         * device/include/mcs51/reg51.h,
1796         * device/include/mcs51/reg764.h,
1797         * device/include/mcs51/regc515c.h,
1798         * device/include/mcs51/sab80515.h: and added them here
1799
1800 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1801
1802         * device/include/stdarg.h: changed SDCC specific keywords to double
1803           underlined form.
1804         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1805           mcs51 and ds390.
1806         * device/include/hc08/mc68hc908gp32.h,
1807         * device/include/hc08/mc68hc908jb8.h,
1808         * device/include/hc08/mc68hc908jkjl.h,
1809         * device/include/hc08/mc68hc908qy.h: fixed comments
1810         * device/include/mcs51/README: updated
1811         * device/include/mcs51/c8051f120.h: added PINRSF
1812         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1813         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1814           amidst code. Also inline is not supported.
1815
1816 2005-04-06 Raphael Neider <rneider AT web.de>
1817
1818         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1819         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1820           callers stack/frame pointers
1821
1822 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1823
1824         * device/include/pic16/usart.h: added, missing in previous commit,
1825         * device/include/pic16/adc.h: fixed typo,
1826         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1827         commit,
1828         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1829         <p18fxxx.inc>
1830         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1831         uninitialized because a bug appears with gplink
1832         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1833         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1834         complains for unrecognised option
1835
1836 2005-04-05 Raphael Neider <rneider AT web.de>
1837
1838         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1839           structs as well (using memcpy)
1840         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1841           on ISRs (GOTO has no label)
1842         * src/pic16/device.h: added OF_OPTIMIZE_DF
1843         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1844           new data flow analysis/optimization
1845         * src/pic16/pcode.c: added (prototypes for and implementation of)
1846           dataflow analysis functions, fixed pCodeInstructions' inCond and
1847           outCond values, made RCALL a branch instruction
1848         * (pic16_unlinkpCode): keep C line if possible
1849         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1850           C line moved if possible
1851         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1852         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1853           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1854         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1855           new flow)
1856         * (pic16_getJumptabpCode): NEW, needed in...
1857         * (LinkFlow): fixed handling of jumptables, calls and conditional
1858           branches
1859         * (pic16_InsertCommentAfter): NEW
1860         * (pic16_pCodeReplace): made verbose and flow preserving
1861         * (AnalyzeFlow): added call to data flow analysis
1862         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1863         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1864         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1865
1866 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1867
1868         * src/SDCCast.c (decorateType): fixed bug #1105626
1869
1870 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1871
1872         * device/include/asm/pic16/features.h,
1873         * pic18f*.h headers,
1874         * device/include/pic16/adc.h,
1875         * device/include/pic16/delay.h,
1876         * device/include/pic16/i2c.h,
1877         * device/include/pic16/malloc.h,
1878         * device/include/pic16/stdio.h,
1879         * device/include/pic16/stdlib.h,
1880         * device/include/pic16/string.h,
1881         * device/lib/pic16/libc/stdio/printf_tiny.c,
1882         * device/lib/pic16/libc/stdio/printf_small.c,
1883         * device/lib/pic16/libc/stdio/strmgpsim.c,
1884         * device/lib/pic16/libc/stdio/strmmssp.c,
1885         * device/lib/pic16/libc/stdio/strmusart.c,
1886         * device/lib/pic16/libc/stdio/vfprintf.c,
1887         * device/lib/pic16/libc/stdlib/ltoa.c,
1888         * device/lib/pic16/libc/stdlib/putchar.c,
1889         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1890         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1891         * device/lib/pic16/libc/stdlib/memchrram.c,
1892         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1893         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1894         * device/lib/pic16/libio/adc/adcbusy.c,
1895         * device/lib/pic16/libio/adc/adcread.c,
1896         * device/lib/pic16/libio/adc/adcsetch.c,
1897         * device/lib/pic16/libio/usart/ubaud.c,
1898         * device/lib/pic16/libio/usart/ubusy.c,
1899         * device/lib/pic16/libio/usart/udrdy.c,
1900         * device/lib/pic16/libio/usart/uopen.c,
1901         * device/lib/pic16/libio/usart/uputc.c,
1902         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1903         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1904         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1905         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1906         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1907         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1908         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1909         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1910         specific keywords to double underlined form,
1911         * device/lib/pic16/libc/Makefile.rules,
1912         * device/lib/pic16/libsdcc/Makefile.rules,
1913         * device/lib/pic16/libm/Makefile,
1914         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1915         to compile with C standard set in Makefile.common
1916         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1917         rand.c and crc.c in compilation process,
1918         * device/lib/pic16/libsdcc/int/divuint.c,
1919         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1920         `c' from signed to unsigned,
1921         * device/lib/pic16/startup/crt0.c,
1922         * device/lib/pic16/startup/crt0i.c,
1923         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1924         keywords to double underlined form, bug fixes in _do_cinit function
1925         which prevented the correct initialization of the .idata segment,
1926         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1927         core to enter a infinite loop
1928         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1929
1930 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1931
1932         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1933
1934 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1935
1936         * device/include/Makefile.in: add support for hc08 subdirectory
1937         * device/include/hc08/: new subdirectory
1938         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1939         Lucas Loizaga, thanks!
1940         * device/include/hc08/mc68hc908qy.h,
1941         * device/include/hc08/mc68hc908gp32.h,
1942         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1943         their own directory. Changed internal macro names to use the compiler
1944         reserved namespace. Changed SDCC specific keywords to double
1945         underlined form.
1946         * device/include/math.h,
1947         * device/include/malloc.h,
1948         * device/include/stdarg.h,
1949         * device/include/stdbool.h
1950         * device/include/string.h,
1951         * device/include/tinibios.h,
1952         * device/include/ds400rom.h,
1953         * device/include/8051.h,
1954         * device/include/8052.h,
1955         * device/include/80c51xa.h,
1956         * device/include/at89c55.h,
1957         * device/include/at89S8252.h,
1958         * device/include/at89x51.h,
1959         * device/include/at89x52.h,
1960         * device/include/ds80c390.h,
1961         * device/include/reg764.h,
1962         * device/include/regc515c.h,
1963         * device/include/sab80515.h,
1964         * device/include/mcs51/c8051f000.h,
1965         * device/include/mcs51/c8051f018.h,
1966         * device/include/mcs51/c8051f020.h,
1967         * device/include/mcs51/c8051f040.h,
1968         * device/include/mcs51/c8051f060.h,
1969         * device/include/mcs51/c8051f120.h,
1970         * device/include/mcs51/c8051f300.h,
1971         * device/include/mcs51/c8051f310.h,
1972         * device/include/mcs51/c8051f320.h,
1973         * device/include/mcs51/c8051f330.h,
1974         * device/include/mcs51/c8051f350.h,
1975         * device/include/z180.h: Changed SDCC specific keywords to double
1976         underlined form.
1977
1978 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1979
1980         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1981         18F4455,
1982         * (pic16_assignConfigWordValue): disable testing of configuration
1983         register value with config mask,
1984         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1985         function with port->fun_prefix,
1986         * (genFunction): when generating a naked interrupt function never
1987         create an absolute segment placed in interrupt vector address, place
1988         the actual interrupt function at IVA instead, when an interrupt
1989         function is generated with unspecified interrupt then do not create
1990         the absolute section,
1991         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1992         code for generating a call to generic pointer get/put function with
1993         a call to function pic16_callGenericPointer(),
1994         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1995         the call to the generic pointer get/put functions with prefixing the
1996         function name with port->fun_prefix,
1997         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1998         * src/pic16/main.c (_process_pragma): prefix function with
1999         port->fun_prefix,
2000         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2001         calling assembler, old 18Fxxxx macro is deprecated,
2002         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2003         PC_ASMDIR in while condition,
2004         * (findInstruction): add PC_ASMDIR in while condition,
2005         * (buildCallTree): prefix main with port->fun_prefix,
2006         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2007         identifier for variable with banked access in instructions BTFSS,
2008         BTFSC, BCF, BSF, BTG
2009         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2010         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2011         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2012         perform optimization when enviroment variable NO_REG_OPT is set,
2013         * (insideLRBlock): NEW, return 1 if register is inside an
2014         INF_LOCALREGS block,
2015         * (RemoveRegFromLRBlock): remove a register that is completely
2016         eliminated by register optimization, but it is still left in local
2017         register store/restore in/from stack block,
2018         * (Remove2pcodes): after removing register, check to see if it
2019         should be removed from local register store/restore in/from stack
2020         block,
2021         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2022         DUMMY_READ_VOLATILE,
2023
2024         * device/include/pic16/adc.h: minor prototype modifications and
2025         update,
2026         * device/include/pic16/malloc.h: added GPL notice various
2027         modifications,
2028         * device/include/pic16/stdint.h: NEW, standard header for ints
2029         * device/include/pic16/delay.h: NEW, header for delay functions,
2030         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2031         delay1mtcy,
2032         * device/include/pic16/signal.h: NEW, header providing helper macros
2033         for implementing signal handlers,
2034         * device/include/pic16/stdio.h: added prototypes for functions,
2035         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2036         prototypes for stdin and stdout, added macro PUTCHAR to
2037         automatically implement putchar function prototype,
2038         * device/include/pic16/usart.h: modified and updated USART library,
2039         * device/lib/pic16/libio/adc/,
2040         * device/lib/pic16/libio/i2c: some modifications to improve library
2041         performance,
2042         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2043         family of functions,
2044         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2045         family of functions and other sources,
2046         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2047         of the PIC18Fxx[28] devices,
2048         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2049         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2050         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2051         _do_cinit function, because the previous failed when local variables
2052         where not placed in the same memory bank,
2053         * device/lib/pic16/libsdcc/char/: various modifications to improve
2054         library performance,
2055         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2056         information on the new functions of the c library and more...
2057
2058 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2059
2060         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2061
2062 2005-03-26 Raphael Neider <rneider AT web.de>
2063
2064         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2065           if condition == CARRY)
2066         * (genCmp): adapted to new genSkipc semantics
2067         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2068           on rIfx (genCmp was broken)
2069
2070 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2071
2072         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2073         * src/z80/main.c (_keywords[]),
2074         * src/SDCCglobal.h (struct options),
2075         * src/SDCC.y,
2076         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2077         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2078         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2079         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2080         always available in leading double underscore form. The C99 support is
2081         mostly missing, but it's a start.
2082         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2083         reserved identifier "__data".
2084
2085 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2086
2087         * src/mcs51/peeph.def: fixed bug 1170013
2088
2089 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2090
2091         * device/include/mcs51reg.h: fixed bug 842007
2092
2093 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2094
2095         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2096         last time.
2097
2098 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2099
2100         * src/port.h (struct PORT),
2101         * src/avr/ralloc.c (avr_assignRegisters),
2102         * src/avr/main.c,
2103         * src/ds390/ralloc.c (ds390_assignRegisters),
2104         * src/ds390/main.c,
2105         * src/hc08/ralloc.c (hc08_assignRegisters),
2106         * src/hc08/main.c,
2107         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2108         * src/mcs51/main.c,
2109         * src/pic/ralloc.c (pic14_assignRegisters),
2110         * src/pic/main.c,
2111         * src/pic16/ralloc.c (pic16_assignRegisters),
2112         * src/pic16/main.c,
2113         * src/xa51/ralloc.c (xa51_assignRegisters),
2114         * src/xa51/main.c,
2115         * src/z80/ralloc.c (z80_assignRegisters),
2116         * src/z80/ralloc.h,
2117         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2118         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2119         * src/SDCCcse.h,
2120         * src/SDCCdflow.c (computeDataFlow),
2121         * src/SDCCdflow.h,
2122         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2123         * src/SDCCloop.h,
2124         * src/SDCCcflow.c (*),
2125         * src/SDCCcflow.h,
2126         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2127         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2128         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2129         immedDom() returning wrong block; probably fixes bug #1160833)
2130
2131 2005-03-20 Borut Razem <borut.razem AT siol.net>
2132
2133         * support/scripts/inc2h.pl: WIN32 port
2134
2135 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2136
2137         * device/lib/makefile.in: added abs.c and labs.c
2138
2139 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2140
2141         * device/include/stdint.h: added
2142         * device/lib/abs.c: added
2143         * device/lib/labs.c: added
2144         * device/include/stdlib.h: added abs() and labs() prototypes
2145         * device/lib/libsdcc.lib: added abs and labs
2146         * device/include/float.h,
2147         * device/lib/_fsmul.c,
2148         * device/lib/printf_fast.c,
2149         * device/lib/printf_tiny.c: updated comments
2150
2151 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2152
2153         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2154         bug #1164313
2155
2156 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2157
2158         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2159         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2160
2161 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2162
2163         * device/lib/printf_large.c: removed inline assembly for portability and
2164           readability. Use printf_fast if speed or size are more important.
2165         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2166         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2167
2168 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2169
2170         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2171         prevent compiler warning
2172
2173 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2174
2175         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2176         moved to level 0 and declared as static. Also they are explicit
2177         placed in access bank. This was necessery because some times they
2178         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2179         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2180         optimizations. Currently only compare to unsigned char is implemented,
2181         * src/pic16/gen.c: added fReturnIdx array,
2182         * (struct resolvedIfx) is moved to gen.h and made public,
2183         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2184         * (aopForSym): added an optimization to directly store in stack of
2185         the operand of a SEND iCode,
2186         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2187         but as registers instead (AOP_REG) using the fReturnIdx array,
2188         * (pic16_freeAsmop): remove the freed register from the
2189         _G.sregsAlloc field,
2190         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2191         a compare of 'WREG',
2192         * (pic16_popGetTempRegCond): changed function prototype, now
2193         function takes also a bitVector argument v which holds the current
2194         set of registers that are allocated for stack access by aopForSym,
2195         registers allocated in aopForSym for accessing stack symbols are not
2196         any more part of the functions usedRegs field,
2197         * (genCall): some times aopOp is called for a stack variable to be
2198         send, aopForSym might perform the push, if this is true make sure
2199         that genCall doesn't push the variable twice by testing _G.resDirect,
2200         * (genFunction): changed testing for unspecified interrupt number
2201         from 256 to INTNO_UNSPEC,
2202         * modified selection scheme of frame pointer generation. Previously
2203         if function did use local registers a frame pointer was generated,
2204         now a frame pointer is generated only if function has arguments
2205         (that need PLUSW2 register access), or has stack arguments, or the
2206         compiler is not instructed to omit the frame pointer,
2207         * (genEndFunction): before restoring local registers that were saved
2208         in the function preamble, also restore the registers that *might*
2209         have been allocated for stack access,
2210         * (genRet): removed some old comments,
2211         * (genCmp, the active (RN's) version): added a call to the
2212         pic16_genCmp_special function to perform the compare with a more
2213         robust and optimized way,
2214         * (genInline): a feature has been added in inline code generation,
2215         which allows a wildcard variable substitution when writing inline
2216         assembly. Code is incomplete and experimental therefore undocumented,
2217         * (genCast): changed order of aopOp for result and right to allow
2218         aopForSym to directly load the result if possible,
2219         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2220         perform an optimized compare on some selected special occasions,
2221         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2222         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2223         generate an IVT any more,
2224         * src/pic16/main.c (pic16_optionsTable): added command line option
2225         --optimize-cmp,
2226         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2227         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2228         macros,
2229         * src/pic16/NOTES: Raphael Neider added in list of active developers
2230         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2231         jumptable_end to prevent bug #,
2232         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2233         inCond and outCond fields,
2234         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2235         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2236         turn off register spilling,
2237         * (packRegsForOneUse): synced with other ports' versions although it
2238         is not used currently,
2239         * (pic16_packRegisters): added an optimization while reading
2240         structure bitfields, some registers may be saved (malloc code is
2241         decreased by 80 bytes)
2242
2243 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2244
2245         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2246         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2247         this can be optimized more?
2248
2249 2005-03-10 Raphael Neider <rneider AT web.de>
2250
2251         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2252           genNearPointerGet): (hopefully) fixed access to bitfields via
2253           pointers (p->bitN = x; and x = p->bitN; failed)
2254
2255 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2256
2257         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2258
2259 2005-03-09 Raphael Neider <rneider AT web.de>
2260
2261         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2262
2263 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2264
2265         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2266         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2267           (regTypeNum): set REG_BIT type if necessary
2268         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2269         * support/regression/tests/critical.c: check bug 1144613
2270
2271 2005-03-02 Raphael Neider <rneider AT web.de>
2272
2273         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2274
2275 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2276
2277         * src/avr/ralloc.c (serialRegAssign),
2278         * src/ds390/ralloc.c (serialRegAssign),
2279         * src/hc08/ralloc.c (serialRegAssign),
2280         * src/mcs51/ralloc.c (serialRegAssign),
2281         * src/pic/ralloc.c (serialRegAssign),
2282         * src/pic16/ralloc.c (serialRegAssign),
2283         * src/xa51/ralloc.c (serialRegAssign),
2284         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2285
2286 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2287
2288         * src/SDCCast.c (decorateType): fixed bug 1124787
2289
2290 2005-02-20 Hubert Sack <sack AT digiplan.de>
2291         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2292
2293         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2294         patch #1121755
2295
2296 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2297
2298         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2299         to keep the correct label reference count when adding/removing references
2300         to labels. A peephole file using this is appended to patch #1144962.
2301
2302 2005-02-14 Raphael Neider <rneider AT web.de>
2303
2304         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2305         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2306         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2307           retrievals of result operand's value on assignment
2308
2309 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2310
2311         * device/include/pic16/string.h: modified prototype for memccpy()
2312         to memccpy(void *, void *, char, size_t)
2313         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2314         check whether to omit frame pointer or not,
2315         * (genInline): convert all occurences of "\n" to LF in inline
2316         assembler blocks, this helps formatting the inline text,
2317         * (pic16_loadFSR0): modified prototype,
2318         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2319         removed some 8051 legacy code,
2320         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2321         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2322         before allocating temporary registers in functions,
2323
2324 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2325
2326         * support/regression/tests/bitvars.c: corrected the "fix"
2327
2328 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2329
2330         * support/regression/tests/bitvars.c,
2331         * support/regression/tests/bitwise.c,
2332         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2333
2334 2005-02-10 Raphael Neider <rneider AT web.de>
2335
2336         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2337           different size for Alpha
2338         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2339
2340 2005-02-09 Raphael Neider <rneider AT web.de>
2341
2342         * src/SDCC.lex(doPragma) : save and restore warning options as well
2343           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2344         * have #pragma less_pedantic set the errorlevel to WARNING
2345           (fixes #1117001)
2346         * (cloneOptimize) : fixed wrong malloc's size
2347         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2348           facilitate correct handling of #pragma (save|restore)
2349
2350 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2351
2352         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2353
2354 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2355
2356         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2357
2358 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2359
2360         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2361
2362 2005-02-02 Raphael Neider <rneider AT web.de>
2363
2364         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2365         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2366         * (pic16_storeForReturn): fixed to allow returning function pointers
2367         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2368         * device/include/pic16/{stddef.h,stdbool.h}: added
2369
2370 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2371
2372         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2373
2374 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2375
2376         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2377         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2378          appeared to be required
2379
2380 2005-01-31 Borut Razem <borut.razem AT siol.net>
2381
2382         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2383           include/mcs51 and include/z80 directories to the package
2384
2385 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2386
2387         * src/hc08/gen.c (genFunction): fixed bug #1112752
2388
2389 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2390
2391         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2392
2393 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2394
2395         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2396
2397 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2398
2399         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2400
2401 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2402
2403         * device/include/c8051fxxx.h: removed these 6 files
2404         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2405
2406 2005-01-26 Raphael Neider <rneider AT web.de>
2407
2408         * src/pic16/gen.c (genAssign): fixed assignment from longs
2409           in codespace (were cut to three bytes)
2410         * (genDummyRead): implemented (except for CODESPACE...),
2411           fixed bug #1108575
2412         * src/pic16/glue.c (emitStatistics): beautified
2413         * device/lib/pic16/libm/Makefile: added include path
2414
2415 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2416
2417         * src/z80/gen.c (aopPut): fixed bug #1103902
2418
2419 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2420
2421         * device/lib/expf.c: fixed bug #1095792
2422
2423 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2424
2425         * device/lib/pic16/libm: added Math library sources
2426
2427 2005-01-24 Raphael Neider <rneider AT web.de>
2428
2429         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2430           to enable upcast to pCodeOpReg2 (there is no type tag to
2431           differenciate the two and pic16_popGet2p cast into PCOR2)
2432         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2433           (sizeof(sectNames) changed to sizeof(sectName))
2434           Both patches fix segfaults under MinGW.
2435
2436 2005-01-23 Raphael Neider <rneider AT web.de>
2437
2438         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2439           Safe_[mc]?alloc()'ed variables
2440         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2441           of (byte sized) temporaries (assign them to WREG for now)
2442         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2443           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2444           this might fix SIGSEGVs on MinGW...
2445         * src/SDCCopt.c (killDeadCode): restored original behaviour
2446           (volatile operands might get thrown away though)
2447
2448 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2449
2450         * src/pic16/gen.c: fixed bug #1106975,
2451         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2452         pointer update, INTCON is saved, global interrupts are disabled and
2453         restored after updateing TOS.
2454         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2455         * added function attribute 'shadowregs' to take advantage of shadow
2456         registers,
2457         * added function attribute 'wparam' as an alternative to the wparam
2458         pragma,
2459         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2460         user declares a non-ISR function as 'shadowregs',
2461         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2462
2463 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2464
2465         * .version: bumped version number to 2.4.8
2466         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2467         pic16 port,
2468         * device/lib/pic16/libio/i2c/: I2C module support library,
2469         * device/include/pic16/i2c.h: I2C support library header,
2470         * device/lib/pic16/libc/stdio/: standard IO support sources,
2471         * (printf_small.c): printf_small() source, supports float print,
2472         * (printf_tiny.c): printf_tiny() source, does not support floats,
2473         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2474         enable global optimizations for entire library source, other
2475         Makefiles in the source tree are also modified to reflect this,
2476         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2477         function,
2478         * doc/sdccman.lyx: updated to reflect new changes,
2479         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2480         sym->onStack if-case,
2481         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2482         sbit, idata, _idata, xdata, _xdata,
2483         * added pragma library, to link an external library, (see doc),
2484         * removed command line options, --pomit-config-words, --pomit-ivt,
2485         --pleave-reset-vector,
2486         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2487         when calling assembler to reflect memory model used, also define
2488         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2489         reflect stack model used,
2490         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2491         on stack return NULL,
2492
2493 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2494
2495         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2496           of the operands is volatile. Fixes #1020220
2497
2498 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2499
2500         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2501         * (OptimizeRegUsage): make sure that there is really no other flow where
2502           the first pCode is used
2503
2504 2005-01-22 Raphael Neider <rneider AT web.de>
2505
2506         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2507           to fix #1106967 (pCode->seq are not set up correctly)
2508
2509 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2510
2511         * src/SDCCglue.c (glue): make sure code area is declared before the
2512         static initialization area.
2513
2514 2005-01-21 Raphael Neider <rneider AT web.de>
2515
2516         * device/lib/Makefile.in: fixed test for pic16 install dir
2517         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2518           optimizations
2519         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2520           added --optimize-goto compiler switch and pragma wparam documentation
2521         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2522         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2523           and PRODH closing bug #1071770 (peephole optimizer)
2524
2525 2005-01-19 Raphael Neider <rneider AT web.de>
2526
2527         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2528           cmdLine buffers (used when calling sdcpp...) are large enough
2529           (MAX_PATH=256 truncates arguments leading to system halts when
2530           used in MinGW...)
2531         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2532         * (genUminus): rewritten to for efficiency
2533         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2534           used uninitialized in some cases)
2535         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2536           copy the third byte from the int -- now assumes 0x80 (data memory)
2537         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2538           operands (genAddLit expects the iCode's operands to swapped as
2539           well), fixed leftover bytes (crashed for short left operands)
2540         * (pic16_genMinusDec): performance improvements, removed false
2541           PIC14 emitSKPNCs
2542         * (pic16_genMinus): fixed to cope with differently sized operands
2543         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2544           for --obanksel > 1
2545         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2546         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2547           new banksel optimization
2548         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2549           analysis for temporary registers (segfaults...)
2550         * src/pic16/peeph.def: added rule
2551
2552 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2553
2554         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2555         which converts a float number to its ASCII representation
2556         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2557         functions to convert the fractional and integer part of a float to ASCII,
2558         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2559         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2560         ram
2561         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2562         _STATMEM macros,
2563         * device/include/pic16/adc.h: added GPL info,
2564         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2565         a pCodeOp as tested operand,
2566         * (genNearPointerGet): optimized bit testing, does not use
2567         intermediate register for bit value, test directly instead with
2568         BTFSS, BTFSC, works only for single bits,
2569         * (genpic16Code): dump the name of the iCode in the asm,
2570         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2571         renamed to pic16_decodeOp,
2572         * (serialRegAssign): do not allocate a temporary register for iCode
2573         sequences that test a single bit for 1/0
2574
2575 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2576
2577         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2578         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2579         access stack and frame pointers. They are initially assigned to
2580         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2581         accessing SFRs. Updated all occurences of modification of stack or
2582         frame pointer in gen.c and pcode.c,
2583         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2584         assigning of a literal value to pointers,
2585         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2586         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2587         selected
2588
2589 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2590
2591         * doc/sdccman.lyx: update documentation about stack pragma, added
2592         some info for stack memory models
2593
2594 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2595
2596         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2597
2598 2005-01-08 Raphael Neider <rneider AT web.de>
2599
2600         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2601           udata sections to fix bug #1097823
2602
2603 2005-01-05 Raphael Neider <rneider AT web.de>
2604
2605         * src/pic16/gen.c (genGenericShift): added handling of differently
2606           sized left operand and result
2607
2608 2005-01-04 Raphael Neider <rneider AT web.de>
2609
2610         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2611         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2612           to hold the condition bit)
2613         * added new version of genCmp (old code available via #define)
2614         * added new version of genShiftLeft/genShiftRight in a generic
2615           way, now supports shifting by negative values
2616         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2617           shiftCount (expected by genGenericShift)
2618         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2619         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2620           dump
2621         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2622           is an invalid literal too...)
2623
2624 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2625
2626         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2627         from Raphael Neider,
2628         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2629         for 8-bit literals. This fixes some literal operands which are sign
2630         extended to 16-bits ints when instruction needs only 8-bits.
2631
2632 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2633
2634         * device/lib/logf.c: added mcs51 assembly version
2635         * device/lib/expf.c: added mcs51 assembly version
2636         * device/lib/_logexpf.c: new shared asm code for expf and logf
2637         * device/include/math.h: add defines for assembly math library
2638         * device/lib/Makefile.in: build new _logexpf.c
2639         * device/lib/libfloat.lib: use new _logexpf.c
2640
2641 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2642
2643         * src/pic/device.c
2644         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2645           device types which have less than 0x7f registers.
2646
2647 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2648
2649         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2650
2651 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2652
2653         * device/lib/printf_fast.c: only build on supported arch.
2654         * device/lib/printf_tiny.c: only build on supported arch.
2655         * device/lib/printf_fast_f.c: only build if asm float lib
2656         * device/lib/_fsget1arg.c: only build if asm float lib
2657         * device/lib/_fsget2args.c: only build if asm float lib
2658         * device/lib/_fsnormalize.c: only build if asm float lib
2659         * device/lib/_fsreturnval.c: only build if asm float lib
2660         * device/lib/_fsrshift.c: only build if asm float lib
2661         * device/lib/_fsswapargs.c: only build if asm float lib
2662         * device/include/stdio.h: don't provide print_fast,
2663           print_fast_f, print_tiny prototypes if --xstack used
2664
2665 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2666
2667         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2668         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2669           to the SOURCES
2670
2671 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2672
2673         * device/lib/printf_fast_f.c: same as printf_fast, but
2674           with floating point enabled
2675         * device/lib/printf_fast.c: minor tweaks
2676         * device/include/stdio.h: add printf_fast_f
2677
2678 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2679
2680         * src/SDCCmain.c: make --float-reent default for mcs51
2681         * device/lib/_fsadd.c: added mcs51 assembly version
2682         * device/lib/_fssub.c: added mcs51 assembly version
2683         * device/lib/_fsmul.c: added mcs51 assembly version
2684         * device/lib/_fsdiv.c: added mcs51 assembly version
2685         * device/lib/_fseq.c: added mcs51 assembly version
2686         * device/lib/_fsneq.c: added mcs51 assembly version
2687         * device/lib/_fsgt.c: added mcs51 assembly version
2688         * device/lib/_fslt.c: added mcs51 assembly version
2689         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2690         * device/lib/Makefile.in: add _fscmp to build
2691         * device/lib/libfloat.lib: add _fscmp to build
2692
2693 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2694
2695         * device/lib/_fs2slong.c: added mcs51 assembly version
2696         * device/lib/_fs2sint.c: added mcs51 assembly version
2697         * device/lib/_fs2schar.c: added mcs51 assembly version
2698         * device/lib/_fs2ulong.c: added mcs51 assembly version
2699         * device/lib/_fs2uint.c: added mcs51 assembly version
2700         * device/lib/_fs2uchar.c: added mcs51 assembly version
2701         * device/lib/_slong2fs.c: added mcs51 assembly version
2702         * device/lib/_sint2fs.c: added mcs51 assembly version
2703         * device/lib/_schar2fs.c: added mcs51 assembly version
2704         * device/lib/_ulong2fs.c: added mcs51 assembly version
2705         * device/lib/_uint2fs.c: added mcs51 assembly version
2706         * device/lib/_uchar2fs.c: added mcs51 assembly version
2707         * device/include/float.h: added #define to select asm vs c
2708
2709 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2710
2711         * device/lib/printf_fast.c: improvements to float output
2712         * device/include/float.h: add defines for assembly float library
2713         * device/lib/_fsget1arg.c: receive 1 float arg
2714         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2715         * device/lib/_fsnormalize.c: normalize a float
2716         * device/lib/_fsreturnval.c: return float, various helper routines
2717         * device/lib/_fsrshift.c: right shift a float's mantissa
2718         * device/lib/_fsswapargs.c: swap 2 floats
2719         * device/lib/Makefile.in: build these 6 new files for mcs51
2720         * device/lib/libfloat.lib: add these 6 files to the library
2721
2722 2004-12-26 Borut Razem <borut.razem AT siol.net>
2723
2724         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2725           built by gcc 3.4.2
2726
2727 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2728
2729         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2730           and fully reentrant and register bank neutral.
2731         * device/lib/printf_fast.c: added float (not enabled by default),
2732           added compact/slower integer (also not enabled by default),
2733           improved size/speed of fast integer code, other minor changes
2734         * device/include/stdio.h, device/lib/Makefile.in,
2735           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2736
2737 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2738
2739         * src/pic16/pcode.c: declaring variables other than at the start of a
2740           block is not supported in C by VC6.
2741
2742 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2743
2744         * applied a previous patch from Raphael Neider that wasn't included
2745         in the previous commits, which fixes infinite loops within jumptable
2746         improvements,
2747         * made some fixes that previous patches introduced
2748
2749 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2750
2751         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2752         that fixes an issue with AOP_PCODE asmop's offset,
2753         * (pic16_popCopyReg): update instance field too,
2754         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2755         function of pic port,
2756         * (genCmp, genAnd, genAssign),
2757         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2758
2759 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2760
2761         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2762         variables initial values to idata section,
2763         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2764         variables in some functions. This utilizes parmBytes field of iCode
2765         structure to hold the offset of the variable in stack. (might be
2766         able to use the stack field too?)
2767         * applied patch from Raphael Neider # ### , # ###
2768         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2769         variable initial values in idata section,
2770         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2771         for static variables with initial value
2772         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2773         applied fix in while loop from Raphael Neider.
2774
2775 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2776
2777         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2778         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2779         * src/ds390/ralloc.c (serialRegAssign): spill bits
2780         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2781         * support/Util/SDCCerr.c,
2782         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2783         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2784         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2785
2786 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2787
2788         * device/include/sdcc-lib.h: inserted LGPL, added includes
2789           asm/ds390/features.h and asm/mcs51/features.h
2790         * device/include/asm/default/features.h,
2791         * device/include/asm/gbz80/features.h,
2792         * device/include/asm/z80/features.h: added empty _AUTOMEM
2793           and _STATMEM
2794         * device/include/asm/ds390/features.h,
2795         * device/include/asm/mcs51/features.h: added files with defines for
2796           _AUTOMEM and _STATMEM indicating automatic and static storage class
2797         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2798         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2799         * src/SDCCicode.c (geniCodeCast),
2800         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2801         * src/SDCCloop.c (loopInduction): removed unused variable lr
2802         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2803           to convertToFcall to include char modulo (RFE 1065037), added check
2804           if left operand is unsigned and use abs of literal value
2805         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2806           as it doesn't work after conversion from peephole.def to peephole.rul
2807         * src/mcs51/gen.c (toBoolean): added check for size,
2808           (genModOneByte): optimized code for signed char modulo a literal
2809           power of 2 (thanks to Hubert Sack),
2810           (genRRC): removed unnecessary "clr c",
2811           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2812         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2813           jump optimization,
2814           swapped rules 256.c and 256.d,
2815           extended 256.d by using new multiple checks (thanks Erik),
2816           added rules 256.e and 256.f,
2817           updated rule 261.a and 261.b to new generated code
2818         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2819
2820 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2821
2822         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2823           induction related bugs, including first part of bug #1074377
2824
2825 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2826
2827         * applied patch from bug-report #1076292,
2828         * applied patches for genAnd and Goto-optimizations for Raphael
2829         Neider,
2830         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2831         dump a less iCode information,
2832         * src/pic16/device.h (pic16_options_t): added field debgen,
2833         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2834         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2835         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2836         puclic,
2837         * (various functions): added macros FENTRY and FENTRY2 to functions,
2838         to emit function prologue,
2839         * (various functions): fixed indentation,
2840         * (genNearPointerGet): fixed loading of FSR0,
2841         * (genPackBits): applied patch from Raphael Neider to fix updating
2842         of FSR0 and touching only the modified bits,
2843         * src/pic16/genarith.c (various functions): added macros FENTRY to
2844         emit function prologue in comments,
2845         * src/pic16/pcode.h: added functions debugf2, debugf3,
2846         * src/pic16/ralloc.c: partial fix for packForPush caused
2847         segmentation fault,
2848
2849 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2850
2851         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2852           <stsp AT users.sourceforge.net> with reversed byte order
2853         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2854
2855 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2856
2857         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2858           bug #1074377
2859         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2860         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2861
2862 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2863
2864         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2865
2866 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2867
2868         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2869           conditions,
2870           (setFromConditionArgs): friendly operand parser for peephole rules,
2871           (operandBaseName, operandsNotRelated): new peephole condition
2872           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2873           architecture specific register naming into account, handles n-way
2874           comparisons, and supports quoted literals
2875         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2876
2877 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2878
2879         * src/mcs51/peeph.def: fixed bug #1076940
2880
2881 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2882
2883         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2884
2885 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2886
2887         Adding support for replacing ljmps with sjmps in jumptables
2888         generated for switch statements. For now you need to set the
2889         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2890         Now 4 algorithms for mcs51 jumptable generation are used:
2891         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2892         addresses loaded pc-relative for up to 112 cases and stack-pushing
2893         target addresses loaded with offset from dptr for up to 256 cases.
2894
2895         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2896         * src/mcs51/main.c: adapted constants for switch table generation
2897         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2898
2899 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2900
2901         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2902         * support/regression/tests/bug1057979.c: added test for bug 1073386
2903
2904 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2905
2906         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2907         compilers
2908
2909 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2910
2911         * src/pic16/device.h,
2912         * src/pic16/genarith.c,
2913         * src/pic16/glue.c,
2914         * src/pic16/main.c,
2915         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2916
2917 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2918
2919         Large cummulative patch for pic16 port.
2920         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2921         to call when a stack overflow occurs,
2922         * (malloc.h): added CVS Id tag,
2923         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2924         variable,
2925         * added libc directory. The current version of LibC contains string
2926         functions, ctype functions and macros and some functions of the
2927         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2928         be extensively tested in the future. Standard disclaimer here.
2929         Library is not automatically build yet. But one can build it by
2930         invoking 'make' inside the libc directory.
2931         * added ADC library under libio. Preliminary version yet.
2932
2933         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2934         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2935         aopForRemat() now and not by pic16_aopOp(),
2936         * (pic16_popGetTempReg): removed warning messgae when allocating
2937         temporary registers, its a buggy feature and will be removed,
2938         * (pic16_popGet): set register instance field in AOP_CRY,
2939         * (pic16_outBitC): fixed for results in size greater than 1,
2940         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2941         * (pic16_storeForReturn): optimized return of 0,
2942         * (genCmp): experimental code for new genCmp which uses PIC18's
2943         special compare&skip instructions. Initial tests fail some times
2944         with variables grater than 1 byte in size, so new code is disabled,
2945         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2946         a single bit,
2947         * (genCast): began a fix to optimize the casting of a bit to another
2948         bit, now assigning a bitfield to another bitfield will fail, sorry,
2949         * src/pic16/main.c: disabled the use of lr-support feature,
2950         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2951         * added some function prototypes, added function _debugf prototype,
2952         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2953         bits with offset (case PO_GPR_BIT),
2954         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2955         command line,
2956         * (isBankInstruction): modified to return 0 for no banking instruction,
2957         and 1 for banking instruction,
2958         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2959         caused stop processing pCodes after a inline assembly block,
2960         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2961         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2962         registers when it shouldn't,
2963         * src/pic16/ralloc.c (allocReg): add preliminary support for
2964         supporting a limited set of temporary registers,
2965
2966 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2967
2968         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2969           genDataPointerSet): ensure assignments always copy in MSB to LSB
2970           order,
2971           (loadRegFromAop): recognize CLRH optimization,
2972           (genFunction): optimize RECEIVE iCodes in reentrant functions
2973
2974 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2975
2976         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2977           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2978           selected.
2979         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2980         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2981           contiguous with data
2982
2983 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2984
2985         * device/lib/_gptrget.c (_gptrget),
2986         * device/lib/_gptrgetc.c (_gptrgetc),
2987         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2988           instead of sjmp to ret
2989         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2990           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2991
2992 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2993
2994         * .version: bumped version to 2.4.7
2995         * device/lib/_gptrget.c (_gptrget): is now _naked
2996         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2997         * device/lib/_gptrput.c (_gptrput): is now _naked
2998         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2999           (createFunction): fixed xstack
3000         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3001         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3002           or bit either,
3003           (geniCodeCritical): store original interrupt state in an iTemp bit
3004           var unless stack-auto
3005         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3006         * src/SDCCmain.c (setIncludePath): added include/target to search path
3007         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3008         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3009           prototype,
3010           (processFuncArgs): put bit vars in bit area
3011         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3012           unsaveRBank): fixed xstack,
3013           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3014           (genFunction, genEndFunction): fixed xstack,
3015           (genAssign): optimization don't walk backwards through mem
3016         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3017         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3018         * support/regression/Makefile: also make library (for stack-auto) when
3019           making "all" and added "test-mcs51-xstack-auto"
3020         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3021         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3022         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3023         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3024         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3025           make-library by MAKE_LIBRARY
3026         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3027           regression tests for xstack
3028         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3029         * support/regression/tests/critical.c: test for critical on mcs51
3030
3031 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3032
3033         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3034           built version of sdcc instead of installed version
3035
3036 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3037
3038         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3039         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3040           vprintf.c now
3041         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3042         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3043           WARNING: remove device/lib/build/z80/printf.o by hand when
3044           updating from previous build!
3045         * device/lib/z80/printf.c: updated comment
3046         * support/regression/tests/bug1057979.c: test all ports now
3047         * support/regression/tests/bug1065458.c: file added
3048
3049 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3050
3051         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3052           *_start and *_end symbols for static functions
3053
3054 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3055
3056         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3057           and search crt0.o in all library paths,
3058           (setIncludePath): proper handling of --nostdinc,
3059           (setLibPath): proper handling of --nostdlib
3060         * support/regression/Makefile,
3061         * support/regression/ports/ds390/spec.mk,
3062         * support/regression/ports/gbz80/spec.mk,
3063         * support/regression/ports/hc08/spec.mk,
3064         * support/regression/ports/mcs51/spec.mk,
3065         * support/regression/ports/mcs51-large/spec.mk,
3066         * support/regression/ports/mcs51-stack-auto/spec.mk,
3067         * support/regression/ports/z80/spec.mk: use include and lib files from
3068           built version of sdcc instead of installed version
3069         * doc/sdccman.lyx: fixed typo in --nostdinc
3070
3071 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3072
3073         * src/pic/pcode.c,
3074         * src/pic/device.c,
3075         * src/pic/ralloc.c,
3076         * src/pic/gen.c : added support to generate code for struct bit fields.
3077
3078 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3079
3080         * as/xa51/xa_version.h,
3081         * device/include/errno.h,
3082         * device/include/regc515c.h,
3083         * device/lib/_itoa.c,
3084         * device/lib/_ltoa.c,
3085         * device/lib/ser_ir_cts_rts.c,
3086         * sim/ucsim/xa.src/glob.cc,
3087         * sim/ucsim/xa.src/inst_gen.cc,
3088         * sim/ucsim/xa.src/xa_bit.cc,
3089         * sim/ucsim/xa.src/xa_sfr.cc,
3090         * sim/ucsim/z80.src/inst_dd.cc,
3091         * sim/ucsim/z80.src/inst_fdcb.cc,
3092         * support/scripts/keil2sdcc.pl,
3093         * src/pic16/pic16.dsp,
3094         * src/pic16/pic16a.dsp: corrected cvs line endings
3095         * device/lib/printf_large.c: fixed bug 1057979
3096         * src/pic16/gen.c: fixed non-C standard code
3097         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3098         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3099         * support/regression/ports/mcs51/support.c: reload T1 asap
3100         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3101           pdata use and clear idata startup behaviour
3102         * support/regression/tests/bug1057979.c: added
3103
3104 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3105
3106         * device/examples/ds390/ow390/ad26.h,
3107         * device/examples/ds390/ow390/cnt1d.h,
3108         * device/examples/ds390/ow390/crcutil.c,
3109         * device/examples/ds390/ow390/ownet.h,
3110         * device/examples/ds390/ow390/owsesu.c,
3111         * device/examples/ds390/ow390/swt12.h,
3112         * device/examples/ds390/ow390/swtoper.c,
3113         * device/examples/ds390/ow390/temp10.h,
3114         * device/examples/ds390/ow390/thermodl.c,
3115         * device/examples/ds390/tinitalk/tinitalk.dsp,
3116         * device/examples/ds390/tinitalk/tinitalk.dsw,
3117         * device/examples/mcs51/clock/hw.h,
3118         * device/examples/mcs51/simple2/go.bat,
3119         * device/examples/serialcomm/windows/serial.h,
3120         * device/examples/xa51/dummy.c,
3121         * device/examples/xa51/hello.c,
3122         * device/include/80c51xa.h,
3123         * device/include/at89x051.h: corrected cvs line endings
3124
3125 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3126
3127         * src/pic16/main.c (options): added command line --gstack, to trace
3128         stack over/under flows,
3129         * added pragma 'wparam' to allow passing first byte of function
3130         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3131         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3132         call to __gstack_test function and sets up the symbol as extern,
3133         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3134         * popaop): added call to pic16_testStackOverflow,
3135         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3136         wparamList list,
3137         * (genCall, genPcall): now all parameters are passed via stack
3138         except in functions that are pass to wparam pragma in which WREG is
3139         used too,
3140         * (genPcall): REENTRANT flag is checked to see if variable prototype
3141         contains reentrant keyword, don't call a non-reentrant function, via
3142         a reentrant function pointer or vice versa, functions are never
3143         passed via WREG,
3144         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3145         D.Winkler,
3146         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3147         SIGSEGV when accessing a NULL register stucture,
3148         * (pic16_printGPointerType): modified to handle UPPER modifier for
3149         function initializers, changed prototype of function to simpler one,
3150         * (pic16_printIvalFuncPtr): check to see if function is already
3151         added in externs list,
3152         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3153         optimized a move from W to SFR with a move to the same register
3154         later after a CALL,
3155         * device/lib/pic16/debug: NEW directory, contains debug features
3156         which are enabled when linking with libdebug.lib, currently command
3157         line option --gstack enables stack pointer tracing for over/under
3158         flow, corresponding sources are in debug/gstack
3159
3160 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3161
3162         * doc/sdccman.lyx: updated SDCC version,
3163         * (PIC16 port): update list of command line options,
3164         * src/pic16/device.h (structure pic16_options_t): added field gstack
3165         to enable stack overflow tracing on push/pops,
3166         * src/pic16/device.c (statistics structure): added statistics
3167         structure,
3168         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3169         pic16_dump_int_registers): increase statistics counters for each
3170         * variable which is encountered
3171         * (pic16_dump_usection): emit each .udata variable to its own udata
3172         section,
3173         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3174         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3175         parameters via stack, otherwise use old scheme,
3176         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3177         assembler output file,
3178         * src/pic16/main.c: added command line options --gstack to enable
3179         push/pop tracing for stack overflow,
3180         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3181         instructions): added size of each instruction,
3182         * (pic16_countInstruction): estimate size of instructions in
3183         the_pFile list, inline assembly blocks are not counted,
3184         * (pic16_FixRegisterBanking): trace previous register usage, when
3185         banksel optimizations is greater than 0, don't emit a redudant
3186         banksel directive,
3187
3188 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3189
3190         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3191         * src/pic16/ralloc.c : applied same fix for pic16.
3192         * src/pic/gen.c : tidied it up a little.
3193
3194 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3195
3196         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3197         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3198
3199 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3200
3201         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3202
3203 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3204
3205         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3206         non-reentrant function __modsint in the interrupt function (thus
3207         corrupting math operations during serial I/O)
3208         * device/lib/ser_ir.c: as above, changed buffersize
3209         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3210         256.c,d for zeroing
3211         * doc/Makefile: added option -t for rsync
3212
3213 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3214
3215         * src/SDCCast.h (struct ast),
3216         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3217
3218 2004-10-20 Borut Razem <borut.razem AT siol.net>
3219
3220         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3221         package
3222
3223 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3224
3225         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3226         makefile targets,
3227         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3228         support functions to replace long sequences of MOVFF's from access
3229         bank registers to stack and vice versa,
3230         * src/pic16/device.h: added new field opt_flags, where optimization
3231         flags can be set to enable certain features,
3232         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3233         * pBlock, (genFunction, genEndFunction): surroung loop for
3234         saving/loading used registers in stack with PC_INFO pCodes,
3235         INF_LREGS. Code in between can then be optimized by pCode optimizer
3236         to support function calls,
3237         * (genDataPointerSet): fixed bug which loaded float fields in
3238         structures with corrupt data,
3239         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3240         in a standard way debug info on stderr. Feature used for developing
3241         and debugging only,
3242         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3243         obsolete chunks of code,
3244         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3245         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3246         * pic16/src/pcode.c (pic16_newpCodeInfo,
3247         * (pic16_newpCodeOpLocalRegs),
3248         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3249         feature,
3250         * (pic16_pCodeConstString): printing of the initial value of a
3251         symbol as a comment is inhibited since parsing was already done by
3252         copyStr and output is corrupt,
3253         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3254
3255 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3256
3257         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3258
3259 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3260
3261         * as/mcs51/lkarea.c: removed old K&R style,
3262           (lnksect): changed check on boundary error,
3263           (lnksect2): changed check on boundary error,
3264           (lnksect2): extend XSTK to end of page if size = 1
3265         * as/mcs51/lkmain.c: removed old K&R style,
3266           (Areas51): create l_IRAM symbol
3267         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3268         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3269           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3270         * device/lib/_mullong.c: added version to be compiled with xstack
3271         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3272         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3273         * device/lib/mcs51/crtxstack.asm: fixed comment
3274         * src/SDCCglue.c: maxInterrupts defaults to 0,
3275           (emitMaps): added pdata,
3276           (createInterruptVect): (re)moved default,
3277           (glue): added pdata,
3278           (glue): moved __start__xstack to XSTK with default size 1
3279         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3280           and options.float_rent when options.stackAuto is set,
3281           (linkEdit): only write XDATA_NAME if provided on command line
3282         * src/SDCCmem.h,
3283         * src/SDCCmem.c: added pdata
3284         * src/port.h: added pdata_name to PORT
3285         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3286           (saveRegisters, unsaveRegisters): removed usage of B,
3287           (genMinus): fixed accumulator clash,
3288           (genJumpTab): added comment, this needs another look
3289         * src/mcs51/gen.c: added check for "B in use" paranoia,
3290           added pushB() and popB()
3291         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3292           chance
3293         * src/avr/main.c,
3294         * src/ds390/main.c,
3295         * src/hc08/main.c,
3296         * src/mcs51/main.c,
3297         * src/pic/main.c,
3298         * src/pic16/main.c,
3299         * src/xa51/main.c,
3300         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3301           added PSEG (PAG,XDATA) or NULL to port specifier
3302         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3303         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3304           (_mcs51_genInitStartup): removed __start__xstack equ,
3305           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3306         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3307         * src/z80/gen.c (_rleAppend): fixed warnings
3308         * support/regression/tests/zeropad.c: added pdata test
3309         * .version: bumped to 2.4.6
3310
3311 2004-10-17 Borut Razem <borut.razem AT siol.net>
3312
3313         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3314         as a part of nightly build
3315
3316 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3317
3318         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3319         WREG holds the first byte function parameters,
3320         * (aopForSym): take special case for symbols which are in FARSPACE
3321         but in CODESPACE too,
3322         * (assignResultValue): modified to take into account _G.useWreg,
3323         * (genCall): don't use wreg for parameter passing when function is
3324         declared as reentrant, too, added optimization INCF to stack
3325         pointer when stack parameter count is 1,
3326         * (genFunction, genEndFunction): refurnished and fixed to not using
3327         wreg for passing parameters when function has varargs or is
3328         reentrant, fixed bug with symbol name compare for generating
3329         functions in absolute address,
3330         * (pic16_storeForReturn): refurnished,
3331         * (genCmp): began writing a new version of the function, not ready
3332         yet, therefore it is disabled,
3333         * (genAssign): do not read code memory when assigning a function to
3334         a pointer function,
3335         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3336         array of characters, not pointer,
3337         * (pic16initialComments): in debug mode emit an .ident directive for
3338         the assembler,
3339         * (_process_pragma): emit a new warning type (internal to pic16)
3340         when setting stack to default length, emit a similar warning when
3341         placing a function at absolute address and address is not word aligned
3342         * (_pic16_parseOptions): added 'return TRUE' statement,
3343         * (_pic16_linkEdit): if compiling a source, then add the source's
3344         file object, first in the list of objects to link,
3345
3346 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3347
3348         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3349         * src/pic/main.c : removed VC warning.
3350         * src/pic/gen.c : changed comment.
3351
3352 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3353
3354         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3355         reference to a deprecated symbol _GPTRREG was causing failure to
3356         link. Thanks G. M. Gallant for the info.
3357
3358 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3359
3360         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3361         comments for Bugs item #954788.
3362
3363 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3364
3365         * src/pic16/device.c (pic16_dump_gsection,
3366         * pic16_groupRegistersInSection): handle symbols declared to be in
3367         access bank differently,
3368         * src/pic16/gen.c (struct _G): added field resDirect,
3369         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3370         send values read from stack directly to result and don't allocate
3371         temporary values,
3372         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3373         same registers,
3374         * (pic16_sameRegsOfs): NEW,
3375         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3376         free because they were not allocated from temporary pool,
3377         * pic16_popRegFromString): workaround to fix a problem with
3378         allocating variables twice or never,
3379         * (genGenPointerGet): using PRODL instead of FSR0H,
3380         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3381         instead of FSR0H,
3382         * (genAssign): take advantage of the _G.resDirect flag,
3383         * (genCast): around line 11844, use mov2f instead of directly
3384         MOVFF'ing between operands to account for literal values,
3385         * src/pic16/genutils.c: some new debug functions for gpsim have been
3386         added,
3387         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3388         float with integer part only,
3389         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3390         place variables in access bank
3391         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3392         updated sources to reflect recent changes in gen.c
3393
3394 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3395
3396         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3397         sources that searched for headers in installation path, now the
3398         device/include/pic16 is used,
3399         * src/pic16/glue.c (pic16glue),
3400         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3401         .line directives if not in debug mode, this suppresses assembler's
3402         warnings for ignored directives
3403
3404 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3405
3406         * src/port.h: made reset_regparms prototype void parameter explicit.
3407         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3408         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3409         * doc/sdccman.lyx: documented warning disabling and how to use
3410           printf_large to make it print floats.
3411         * device/include/stdbool.h: NEW
3412         * device/lib/_atof.c,
3413         * device/lib/_divuint.c,
3414         * device/lib/_divulong.c,
3415         * device/lib/expf.c,
3416         * device/lib/printf_large.c,
3417         * device/lib/sincosf.c,
3418         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3419         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3420           a completely reentrant lib.
3421
3422 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3423
3424         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3425         * device/include/pic16/stdio.h: fixed bug with colon
3426
3427 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3428
3429         * device/include/pic16/stdio.h,
3430         * device/include/pic16/stdlib.h,
3431         * device/include/pic16/math.h: NEW
3432         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3433         declared as _naked to reduce overhead
3434         * device/lib/Makefile.in (target port-specific-objects-pic16):
3435         changed * to *.* so to ignore the CVS directory,
3436         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3437         stacked variables back in stack,
3438         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3439         corruption
3440
3441 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3442
3443         * .version: bumped version number to 2.4.5
3444         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3445         * support/Util/SDCCerr.c (messages structure): added entry for
3446         W_POSSBUG2
3447
3448         Large cumulative patch for pic16 port and libraries.
3449         * device/include/pic16/sdcc-lib.h,
3450         * device/include/pic16/stdarg.h,
3451         * device/include/asm/pic16/features.h,
3452         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3453         * device/include/pic16/float.h: changes reentrant keyword with
3454         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3455         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3456         updated target build-libraries to include objects from gptr,
3457         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3458         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3459         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3460         all function headings,
3461         * src/SDCCmain.c: added global parameter userIncDirsSet,
3462         * (parseCmdLine): when option -I is encountered add directory to
3463         userIncDirsSet too,
3464         * src/version.awk: added space between control and long,
3465         * src/pic16/NOTES: added some notes for the port,
3466         * src/pic16/gen.c: added prototype for mov2fp function,
3467         * (fReturnpic16[]): properly named return value registers,
3468         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3469         * (aopForSym): added code to handle symbols with onStack flag set,
3470         symbols onStack are allocated PTRSIZE bytes,
3471         * (aopFreeAsmop): handles special case where asmops are stack objects,
3472         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3473         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3474         added argument lock to trace flaws in allocating temporary registers
3475         when developing port,
3476         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3477         * (pic16_popRegFromString): reenabled allocating a direct register
3478         from string,
3479         * (assignResultValue): various beautifications,
3480         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3481         referenced function argument,
3482         * (genIpush): reenabled to allow stacked arguments, handles only
3483         ic->parmPush iCodes,
3484         * (genCall, genPcall): major changes to allow for variable argument
3485         functions, fixed a bug with falsely restoring stack pointer after
3486         returning from call,
3487         * (genFunction): pending code for critical function,
3488         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3489         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3490         * (genNearPointerGet): fixed bug with indirect reading, was always
3491         reading from INDF0
3492         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3493         pointers,
3494         * (genAddrOf): rewrote code to take address of a stacked function parameter
3495         * (genCast): fixed casting to generic pointer type,
3496         * src/pic16/gen.h: added AOP_STA,
3497         * (struct asmop): added field stk,
3498         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3499         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3500         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3501         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3502         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3503         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3504         generic pointers,
3505         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3506         and library paths,
3507         * (pic16_port structure): generic pointer size is set to 3,
3508         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3509         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3510         compiler warning,
3511         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3512         operand is an iTemp,
3513
3514 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3515
3516         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3517         * debugger/mcs51/simi.c: addapt new syntax of s51
3518
3519 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3520
3521         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3522         * src/pic16/pcode.c: commented out some calls to free() in order to
3523         fix bug #989576,
3524
3525 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3526
3527         * src/SDCCicode.h,
3528         * src/SDCCicode.c (isiCodeInFunctionCall),
3529         * src/avr/ralloc.c (selectSpil),
3530         * src/pic/ralloc.c (selectSpil),
3531         * src/pic16/ralloc.c (selectSpil),
3532         * src/ds390/ralloc.c (selectSpil),
3533         * src/hc08/ralloc.c (selectSpil),
3534         * src/xa51/ralloc.c (selectSpil),
3535         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3536         stack in the middle of a function call sequence (fixes bug #1020268)
3537         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3538         costs associated with the minimum switch case.
3539
3540 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3541
3542         * src/SDCC.lex: fixed bug #1030549
3543
3544 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3545
3546         * src/SDCCcse.h (struct cseDef),
3547         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3548         over a function call if the CSE is derived from a symbol whose
3549         address has been taken (fixes bug #1029883)
3550         * support/regression/tests/bug-1029883: a new regression test for
3551         this bug
3552
3553 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3554
3555         * src/hc08/gen.c (emitinline): fixed bug #1029778
3556         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3557         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3558         and starts toward RFE #905167)
3559
3560 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3561
3562         * src/pic16/gen.c (mov2f): New function to move an operand to
3563         another without considering if it is a literal or a register,
3564         * (pic16_sameRegs): don't check if they are both AOP_REG,
3565         * (AccRsh): removed andmask=0 lines,
3566         * (genLeftShift): duplicated to be improved in future versions,
3567         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3568         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3569         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3570         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3571         * (insertBankSwitch): fixed inserting banksel directives algorithm
3572         for instructions that follow a skip instruction, this fixes a report
3573         for broken subtraction code generation,
3574         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3575         iCode is a left op, just in case result and right share the same
3576         registers
3577
3578 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3579
3580         * src/hc08/main.c,
3581         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3582         preservation of HX
3583         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3584         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3585         on 2004-09-12; it was buggy
3586
3587 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3588
3589         * src/SDCCsymt.h: removed RESULT_CHECK
3590         * src/SDCCast.c,
3591         * src/SDCCglue.c,
3592         * src/SDCCval.c,
3593         * src/pic/glue.c,
3594         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3595
3596 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3597
3598         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3599         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3600         configuration values no more rejected by compiler, they are assigned
3601         to configuration registers with a warning message instead,
3602         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3603         the for-loop so last conf register is emitted too,
3604         * (_pic16_initPaths): link library libsdcc.lib by default,
3605         * (_hasNativeMulFor): modified test for multiplication according to
3606         Raphael Neider's remarks. Integer multiplication is also done with
3607         support functions,
3608         * device/include/pic16/pic18fregs.h: corrected type error in while
3609         testing and including 18f6720 header file
3610
3611 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3612
3613         * src/pic16/device.h (pic16_options): removed field use_crt,
3614         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3615         until an optimization to handle single bits is added,
3616         * (pic16_loadFSR0): moved before genUnpackBits,
3617         * (genAnd): some white lines removed,
3618         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3619         leave_reset flags in pic16_options when using crt modules,
3620
3621 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3622
3623         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3624           for bugs 898889 & 979599. Also used some safer print instructions.
3625
3626 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3627
3628         * src/pic16/device.h (pic16_options_t): added field use_crt,
3629         crt_name, no_crt,
3630         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3631         catch a probable future bug,
3632         * src/pic16/gen.c: aopIdx function commented out,
3633         * (genAssign): commented out old code which used aopIdx,
3634         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3635         code, added if conditionals to take into account the --use-crt
3636         command line options,
3637         * src/pic16/main.c (pic16_optionsTable): added new command line
3638         options, --use-crt= and --no-crt,
3639         * (_pic16_linkEdit): now the proper crt object is added in the
3640         linker command line except than when --no-crt is specified,
3641         * src/pic16/pcode.c,
3642         * src/pic16/pcode.h: added some structures and functions for a new
3643         optimization scheme to compansate for instruction overhead between
3644         same iCodes, this scheme is currently under development and is not
3645         working in any way,
3646         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3647         to && operator,
3648         * device/lib/pic16/startup/crt0i.c,
3649         * device/lib/pic16/startup/crt0iz.c: added global char variable
3650         __uflags to force the generation of an idata section
3651
3652 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3653
3654         * doc/Makefile,
3655         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3656         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3657
3658 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3659
3660         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3661         Frieder) and clarified the default code optimization mode
3662
3663 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3664
3665         * src/SDCC.lex (doPragma, process_pragma),
3666         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3667         "opt_code_size", and "opt_code_balanced"
3668         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3669         regrouped options by category, added support for category headers
3670         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3671         and "--opt-code-size"
3672         * doc/sdccman.lyx: documented these new options and pragmas
3673         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3674         preference into account
3675
3676 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3677
3678         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3679           geniCodePreDec): Fixed bug 904237 by generating a warning
3680         * src/SDCCerr.h,
3681         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3682
3683 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3684
3685         * src/pic/device.c : When no max ram set validate full memory range.
3686         * src/pic/pcode.c,
3687         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3688
3689 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3690
3691         * device/lib/_gptrget.c,
3692         * device/lib/_gptrput.c: updated comment
3693         * device/lib/calloc.c,
3694         * device/lib/free.c,
3695         * device/lib/malloc.c,
3696         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3697         * src/SDCCcse.c (cseBBlock),
3698         * src/SDCCicode.c (printOperand, geniCodeArray),
3699         * src/SDCCicode.h (struct operand): fixed bug 868103
3700         * support/regression/tests/bug-868103.c: added
3701         * src/SDCCast.c (searchLitOp),
3702         * src/SDCCcse.h (struct cseDef),
3703         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3704         * src/SDCCicode.h (struct operand),
3705         * src/SDCCsymt.h (struct sym_link),
3706         * src/avr/gen.c (hasInc),
3707         * src/ds390/gen.c (hasInc),
3708         * src/hc08/gen.c (genPlusIncr, hasInc),
3709         * src/mcs51/gen.c (hasInc),
3710         * src/pic16/glue.c (pic16_printIvalChar),
3711         * src/pic16/ralloc.c (regWithIdx),
3712         * src/xa51/gen.c (hasInc) : removed warnings
3713         * src/SDCCast.c (createBlock): added comment ???
3714         * src/hc08/ralloc.c: updated comments
3715
3716 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3717
3718         * doc/sdccman.lyx: updated section on switch statements, added
3719         section about semaphore locking
3720         * doc/Makefile: added option -info for latex2html
3721         * device/lib/_gptrget.c,
3722         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3723
3724 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3725
3726         * src/pic/device.h,
3727         * src/pic/device.c,
3728         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3729          maxram is less than 0x100.
3730
3731 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3732
3733         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3734
3735 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3736
3737         * src/port.h,
3738         * src/mcs51/main.c,
3739         * src/ds390/main.c,
3740         * src/z80/main.c,
3741         * src/hc08/main.c,
3742         * src/pic/main.c,
3743         * src/pic16/main.c,
3744         * src/avr/main.c,
3745         * src/xa51/main.c
3746         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3747         a jump table is the best form for a switch statement, including
3748         automatic insertion of missing cases to make the case range
3749         continuous. Developed in collaboration with Frieder Ferlemann.
3750
3751 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3752
3753         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3754         accumulator result if it needs sign extension
3755
3756 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3757
3758         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3759
3760 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3761
3762         * device/lib/gbz80/printf.c,
3763         * device/lib/z80/printf.c: removed define for NULL
3764
3765 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3766
3767         * as/xa51/xa_link.c,
3768         * device/examples/ds390/ow390/ad26.c,
3769         * device/examples/ds390/ow390/cnt1d.c,
3770         * device/examples/ds390/ow390/counter.c,
3771         * device/examples/ds390/ow390/ds2480.h,
3772         * device/examples/ds390/ow390/ds2480ut.c,
3773         * device/examples/ds390/ow390/findtype.c,
3774         * device/examples/ds390/ow390/gethumd.c,
3775         * device/examples/ds390/ow390/owllu.c,
3776         * device/examples/ds390/ow390/ownetu.c,
3777         * device/examples/ds390/ow390/swt12.c,
3778         * device/examples/ds390/ow390/swtloop.c,
3779         * device/examples/ds390/ow390/temp.c,
3780         * device/examples/ds390/ow390/temp10.c,
3781         * device/examples/ds390/ow390/thermo21.c,
3782         * device/examples/ds390/ow390/tinilnk.c,
3783         * device/examples/ds390/ow390/tstfind.c,
3784         * device/examples/serialcomm/windows/serial.cpp,
3785         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3786         * device/include/reg51.h: fixed line endings for cvs
3787
3788 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3789
3790         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3791         packRegsForAccUse, packRegisters): new accumulator register
3792         packing algorithm
3793         * support/regression/ports/hc08/support.c (_putchar): suppress
3794         warning of unused variable
3795         * src/SDCCicode.c: added SWAP entry to codeTable
3796
3797 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3798
3799         * device/lib/sprintf.c: forgot to add this file before previous commit
3800
3801 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3802
3803         * src/pic16/gen.c (genPackBits): added operand right in function
3804         parameters, load result directly if p_type is POINTER (that is
3805         called by genNearPointerSet)
3806         * (genUnPackBits): added operand left in function parameters,
3807         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3808         FSR0 if accessing bitfields,
3809
3810 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3811
3812         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3813           _print_format; updated printf, sprintf, vsprintf
3814         * device/include/asm/default/features.h: corrected comment/define
3815         * device/lib/Makefile.in: added sprintf.c
3816         * device/lib/libsdcc.lib: added sprintf module
3817         * device/lib/printf_large.c,
3818         * device/lib/vprintf.c,
3819         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3820           into these 3 files
3821         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3822         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3823         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3824           hc08 test
3825         * support/regression/tests/zeropad.c: define idata as data for hc08
3826
3827 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3828
3829         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3830         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3831         labels are referenced at least once (even if a reference is not found)
3832         * src/hc08/gen.c (emitcode): set isComment flag for comments
3833         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3834         loads), rules 6a..6b (optimize jumps to return)
3835
3836 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3837
3838         * device/lib/acosf.c (acosf),
3839         * device/lib/asinf.c (asinf),
3840         * device/lib/atanf.c (atanf),
3841         * device/lib/ceilf.c (ceilf),
3842         * device/lib/cosf.c (cosf),
3843         * device/lib/coshf.c (coshf),
3844         * device/lib/cotf.c (cotf),
3845         * device/lib/fabsf.c (fabsf),
3846         * device/lib/floorf.c (floorf),
3847         * device/lib/log10f.c (log10f),
3848         * device/lib/logf.c (logf),
3849         * device/lib/sinf.c (sinf),
3850         * device/lib/sinhf.c (sinhf),
3851         * device/lib/sqrtf.c (sqrtf),
3852         * device/lib/tanf.c (tanf),
3853         * device/lib/tanhf.c (tanhf),
3854         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3855         replaced all instances of "reentrant" in the library functions
3856         defined in math.h with this macro.
3857         * support/regression/tests/float_trans.c: reenabled test for hc08
3858
3859 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3860
3861         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3862         erroneously deleted
3863
3864 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3865
3866         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3867         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3868         multi-byte volatile operands are used
3869         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3870         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3871         initialization to area GSINIT0 so that it would always precede
3872         any static initializers in GSINIT
3873         * support/regression/tests/zeropad.c: fixed idata define for hc08
3874         * support/regression/tests/bug-927659.c,
3875         * support/regression/tests/float_trans.c: disabled tests for hc08
3876         pending missing library routines
3877         * .version: increased version number to 2.4.4 - hc08 port now passes
3878         regression tests
3879
3880
3881 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3882
3883         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3884         * Makefile.common.in,
3885         * as/Makefile,
3886         * as/hc08/Makefile.in,
3887         * as/mcs51/Makefile.in,
3888         * as/z80/Makefile.in,
3889         * debugger/mcs51/Makefile.in,
3890         * device/include/Makefile.in,
3891         * device/lib/Makefile.in,
3892         * doc/Makefile,
3893         * link/Makefile,
3894         * link/z80/Makefile.in,
3895         * packihx/Makefile.in,
3896         * sim/ucsim/main_in.mk,
3897         * sim/ucsim/avr.src/Makefile.in,
3898         * sim/ucsim/doc/Makefile.in,
3899         * sim/ucsim/gui.src/serio.src/Makefile.in,
3900         * sim/ucsim/hc08.src/Makefile.in,
3901         * sim/ucsim/s51.src/Makefile.in,
3902         * sim/ucsim/xa.src/Makefile.in,
3903         * sim/ucsim/z80.src/Makefile.in,
3904         * src/Makefile.in,
3905         * support/cpp2/Makefile.in,
3906         * support/librarian/Makefile,
3907         * support/makebin/Makefile: added DESTDIR to the install path proposed
3908         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3909         * doc/sdccman.lyx: added DESTDIR documentation
3910
3911 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3912
3913         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3914         instruction for interrupt handlers, use fast returns when returning
3915         from high priority interrupts
3916
3917 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3918
3919         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3920         code generation
3921         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3922         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3923         bugs, ported much of Bernhard's code from mcs51
3924         * src/mcs51/gen.c (genSend),
3925         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3926         than one when calling a reentrant function
3927         * device/lib/_mullong.c: defined an alternate struct layout for big
3928         endian ports (hc08)
3929
3930 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3931
3932         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3933         test
3934
3935 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3936
3937         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3938         are sane and complete before asking the port its prefered parameter
3939         passing method (fixes bug #1017633)
3940         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3941         and _ret3
3942
3943 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3944
3945         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3946         problem in bitfields >= 8 bits.
3947
3948 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3949
3950         * src/SDCCsymt.c: undid changes that were not meant to be committed
3951
3952 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3953
3954         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3955
3956 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3957
3958         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3959           copied and wrong bit got inverted
3960
3961 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3962
3963         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3964         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3965         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3966         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3967         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3968         assignments to bitfields at known addresses
3969         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3970         reads from bitfields at known addresses
3971         * src/hc08/ralloc.c (packRegisters),
3972         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3973         genhc08Code): optimize pointer get values used as conditionals
3974         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3975         and branch
3976
3977 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3978
3979         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3980         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3981         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3982         as conditionals
3983
3984 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3985
3986         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3987
3988 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3989
3990         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3991         related problems
3992
3993 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3994
3995         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3996
3997 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3998
3999         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4000         mcs51 port
4001
4002 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4003
4004         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4005
4006 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4007
4008         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4009         cases use more compact code.
4010
4011 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4012
4013         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4014
4015 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4016
4017         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4018
4019 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4020
4021         * src/SDCCsymt.h,
4022         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4023         parameter of changePointer() from symbol* to sym_link*
4024         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4025         * src/SDCCsymt.c (compareType): void* type is castable to other
4026         pointers, but not necesarily an exact match.
4027         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4028         is no longer blindly treated as an exact match.
4029         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4030
4031 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4032
4033         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4034
4035 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4036
4037         * src/pic/gen.c,
4038         * src/pic/pcode.c,
4039         * src/pic/ralloc.h,
4040         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4041
4042 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4043
4044         * src/pic/device.c,
4045         * src/pic/device.h,
4046         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4047
4048 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4049
4050         * src/mcs51/gen.c (emitcode): fixed bug #992819
4051
4052 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4053
4054         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4055           there's no need to make it worse
4056
4057 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4058
4059         * src/mcs51/ralloc.c (deassignLR),
4060         * src/ds390/ralloc.c (deassignLR),
4061         * src/hc08/ralloc.c (deassignLR),
4062         * src/z80/ralloc.c (deassignLR),
4063         * src/pic/ralloc.c (deassignLR),
4064         * src/pic16/ralloc.c (deassignLR),
4065         * src/avr/ralloc.c (deassignLR),
4066         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4067         rlivePoint): fixed another part of bug #971834
4068
4069 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4070
4071         * src/z80/main.c: enabled "critical" keyword
4072         * src/z80/mappings.i,
4073         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4074         functions (fixes bug #979646)
4075         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4076
4077 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4078
4079         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4080           such as c:\mydir.
4081
4082 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4083
4084         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4085           doesn't disable too much optimizations
4086
4087 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4088
4089         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4090
4091 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4092
4093         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4094
4095 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4096
4097         * src/pic/gen.c tidied up tabs
4098         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4099         * src/pic/main.c tidied up tabs
4100         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4101         * src/pic/pcoderegs.c tidied up tabs
4102         * src/pic/ralloc.c tidied up tabs
4103
4104 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4105
4106         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4107         to S_FIXED for pic16 port and when symbol is not in level 0,
4108         allocate for S_REGISTER storage class and pic16 port, too,
4109         * src/pic16/device.h: prototype for checkSym,
4110         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4111         * (pic16_assignConfigWordValue): test the value and the mask to
4112         validate that the value is suitable for the configuration word,
4113         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4114         collect extern declared symbols, don't emit symbol twice, check
4115         first if symbol is in publics set first,
4116         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4117         * added command line '--fstack' which enables an experimental
4118         feature for stack access, too buggy to be used yet...
4119         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4120         * (pic16_allocDirReg): when register has storage class S_REGISTER
4121         allocate in pic16_dynAccessRegs,
4122         * device/include/pic16/pic18f????.h: modified configuration word
4123         naming convention, words started as CONFIG0H but should be CONFIG1H
4124
4125 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4126
4127         * device/include/mcs51reg.h: fixed bug 970993
4128
4129 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4130
4131         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4132         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4133         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4134         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4135         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4136         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4137           error/warning numbers,
4138           added function setWarningDisabled()
4139         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4140         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4141           _memcmp.c _memmove.c calloc.c realloc.c free.c
4142         * support/regression/tests/malloc.c: added tests for new functionality
4143         * support/regression/tests/zeropad.c: added tests for truncated initializers
4144           and initialized char arrays starting with '\x0'
4145         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4146
4147 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4148
4149         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4150
4151 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4152
4153         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4154         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4155         peephole 177.e. Thanks to anonymous
4156
4157 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4158
4159         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4160         function isn't used in the source but referenced as a
4161         variable initializer then declare it as extern in .asm file
4162
4163 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4164
4165         * .version: increased version number to 2.4.3
4166
4167         Adding version extension according to ChangeLog CVS revision
4168         * src/Makefile.in (target all): added dependency 'version.h'
4169         * (rule version.h): added rule to create version.h from ChangeLog,
4170         * (rule dep): added dependency version.h,
4171         * src/version.awk: AWK script to create version.h
4172         * src/SDCCdwarf2.c (dwWriteModule),
4173         * src/SDCCglue.c (initialComments),
4174         * src/SDCCmain.c (printVersionInfo): modified to write after
4175         version string the version extension number,
4176         * src/SDCCutil.c: included "version.h"
4177         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4178         number,
4179         * src/SDCCutil.h: added prototype for getBuildNumber
4180
4181         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4182         includeDirsSet, too,
4183         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4184         const char [] is found in function prototype...
4185
4186         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4187         moving to WREG with source is already in WREG,
4188         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4189         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4190         * (aopForSym): stack'ed symbols are partially supported, added
4191         if-clause to support symbols in FARSPACE,
4192         * (sameRegs): added test for AOP_ACC to see if registers are same,
4193         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4194         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4195         * (pic16_popRegFromString): will not allocate a new register if it
4196         doesn't find one by name, bug may have introduced...
4197         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4198         * (genIpush): revived to use pic16 port's stack,
4199         * (genAddrOf): added incomplete case for stack'ed operand,
4200         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4201         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4202         can handle multibyte operands,
4203         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4204         * (pic16initialComments): added message for MPLAB compatibility
4205         mode enabled,
4206         * src/pic16/main.h: prototype for pic16_mplab_comp,
4207         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4208         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4209         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4210         because of increased complexity of procedure,
4211         * (_process_pragma): stack pragma changed to format 'stack pos len',
4212         emit symbol '_stack_end' to conform with gplink,
4213         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4214         to search for register,
4215         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4216         PO_GPR_REGISTER,
4217         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4218         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4219         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4220         case for PO_GPR_REGISTER,
4221         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4222         dies, the new era is ahead !...
4223         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4224         pic16_dynInternalRegs,
4225         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4226         * (pic16_allocDirReg): minor optimizations and bug fixes,
4227         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4228
4229         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4230         load stack and frame pointer with address of 'stack_end' symbol
4231
4232 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4233
4234         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4235         without source code but only variable initializers
4236
4237 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4238
4239         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4240         external are not declared as extern to reduce overhead while linking
4241
4242 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4243
4244         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4245
4246 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4247
4248         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4249           Yee Keat for the patch
4250         * src/SDCCast.c (decorateType): fixed bug #979599
4251         * src/ds390/gen.h: removed local fReturnSizeDS390
4252         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4253         * src/ds390/gen.c (genAnd, genOr, genXor),
4254         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4255
4256 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4257
4258         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4259         add relFilesSet to $3, manipulate $2 to handle linking of object
4260         files without source files in command line,
4261         * device/include/pic16 (all headers): added ID location macros,
4262         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4263         entries for ID location bytes,
4264         * (pic16_assignIdByteValue): NEW,
4265         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4266         added field dumpcalltree to pic16_options_t,
4267         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4268         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4269         emitting rFalseIfx label after check_carry label,
4270         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4271         pic16_emitDIRegs), NEW
4272         * (pic16glue): dump .calltree file when option --calltree found,
4273         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4274         * (_pic16_genAssemblerPreamble): emit ID locations after
4275         configuration registers,
4276         * (pic16_linkCmd): modifications of the link command,
4277         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4278         * (pic16_pCodeInitRegisters): don't init stack registers,
4279         * (pic16_findPrevInstruction): fixed bug,
4280         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4281         bug with immediate registers,
4282         * (buildCallTree): traces stack push and pop,
4283         * (pct2): dump also stack usage for each function,
4284         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4285         * (pic16_allocDirReg): various modifications,
4286         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4287         fixed to 1,
4288
4289 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4290
4291         * src/pic16/pcode.c: removed buggy double colon
4292
4293 2004-07-01 Borut Razem <borut.razem AT siol.net>
4294
4295         * support/scripts/sdcc.nsi: added include/pic16 to setup
4296
4297 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4298
4299         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4300         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4301         target 'clean',
4302         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4303         specific command line arguments. Also added sample lkr script
4304         for placing a variable at a specific memory bank.
4305         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4306         at a specific memory bank,
4307         * (pic16_dump_isection): fixed bug which caused string literals to
4308         be omitted when dumping idata section,
4309         * (pic16_groupRegistersInSection): added code to handle registers
4310         in specific memory banks,
4311         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4312         public, all references are renamed too,
4313         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4314         AOP_DPTR2,
4315         * (pic16_storeForReturn): added case to handle when dest is WREG,
4316         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4317         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4318         pic16_rel_udata, check to see if that register is marked as being
4319         a member of a specific memory bank,
4320         * (pic16_printIvalCharPtr): added code to add string literals either
4321         to code or the idata sections,
4322         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4323         also accept the 'udata' pragma,
4324         * src/pic16/main.h: new structure types sectName and sectSym
4325         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4326         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4327         * (pic16_findPrevInstruction): fixed, it returned nothing,
4328         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4329         instruction combinations,
4330         * (pic16_FixRegisterBanking): heavily reorganised,
4331         * (pic16_AnalyzeBanking): if generating banksel directives is
4332         disabled, then don't call FixRegisterBanking at all,
4333         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4334         completely removed,
4335         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4336
4337 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4338
4339         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4340         Phuah Yee Keat <yk.phuah AT nestac.com>
4341
4342 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4343
4344         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4345         correctly the IVT even if it is relocated to some other location
4346
4347 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4348
4349         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4350         * device/include/pic16/pic18f2220.h: NEW,
4351         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4352         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4353         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4354         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4355         nodefaultlibs, ivt_loc is the location of the interrupt vector
4356         table, and nodefaultlibs signs that default libraries should not be
4357         linked in link stage,
4358         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4359         according to --ivt-loc argument,
4360         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4361         when pragma stack is found,
4362
4363 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4364
4365         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4366         256 (range check), 257 (do while), 258.a-f (bit banging
4367         f.e. on 3-wire SPI bus)
4368
4369 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4370
4371         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4372         variables used exclusively within a loop
4373
4374 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4375
4376         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4377
4378 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4379
4380         * src/SDCClrange.c (computeClash): fixed bug #971834
4381
4382 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4383
4384         * src/mcs51/gen.c (genCmp): fixed bug #975903
4385         * src/hc08/gen.c (operandsEqu),
4386         * src/ds390/gen.c (operandsEqu),
4387         * src/z80/gen.c (operandsEqu),
4388         * src/pic/gen.c (operandsEqu),
4389         * src/pic16/gen.c (operandsEqu),
4390         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4391         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4392
4393 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4394
4395         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4396
4397 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4398
4399         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4400         default case in switch statement,
4401         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4402         to eliminate problem with initialisation of pointers, but problem
4403         still exists,
4404         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4405         * (emitStaticSegment): removed various lines emitting debug info,
4406         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4407         added processor registers for utilizing EEPROM,
4408         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4409         configurable and set 8
4410
4411 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4412
4413         * .version: increased version number to 2.4.2,
4414
4415         Cumulative patch for pic16 port
4416         * src/pic16/device.c: changed scheme to dump initial values for
4417         variables in idata segment, all print_idata* functions were removed,
4418         now the pic16_printIval* will be called,
4419         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4420         * _pic16_printPointerType, pic16_printPointerType,
4421         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4422         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4423         NEW, similar to the respective functions in SDCCglue.c,
4424         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4425         way, emitting hex bytes,
4426         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4427
4428 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4429
4430         * src/avr/ralloc.c (serialRegAssign),
4431         * src/xa51/ralloc.c (serialRegAssign),
4432         * src/pic/ralloc.c (serialRegAssign),
4433         * src/pic16/ralloc.c (serialRegAssign),
4434         * src/hc08/ralloc.c (serialRegAssign),
4435         * src/z80/ralloc.c (serialRegAssign),
4436         * src/ds390/ralloc.c (serialRegAssign),
4437         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4438
4439 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4440
4441         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4442         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4443
4444 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4445
4446         Cumulative patch for pic16 port:
4447         * src/pic16/device.h (typedef PIC16_device) modified fields for
4448         defining microcontrollers,
4449         * src/pic16/device.c: added new info for all devices in Pics16 array,
4450         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4451         to be optimised out by the pCode optimiser,
4452         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4453         specially, bug reported by G.M. Gallant,
4454         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4455         as force'd so that cannot be optimised out by pCode optimiser,
4456         * src/pic16/pcode.c,
4457         * src/pic16/pcodepeeph.c,
4458         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4459         they are disabled by default, but can be enabled explicit with
4460         command argument --denable-peeps, for testing,
4461         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4462         --pomit-ivt in COMPILE_FLAGS
4463
4464 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4465
4466         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4467           compilation on MSVC
4468
4469 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4470
4471         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4472
4473 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4474
4475         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4476         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4477
4478 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4479
4480         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4481         would only assign 0x300001 register.
4482
4483 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4484
4485         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4486         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4487
4488 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4489
4490         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4491         for ds80c400
4492         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4493         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4494         added peephole 254 (left shift), 255 (jump table)
4495
4496 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4497
4498         * device/lib/Makefile.in: removed comment line with model-pic16,
4499         * (target port-specific-objects-pic16): the libraries and objects
4500         are copied to the build directory form the device/lib/pic16/bin
4501         directory
4502
4503         Cumulative patch concerning pic16 port:
4504         * library directory has been re-organized,
4505         * added support for PIC18F1220,
4506         * added headers and library sources for chips 18f1220,18f6520,
4507         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4508
4509         * configuration registers setting has changed, now each supported
4510         device has a complete description of the registers it uses,
4511         * all initialisations are moved to idata sections, these section
4512         can be absolute or relocatable,
4513         * fixed initialisation of codespace variables,
4514         * fixed warning about PCLATU and gpsim,
4515         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4516         * (genAssign): use table reads when assigning from variables in codespace,
4517         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4518         char/int variables placed in codespace,
4519         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4520         registers set in .asm file, no need for --pomit-config-words anymore,
4521         * (pic16glue): some 8051 legacy segments are commented out
4522         (to be removed completely),
4523         * added support for alternative assembler and linker with --asm=
4524         and --link= command line arguments,
4525         * peepholes are disabled automatically in the port, no need to
4526         specify on command line,
4527         * port supports natively char/int/long multiplication, but converts
4528         all divisions to support functions,
4529         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4530         to the file set in variable $2,
4531         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4532         strings in ASCII format and not in hex,
4533         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4534         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4535         allocate proper register if iCodes aren't temporary,
4536
4537 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4538
4539         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4540
4541 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4542
4543         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4544         is commented out
4545
4546 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4547
4548         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4549         computed address is reused
4550         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4551         multi-byte bitfields
4552
4553 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4554
4555         * src/z80/gen.c: (genArrayInit): must check for pointers too
4556
4557 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4558
4559         * support/regression/tests/zeropad.c: never meant to commit the
4560           nestedstruct test: removed, added check for GCC version
4561
4562 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4563
4564         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4565         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4566         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4567           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4568           bugs 928906 and 954082 half-empty initializers
4569         * src/SDCCsymt.h,
4570         * src/SDCCsymt.c (getAllocSize): added for above fix
4571         * src/z80/gen.c (genArrayInit): fixed bug 741044
4572         * support/regression/tests/zeropad.c: added tests
4573
4574 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4575
4576         * src/pic16/device.c (pic16_dump_section): corrected bug which
4577         caused some symbols of the libraries to be misplaced
4578
4579 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4580
4581         * src/pic16/glue.c,
4582         * src/pic16/ralloc.h,
4583         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4584         to fix conflict with pic port
4585
4586 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4587
4588         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4589         externs configuration variables,
4590         * src/pic16/ralloc.h,
4591         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4592         prototype in header, commented out some debug messages
4593
4594 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4595
4596         * src/pic16/glue.c,
4597         * src/pic16/main.c,
4598         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4599         for gpasm COFF object generation. Thanks to D. Hawkins for
4600         his patch info
4601
4602 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4603
4604         * src/ds390/main.c,
4605         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4606         Brock for spotting this)
4607         * src/ds390/gen.c (genEndFunction),
4608         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4609         interrupt handler and critical. Disable push/pop optimizations when
4610         peephole optimizations disabled.
4611
4612 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4613
4614         Updated pic16 library sources and headers.
4615         * device/lib/pic16/pic18f*/ ,
4616         * device/include/pic16/*.h: modified to handle structured SFR
4617         definitions
4618
4619 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4620
4621         * src/port.h (PORT structure): added hook initPaths, now each
4622         port can declare its own default search paths,
4623         which can been seen with the --print-search-dirs option,
4624         see pic16 port for example,
4625         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4626         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4627         * (doPrintSearchDirs): NEW, replaces in a central manner the
4628         printing of search dirs which was split in set*Paths functions,
4629         * (main): added call to port->initPaths and doPrintSearchDirs,
4630         * src/avr/main.c,
4631         * src/ds390/main.c,
4632         * src/hc08/main.c,
4633         * src/izt/i186.c,
4634         * src/izt/tlcs900h.c,
4635         * src/mcs51/main.c,
4636         * src/pic/main.c,
4637         * src/pic16/main.c: modified port structures to reflect addition of
4638         initPaths hook,
4639
4640         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4641         * (pic16_dump_section): for registers in same address reserve memory once,
4642         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4643         to no_banksel,
4644         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4645         result is greater in size than right or left,
4646         * (pic16_genUMult8X8_8): there are some cases where the result can
4647         be 16 bits size, so handle these,
4648         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4649         * (pic16_outBitC): modified to emit pcodes,
4650         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4651         or not,
4652         * (genDivOneByte): implemented algorithm to divide 8-bits,
4653         * (genCmp): uncommented goto, but issues still exist,
4654         * (genAnd): fixed a bug with variables >8bits,
4655         * (genPackBits): optimization added that uses BCF/BSF to change a
4656         single bit,
4657         * (genAssign): fixed bug when assigning floating point literals,
4658         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4659         __sdcc_gsinit_startup label,
4660         * src/pic16/main.c (_pic16_init): removed search directory
4661         initialisations,
4662         * (_pic16_initPaths): NEW, used to initialise search directories,
4663         * (_hasNativeMulFor): support functions for all except char/int
4664         multiplication, and char division,
4665         * (PIC16_port struct): modified entry for native mul support,
4666         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4667         no_banksel option,
4668         * (buildCallTree): call to register_usage is ifdef'ed out,
4669
4670 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4671
4672         * device/include/string.h: applied Stas Sergeev's patch to make this
4673         header file compatible with the preprocessor -Wundef option
4674         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4675         failure (fixes bug #941458)
4676
4677 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4678
4679         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4680         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4681         that the variable, not the function, should be static
4682         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4683         to be consistent with non-literal case
4684
4685 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4686
4687         * src/SDCCast.c (isConformingBody): fixed bug #949967
4688         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4689         convilong): fixed bug #952086
4690
4691 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4692
4693         * src/SDCCmem.c (allocVariables): fixed bug #955321
4694
4695 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4696
4697         * src/hc08/main.c (_hc08_genAssemblerEnd),
4698         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4699         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4700         completely eliminated the use of a temporary file
4701         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4702         when more than one file linked
4703         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4704
4705 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4706
4707         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4708         which fixes bug #543481
4709         * support/regression/tests/bug-751703.c: fixed comments left from a
4710         cut and paste error
4711         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4712         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4713         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4714         scopes
4715         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4716         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4717         are now changed to underscores in moduleName
4718
4719 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4720
4721         * as/mcs51/lkmem.c: better fix for bug #954173
4722
4723 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4724         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4725
4726         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4727         * device/include/c8051f000.h,
4728         * device/include/c8051f120.h,
4729         * device/include/c8051f300.h,
4730         * device/include/c8051f310.h,
4731         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4732         PWM16) and detab'ed
4733
4734 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4735
4736         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4737         and mailing lists, doc'ed --no-peep-comments, removed reference
4738         to knoppix (newest version has no LyX/LaTeX), other minor changes
4739         * src/SDCCglue.c (glue): save 2 bytes stack space with
4740         option --main-return. The ljmp could probably be avoided too
4741
4742 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4743
4744         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4745
4746 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4747
4748         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4749         * src/SDCCopt.c (isLocalWithoutDef),
4750         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4751         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4752         (credit to Maarten Brock for patch #949363, on which this is based)
4753         * support/regression/tests/bug-751703.c: some test cases of extern used
4754         within inner scopes.
4755
4756 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4757
4758         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4759         SPEC_STRUCT
4760         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4761         struct definitions
4762         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4763         dwWriteLabel): fix to create valid debugger symbols even when
4764         the module name has non-alphanumeric symbols in it
4765         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4766         when a variable's allocation has been optimized away
4767
4768
4769 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4770
4771         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4772         * src/hc08/main.c,
4773         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4774         * src/mcs51/main.c,
4775         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4776         * src/ds390/main.c,
4777         * src/z80/gen.c (z80_emitDebuggerSymbol),
4778         * src/z80/main.c,
4779         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4780         * src/pic/main.c,
4781         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4782         * src/pic16/main.c,
4783         * src/avr/gen.c (avr_emitDebuggerSymbol),
4784         * src/avr/main.c,
4785         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4786         * src/xa51/main.c,
4787         * src/SDCCdebug.c (emitDebuggerSymbol),
4788         * src/SDCCdebug.h,
4789         * src/port.h: added a debugger struct to the port struct. Added a
4790         callback for defining debugger symbols
4791
4792         * src/SDCCast.c (createLabel),
4793         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4794         with isitmp = 1
4795         * src/SDCCicode.h,
4796         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4797         iCode back to the ast for the function
4798
4799         * src/hc08/ralloc.c (hc08_assignRegisters),
4800         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4801         unneeded fields from the regs struct.
4802         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4803         pushReg() & pullReg() functions instead of emitcode()
4804
4805         * src/hc08/gen.c (genLabel, genhc08Code),
4806         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4807
4808         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4809         debugger hooks
4810
4811         * src/hc08/gen.c (genEndFunction, genhc08Code),
4812         * src/hc08/gen.h,
4813         * src/mcs51/gen.c (genEndFunction, gen51Code),
4814         * src/mcs51/gen.h,
4815         * src/ds390/gen.c (genEndFunction, gen390Code),
4816         * src/ds390/gen.h,
4817         * src/z80/gen.c (genEndFunction, genZ80Code),
4818         * src/z80/gen.h,
4819         * src/z80/z80.h,
4820         * src/pic/gen.c (genEndFunction, genpic14Code),
4821         * src/pic/gen.h,
4822         * src/pic16/gen.c (genEndFunction, genpic16Code),
4823         * src/pic16/gen.h,
4824         * src/avr/gen.c (genEndFunction, genAVRCode),
4825         * src/avr/gen.h,
4826         * src/xa51/gen.c (genEndFunction, genXA51Code),
4827         * src/xa51/gen.h,
4828         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4829         specific code to cdbFile.c and out of the backend code generators
4830
4831         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4832         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4833         starting address is now 0
4834
4835         * as/hc08/asm.h,
4836         * as/hc08/m08pst.c,
4837         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4838         assembler directive for DWARF support
4839         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4840
4841         * src/src.dsp,
4842         * src/Makefile.in,
4843         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4844
4845 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4846
4847         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4848         and inappropriate peephole optimization in jump tables
4849
4850 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4851
4852         * as/hc08/m08pst.c,
4853         * src/SDCCglue.c: sdccopt works for the hc08 port now
4854
4855 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4856
4857         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4858
4859 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4860
4861         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4862
4863 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4864
4865         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4866         rules
4867         * src/SDCCmain.c,
4868         * src/SDCCglobl.h,
4869         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4870         comments from the peephole optimizer replacement rules
4871         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4872         symbols
4873         * src/SDCCcse.c (updateSpillLocation),
4874         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4875         equivalents
4876         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4877         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4878         objects far pointers
4879
4880 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4881
4882         * src/SDCCsymt.h: a missing part of my last change
4883         * src/pic/ralloc.c (regTypeNum),
4884         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4885
4886 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4887
4888         * src/SDCCicode.h,
4889         * src/SDCCicode.c (aggrToPtrDclType),
4890         * src/SDCCptropt.h,
4891         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4892         ptrPseudoSymConvert),
4893         * src/pic/ralloc.c (regTypeNum),
4894         * src/pic16/ralloc.c (regTypeNum),
4895         * src/hc08/ralloc.c (regTypeNum),
4896         * src/ds390/ralloc.c (regTypeNum),
4897         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4898         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4899
4900 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4901
4902         * link/z80/lkmain.c (afile),
4903         * as/hc08/lkmain.c (afile),
4904         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4905         prevent a pointer problem when a filename has no directory and
4906         no extension specified.
4907
4908 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4909
4910         * link/z80/lkmain.c (afile): allow periods in directory names
4911         * link/z80/lkmain.c (afile),
4912         * as/mcs51/lkmain.c (afile),
4913         * as/hc08/lkmain.c (afile): allow linker script file to have an
4914         extension other than ".lnk"
4915         * link/z80/lklex.c (getfid),
4916         * link/z80/lkmain.c (parse),
4917         * as/mcs51/lklex.c (getfid),
4918         * as/mcs51/lkmain.c (parse),
4919         * as/hc08/lklex.c (getfid),
4920         * as/hc08/lkmain.c (parse): Support comments in the linker script
4921         file on lines by themselves and after filenames
4922
4923 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4924
4925         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4926
4927 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4928
4929         * src/z80/peeph-z80.def: removed some peephole rules that don't
4930         work with multibyte arithmetic (fixed bug #937126)
4931         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4932         to registers and not global variables
4933         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4934         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4935         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4936         checking for assignments not internally generated (fixed bug #931895)
4937         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4938         structure member (fixed bug #930072)
4939
4940 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4941
4942         * src/SDCCmain.c (linkEdit),
4943         * src/hc08/main.c (_hc08_parseOptions),
4944         * as/hc08/Makefile.in,
4945         * as/hc08/aslink.h,
4946         * as/hc08/asm.h,
4947         * as/hc08/m08pst.c,
4948         * as/hc08/lkrloc.c (relr, rele),
4949         * as/hc08/lkarea.c (lnkarea)
4950         * as/hc08/lkmain.c (afile, parse),
4951         * as/hc08/lkelf.c: support for ELF output
4952         * as/hc08/lks19.c (s19),
4953         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4954
4955 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4956
4957         * as/mcs51/lkihx.c: Fixed bug #899105.
4958
4959 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4960
4961         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4962         .dsp files from Unix to DOS.
4963
4964 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4965
4966         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4967         function pointers; we have been compliant for several months now.
4968         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4969         change that was accidently commented out
4970         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4971         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4972         bug #922319
4973
4974 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4975
4976         * src/hc08/gen.c: output of all of the internal debugging information
4977         is now controlled by the D() macro; it is disabled by default
4978
4979 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4980
4981         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4982         harder to keep the same registers during a CAST iCode
4983         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4984         long via int can be done in a single cast, if the signedness is
4985         correct.
4986         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4987         putchar() in tinibios.c in ds390's library
4988
4989 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4990
4991         * src/SDCCast.c (decorateType): fixed bug #898889,
4992         cast result of a literal complement too
4993         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4994         fixed check for bitfields
4995
4996 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4997
4998         * src/SDCCicode.c (geniCodeLogic): made it static,
4999         (geniCodeLogicAndOr): added in order to fix bug #905492,
5000         (ast2iCode): fixed bug #905492
5001         * support/regression/tests/bug-905492.c: added
5002         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5003         (processParms): fixed bug #927659: don't copy parms, this will clear
5004         decorated flag
5005         * support/regression/tests/bug-927659.c: added
5006
5007 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5008
5009         * src/SDCCast.c (addCast): don't cast float to char
5010         * device/lib/libsdcc.lib: added _memmove
5011
5012 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5013
5014         * device/lib/large/Makefile: fixed parallel execution by
5015         replacing `make` by `$(MAKE)`
5016
5017 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5018
5019         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5020         offsets (fixes bug #923936)
5021
5022 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5023
5024         * device/lib/small/Makefile: fixed parallel execution by
5025         replacing `make` by `$(MAKE)`
5026
5027 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5028
5029         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5030
5031 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5032
5033         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5034         * src/regression/Makefile: Regression test was not running.
5035
5036 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5037
5038         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5039         complement if possible
5040         * src/SDCCval.c (valComplement),
5041         * src/SDCCicode.c (operandOperation): fixed complement of literal
5042         * support/regression/tests/onebyte.c (testComplement): added
5043
5044 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5045
5046         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5047         return an optimized tree; actually replace actParm with the new tree
5048         * src/SDCCast.h: added some parantheses to remove side effects
5049         * support/regression/tests/bug-920866.c
5050
5051 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5052         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5053         Bit operands were not being handled properly in the pic14 port.
5054         (now src/regression/add.c passes again).
5055
5056 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5057
5058         * src/SDCC.y (labeled_statement): case and default no longer require
5059         a following statement (RFE #893037)
5060
5061 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5062
5063         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5064         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5065         disabled (fixes bug #916294)
5066         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5067         "mov a,acc"; patch provided by Lenny Story
5068         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5069
5070 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5071
5072         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5073         functions
5074         * src/ds390/gen.c (genFunction, genEndFunction),
5075         * src/ds390/ralloc.c (ds390_assignRegisters),
5076         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5077         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5078         pushed if there are parameters passed on the stack. Also, a cleaner
5079         way to decide if r0/r1 should be pushed/popped. (Together they fix
5080         bug #918693)
5081
5082 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5083
5084         * doc/sdccman.lyx,
5085         * device/lib/mcs51/crtpagesfr.asm,
5086         * device/lib/mcs51/crtxinit.asm,
5087         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5088         to avoid confusion with Si Lab's SFRPAGE register.
5089
5090 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5091
5092         * src/SDCCglue.c (emitMaps): allow public sfr variables
5093         * src/SDCCglue.c (initialComments): include compiler build date
5094         with compiler version and put the timestamp of the generated
5095         assembly file on a serperate line to be less confusing.
5096         * src/port.h: added genInitStartup hook
5097         * src/avr/main.c,
5098         * src/ds390/main.c,
5099         * src/hc08/main.c,
5100         * src/pic/main.c,
5101         * src/pic16/main.c,
5102         * src/xa51/main.c,
5103         * src/z80/main.c: genInitStartup initialize as NULL (default to
5104         historical behaviour)
5105         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5106         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5107         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5108         library instead of hard coding it into the compiler.
5109         * support/regression/ports/mcs51-stack-auto/spec.mk,
5110         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5111         * device/lib/mcs51/Makefile,
5112         * device/lib/small/Makefile,
5113         * device/lib/large/Makefile,
5114         * device/lib/mcs51/crtpagesfr.asm,
5115         * device/lib/mcs51/crtstart.asm,
5116         * device/lib/mcs51/crtxclear.asm,
5117         * device/lib/mcs51/crtxinit.asm,
5118         * device/lib/mcs51/crtclear.asm,
5119         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5120         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5121         and into user configurable files.
5122         * device/lib/clean.mk: clean mcs51 directory too
5123         * support/regression/tests/longlit.c: added static to T1 declaration
5124         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5125         accesses in the initialization code
5126
5127 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5128
5129         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5130         OSCTRIMVAL as noted in bug #916008
5131
5132 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5133
5134         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5135         in loops with multiple exits (reported as incorrect registers
5136         used by Martin Helmling in Sdcc-user list)
5137
5138 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5139
5140         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5141         made ds390 register extensions look less like error messages
5142
5143 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5144
5145         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5146         reported by Adam Wozniak in Sdcc-user list
5147
5148 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5149
5150         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5151         arithmetic optimizations, added debug output
5152
5153 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5154
5155         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5156         * sdcc.spec: updated and split sdcc into 3 rpms
5157         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5158         needed for literals of LEFT_OP and '+'
5159         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5160         introduced RESULT_TYPE_NOPROM
5161         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5162         left shift
5163         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5164         limited promotion to int only for '*'
5165         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5166
5167 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5168
5169         * src/pic16/gen.c (genSkip),
5170         (genc16bit2lit), (gencjneshort): commented out
5171         (is_LitOp): new helper function, checks operand type
5172         (genCmpEq): rewritten
5173
5174 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5175
5176         * support/regression/tests/bug-908454.c: added
5177
5178 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5179
5180         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5181         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5182         (geniCodeCast): cosmetic, don't preserve bit storage class
5183         (geniCodeLeftShift): added promotion
5184         (geniCodeLogic): fixed regression
5185         * src/SDCCsymt.c (computeTypeOr): accept bits too
5186         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5187
5188 2004-03-07  Borut Razem <borut.razem AT siol.net>
5189
5190         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5191
5192 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5193
5194         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5195         version of pic16_genPackRegisters which does not check if ic is a
5196         CAST operator,
5197         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5198         function cause string1.c regression test fails
5199
5200 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5201
5202         * sim/ucsim/configure.in,
5203         * sim/ucsim/configure,
5204         * sim/ucsim/doc/Makefile.in: use docdir
5205         * src/SDCC.y: fixed sbit atrributes
5206         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5207         * src/SDCCast.c (decorateType): |^& need special promotion handling
5208         * src/SDCCast.h,
5209         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5210         * src/SDCCsymt.h (computeType),
5211         * src/SDCCicode.c: computeType() needs op
5212         * src/SDCCsymt.c (checkTypeSanity),
5213         * doc/sddman.lyx: "plain" bitfields are unsigned
5214         * src/SDCCsymt.c (computeTypeOr): added
5215         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5216         |^& ops
5217         * src/SDCCval.c (val*): computeType() needs op
5218         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5219         * support/regression/tests/onebyte.c: added tests for |^&
5220
5221 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5222
5223         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5224         for writing icode into asm output.
5225
5226 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5227
5228         * src/pic16/device.c: added some debug lines enabled
5229         with macro DEBUG_CHECK,
5230         * src/pic16/genarith.c: more debug in genPlus,
5231         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5232         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5233         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5234         * (aopForSym): onStack symbols are re-placed in data memspace,
5235         and onStack flag is cleared,
5236         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5237         copy temporary pcodeop,
5238         * (genPcall): added warning for not updating PCLATU,
5239         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5240         always true for pic16 port,
5241         * (genMultOneWord): NEW, supports integer multiplication,
5242         * (genMult): modified to call genMultOneWord,
5243         * (ifxForOp): added warning when return NULL,
5244         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5245         flag is set before call to operandFromSymbol for implicit
5246         added structures,
5247         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5248         options.intlong_rent are set by default,
5249         * (_hasNativeMulFor): modified to allow port generation of integer
5250         multiplication,
5251         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5252         set regtype to REG_SFR for all registers, restricting seting the
5253         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5254
5255 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5256
5257         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5258         more than 500 times in the regression tests
5259
5260 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5261
5262         * support/Util/SDCCerr.h,
5263         * support/Util/SDCCerr.c,
5264         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5265         enumerator_list),
5266         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5267         for symbol conflicts.
5268         * support/valdiags/tests/enum.c,
5269         * support/valdiags/tests/tentdecl.c,
5270         * support/valdiags/tests/struct.c: expect possible error messages
5271         referring to original symbol definitions.
5272         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5273         * src/SDCCsymt.h,
5274         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5275
5276 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5277
5278         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5279
5280 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5281
5282         * src/pic16/ralloc.c (newReg): fixed bug #908929
5283
5284 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5285
5286         * src/ds390/gen.c: added missing #include "main.h"
5287
5288 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5289
5290         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5291         checking if symbol is already in set,
5292         * src/pic16/device.h: prototype for checkAddSym,
5293         * src/pic16/gen.c: (_G): added entry interruptvector,
5294         * (assignResultValue): removed some commented out lines,
5295         * (genFunction): check for ISR via sym->type, absolute section for
5296         interrupt code is created via a new pBlock, the goto instruction is
5297         placed now correctly at the interrupt vector position, changed all
5298         references from ivec to _G.interruptvector,
5299         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5300         is the interrupt is a high priority one, same for return from ISR,
5301         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5302         externs to calls of checkAddSym,
5303         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5304         pic16_pcode_verbose flag is set,
5305         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5306         * src/pic16/pcoderegs.c: message about how many registers are saved
5307         will only be emitted if pic16_pcode_verbose flag is set,
5308
5309 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5310
5311         * src/ds390/ralloc.h,
5312         * src/ds390/ralloc.c (ds390_regWithIdx),
5313         * src/ds390/gen.c (emitcode),
5314         * src/ds390/main.h,
5315         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5316         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5317         ds390operandCompare, getRegsRead, getRegsWritten,
5318         initializeAsmLineNode): customized instruction size calculation for
5319         ds390, started basis for some register optimizations
5320         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5321         corresponding assembly output
5322         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5323         missing push/pop of r0/r1. Optimized push/pops
5324
5325 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5326
5327         * src/mcs51/main.c (instructionSize): fixed ACALL size
5328         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5329
5330 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5331
5332         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5333         the sorting of rlist with NULL elements
5334         * (print_idataType, print_idata): NEW to create idata sections
5335         * src/pic16/device.h: idataSymSet new variable
5336         * src/pic16/gen.c (genFunction): fixed some bugs in string
5337         comparing, improved the absolute section creation for ISRs,
5338         added FSR0L/FSR0H in registers that are saved in an ISR,
5339         * (genInline): fixed the processing of inline snippets,
5340         now they undergo no process by the peephole optimizer
5341         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5342         are placed in idataSymSet,
5343         * (pic16emitStaticSeg): extern symbols are added in externs,
5344         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5345         switching when aboslute variables are placed in access bank memory
5346         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5347         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5348         commented out with #if,
5349         * (pic16_packRegisters): reintroduce the check for CAST because some
5350         symbols are not correctly handled,
5351         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5352         pCodeInstruction instead of pCode,
5353         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5354         pCodeAsmDir definition,
5355         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5356         directive, then the argument directive is emitted without the leading
5357         tab, hack for inline labels which must be in the first column,
5358         * (compareLabel,pic16_findNextInstruction),
5359         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5360         * (insertBankSwitch): modified for the new pCodeAsmDir,
5361
5362 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5363         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5364
5365         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5366         instance,
5367         * (pushSide): commented out with #if,
5368         * (assignResultValue): fixed some typos in saving
5369         registers,
5370         * (genPcall): FIXED and sync'ed with genCall,
5371         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5372         * (genNearPointerGet): fixed to handle some more cases,
5373         implementation scheme via table reads,
5374         * (genConstPointerGet): modified to access code memory correct,
5375         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5376         and improved to handle some cases
5377         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5378         instead of "RETLW" for init data
5379         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5380         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5381         variables are placed in access bank memory (<0x80 and >=0xf80),
5382         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5383         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5384         TBLWT_POSTDEC,TBLWT_PREINC
5385         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5386         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5387         directives
5388         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5389         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5390         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5391         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5392
5393 2004-02-29  Borut Razem <borut.razem AT siol.net>
5394
5395         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5396         support/Util/findme.h, support/Util/system.h: enhance binary relative
5397         search for lib and include by using findProgramPath()
5398
5399 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5400
5401         * src/SDCCpeeph.h,
5402         * src/SDCCpeeph.c (pcDistance),
5403         * src/port.h,
5404         * src/mcs51/ralloc.h,
5405         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5406         * src/mcs51/main.h,
5407         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5408         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5409         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5410         size calculation port specific, started basis for some register
5411         optimizations
5412         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5413         missing push/pop of r0/r1. Optimized push/pops
5414         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5415         * device/lib/_modsint.c (_modsint),
5416         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5417         and stack version so regression tests pass
5418
5419 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5420
5421         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5422         * src/SDCCast.c (decorateType): catch another small optimization
5423         with '?' operator
5424         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5425         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5426         modified to finally use computeType() all over SDCC,
5427         see Feature Request #877103
5428         * src/SDCCval.h: cosmetic
5429         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5430         valCompare(); regression tested in muldiv.c
5431         * support/regression/tests/muldiv.c (testMod): mod sign follows
5432         dividend only
5433
5434 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5435
5436         * src/SDCCast.c (decorateType): fixed bug #902362
5437         * doc/INSTALL.txt: fixed install instructions for win32
5438
5439 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5440
5441         * device/include/Makefile.in (install): fixed by replacing spaces
5442         by tabs
5443         * doc/README.txt,
5444         * doc/INSTALL.txt: updated for release
5445         * doc/sdccman.lyx: added warning for --xstack being buggy
5446
5447 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5448
5449         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5450         to eliminate build warnings.
5451         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5452
5453 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5454            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5455
5456         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5457         removed -penable-stack, added comment for stack pragma, added
5458         warning for not initializing the stack/frame registers, removed
5459         comment at interrupts section
5460
5461         Stack is made permanent, there is no ability to disable stack usage.
5462         * src/pic16/device.h,
5463         * src/pic16/device.c: removed all references to USE_STACK macro,
5464         * src/pic16/device.c (pic16_dump_section): when no elements in
5465         rlist, free rlist before return,
5466         * (pic16_dump_int_registers): NEW, internal registers are a new set
5467         of general purpose registers reused by each function,
5468         * (checkAddReg): returns 1 if registers is added to set,
5469         * (pic16_groupRegistersInSection): when a registers is of type
5470         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5471         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5472         SRCASECMP macro is moved here from device.c
5473         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5474         PO_PCLATU, PO_PRODL, PO_PRODH,
5475         * (pic16_pCodeOpType, genMinus,
5476         changed compares to "a" register, with AOP_ACC,
5477         * (pic16_genPlus): fixed some bugs and indented properly,
5478         * (pic16_addSign): changed size to size+offset in the MOVWF
5479         instruction,
5480         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5481         multiply 8-bit operand by literal, result is 8-bit,
5482         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5483         multiply 2 8-bit operand, result is 8-bit,
5484         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5485         genUMult8X*_16,
5486         * src/pic16/gen.c: changed accUse to contain WREG only,
5487         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5488         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5489         true, do not use immediate addressing any more unless sym is a
5490         pointer in codespace,
5491         * (aopForRemat): do not use immediate addressing when symbol not in
5492         codespace and when symbol's address is requested,
5493         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5494         accUse size (= 1),
5495         * (aopGet): added case for AOP_ACC and don't return "accumulator
5496         bug" but WREG instead,
5497         * (popGetTempReg): pushes contents of temporary register in stack,
5498         * (popReleaseTempReg): pops contents of temporary register from
5499         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5500         * (pic16_popGet): separated case AOP_ACC to return register WREG
5501         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5502         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5503         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5504         the use of immediate pointers to certain cases only.
5505
5506         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5507         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5508         * (assignResultValue, genCall, genRet): modified to use the new
5509         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5510         genPcall is still broken,
5511         * (genFunction): added code to create 'A' type pBlocks when
5512         interrupt functions are generated, code not extensively tested yet,
5513         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5514         * (genEndFunction): modified so ISRs pop stored registers from stack,
5515         * (genMultOneByte): cleanup,
5516         * (AccRsh): added flag andmask, to and result with appropriate mask,
5517         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5518         * (genDataPointerGet): fixed and reenabled its use,
5519         * (genNearDataPointerGet): bugs fixed,
5520         * (genDataPointerSet): bugs fixed,
5521         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5522         pic16_DumpSymbol, pic16_DumpOp,
5523         * src/pic16/genutils.h: function prototypes for the above functions,
5524         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5525         pointers,
5526         * (pic16emitRegularMap): many many many improvements, but needs a
5527         major cleanup,
5528         * src/pic16/main.c: enable_stack in pic16_options is removed,
5529         * (_pic16_parseOptions): removed command line options -penable-stack,
5530         * (_process_pragma): emit stack symbol only when stack pragma is
5531         processed,
5532         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5533         redirected to FSR0L/FSR0H pair,
5534         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5535         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5536         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5537         for immediates,
5538         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5539         * (dumpPicOptype): NEW,
5540         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5541         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5542         with movff instruction,
5543         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5544         added pic16_int_regs, some packRegsFor* functions are commented out,
5545         because produce errors,
5546         * src/pic16/NOTES: minor modifications
5547
5548 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5549
5550         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5551         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5552         --pack-iram.
5553         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5554         * as/mcs51/lkaomf51.c: fixed bug #895763
5555
5556 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5557
5558         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5559
5560 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5561
5562         * doc/sdccman.lyx: added details about the HC08 storage classes and
5563         interrupts, fixed the register usage info for z80 & gbz80
5564
5565 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5566
5567         * doc/sdccman.lyx: added more pic16 port documentation
5568         * device/include/pic16/: added header pic18fregs.h
5569
5570 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5571
5572         * doc/sdccman.lyx: added Vangelis' contribution
5573
5574 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5575
5576         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5577         extend to the next CALL or PCALL, not just to the next CALL.
5578
5579 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5580
5581         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5582
5583 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5584
5585         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5586         bug #895752 and a better fix for bug #716790
5587
5588 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5589
5590         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5591
5592 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5593
5594         * doc/sdccman.lyx: minor changes, minor changed
5595
5596 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5597
5598         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5599         which can't handle SDCC_NEWONEBYTEOPS,
5600         (geniCodeMultiply): removed conversion from mult to shift for pic14
5601         and pic16
5602
5603 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5604
5605         * src/hc08/gen.h,
5606         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5607         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5608         thus fixing bug #895406
5609
5610 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5611
5612         * device/lib/_modsint.c,
5613         * device/lib/_modslong.c: sign follows divisor only
5614         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5615         signs or signedness can be ignored
5616         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5617         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5618         added optimization for IFX,
5619         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5620         arguments;
5621         reenabled optimization for IFX, which was removed on 2004-01-11
5622         * src/SDCCast.h: added return type IFX
5623         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5624         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5625         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5626         SDCC_OLDONEBYTEOPS selects the old behaviour
5627         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5628         changed again and commented promotion rule
5629         * src/SDCCval.c (valDiv): promotion no longer necessary
5630         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5631         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5632         rewritten
5633         * support/regression/tests/onebyte.c: added
5634
5635 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5636
5637         * gen.c (genInline): reverted to old code for assemnling inline
5638         code because of bug reported James Chadd
5639
5640 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5641
5642         * ralloc.h: missing declarations from previous patch,
5643         seems that patch for ralloc.h was never applied, fixed
5644
5645 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5646            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5647
5648         * pcode.c,
5649         * pcode.h,
5650         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5651         indirect addressing. Marked FSR0 as deprecated
5652         * gen.c (pointerCode): commented out, not needed now
5653         (pic16_popGet2p): new MOVFF helper function
5654         (genGenPointerGet),
5655         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5656         (shiftRLong): removed duplicate debugging info
5657
5658 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5659
5660         * src/ds390/gen.c (genNearPointerGet),
5661         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5662         optimization with bits, but not bitfields.
5663         * src/ds390/ralloc.c (packRegisters),
5664         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5665
5666 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5667
5668         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5669
5670 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5671
5672         * src/SDCCsymt.h,
5673         * src/SDCCicode.c (operandFromSymbol),
5674         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5675         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5676         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5677         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5678         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5679         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5680         bug #892038
5681         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5682         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5683         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5684         * src/SDCCsymt.c (newSymbol),
5685         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5686         enumerator_list),
5687         * src/SDCCval.h,
5688         * src/SDCCval.c (newiList): fixed bug #885705
5689
5690 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5691
5692         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5693         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5694
5695 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5696
5697         * device/include/c8051f120.h,
5698         * device/include/c8051f300.h,
5699         * device/include/c8051f310.h: added/updated header files for Silicon
5700         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5701         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5702         in new section Submitting patches
5703
5704 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5705
5706         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5707         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5708         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5709         genGenPointerSet),
5710         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5711         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5712         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5713         genGenPointerSet),
5714         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5715         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5716         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5717         genGenPointerSet),
5718         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5719         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5720         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5721         genGenPointerSet): fixed bug #892400
5722         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5723         to eliminate build warnings.
5724         * src/SDCCast.c (processParms),
5725         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5726         fixed bug 751859
5727         * support/valdiag/valdiag.py: added GCC to the list of defines active
5728         when compiling with gcc
5729
5730 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5731
5732         * support/Util/SDCCerr.h,
5733         * support/Util/SDCCerr.c,
5734         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5735         with an incomplete type (fixed bug #883734)
5736         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5737
5738 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5739
5740         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5741
5742 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5743
5744         * src/SDCCast.c (decorateType),
5745         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5746         function pointer implementation
5747         * support/regression/tests/funptrs.c: added tests to verify both forms
5748         of function pointers work correctly. Added tests to verify parameters
5749         are passed in the correct order.
5750
5751 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5752
5753         * device.c (regCompare): registers are sorted by ascending
5754         address and increasing size,
5755         * main.c (_pic16_finaliseOptions): removed the declaration
5756         of compiler macro MCU. Now a macro of the format pic18fxxxx
5757         will be defined from the command line
5758
5759 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5760             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5761
5762         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5763         PCOP_RLCF was overwritten!
5764         * gen.c (genSkip): commented out calls to pic16_emitcode,
5765         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5766         * (genlshTwo),
5767         * (genRRC): added debugging info,
5768         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5769         overwritten while shifting,
5770         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5771         overwritten while shifting,
5772         * (AccLsh),
5773         * (AccRsh),
5774         * (shiftLLeftOrResult),
5775         * (shiftRLeftOrResult),
5776         * (shiftRLong),
5777         * (shiftLLong): Implemented with pic16_emitpcode
5778         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5779         * (genLeftShift): Fixed bug, operand for shift by variable always
5780         was "and"ed with 0x0f,
5781         * (genLeftShiftLiteral),
5782         * (genrshTwo),
5783         * (genRightShiftLiteral): added debugging info,
5784         * (genrshFour): added comment,
5785         * (genRightShift): determined signedness from operand "left"
5786         instead of "result"
5787
5788 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * src/SDCCicode.c (geniCodeParms),
5791         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5792         function pointers, fixed function pointer bugs #861242 and #861896
5793
5794 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5795
5796         * device/include/c8051f000.h,
5797         * device/include/c8051f120.h,
5798         * device/include/c8051f300.h: added header files for Silicon
5799         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5800
5801 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5802
5803         * src/SDCCast.c (processParams): added new type flow and restructured
5804         (gatherAutoInit): added new type flow
5805         (addCast): cosmetic changes
5806         (getLeftResultType): added new type flow for array indices, patch
5807         provided by Stas, see FR #877103
5808         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5809         array index patch by Stas
5810         * src/SDCCast.h: added prototype getResultTypeFromType()
5811         * src/SDCCval.h,
5812         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5813         * src/pic/glue.c (pic14emitStaticSeg),
5814         * src/pic16/glue.c (pic16emitStaticSeg),
5815         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5816         for initialization of symbols
5817         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5818         * support/Util/SDCCerr.h:
5819         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5820         * .version: bumped version number to 2.3.8
5821         * device/include/Makefile.in (install),
5822         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5823         avoid warnings
5824
5825 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5826
5827         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5828         Slade Rich fixed an optimization bug
5829         * src/pic/pcodepeep.c,
5830         * src/pic/pcoderegs.c
5831         * doc/Makefile (install): added test for directory
5832
5833 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5834
5835         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5836         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5837         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5838         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5839         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5840         * as/mcs51/asexpr.c (term),
5841         * as/hc08/asexpr.c (term): fixed bug #887146
5842
5843 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5844
5845         * src/z80/gen.c (genMult): handle single byte result product
5846         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5847         DUMMY_READ_VOLATILE (fixed bug #886367)
5848
5849 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5850
5851         * support/regression/tests/libmullong.c: fixed logic, on little endian
5852         hosts we ended without a mullong_wrapper()
5853
5854 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5855
5856         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5857         virus/worm forged address usage.
5858
5859 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5860
5861         Fixed promotion, it should be done on AST level:
5862         * src/SDCCast.c (addCast): added promotion to int
5863         (decorateType): updated call to upCast()
5864         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5865         usualUnaryConversions()
5866
5867 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5868
5869         * support/regression/tests/literalop.c (mulWrapper): Added a
5870         wrapper to remove integer overflow warnings.
5871
5872         * support/regression/tests/float_trans.c: Made work on host.
5873
5874         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5875         location of sz80.
5876
5877         * support/regression/generate-cases.py (main): Changed from inline
5878         to a main method.
5879
5880         * doc/Makefile (install): Changed to depth first to get rid of
5881         missing directory install warning.
5882
5883         * as/Makefile (install-doc): Made work on Mac.
5884
5885 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5886
5887         * src/SDCCast.c: added an additional type flow in decorateType() of
5888         opposite direction, see feature request #860006; it's enabled at runtime
5889         by setting the environment variable SDCC_NEWTYPEFLOW
5890         * src/SDCCast.h: changed prototype of decorateType()
5891         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5892         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5893         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5894         see feature request #877103
5895         * src/SDCCval.c: updated call of decorateType()
5896         (valBitwise): fixed bug #882876
5897         (valMinus): added promotion
5898         (valLogicAndOr): result is unsigned
5899         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5900         * src/SDCCsymt.c (computeType),
5901         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5902         must not cause an unsigned operation
5903         * src/pic/glue (pic14emitRegularMap),
5904         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5905
5906 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5907
5908         * src/pic/pcode.c (PCodeID): commented out left over debug code
5909
5910 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5911
5912         * support/valdiag/tests/overflow.c: added shift tests
5913         * src/pic/device.c,
5914         * src/pic/gen.c,
5915         * src/pic/gen.h,
5916         * src/pic/glue.c,
5917         * src/pic/main.c,
5918         * src/pic/pcode.c,
5919         * src/pic/pcode.h,
5920         * src/pic/pcodepeep.c,
5921         * src/pic/pcoderegs.c,
5922         * src/pic/ralloc.c,
5923         * src/pic/ralloc.h: applied patch from Slade Rich;
5924         added support for multiple code pages and multiple RAM banks on the
5925         PIC 14 port. The ASM files now no longer simply assume all the
5926         code / RAM are in the same page / bank. This means the linker can
5927         safely allocate code/RAM of separate ASM files to different pages/banks.
5928         * doc/sdccman.lyx: added Slade's tips
5929         * src/mcs51/peeph.def: fixed bug #880768
5930
5931 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5932
5933         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5934         * src/SDCCast.c (decorateType): fixed bug #880197
5935
5936 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5937
5938         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5939         getopt.h.
5940
5941         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5942         strtof is not part of C89 and isn't included with Mac OS X.
5943
5944 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5945
5946         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5947         shiftL2Left2Result): fixed bug #879326
5948         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5949         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5950         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5951         address fetch for clr instruction
5952         * device/lib/hc08/_mulint.c: created optimized assembly version
5953         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5954
5955 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5956
5957         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5958         proposed in FR #877103
5959
5960 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5961
5962         * src/SDCCval.c (cheapestVal): added missing checks
5963         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5964         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5965
5966 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5967
5968         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5969         equal operands
5970
5971 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5972
5973         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5974         loaded with the linker search paths (-L arguments) and the libraries
5975         to be linked with the current source (-l arguments). Changes
5976         currently will affect only the pic16 port.
5977         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5978         include path the port specific paths and port specific libraries,
5979         * gplink command now contains the $3 argument,
5980         * src/pic16/device.h,
5981         * src/pic16/device.c,: structure PIC_device is made public and
5982         renamed to PIC16_device, the same for variable Pics which is renamed
5983         to Pics16. Updated all references to them.
5984         * src/pic16/glue.c (pic16glue): corrected bug with code
5985         initialization which bypassed the variable initializations block.
5986
5987         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5988         COMPILE_FLAGS and added the --nostdinc option
5989
5990 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5991
5992         * device/include/mc68hc908jb8.h: Register defs for another member
5993         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5994
5995 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5996
5997         Documenting changes from previous commits.
5998         * configure.in (version 1.56),
5999         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6000         when generating output files to configure the pic16 library,
6001         but now I've commented it out, since gputils aren't installed in the
6002         SF compile farm, so library won't compile
6003
6004         * device/lib/Makefile.in (version 1.56): initially I've added in
6005         target 'all' the prerequestive 'model-pic16' so it compiled the
6006         pic16 library, but now I've commented it out for the same reasons
6007         above,
6008         * added targets 'model-pic16' and 'objects-pic16' to compile the
6009         library
6010         * added target 'port-specific-objects-pic16' to handle the
6011         generated libraries and copy them into the build/ directory
6012         * added target 'clean-intermediate-pic16' to clean intermediate
6013         files into pic16 directory
6014         * in target 'installdirs' added line to create directory pic16 in
6015         the installation path
6016
6017         * device/include/Makefile.in (version 1.11): in target 'install'
6018         added lines to copy all header files to installation path,
6019         * in target 'installdirs' added line create directory for pic16
6020         headers in the installation path
6021
6022 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6023
6024         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6025          a function call
6026
6027 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6028
6029         * configure,
6030         * device/lib/configure.in,
6031         * device/lib/configure: fixed for autoconf 2.57
6032
6033 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6036         option so that it actually works. Made it specific to the z80, since
6037         the gbz80 doesn't have these kinds of I/O ports.
6038
6039 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6040
6041         * device/include/z180.h,
6042         * device/lib/_memcpy.c,
6043         * device/lib/_memmove.c,
6044         * device/lib/_mulint.c,
6045         * device/lib/ser_ir.c,
6046         * device/lib/ser_ir_cts_rts.c,
6047         * device/lib/_strcmp.c,
6048         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6049         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6050         portmode; added deprecation warning for bank= and protmode= forms.
6051         Also, guard against buffer overflow.
6052         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6053
6054 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6055
6056         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6057         changed interrupt vector table generation to only emit declared vectors.
6058         * device/include/Makefile.in: added missing backslash
6059         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6060
6061 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6062
6063         Mainly changes to support compilation of the device libraries
6064         * src/pic16/device.c: stack is allocated via symbol and not
6065         via literal number. The symbol is placed in the corresponding
6066         position of the data ram
6067         * (pic16_dump_section): relocatable and absolute uninitialized
6068         data are now emitted in sorted order to reduce section naming,
6069         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6070         weren't marked as being in the access bank,
6071
6072 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6073
6074         Added portion of GNU PIC Library under the directory
6075         device/include/pic16 and device/lib/pic16. These files
6076         contain the declarations of SFRs for the PIC18Fxx2 devices.
6077         The directory is initialized via configure from toplevel.
6078
6079 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6080
6081         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6082         the spilllocations to be compared correctly
6083
6084 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6085
6086         * src/SDCCast.c (decorateType): fixed bug introduced today
6087
6088 2004-01-12  Borut Razem <borut.razem AT siol.net>
6089
6090         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6091         doc/sdccman.lyx: upper case pragmas are deprecated
6092
6093 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6094
6095         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6096         in simpler and even better code
6097
6098 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6099
6100         * src/SDCCicode.c (operandOperation): fixed bug #874819
6101         * src/SDCCast.c (decorateType): fixed
6102         char foo (unsigned long ul) { return ul > 0; }
6103
6104 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6105
6106         * doc/sdccman.lyx: Moved and added some sections, small changes
6107         all over. Telling LaTeX to be less strict with word spacing
6108         to better keep the right margin. Changed some notes about
6109         maintainance of the ports in section 3.2.1 - is it OK like this?
6110
6111 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6112
6113         SDCC source changes:
6114         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6115         convilong): modified to inform the pic16 port that builtin functions
6116         are external
6117
6118         PIC16 PORT specific changes:
6119         * src/pic16/device.c pic16_dump_equates() added,
6120         processor registers declared internally by the port are emitted in
6121         the translation as equates,
6122         * src/pic16/gen.c: inline code is passed unprocessed to the
6123         translation,
6124         * (pic16_popGetLit2): fnuction modified to take second operand as
6125         pCodeOp pointer and not as literal,
6126         * (popRegFromIdx): prefixed with pic16_,
6127         * (pic16_popCombine2): modified to receive already allocated pCode
6128         operands,
6129         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6130         * (genFunction): initializes local stack frame and pushes on stack
6131         all the registers used by this function,
6132         * (genEndFunction): restores all registers from stack and restores
6133         stack frame,
6134         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6135         improvements,
6136         * (pic16glue): changed the program startup sequence,
6137         * added new dbName code 'A' for functions placed in absolute section
6138         * src/pic16/main.c: added function attribute _naked,
6139         * added pragma 'code' to place a fnuction at an absolute address,
6140         * added command line arguments --debug-ralloc and --pcode-verbose,
6141         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6142         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6143         * (pic16_newpCodeOpLit2): modified to take the second operand as
6144         pCodeOp pointer,
6145         * (pic16_printpBlock): modified to emit each function in a separate
6146         section,
6147         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6148         UPPER for immediate operands,
6149         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6150         instruction,
6151         * src/pic16/peeph.def: all peepholes with movff are commented out,
6152         because there is a problem in the pcode peep optimizer,
6153         * src/pic16/ralloc.c: the register allocator can now reuse local
6154         function symbols for another function. This saves register usage.
6155         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6156
6157         Added file src/pic16/NOTES with information about program writing on
6158         the current port version.
6159
6160 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6161
6162         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6163         and peephole 252 (array access)
6164
6165 2004-01-09  Borut Razem <borut.razem AT siol.net>
6166
6167         * src/SDCCmain.c : fixed #872250: -l command line defined library
6168           files are scanned before standard library files
6169
6170 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6171
6172         * src/SDCCast.c (decorateType): fixed bug #874046
6173
6174 2004-01-09  Borut Razem <borut.razem AT siol.net>
6175
6176         * support/scripts/sdcc.nsi: remove previous installation
6177
6178 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6179
6180         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6181         bytes for last interrupt vector (mcs51)
6182         * sdcc.spec: fixed typo
6183
6184 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6185
6186         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6187         gen51Code): more efficient parameter receive for --model-large
6188         ("bug" #845294)
6189
6190 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6191
6192         * src/ds390/main.c,
6193         * src/z80/main.c: added missed needLinkerScript flags (more than
6194         one port structure defined in these file)
6195         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6196         bug #795325
6197
6198 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6199
6200         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6201         * src/port.h: added flag needLinkerScript in port->linker
6202         structure to inform whether to create a .lnk file or not,
6203         * src/avr/main.c,
6204         * src/ds390/main.c,
6205         * src/hc08/main.c,
6206         * src/mcs51/main.c,
6207         * src/pic/main.c,
6208         * src/pic16/main.c,
6209         * src/xa51/main.c,
6210         * src/z80/main.c: changed appropriately to configure
6211         needLinkerScript flag
6212         * src/pic/gen.c,
6213         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6214         * src/pic/glue.c: added variable udata_section_name to
6215         override default uninitialized data segment definition for
6216         devices only with SHAREBANK memory (reported from Erik Epetrich)
6217         * (pic14emitOverlay): modified to emit a commented overlay segment
6218         directive when no overlay data exist
6219         * (picglue): modified to emit uninitialized data segment
6220         according to udata_section_name
6221         * src/pic/main.c (_pic14_parseOptions): added command line
6222         options --udata-section-name=[name] to override default
6223         udata definition name
6224         * modified _linkCmd and _asmCmd to include compiler passed
6225         arguments via -W option
6226         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6227         object file from '.rel' to '.o' in port->linker structure,
6228         changed size of fptr from 2 to 3 in port structure
6229
6230 2004-01-07  Borut Razem <borut.razem AT siol.net>
6231
6232         * support/scripts/sdcc.nsi: update PATH
6233         * support/scripts/sdcc.ico: craeted
6234
6235 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6236
6237         * device/include/Makefile.in: fix install
6238         * doc/Makefile: fix install
6239
6240 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6241
6242         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6243         in bug #860505
6244         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6245         how the function variable allocation summary is displayed; also
6246         include information about variables allocated to the overlay
6247         segment
6248
6249 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6250
6251         * as/mcs51/lkmain.c: Help about -Y option
6252         * as/mcs51/lkarea.c: Fixed gcc warnings
6253
6254 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6255
6256         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6257         fixed warning
6258         * support/valdiag/tests/overflow.c: added
6259         * src/SDCCast.c (decorateType),
6260         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6261         LEFT_OP (left shift)
6262
6263 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6264
6265         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6266         (default behaviour).
6267
6268 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6269
6270         A python script to validate compiler diagnostic messages. It can be
6271         used to verify that sdcc complains about bad c source code and
6272         gives a good location of the error.
6273         * support/valdiag/Makefile,
6274         * support/valdiag/valdiag.py,
6275         * support/valdiag/tests/*
6276
6277 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6278
6279         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6280         * src/SDCCsymt.c (newEnumType),
6281         * src/SDCCsymt.h
6282         * support/Util/SDCCerr.c,
6283         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6284         enum related bugs.
6285         * support/regression/tests/enum.c: added test for enum values that
6286         require at least 2 bytes of storage.
6287
6288 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6289
6290         * src/common.h: added ifndef/define/endif macros
6291         around the header file.
6292         Bug reported from Jesus Calvino-Fraga
6293
6294 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6295
6296         * sdcc.spec: updated
6297         * device/include/Makefile.in: don't install CVS directories
6298         * device/lib/Makefile.in: added removal of CVS directories after install
6299         * doc/Makefile: fixed install, added local_icons
6300         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6301         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6302         * src/ds390/gen.c (genRightShift): fixed bug #870788
6303         * src/SDCCast.c (decorateType): fixed bug #870781
6304
6305 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6306
6307         PIC16 port related changes:
6308         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6309         added variable stackPos,
6310
6311         * gen.c: genCall, assignResultValue: added support for
6312         pushing/retrieving function parameters to/from stack,
6313         genFunction,genEndFunction: setup stack frame for the
6314         generated function,
6315         genAddrOf: will be changed according to bug 863624
6316
6317         * added files genutils.c and genutils.h which contain gen*
6318         debugged and optimised functions extracted from gen.c
6319
6320         * glue.c: added variable 'externs' which holds extern symbols,
6321         pic16emitRegularMap: is modified to properly handle relocatable
6322          symbols under the new scheme,
6323         pic16createInterruptVect: is modified
6324         pic16printPublics: is modified to emit 'global' assembler directives,
6325         added pic16_printExterns to print extern symbols,
6326         pic16glue: initializes stack/frame pointer in the beginning of
6327         the assembly output. Temporary hack, will be corrected later,
6328         because gplink yet does not support stack and SDCC does not
6329         yet support a type of crt0.o object to create the final binary.
6330
6331         * Removed many lines that contain 8051 legacy code.
6332         * The code is finally placed under a 'code' directive.
6333         * Added port specific options.
6334
6335         * _process_pragma: simplified since now we do not need *special*
6336         include file to define SFR registers. But a separate header
6337         will be needed. This will be developed later.
6338         * _pic16_parseOptions: added, parses port specific options:
6339         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6340         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6341         --preplace-udata-with=
6342
6343         * _pic16_setDefaultOptions: modified to initialize section names,
6344         but hack is temporarly out of order since it needs improvement.
6345         * _pic16_genAssemblerPreamble: configuration words are emitted by
6346         their address instead of their name. This part is incomplete and
6347         supports only the 18Fxx2 devices. Other devices will emit an error
6348         during assembly since they do not contain the same set of config
6349         registers
6350         * _pic16_genIVT: is modified,
6351
6352         * pcode.c: added definitions for some hardware registers that are needed
6353         for stack support
6354         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6355         All PCI entries are updated. Now LFSR is supported.
6356         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6357         * added pic16_newpCodeOpLit2 to support instructions with
6358         two literal arguments
6359         * pic16_pCode2str: corrected code that emits assembler instructions
6360         with two literal operands and those that have an access bit modifier
6361         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6362         this fixes a bug which caused some labels to be lost, when an
6363         assembler directive was added, i.e. banksel,
6364         * pic16_FixRegisterBanking: improved logic that causes the insertion
6365         of bank switching,
6366         * InlineFunction: functions that are called once, are not any more
6367         inlined. This can be a port option in the future,
6368
6369         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6370
6371         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6372         hold the corresponding uninitialized symbols,
6373         * pic16_allocProcessorRegister: registers have explicit marked the
6374         accessBank field,
6375         * pic16_allocInternalRegister: registers are explicit marked as
6376         not used,
6377         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6378         processing list, so bit registers were lost,
6379         *
6380
6381         * ralloc.h: added field 'accessBank' and original symbol operand
6382         in register definition,
6383         * removed the field isMapped from register definition,
6384
6385         ** Several functions have been removed from various sources:
6386         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6387         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6388         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6389         pic16_assignRelocatableRegisters
6390
6391         ** others have been introduced:
6392         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6393         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6394
6395 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6396
6397         * support/scripts/inc2h.pl: changed definition of BIT_AT
6398         to emit 'sbit at' instead of 'bit at'. This was a request.
6399
6400         PIC16 port related preliminary changes:
6401         * gen.c: prefixed function popRegFromString with
6402         pic16_ and all references to it corrected
6403         * pcode.c: all pic16_pc_* hardware registers prefixed
6404         with underscore (_),
6405         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6406         * ralloc.c: newReg(): when register is REG_SFR then
6407         set address to rIdx,
6408         pic16_allocProcessorRegister(): marks register wasUsed=0
6409         pic16_writeUsedRegs(): added a call to assign processor
6410         registers via pic16_assignFixedRegisters
6411
6412 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6413
6414         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6415         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6416         variables in unused register banks.  Also the SSEG is placed
6417         wherever there is enough space for it, and IDATA can be anywhere
6418         in internal RAM.  For now compile using -Wl-Y[stack_size].
6419         The mem file is different for this option as well, since it
6420         makes no sense of talking about DSEG lenght.
6421
6422 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6423
6424         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6425         in certain cases, e.g. when ROM assignment, patch provided
6426         from Albert den Haan.
6427
6428 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6429
6430         Many signedness and type propagation fixes:
6431         * src/SDCCicode.c: made geniCodeCast() static
6432         replaced SPEC_ by IS_ (cosmetic)
6433         (operandOperation): fixed div and mod operation
6434         (usualBinaryConversions): added support for promotion of char
6435         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6436         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6437         (geniCodeAdd): an array index will stay unsigned, even if promoted
6438         from char to int
6439         (geniCodeArray): ditto
6440         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6441         * src/SDCCsymt.c (computeType): added more support for char;
6442         promotion of char is selectable by promoteCharToInt, fixed signedness
6443         for all cases
6444         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6445         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6446         * src/SDCCval (val*): replaced signedness calculation by
6447         computeType()
6448         rearranged if-branches (cosmetic)
6449         (valShift): added warning W_SHIFT_CHANGED
6450         (valCompare): fixed problem with different types
6451         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6452         * support/regression/tests/literalop.c: added many cases
6453         * support/regression/tests/ast_constant_folding.c: changed finally to
6454         'unsigned int'
6455         * .version: new year, new version: 2.3.7
6456         * src/SDCCmain.c (main): applied patch #866468
6457         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6458         provided by Scott Bronson
6459         * doc/sdccman.lyx: updated documentation for sdcdb
6460         updated and added chapter tips
6461
6462 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6463
6464         * src/SDCCsymt.h: missing from yesterday's commits
6465
6466 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6467
6468         * src/SDCC.y (struct_or_union_specifier),
6469         * support/Util/SDCCerr.c,
6470         * support/Util/SDCCerr.h: verify that struct & union tags are used
6471         as declared.
6472
6473 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6474
6475         * src/SDCCglobl.h: missing from yesterday's commits
6476
6477 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6478
6479         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6480         sft_attributes, struct_declaration, parameter_declaration,
6481         type_name, start_block, declaration_list),
6482         * src/SDCC.lex (check_type): support redefinition of typedef names
6483
6484 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6485
6486         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6487         aligned xdata arrays. Erik helped me with the if clause.
6488
6489 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6490
6491         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6492         warning
6493
6494 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6495
6496         * src/SDCCast.h,
6497         * src/SDCCast.c (newAst_),
6498         * src/SDCCicode.h,
6499         * src/SDCCicode.c (ast2iCode, newiCode),
6500         * src/SDCCglobl.h,
6501         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6502         expr, statement, expression_statement, selection_statement,
6503         iteration_statement, expr_opt, jump_statement): foundation for tracking
6504         sequence points
6505         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6506         point code too)
6507
6508 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6509
6510         * support/Util/SDCCerr.c,
6511         * src/SDCCast.h,
6512         * src/SDCCast.c (createCase, createDefault, decorateType),
6513         * src/SDCClabel.c (labelUnreach),
6514         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6515         to error messages.
6516         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6517         (with thanks to Stas Sergeev)
6518         * device/include/time.h,
6519         * device/lib/time.c (CheckTime): suppress unreachable code warning
6520
6521 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6522
6523         * src/SDCCast.c (createIvalCharPtr),
6524         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6525         bug #753752)
6526         * support/regression/tests/nullstring.c: tests for these two bugs
6527
6528 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6529
6530         * support/Util/SDCCerr.h,
6531         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6532         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6533         about storage class and 'at' used inside struct or union
6534         * src/SDCCBBlock.c (iCodeFromeBBlock),
6535         * src/SDCCcse.c (ifxOptimize),
6536         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6537         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6538         printIval, emitStaticSeg, emitOverlay),
6539         * src/SDCClabel.c (deleteIfx),
6540         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6541         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6542         gatherAutoInit, processParms),
6543         * support/Util/SDCCerr.h,
6544         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6545         reporting for post-parse errors.
6546
6547 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6548
6549         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6550         implicit casts via union; they don't work on big endian systems
6551         (possible fix for bug #861138)
6552
6553 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6554
6555         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6556         * src/mcs51/main.c: fixed the fix for bug #737001
6557
6558 2003-12-15  Borut Razem <borut.razem AT siol.net>
6559
6560         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6561
6562 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6563
6564         * support/makebin/makebin.c: put output in binary mode
6565
6566 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6567
6568         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6569         xdata and data memory on startup. Set the environment variable
6570         SDCC_NOGENRAMCLEAR to disable this.
6571         * src/mcs51/peephole.def,
6572         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6573         (allows non-interrupt and interrupt code to safely compete for a resource
6574         without the non-interrupt code having to disable interrupts)
6575
6576 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6577
6578         * src/SDCCicode.c (geniCodeAdd),
6579         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6580         with valFromType if type might be a pointer and host is big endian).
6581         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6582         types, not just integer types.
6583         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6584         multiply defined with mismatching "at" address.
6585
6586 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6587
6588         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6589         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6590         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6591         with embedded nulls (fixed bug #753752)
6592
6593 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6594
6595         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6596         Apparently this did not see much testing (endless loop)
6597
6598 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6599
6600         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6601
6602 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6603
6604         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6605         gracefully handle NULL memmap pointers
6606
6607 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6608
6609         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6610         instead of deleting the iCode when an operand is volatile
6611         * src/z80/gen.c (genDummyRead),
6612         * src/mcs51/gen.c (genDummyRead),
6613         * src/ds390/gen.c (genDummyRead),
6614         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6615         not just IC_RIGHT
6616         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6617         * src/SDCC.y: fixed bug #850420
6618
6619 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6620
6621         Applied z80 i/o port patch from Peter Townson and fixed some operators
6622         to better handle operands in A register.
6623         * device/include/z180.h
6624         * src/SDCC.y
6625         * src/SDCCglue.c
6626         * src/z80/gen.c
6627         * src/z80/gen.h
6628         * src/z80/main.c
6629         * src/z80/peeph-z80.def
6630         * src/z80/peeph.def
6631         * src/z80/z80.h
6632
6633 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6634
6635         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6636
6637 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6638
6639         * device/lib/hc08/_mullong.c: Removed extra #endif
6640
6641 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6642
6643         * sim/ucsim/hc08.src/inst.cc,
6644         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6645         carries from x to h
6646         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6647         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6648         * device/include/stdarg.h: fixed varargs for hc08
6649         * device/lib/Makefile.in,
6650         * device/lib/hc08/Makefile,
6651         * device/lib/hc08/_mulint.c,
6652         * device/lib/hc08/_mullong.c: fixed some endian problems
6653
6654 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6655
6656         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6657         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6658         * device/lib/_gptrget.c,
6659         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6660
6661 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6662
6663         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6664         * src/SDCCast.c (astErrors): fixed bug #846007
6665         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6666
6667 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/SDCCast.c (decorateType): disabled a transformation I added in
6670         revision 1.188 (access to fields of a structure at an absolute address);
6671         it breaks with bitfields, extern declarations, and gcse analysis.
6672         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6673         could be assigned through a pointer, so don't complain.
6674         * src/SDCCast.c (astErrors),
6675         * src/SDCCast.h,
6676         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6677
6678 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6679
6680         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6681         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6682         output of __config directives, since gpasm now supports them
6683         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6684         pre-processor macro, i.e. -DMCU=p18f452
6685         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6686         and modified to handle 'cast' icode similarly to '=' icode
6687         * src/pic16/device.h (typedef struct PIC_device): added field
6688         'extMIface' to indicate that chip has external memory interface
6689         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6690         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6691         18F8720
6692
6693 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6694
6695         * src/SDCC.y (pointer): fixed bug #846006
6696         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6697         * src/SDCCast.c (decorateType): fixed bug #846009
6698         * src/ds390/peeph.def,
6699         * src/ds390/gen.c (genAnd, genOr),
6700         * src/mcs51/peeph.def,
6701         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6702
6703 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6704
6705         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6706         * src/SDCCdflow.c
6707         * src/SDCCcse.c
6708         * src/SDCCcse.h
6709         * src/SDCCBBlock.h
6710         * src/SDCCBBlock.c
6711
6712 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6713
6714         fixed bug #845089
6715         * src/SDCCbitv.h,
6716         * src/SDCCbitv.c: added function to free a bitvector
6717         * src/SDCClrange.h,
6718         * src/SDCClrange.c: added function to recompute the liveranges
6719         * src/avr/ralloc.c,
6720         * src/ds390/ralloc.c,
6721         * src/hc08/ralloc.c,
6722         * src/mcs51/ralloc.c,
6723         * src/pic/ralloc.c,
6724         * src/pic16/ralloc.c,
6725         * src/xa51/ralloc.c,
6726         * src/z80/ralloc.c: recompute the liveranges after register packing
6727
6728 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6729
6730         * src/SDCCloop.c (newInduction): fixed bug #845630
6731
6732 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6733
6734         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6735         inadvertantly left behind from my 2003-11-12 change
6736
6737 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6738
6739         Updated headers I neglected to commit yesterday.
6740         * src/SDCClrange.h,
6741         * src/SDCCicode.h
6742
6743 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6744
6745         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6746         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6747         * src/SDCCopt.c (eBBlockFromiCode),
6748         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6749         the creation of the key hash table from the sequencing so it can be used
6750         earlier (for some GCSE bug fixes still pending)
6751
6752 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6753
6754         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6755         * support/regression/tests/addsub.c: testing genPlus shortcut
6756
6757 2003-11-15  Borut Razem <borut.razem AT siol.net>
6758
6759         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6760
6761 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6762
6763         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6764         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6765         ordering is immaterial.
6766         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6767
6768 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6769
6770         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6771         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6772         (SIGSEV) of bug #840381
6773         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6774         unlink new file before rename if new and old filenames are the same)
6775
6776 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6777
6778         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6779         uninitialized variables) for the mcs51. Set environment variable
6780         SDCC_GENRAMCLEAR to test.
6781         xdata initialization slightly shorter
6782
6783 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6784
6785         * src/SDCCsymt.h,
6786         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6787         #838241 & 780691 (basicly the same bug)
6788         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6789         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6790
6791 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6792
6793         * src/SDCCmain.c (linkEdit): "fix" #834252
6794
6795 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6796
6797         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6798         * src/SDCCast.h,
6799         * src/SDCC.y: fixed bug #819403
6800
6801 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6802
6803         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6804         the reentrant attribute.
6805         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6806         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6807         simulation
6808         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6809         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6810         erroneously reduced to a literal.
6811         * src/hc08/ralloc.c (packRegisters, rematStr),
6812         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6813         some cases
6814
6815 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6816
6817         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6818         * doc/sdccman.lyx: changed from 'article' to 'book'
6819         * doc/Makefile: readded test_suite_spec and cdbfileformat
6820
6821 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6822
6823         * device/include/stdlib.h: include malloc.h to comply with ANSI
6824         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6825
6826 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6827
6828         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6829         * doc/clean.mk: also remove *.out files
6830         * doc/sdccman.lyx: some additions, larger top/bottom margins
6831
6832 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * src/SDCC.y: fixed bug #837365
6835         * support/regression/tests/bitopcse.c
6836         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6837         a symbol (might be valop instead)
6838         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6839         * device/lib/clean.mk: added hc08 to the cleaning list
6840
6841 2003-11-04  Borut Razem <borut.razem AT siol.net>
6842
6843         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6844           made 2003-11-04
6845         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6846           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6847           malloc is declared in standard stdlib.h
6848
6849 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6850
6851         * device/lib/hc08/Makefile: need to clean .rel not .o files
6852         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6853
6854 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6855
6856         * src/port.h,
6857         * src/hc08/main.c,
6858         * src/mcs51/main.c,
6859         * src/ds390/main.c,
6860         * src/z80/main.c,
6861         * src/avr/main.c,
6862         * src/pic/main.c,
6863         * src/pic16/main.c,
6864         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6865         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6866         tests (which uses the port's oclsExpense function)
6867         * src/SDCC.y,
6868         * src/SDCCast.c,
6869         * src/SDCCicode.c,
6870         * src/hc08/gen.c,
6871         * src/ds390/gen.c,
6872         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6873
6874 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6875
6876         * src/SDCCcse.c (ifxOptimize),
6877         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6878         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6879         deleting the IFX iCode.
6880         * src/hc08/ralloc.c: reduced unneeded slocs
6881         * src/hc08/gen.c: fixed bug in asmopToBoolean
6882
6883 2003-11-04  Borut Razem <borut.razem AT siol.net>
6884
6885         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6886           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6887           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6888           transferred to configure
6889
6890 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6891
6892         Use headers defined in the C[++] standards:
6893         * sim/ucsim/gui.src/serio.src/fileio.cc
6894         * sim/ucsim/gui.src/serio.src/frontend.cc
6895         * sim/ucsim/gui.src/serio.src/main.cc
6896         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6897         * support/Util/NewAlloc.c
6898         * as/hc08/lklibr.c
6899         * as/mcs51/lklibr.c
6900         * as/z80/aslist.c
6901         * as/z80/assym.c
6902
6903 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6904
6905         * Added MSVC projects for hc08 assembler and linker:
6906         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6907         /as/hc08/link_hc08.dsp
6908
6909 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6910
6911         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6912
6913 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6914
6915         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6916
6917 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6918
6919         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6920
6921 2003-10-31  Borut Razem <borut.razem AT siol.net>
6922
6923         * support/cpp2/cpplib.h,
6924           support/cpp2/cpplib.c,
6925           support/cpp2/cpplex.c,
6926           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6927           to switch _asm block preprocessing on / off. Default is
6928           #pragma preproc_asm +
6929
6930 2003-10-31  Borut Razem <borut.razem AT siol.net>
6931
6932         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6933           when outputting comment blocks (when executed with -C option) and
6934           _asm (SDCPP specific) blocks
6935
6936 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6937
6938         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6939
6940 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6941
6942         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6943
6944 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6945
6946         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6947         * src/SDCCast.c (decorateType): fixed bug #832664
6948
6949 2003-10-31  Borut Razem <borut.razem AT siol.net>
6950
6951         * support\cpp2\cpplex.c: fixed for SDCPP:
6952           comments(when executed with -C option) and _asm blocks
6953           were included even if they where in skipped #if block.
6954           Applied solution from GCC cpp 3.3.2
6955
6956 2003-10-31  Borut Razem <borut.razem AT siol.net>
6957
6958         * src/SDCC.lex: sdcc now understands both formats:
6959           '# <line_number> <file_name>' and
6960           '#line <line_number> <file_name>'
6961         * support/cpp2/cppmain.c: sdcpp now generates the standard
6962           '# <line_number> <file_name>' instead of former
6963           '#line <line_number> <file_name>'
6964
6965 2003-10-30  Borut Razem <borut.razem AT siol.net>
6966
6967         * support/cpp2/cpphash.h,
6968         * support/cpp2/cpplib.h
6969         * support/cpp2/cpplex.c,
6970         * support/cpp2/cppmain.c,
6971         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6972
6973 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6974
6975         Fixed a number of problems revealed by bug #827883.
6976         * src/SDCCloop.c (loopInvariants): Spill location of the
6977         result operand should be recomputed if extracted from
6978         a loop. Also, don't extract assignments of an iTemp
6979         from a literal.
6980         * src/SDCCast.c (isConformingBody): loop reversal should
6981         not occur if the control variable is involved with a
6982         relational operator.
6983
6984 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6985
6986         * .version: bumped to 2.3.6 to reflect the big improvements
6987         made by Erik and Klaus. Thanks!
6988
6989 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6990
6991         Replaced the livrange code.
6992         * src/SDCClrange.c: added new LR code
6993         * src/SDCCloop.c,
6994         * src/SDCCBBlock.h: removed remainig parts from old LR code
6995         * src/ds390/ralloc.c,
6996         * src/ds390/gen.c: minor fixes to make it work with new code
6997
6998 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6999
7000         * as/hc08/asm.h,
7001         * as/hc08/lkrloc.c,
7002         * src/hc08/gen.c,
7003         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7004         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7005         (tweaked fix for bug #818696)
7006
7007 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7008
7009         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7010
7011 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7012
7013         * src/SDCCmain.c,
7014         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7015         * src/mcs51/gen.c (gencjneshort),
7016         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7017         more efficient (per Scott Bronson's suggestion)
7018
7019 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7020
7021         Extended the semantics of the critical keyword to include
7022         individual statements. See RFE #827755 and #799831
7023         * src/SDCC.y
7024         * src/SDCCicode.c
7025         * src/SDCCopt.c
7026         * src/SDCCast.c
7027         * support/Util/SDCCerr.c
7028         * support/Util/SDCCerr.h
7029         * src/mcs51/gen.c
7030         * src/ds390/gen.c
7031         * src/hc08/gen.c
7032
7033 2003-10-19  Borut Razem <borut.razem AT siol.net>
7034
7035         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7036
7037 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7038
7039         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7040         Fixed bug #818696
7041         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7042         and predecrement operand is displayed
7043
7044 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7045
7046         * src/SDCCval.c (valMinus): fixed bug #826041
7047
7048 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7049
7050         Some hc08 related updates that I missed earlier
7051         * sim/ucsim/stypes.h
7052         * support/regression/ports/hc08/spec.mk
7053
7054 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7055
7056         New target "hc08" for the Motorola 68hc08 family of micros
7057
7058         * configure
7059         * configure.in
7060         * Makefile
7061         * src/hc08/*
7062         * src/SDCCmain.c
7063         * src/port.h
7064         * sim/ucsim/hc08.src/*
7065         * sim/ucsim/configure.in
7066         * src/ucsim/configure
7067         * sim/ucsim/packages_in.mk
7068         * as/hc08/*
7069         * as/Makefile
7070         * device/include/mc68hc908qy.h
7071         * device/lib/hc08/*
7072         * device/lib/Makefile.in
7073         * support/regression/ports/hc08/*
7074         * support/regression/Makefile
7075
7076 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7077
7078         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7079         regression test
7080         * src/ds390/gen.c (genCast): fixed bug #821957
7081
7082 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7083
7084         * device/lib/logf.c: "fixed" overlay bug
7085         * support/regression/ports/host/spec.mk: added m library
7086         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7087         * support/regression/tests/float_trans: added (for Eric)
7088
7089 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7090
7091         * src/mcs51/gen.c (genCpl): fixed bug
7092         http://sf.net/mailarchive/message.php?msg_id=6263915
7093
7094 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7095
7096         * src/SDCCast.c (decorateType): added extended constant folding
7097         * src/SDCCsymt.c (computeType): cleanup
7098         * src/SDCCval.c (valShift): minor optimization
7099         * support/regression/tests/ast_constant_folding.c: added
7100
7101 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7102
7103         * src/SDCCmain.c: removed some unintended changes
7104
7105 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7106
7107         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7108         * src/z80/gen.c: fixed part of bug #817589
7109         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7110
7111 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7112
7113         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7114         * src/SDCCcflow.c
7115         * src/SDCCcse.c
7116         * src/SDCCdflow.c
7117         * src/SDCClabel.c
7118         * src/SDCClrange.c
7119         * src/SDCCmem.c
7120         * src/SDCCopt.c
7121         * src/SDCCpeeph.c
7122         * src/SDCCset.c
7123         * src/avr/ralloc.c
7124         * src/ds390/ralloc.c
7125         * src/izt/ralloc.c
7126         * src/mcs51/ralloc.c
7127         * src/pic/ralloc.c
7128         * src/pic16/ralloc.c
7129         * src/xa51/ralloc.c
7130         * src/z80/ralloc.c
7131         * src/z80/gen.c: removed unused label "release:"
7132
7133 2003-10-06  Borut Razem <borut.razem AT siol.net>
7134
7135         * src/SDCC.lex: removed definition of unused variables
7136           save_optimize and save_options
7137
7138 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7139
7140         * clean.mk: removed '=' in "-maxdepth=1"
7141         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7142         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7143
7144 2003-10-06  Borut Razem <borut.razem AT siol.net>
7145
7146         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7147           my_unput() replaced by unput()
7148
7149 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7150
7151         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7152         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7153         type-punned pointer will break strict-aliasing rules"
7154         Old LR behaviour is again default; Klaus' LR can be choosen by
7155         defining the environment variable LRKLAUS
7156         * src/SDCCBBlock.h
7157         * src/SDCCloop.c
7158         * src/SDCClrange.c
7159         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7160         * clean.mk: fixed removal of files in bin/CVS/
7161         * device/lib/clean.mk: fixed removal of directories small and large
7162         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7163         * src/SDCCicode.c,
7164         * src/SDCCval.c: removed superflous test for pedantic
7165
7166 2003-10-05  Borut Razem <borut.razem AT siol.net>
7167
7168         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7169           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7170           message "unmatched #pragma SAVE and #pragma RESTORE"
7171
7172 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7173
7174         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7175           assembly, critical functions, atomic, nojtbound)
7176
7177 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7178
7179         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7180         * src/SDCCBBlock.h
7181         * src/SDCCloop.c
7182         * src/SDCCloop.h
7183         * src/SDCClrange.c
7184
7185 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7186
7187         * src/z80/gen.h,
7188         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7189         * src/mcs51/gen.h
7190         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7191         * src/ds390/gen.h
7192         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7193         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7194         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7195
7196 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7197
7198         * src/z80/gen.c (genRet): fixed bug #524753
7199         * src/z80/gen.c (genCast): fixed internal error on cast from
7200         pointer to long
7201         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7202         fix for bug #477835 to the z80
7203         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7204         for tracking iCodes in the peephole optimizer for z80
7205
7206 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7207
7208         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7209         the other part of bug #814548
7210         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7211
7212 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7213
7214         * src/SDCCcse.c: fixed part of bug #814548
7215
7216 2003-09-28  Borut Razem <borut.razem AT siol.net>
7217
7218         * src/asm.c: rewrite of printILine() to use temporary file instead
7219           a pipe
7220         * src/xa51/main.c: commented out declaration of int rewinds
7221
7222 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7223
7224         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7225
7226 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7227
7228         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7229         * src/asm.c (printILine): Fixed bug #811015
7230
7231 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7232
7233         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7234         freeing.
7235
7236 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7237
7238         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7239         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7240         to correctly handle general case of AOP_PAIRPTR
7241         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7242
7243 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7244
7245         * src/mcs51/ralloc.c (fillGaps),
7246         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7247         register positioning bug)
7248
7249 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7250
7251         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7252
7253 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7254
7255         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7256         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7257         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7258         (ralloc doesn't intentionally do this now, but perhaps later)
7259         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7260         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7261         register positioning bugs (Fixed bug #762602 and #795325)
7262         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7263         (Fixed bug #808779)
7264         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7265         lines that --i-code-in-asm generates
7266
7267 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7268
7269         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7270         trying to fclose a FILE* that was already closed.
7271
7272 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7273
7274         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7275         of const struct should be treated as if const themselves)
7276
7277 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7278
7279         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7280
7281 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7282
7283         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7284         Unix (/n) and DOS (/r/n) line terminations.
7285
7286 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7287
7288         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7289         bug #613775
7290
7291 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7292
7293         * src/mcs51/gen.c (genFunction, genEndFunction),
7294         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7295         and restore of EA so that stack offsets to parameters are
7296         correct when using both critical and reentrant/stack-auto.
7297         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7298         size (can be triggered in error if sloc is shared between
7299         different sized objects)
7300         * device/include/float.h: fixed macros to explicitly use
7301         unsigned long where needed
7302
7303 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7304
7305         Feature req. 799831: added code to allow nesting of critical functions
7306         * src/mcs51/gen.c (genFunction, genEndFunction)
7307         * src/ds390/gen.c (genFunction, genEndFunction)
7308
7309 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7310
7311         * src/SDCCsymt.c (sclsFromPtr),
7312         * src/SDCCsymt.h,
7313         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7314         support for standard C idiom of memory mapped variables; for
7315         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7316         to xdata int at 0x1234 tempvar = 1.
7317         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7318         provided by Akiya ISHIDA
7319
7320 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7321
7322         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7323         * src/SDCCval.c (constVal): added reduction from int to char
7324         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7325         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7326         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7327         to ignore the sign
7328         * support/regression/tests/shifts.c: fixed
7329
7330 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7331
7332         * src/z80/gen.c (genXor): Fixed bug #805445
7333
7334 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7335
7336         Fixed bug #621531 (const & volatile confusion in the type chain).
7337         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7338         refer to the const or volatile state of the pointer itself.
7339
7340         * src/SDCCast.c
7341         * src/SDCCglue.c
7342         * src/SDCCicode.c
7343         * src/SDCCsymt.c
7344         * src/SDCCval.c
7345         * src/SDCC.y
7346         * src/SDCCsymt.h
7347         * src/pic/gen.c
7348         * src/pic/ralloc.c
7349         * src/pic16/gen.c
7350         * src/pic16/ralloc.c
7351         * support/regression/tests/const.c
7352
7353 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7354
7355         When checking for duplicated modules, use absolute paths
7356         instead of relative paths.  Files changed:
7357
7358         * as/mcs51/lklib.c
7359         * link/z80/lklib.c
7360
7361 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7362
7363         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7364
7365 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7366
7367         * device/include/string.h: added size_t typedef, changed
7368         prototypes to use size_t, eliminated separate reentrant and
7369         non-reentrant declarations, added _memmove declaration
7370         * device/lib/_memcpy.c: changed to use size_t instead of int,
7371         changed /4 to >>2 to avoid division library call
7372         * device/lib/_memcmp.c,
7373         * device/lib/_memset.c,
7374         * device/lib/_strncat.c,
7375         * device/lib/_strncpy.c,
7376         * device/lib/_strncmp.c: changed to use size_t instead of int
7377         * device/lib/_memmove.c: new file (fixed bug #772294)
7378         * device/lib/Makefile.in: added _memmove.c
7379         * device/lib/z80/asm_strings.s: fixed bug #772290
7380         * support/regression/tests/bitfields.c: attempt to fix host assertion
7381         failure on amd64-unknown-linux2.2
7382
7383 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7384
7385         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7386         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7387         * as/z80/asmain.c (main): fixed bug #801766
7388
7389 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7390
7391         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7392         compilers
7393
7394 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7395
7396         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7397         reported in bug #800609
7398
7399 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7400
7401         * Top header beautifications in src/pic16 directory:
7402           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7403           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7404           pcoderegs.h, ralloc.c, ralloc.h
7405         * main.c: added top header and GPL license notice
7406         * pcode.c: fixed the if-conditional warning
7407
7408 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7409
7410         * device/lib/_mullong.c: replaced int by short for gcc
7411
7412 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7413
7414         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7415         and JUMPTABLE iCodes properly now (worked by accident before)
7416         * src/mcs51/gen.c (leftRightUseAcc),
7417         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7418         iCode properly now. Use getSize instead of nRegs since a & b
7419         aren't part of the nRegs tally.
7420
7421 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7422
7423         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7424         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7425           before instructions that use the _STATUS register
7426
7427 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7428
7429         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7430         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7431         fetching of the pointer
7432         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7433         copied from genNearPointerSet()
7434         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7435         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7436         If they pop r0/r1 they must be called in the opposite order than aopOp().
7437         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7438         (resp. --stack-auto), prepared for --xstack
7439
7440 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7441
7442         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7443
7444 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7445
7446         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7447         these ports have their own __sdcc_external_start()
7448
7449 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7450
7451         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7452         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7453         type for bits was changed. It resulted in bit variables becoming
7454         global, which is not permitted in PIC 14 assembly output.
7455
7456 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7457
7458         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7459
7460 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7461
7462         Z80 and MCS51 linkers complaint if a public symbol is defined
7463         in more than one library module:
7464
7465         * as/mcs51/lklib.c
7466         * link/z80/lklib.c
7467         * as/mcs51/Makefile.in
7468
7469 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7470
7471         A few small changes that speed up the peephole optimizer.
7472
7473         * src/SDCCpeeph.c
7474
7475 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7476
7477         Try to make the peephole optimizer smarter by maintaining
7478         an association between the assembly source code and the
7479         iCodes that originated them. Put this information to use
7480         with a new peephole rule condition "notVolatile" so that
7481         the rules can be aggressive yet still safe.
7482
7483         * src/SDCCpeeph.c
7484         * src/SDCCpeeph.h
7485         * src/mcs51/gen.c
7486         * src/mcs51/peeph.def
7487
7488 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7489
7490         Fixed bug #741761
7491
7492         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7493         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7494         if the left or right operand symbols have the accuse flag set.
7495
7496 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7497
7498         Changed the type of the result of the ! (NOT) operator to char;
7499         previously it returned the same type as the source. This allows
7500         us to eliminate all the genFloatNot functions (all of its target
7501         implementations were very buggy) since !float can use the same
7502         code as !long now.
7503
7504         * src/SDCCicode.c (ast2iCode): ! returns char
7505         * src/mcs51/gen.c (genNot, genNotFloat),
7506         * src/ds390/gen.c (genNot, genNotFloat),
7507         * src/z80/gen.c (genNot, genNotFloat),
7508         * src/pic/gen.c (genNot, genNotFloat),
7509         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7510
7511 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7512
7513         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7514         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7515            during interrupts. Ensure WSAVE is located at a shared bank address.
7516         2. Fixed page selection in some places
7517         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7518            the registers name strings.
7519         4. Fixed "signed / unsigned compare" compiler warnings.
7520         5. The PIC port manages its own allocation of the general purpose
7521            registers, but makes no attempt to reuse them. As a result when
7522            compiling it soon runs out of general purpose registers. Some
7523            additional code was added to the files pcode.c and device.c to walk
7524            through the function call tree and rename the registers so that they
7525            get reused.
7526
7527         * src/pic/device.c
7528         * src/pic/gen.c
7529         * src/pic/glue.c
7530         * src/pic/pcode.c
7531         * src/pic/pcode.h
7532         * src/pic/ralloc.c
7533         * src/pic/ralloc.h
7534         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7535         genPlus() & genMinus() when the result is the same as left or right
7536
7537 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7538
7539         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7540
7541 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7542
7543         Made bitfield a distinct type from bit so that bitfields
7544         convert as per ANSI C and bits retain their traditional
7545         boolean style behaviour. Implemented bitfield support in
7546         the z80 port.
7547
7548         * src/SDCCsymt.h,
7549         * src/SDCCsymt.c,
7550         * src/SDCCast.c,
7551         * src/cdbFile.c,
7552         * src/mcs51/gen.c,
7553         * src/ds390/gen.c: bit v bitfield split
7554         * src/z80/gen.c: New support for bitfields
7555         * support/regression/tests/bitfields.c: reenabled z80,
7556         added more tests
7557
7558 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7559
7560         Rules 246.x, 247.x relate to bitfields, the others speed up
7561         access to xdata mapped I/O devices.
7562
7563         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7564
7565 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7566
7567         Cleaned up genPackBits and genUnpackBits and added two helper
7568         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7569         for literal assignments in genPackBits (thanks to Frieder for
7570         reminding me).
7571
7572         * src/mcs51/gen.c
7573         * src/ds390/gen.c
7574
7575 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7576
7577         Fixed bug #748310 (pointer to function type mishandled when the
7578         function name is omitted). Also fixed a SIGSEGV when a function
7579         attribute (reentrant, etc) is used on a non-function or on a
7580         function but misplaced before the parameter list.
7581
7582         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7583         bug #748310
7584         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7585         * support/Util/SDCCerr.h,
7586         * support/Util/SDCCerr.c: Added func attr misuse error msg
7587
7588 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7589
7590         Fixed bug #787649 by anonymous
7591         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7592         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7593
7594 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7595
7596         Fixed numerous bitfield problems.
7597
7598         * src/SDCC.y: More bitfield related error checking
7599         * src/SDCCsymt.h,
7600         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7601         * support/Util/SDCCerr.h,
7602         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7603         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7604         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7605         * support/regression/tests/bitfields.c: tests added
7606
7607 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7608
7609         Made the constant following the "interrupt" keyword optional. If
7610         omitted, the function will not automatically be given an entry
7611         in the interrupt vector table (similar to #pragma NOIV, but
7612         less syntacticly kludgy). The interrupt number is also now
7613         range checked. Also fixed a bug in the high order bit example
7614         in the manual.
7615
7616         * src/SDCC.y
7617         * src/SDCCmem.c
7618         * src/SDCCglue.c
7619         * src/SDCCsymt.h
7620         * support/Util/SDCCerr.c
7621         * support/Util/SDCCerr.h
7622         * doc/sdccman.lyx
7623
7624 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7625
7626         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7627         * src/SDCCicode.c (operandOperation): rewritten some ops
7628         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7629         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7630         other type
7631         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7632         be re-activated by defining REDUCE_LITERALS)
7633         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7634         unsigned, but are signed by default
7635         * src/SDCCval.c (constVal): rearranged
7636         * src/SDCCval.c (valMod): preliminary fix
7637         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7638         * support/regression/literalop.c: added, work in progress
7639
7640 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7641
7642         Generate warnings for useless declarations like "char data;"
7643         that don't do what new users expect.
7644
7645         * src/SDCC.y
7646         * support/Util/SDCCerr.h
7647         * support/Util/SDCCerr.c
7648
7649 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7650
7651         * src/SDCCval.c (valMult): fix overflow detection of negative int
7652
7653 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7654
7655         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7656
7657         Changes to support big endian targets:
7658
7659         * src/ports.h
7660         * src/SDCCglue.c
7661         * src/avr/main.c
7662         * src/ds390/main.c
7663         * src/izt/i186.c
7664         * src/mcs51/main.c
7665         * src/pic/main.c
7666         * src/pic16/main.c
7667         * src/xa51/main.c
7668         * src/z80/main.c
7669
7670 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7671
7672         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7673         * device/lib/time.c: fixed warning "integer overflow in expression"
7674
7675 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7676
7677         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7678         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7679         constants are unsigned; added recognition of "u" flag for unsigned
7680         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7681         * src/SDCCval.c (valDiv, valMod): fixed signdness
7682         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7683         signedness of modulo, left and right shift
7684         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7685         * support/Util/SDCCerr.h: added warning W_INT_OVL
7686         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7687         * src/SDCCast.c (ast_print): improved output of constants
7688
7689 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7690
7691         Fixed some warnings when building with MSVC:
7692
7693         * as\mcs51\asdata.c
7694         * as\z80\asdata.c
7695         * as\mcs51\asm.h
7696         * as\z80\asm.h
7697         * link\z80\aslink.h
7698         * link\z80\lkdata.c
7699         * link\z80\lkeval.c
7700         * link\z80\lkgb.c
7701         * link\z80\lkihx.c
7702         * link\z80\lks19.c
7703         * link\z80\lksym.c
7704         * support\cpp2\cpplib.c
7705         * src\ds390\gen.c
7706         * src\mcs51\gen.c
7707
7708 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7709
7710         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7711
7712 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7713
7714         * support\librarian\clean.mk: Do not remove Makefile.
7715         * support\librarian\Makefile: added.
7716
7717 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7718
7719         Added librarian to MSVC build:
7720         * all.dsp
7721         * sdcc.dsw
7722         * support\librarian\librarian.dsp
7723
7724         'configure' not needed for librarian, removed:
7725         * support\librarian\configure
7726         * support\librarian\configure.in
7727         * support\librarian\config_in.h
7728         * support\librarian\Makefile.in
7729
7730         Hopefully these ones built the librarian and the rest of sdcc properly:
7731         * Makefile
7732         * Makefile.common.in
7733
7734         Messed up 'configure', so revert to previous version:
7735         * configure
7736         * configure.in
7737
7738 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7739
7740         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7741         there, while the mantissa of a double is "only" 53 bits wide.
7742
7743 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7744
7745         Adding sdcclib to the build.  MSVC project coming soon.
7746         Files added/changed:
7747
7748         * support\librarian\clean.mk
7749         * support\librarian\configure
7750         * support\librarian\configure.in
7751         * support\librarian\config_in.h
7752         * support\librarian\Makefile.bcc
7753         * support\librarian\Makefile.in
7754         * support\librarian\sdcclib.c
7755         * Makefile.bcc
7756         * Makefile
7757         * Makefile.common.in
7758         * configure
7759         * configure.in
7760
7761 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7762
7763         Linker now complaints if linked modules have conflicting options, for
7764         example, one compiled using --model-large and another one compiled with
7765         --model-small.  The following files were modified:
7766
7767         * as\mcs51\asdata.c
7768         * as\mcs51\aslink.h
7769         * as\mcs51\asm.h
7770         * as\mcs51\asmain.c
7771         * as\mcs51\asout.c
7772         * as\mcs51\i51pst.c
7773         * as\mcs51\lkdata.c
7774         * as\mcs51\lklibr.c
7775         * as\mcs51\lkmain.c
7776         * as\z80\asdata.c
7777         * as\z80\asm.h
7778         * as\z80\asmain.c
7779         * as\z80\asout.c
7780         * as\z80\z80pst.c
7781         * link\z80\aslink.h
7782         * link\z80\lkdata.c
7783         * link\z80\lklibr.c
7784         * link\z80\lkmain.c
7785         * src\SDCCglue.c
7786
7787 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7788
7789         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7790         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7791
7792 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7793
7794         * src/z80/mappings.i: fix _mul[us][int,long] entries
7795
7796 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7797
7798         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7799
7800 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7801
7802         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7803         * support/regression/tests/bitopcse.c: added
7804         fixed warning:
7805         * src/avr/gen.c:
7806         * src/pic/gen.c:
7807         * src/pic16/gen.c:
7808         * src/z80/gen.c:
7809         * src/xa51/gen.c:
7810
7811 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7812
7813         added support for new library format to z80, gbz80 linkers:
7814         *link/z80/aslink.h
7815         *link/z80/lklex.c
7816         *link/z80/lklib.c
7817         *link/z80/lklist.c
7818
7819 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7820
7821         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7822         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7823
7824 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7825
7826         added DUMMY_READ_VOLATILE:
7827         * src/SDCC.y:
7828         * src/avr/gen.c:
7829         * src/xa51/gen.c:
7830         * src/z80/gen.c:
7831         * src/pic/gen.c:
7832         * src/pic16/gen.c:
7833         * src/mcs51/gen.c:
7834         * src/ds390/gen.c:
7835         * src/SDCCcse.c (algebraicOpts): many improvements
7836         * src/SDCCcse.h: removed algebraicOpts()
7837         * src/SDCCicode.c (picDummyRead): added
7838
7839 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7840
7841         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7842         "Insufficient space in data memory".
7843
7844 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7845
7846         * src/mcs51/gen.c: fixed bug #771358
7847         * src/z80/gen.c: fixed bug #759087
7848
7849 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7850
7851         * src/pic16/glue.c: minor cleanup by Vangelis
7852
7853 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7854
7855         * device/include/regc515c.h: fixed #758477
7856         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7857         * device/lib/_gptrput.c: saved a few bytes
7858         * my tab spacing is 8, yours too?)
7859         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7860         * device/lib/serial.c: process RX bytes earlier than TX bytes
7861         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7862
7863 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7864
7865         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7866
7867 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7868
7869     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7870
7871 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7872
7873         * device/lib/Makefile.in: bad fix, reverted to 1.43
7874
7875 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7876
7877         * device/lib/Makefile.in: added missing z80 object files
7878
7879 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7880
7881         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7882         pic16 progress by Vangelis:
7883         * src/SDCCglobl.h:
7884         * src/SDCCmain.c:
7885         * src/pic/Makefile:
7886         * src/pic:
7887         * pic/Makefile:
7888         * pic16/device.c:
7889         * pic16/device.h:
7890         * pic16/gen.c:
7891         * pic16/gen.h:
7892         * pic16/genarith.c:
7893         * pic16/glue.c:
7894         * pic16/main.c:
7895         * pic16/pcode.c:
7896         * pic16/pcode.h:
7897         * pic16/pcodepeep.c:
7898         * pic16/peeph.def:
7899
7900 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7901
7902     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7903
7904 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7905
7906     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7907     added gbz80 build to MSVC project.
7908     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7909     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7910     from 8051 stuff and setup so it links using a .lnk file.
7911
7912 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7913
7914     * support/librarian/sdcclib.c: sdcc librarian.
7915     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7916     with sdcclib.
7917
7918 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7919
7920     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7921
7922 2003-07-02  Borut Razem <borut.razem AT siol.net>
7923
7924         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7925         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7926         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7927         src/xa51/main.c, src/z80/main.c:
7928         virtualization of glue() function: each port has it's own glue function,
7929         which is accessed by do_glue function pointer in PORT.general structure
7930
7931 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7932
7933         * DS800C400 fun, improved ROM interface and tinibios.
7934
7935 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7936
7937         * More support for DS80C400. Now includes beginning of interface to ROM.
7938
7939 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7940
7941         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7942
7943 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7944
7945         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7946
7947 2003-06-19  Borut Razem <borut.razem AT siol.net>
7948
7949         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7950
7951 2003-06-19  Borut Razem <borut.razem AT siol.net>
7952
7953         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7954         fixed Z80 port - crt0.o: cannot open.
7955
7956 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7957
7958         * support/Util/MySystem.c (merge_command): revert bad fix
7959
7960 2003-06-18  Borut Razem <borut.razem AT siol.net>
7961
7962         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7963
7964 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7965
7966         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7967         option --use-stdout sends errors to stdout instead of stderr.
7968
7969 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7970
7971         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7972
7973 2003-06-15  Borut Razem <borut.razem AT siol.net>
7974
7975         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7976         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7977         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7978         fixed width array of pointers replaced with sets;
7979         multiple include and lib paths ared transferred to preprocessor and linker
7980         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7981         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7982         fixed width array of pointers
7983         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7984         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7985         fixupPath(), getPathDifference()
7986         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7987         fixed width array of pointers
7988
7989 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7990
7991         * src/pic16/ralloc.c: fix warnings
7992         * src/pic16/pcode.c: fix warning
7993
7994 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7995
7996          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7997         know all the details, but essentially this set of changes enable
7998         the pic16 port to generate movff instructions and generate assembler
7999         directives,
8000         * src/SDCCmain.c:
8001         * src/pic16/gen.c:
8002         * src/pic16/glue.c:
8003         * src/pic16/pcode.c:
8004         * src/pic16/device.c:
8005         * src/pic16/main.c:
8006         * src/pic16/pcode.h:
8007         * src/pic16/pcoderegs.c:
8008         * src/pic16/ralloc.c:
8009         * src/pic16/ralloc.h:
8010
8011 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8012
8013         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8014         added option --vc, so sdcc errors and warnings are compatible with
8015         Microsoft Visual Studio.
8016
8017 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8018
8019         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8020           device/lib/libfloat.lib: added atof function.
8021
8022 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8023
8024         * doc/sdccman.lyx: updated to Lyx 1.3
8025         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8026         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8027         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8028
8029 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8030
8031         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8032
8033 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8034
8035         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8036           additions to the "related tools/documentation" section
8037
8038 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8039
8040         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8041
8042 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8043
8044         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8045         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8046
8047 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8048
8049         * doc/sdccman.lyx: fix double dash and other minor things
8050         * doc/Makefile: fix double dash
8051
8052 2003-05-28  Karl Bongers(patches from Martin Helmling)
8053         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8054           condition and ignore commands.
8055
8056 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8057
8058         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8059           is in parts still quite out of date, I did changes as far as I felt makes sense
8060           for a non-native english speaker.
8061           Please feel free to add to the manual or to correct my changes.
8062         * doc/Makefile: undid touching the date of intermediate tex files.
8063
8064 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8065
8066         * doc/sdccman.lyx: Manual has an index now
8067
8068 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8069
8070         Finalize muluint/mulsint and mululong/mulslong merging:
8071         * device/lib/_mulint.c
8072         * device/lib/_mullong.c
8073         * device/lib/gbz80/mul.s
8074         * device/lib/gbz80/stubs.s
8075         * device/lib/z80/mul.s
8076         * device/lib/z80/stubs.s
8077         * src/SDCCsymt.c (initCSupport)
8078
8079 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8080
8081         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8082         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8083           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8084           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8085           instead of /Zm500.
8086
8087 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8088
8089         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8090           the regression tests I'm not brave enough to enable 245.b, 245.c
8091         * doc/sdccman.lyx: added latex preamble for hyperref package.
8092           Using pdflatex this will give you a hyperlinked pdf file with
8093           bookmarks. (prepend '%' before /usepackage if this breaks something)
8094
8095 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8096
8097          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8098
8099 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8100
8101         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8102
8103 2003-05-21    <johan AT balder>
8104
8105         * src/SDCCglue.c (printIval): fixed bug #739934
8106
8107 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8108
8109         Applied patch from bug 737905 (renamed yylineo to mylineno):
8110         * src/altlex.c
8111         * src/SDCCast.c
8112         * src/SDCglobl.h
8113         * src/SDCC.lex
8114         * src/SDCCsymt.c
8115         * src/SDCCval.c
8116         * src/pic16/pcode.c: Cleaned warnings
8117         * src/pic16/pcodeflow.c: Cleaned warnings
8118         * src/pic16/pcoderegs.c: Cleaned warnings
8119
8120 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8121
8122         * src/pic16/pcode.c: Cleaned warnings
8123         * src/pic16/pcodepeep.c: Cleaned warnings
8124         * src/pic16/ralloc.c: Cleaned warnings
8125
8126 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8127
8128         * doc/sdccman.lyx: fixed bug 739745
8129         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8130
8131 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8132
8133         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8134         it can be defined with CFLAGS when running configure
8135         * src/SDCCmain.c: fixed compiling + linking with object files
8136
8137 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8138
8139         * configure.in: configure for pic16 port,
8140             added --disable-pic16-port
8141         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8142         * src/SDCCmain.c: linkOptions is changed to set *,
8143             added if/endif conditional macros to remove options help
8144             messages from optionsTable when a port is not configured, added
8145             support for the PIc16 port in the ports table, when executing
8146             the compiler with no port specified on command line, a default
8147             port is selected with the new macro DEFAULT_PORT which is
8148             defined in port.h, in setDefaultOptions() linkOptions is removed
8149             from initialization assignment, since now it is a set,
8150             parseCmdLine uses setParseWithComma for linkOptions, in
8151             linkEdit() linkOptions are accessed with new function indexSet()
8152             which returns the i'th item of a set variable. See SDCCset.c, in
8153             linkEdit() when calling buildCmdLine(), added linkOptions as
8154             last argument. Now users can pass arguments to gplink via the
8155             -Wl option, main() uses pic16glue() to glue up pic16 programs
8156         * src/SDCCpeeph.c: various changes to support pic16
8157         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8158             return the i'th item of the set
8159         * src/SDCCset.h: added function prototype for indexSet()
8160         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8161         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8162         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8163             added macro DEFAULT_PORT
8164         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8165         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8166             generated
8167         * src/pic16/glue.c: commented out some error producing lines
8168         * src/pic16/main.c: __config directives are commented out to stop
8169             gpasm complaining and test the linkage with gplink, _linkCmd and
8170             _asmCmd changed to be more gplink and gpasm friendly
8171         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8172             produced an error when parsed, peep rule 12 is added to utilize
8173             movff, but it is commented out since the pCode does not support
8174             yet a command with 2 address arguments
8175
8176 2003-05-18    <johan AT balder>
8177
8178         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8179         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8180 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8181
8182         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8183   Added feature to script commands from file.
8184
8185 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8186
8187         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8188         * src/SDCCutil.c: include ctype.h for win32
8189
8190 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8191
8192         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8193
8194 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8195
8196         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8197   Fixed so you can set breakpoints prior to run, run does not stop
8198   on entry now.  Add tbreak.  Other enhancements and fixes for use
8199   with ddd.
8200
8201 2003-05-12  Borut Razem <borut.razem AT siol.net>
8202
8203         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8204
8205 2003-05-11  Borut Razem <borut.razem AT siol.net>
8206
8207         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8208         the path of bin directory, so that PATH is the only env. variable, which has to be set
8209         in case of standard installation.
8210         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8211         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8212         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8213
8214 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8215
8216         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8217         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8218         temp files are in the port dir; clean the gen/test directory when
8219         generating new test.c
8220         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8221         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8222         * support/regression/tests/zeropad.c: added
8223
8224 2003-05-09    <johan AT balder>
8225
8226         * src/SDCCglue.c: fixed bug #597940
8227
8228 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8229
8230         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8231   cache sfr, optimize next,step, fix off by one sourceline,
8232   support ddd list function.
8233         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8234
8235 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8236
8237         * support/regression/HTMLgen.py: added compare_s2f()
8238         * support/regression/Makefile: redo 1.27
8239         * support/regression/generate-cases.py: redo 1.5
8240
8241 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8242
8243         * support/regression/tests/float.c: workaround 33 bit hex constant
8244         * support/regression/tests/simplefloat.c: fix division for host
8245
8246 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8247
8248         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8249         that tame's the PIC's over-aggressive optimizer.
8250
8251 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8252
8253          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8254          support for MSVC.
8255
8256 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8257
8258         Initial support for DS80C400. "Hello world" runs on TINIm400
8259         (with polled I/O).
8260
8261 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8262
8263          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8264          * Some notes on ddd usage added in debugger/README
8265          Martin Helmling adding more features and fixes for ddd GUI debugger.
8266          Code added for nexti, stepi, up, down, and other adjustments.
8267
8268 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8269
8270         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8271         * src/pic/peeph.def Added two rules to optimize carry manipulation
8272         * src/pic/* removed debug printfs
8273
8274 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8275
8276         * debugger/mcs51/cmd.c: added header newalloc.h
8277
8278 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8279
8280         * as/Makefile: new EXEEXT
8281         * as/z80/Makefile: remove trailing slash of BUILDIR
8282         * as/z80/clean.mk: new EXEEXT
8283         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8284         * support/cpp2/Makefile.in: new EXEEXT
8285         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8286
8287 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8288
8289         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8290         EXEEXT was introduced to fix all related problems with targets
8291         "clean", "install" and "uninstall"; a couple of further flaws
8292         especially with "clean" have been fixed too
8293         * as/mcs51/Makefile.in
8294         * as/mcs51/clean.mk
8295         * as/z80/Makefile
8296         * Makefile
8297         * clean.mk
8298         * debugger/mcs51/Makefile.in
8299         * debugger/mcs51/clean.mk
8300         * link/z80/Makefile
8301         * link/z80/Makefile.in
8302         * link/z80/clean.mk
8303         * link/Makefile
8304         * packihx/Makefile.in
8305         * packihx/clean.mk
8306         * sim/ucsim/Makefile
8307         * sim/ucsim/clean.mk
8308         * sim/ucsim/avr.src/Makefile.in
8309         * sim/ucsim/avr.src/clean.mk
8310         * sim/ucsim/s51.src/Makefile.in
8311         * sim/ucsim/s51.src/clean.mk
8312         * sim/ucsim/xa.src/Makefile.in
8313         * sim/ucsim/xa.src/clean.mk
8314         * sim/ucsim/z80.src/Makefile.in
8315         * sim/ucsim/z80.src/clean.mk
8316         * sim/ucsim/main_in.mk
8317         * sim/ucsim/packages_in.mk
8318         * sim/ucsim/gui.src/Makefile.in
8319         * sim/ucsim/gui.src/serio.src/Makefile.in
8320         * sim/ucsim/gui.src/serio.src/clean.mk
8321         * src/Makefile.in
8322         * src/clean.mk
8323         * support/cpp2/Makefile.in
8324         * support/cpp2/clean.mk
8325         * support/makebin/Makefile
8326         * support/makebin/clean.mk
8327         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8328         * doc/sdccman.lyx: --program-suffix no longer needed
8329
8330 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8331
8332          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8333          Martin Helmling added support for ddd GUI debugger.
8334          Code added to display assembly, set variables, and other commands
8335          to interface to ddd.
8336
8337 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8338
8339         * as/Makefile: fix target clean
8340         * as/clean.mk: fix target clean
8341         * as/z80/clean.mk: fix target clean
8342
8343 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8344
8345         * Makefile.common.in: added  AT EXEEXT AT
8346         * configure.in: removed all mingw32 stuff
8347         * configure: rebuilt from configure.in
8348         * doc/sdccman.lyx: updated section "installation"
8349         * support/scripts/sdcc_mingw32: adapted to configure
8350         * support/scripts/sdcc_cygwin_mingw32: added
8351
8352 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8353
8354         * src/pic Added object file support for the PIC port
8355         * src/pic Applied patch from Craig Franklin (this started the object file support)
8356         * src/regression Updated the PIC regression tests for object files
8357
8358 2003-04-20  Borut Razem <borut.razem AT siol.net>
8359
8360         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8361           lklex.c: In function `getfid':
8362           lklex.c:203: warning: array subscript has type `char'
8363         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8364           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8365         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8366           stack handling macros
8367
8368 2003-04-19  Borut Razem <borut.razem AT siol.net>
8369
8370         * "handling space characters in file path" task:
8371         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8372         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8373         * support/Util/MySystem.h: make it self-sufficient
8374         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8375           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8376           handling space characters in file path
8377         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8378           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8379         * support/Util/MySystem.c: handling space characters in executable's path
8380
8381 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8382
8383         * as/z80/Makefile: fix permanent rebuild of z80
8384         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8385         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8386
8387 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8388
8389         * src/SDCCopt.c: add special case optimization to replace modulo by
8390           a power of two with a bitwise AND.
8391
8392 2003-04-18    <johan AT balder>
8393
8394         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8395
8396 2003-04-17    <johan AT balder>
8397
8398         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8399         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8400
8401 2003-04-13  Borut Razem <borut.razem AT siol.net>
8402
8403         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8404         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8405           fixed mingw problem in adl_NORMALIZE_PATH
8406
8407 2003-04-12  Borut Razem <borut.razem AT siol.net>
8408
8409         * fixed "#pragma SAVE/RESTORE can not be nested":
8410         * src/SDCC.lex: reworked pragma handling functions
8411         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8412         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8413
8414 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8415
8416         * src/SDCCutil.c (pathEquivalent): defined but not used
8417         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8418         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8419         * configure: rebuilt from configure.in
8420         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8421         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8422         * device/include/Makefile.in: replace sdcc_datadir
8423         * device/lib/Makefile.in: replace sdcc_datadir
8424         * Makefile.common.in: add LDFLAGS from configure
8425         * packihx/Makefile.in: use LDFLAGS
8426         * src/Makefile.in: use LDFLAGS
8427         * support/cpp2/Makefile.in: add LDFLAGS from configure
8428         * support/makebin/Makefile: use LDFLAGS
8429         * .version: bumped version number to 2.3.5
8430
8431 2003-04-12  Borut Razem <borut.razem AT siol.net>
8432
8433         * completed "different paths" task:
8434         * src/SDCCmacro.c: fixed bug in handling quotes
8435         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8436         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8437
8438 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8439
8440         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8441
8442 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8443
8444         * ds390/gen.c ds390/peeph.def: fix bug 706781
8445
8446 2003-04-11  Borut Razem <borut.razem AT siol.net>
8447
8448         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8449
8450 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8451
8452         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8453         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8454          set - this bit used to not be set...).
8455         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8456           bad code in PIC Port
8457         * src/regression/and2.c added to test bug 609268
8458         * src/regression/Makefile added and2.c to regression test
8459
8460
8461 2003-04-08    <johan AT CP255758-A>
8462
8463         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8464         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8465         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8466
8467 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8468
8469         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8470         fix bug #487815
8471         * support/cpp2/Makefile.in: fix bug #487815
8472         * configure: rebuilt from configure.in
8473         * Makefile.common.in: docdir changed, new path suffixes
8474         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8475         * sdcc_vc_in.h: reflect changes from sdccconf.h
8476         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8477         * src/SDCCutil.h: remove BINDIR hack
8478         * doc/sdccman.lyx: update new path hierarchy
8479
8480 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8481
8482         * src/SDCCpeeph.c: added okToRemoveSLOC test
8483
8484 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8485
8486         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8487
8488 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8489
8490         * src/SDCCpeeph.c: added labelIsReturnOnly test
8491         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8492
8493 2003-04-05    <johan AT balder>
8494
8495         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8496         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8497         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8498         * src/SDCCast.c: fixed a warning
8499         * src/SDCCast.h: fixed a warning
8500         * src/SDCCicode.c (operandFromAst): fixed a warning
8501
8502 2003-04-04    <johan AT balder>
8503
8504         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8505         * src/SDCCast.c (decorateType): fixed bug #715076
8506         * src/SDCC.y: fixed bug #702907
8507
8508 2003-04-03    <johan AT balder>
8509
8510         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8511         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8512         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8513         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8514         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8515
8516 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8517
8518         * _decdptr.c: fix return values
8519         * _gptrget.c: fix return values
8520         * _gptrgetc.c: fix return values
8521         * _gptrput.c: fix return values
8522         * _mulint.c: fix return values
8523         * as/z80/Makefile: fix 'make -j' problem
8524
8525 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8526
8527         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8528         * configure.in: big cleanup, updated to autoconf 2.5x
8529         * configure: rebuilt from configure.in
8530         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8531         * sdcc_vc_in.h: reflect changes from sdccconf.h
8532         * doc/Makefile: fixed a flaw in "make install"
8533
8534 2003-04-02    <johan AT balder>
8535
8536         * src/ds390/gen.c (genCmp): no comments
8537         * src/mcs51/gen.c (genCmp): no comments
8538         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8539         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8540
8541 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8542
8543         * support/regression/generate-cases.py: place generated file in given sub directory
8544         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8545         * support/regression/Makefile: improvements for 'make -j';
8546         side effect: it's simpler and faster now
8547
8548 2003-03-31  Borut Razem <borut.razem AT siol.net>
8549
8550         * src/z80/main.c: link-{port} and as-{port} defined without path
8551         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8552
8553 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8554
8555         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8556
8557 2003-03-30  Borut Razem <borut.razem AT siol.net>
8558
8559         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8560           changed type of list parameter to set
8561         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8562         * src/port.h: changed type of do_assemble() parameter to set
8563         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8564           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8565           definition of "cppoutfilename" macro with NULL value in preProcess()
8566         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8567         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8568         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8569           replaced with set *binPathSet
8570         * shash_add() deallocates the item, if allready exsists, before adding the new one
8571         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8572
8573 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8574
8575         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8576           a nested for loop bug in the PIC port
8577         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8578           for loops
8579
8580 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8581
8582         * support/Util/dbuf.h: remove C++ stuff to make it portable
8583
8584 2003-03-28  Borut Razem <borut.razem AT siol.net>
8585
8586         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8587           literal strings in stringLiteral()
8588         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8589         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8590           to the project
8591
8592 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8593
8594         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8595
8596 2003-03-26    <johan AT balder>
8597
8598         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8599         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8600         * src/SDCCast.c (decorateType): fixed " -v < 3"
8601
8602 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8603
8604         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8605         Added Lenny Story's debug infrastructure changes:
8606         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8607         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8608         * src/cdbFile.c: added
8609         * src/SDCCdebug.c: added
8610         * src/SDCCdebug.h: added
8611         * src/SDCCast.c (createFunction)
8612         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8613         * src/SDCCmain.c (parseCmdLine, main)
8614         * src/SDCCmem.c (redoStackOffsets)
8615         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8616         * src/SDCCsymt.h
8617         * src/common.h
8618         * src/avr/gen.c (genAVRCode)
8619         * src/ds390/gen.c (gen390Code)
8620         * src/mcs51/gen.c (gen51Code)
8621         * src/pic/gen.c (genpic14Code)
8622         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8623         * src/xa51/gen.c (genXA51Code)
8624         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8625
8626 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8627
8628         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8629         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8630
8631 2003-03-22    <johan AT balder>
8632
8633         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8634
8635 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8636
8637         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8638         * doc/cdbfileformat.lyx: added, written by Lenny Story
8639         * doc/Makefile: added cdbfileformat.lyx
8640         * doc/clean.mk: added cdbfileformat.lyx
8641
8642 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8643
8644         * src/mcs51/peeph.def: fix bug #705773
8645
8646 2003-03-20    <johan AT balder>
8647
8648         An sfr/sbit can have an "at #" AND an initializer
8649         * src/SDCCsymt.c (checkSClass):
8650         * src/SDCCmem.c (allocGlobal):
8651         * src/SDCCmem.c (allocLocal):
8652         * src/SDCCast.c (createBlock):
8653
8654 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8655
8656         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8657
8658 2003-03-16    <johan AT balder>
8659
8660         Undid the hackup of const and volatile, the problem is much bigger
8661         * src/SDCC.y:1.65
8662         * src/SDCCast.c:1.171
8663         * src/SDCCglue.c:1.138
8664         * src/SDCCicode.c:1.146
8665         * src/SDCCsymt.c:1.150
8666         * src/SDCCval.c:1.65
8667
8668 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8669
8670         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8671         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8672
8673 2003-03-13    <johan AT balder>
8674
8675         Hackup const and volatile modifiers in type chains a bit:
8676         * src/SDCC.y:1.63
8677         * src/SDCCast.c:1.169
8678         * src/SDCCglue.c:1.136
8679         * src/SDCCicode.c:1.143
8680         * src/SDCCsymt.c1.146
8681         * src/SDCCsymt.h1.59
8682         * src/SDCCval.c:1.63
8683
8684 2003-03-12    <johan AT balder>
8685
8686         * src/SDCCBBlock.h: more LRH debugging junk
8687         * src/SDCCcflow.h: more LRH debugging junk
8688         * src/SDCCloop.c: more LRH debugging junk
8689         * src/SDCC.y (struct_declaration): fixed bug #697590
8690         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8691         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8692         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8693
8694 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8695         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8696         test function names must now match exactly).
8697         * src/SDCCcse.c: added special case in findCheaperOp to allow
8698         extending a short integer. Makes less awful code for bug 700121 test case.
8699
8700 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8701
8702         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8703         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8704
8705 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8706
8707         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8708         actually called (operandsNotEqual() was called for all
8709         operandsNotEqualX tests).
8710
8711 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8712
8713         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8714         with shorter literals. Fixes bug 700121.
8715
8716 2003-03-11    <johan AT balder>
8717
8718         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8719
8720 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8721
8722         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8723         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8724
8725 2003-03-10  Borut Razem <borut.razem AT siol.net>
8726
8727         * src/SDCCmain.c: pipe preprocessor's output
8728         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8729         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8730         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8731         which closes all pipes in pipeSet set
8732         * src/SDCCset.c: free deleted item in function deleteSetItem()
8733         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8734         moved from z80 to src subproject
8735         * .version: increased version number to 2.3.4
8736
8737 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8738
8739         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8740         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8741         * support/regression/ports/xa51/spec.mk: fix typo
8742
8743 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8744
8745         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8746
8747 2003-03-09  Borut Razem <borut.razem AT siol.net>
8748
8749         * src/SDCCmain.c: pipe preprocessor's output
8750         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8751         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8752         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8753         which closes all pipes in pipeSet set
8754         * src/SDCCset.c: free deleted item in function deleteSetItem()
8755         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8756         moved from z80 to src subproject
8757
8758 2003-03-09  Borut Razem <borut.razem AT siol.net>
8759
8760         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8761         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8762         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8763         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8764         * src/SDCCglobl.h: unification of WIN32 native definitions
8765
8766 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8767
8768         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8769
8770 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8771
8772         * src/configure.in:   check for endianess (even while cross-compiling)
8773         * src/configure:      check for endianess (even while cross-compiling)
8774         * src/configure_in.h: check for endianess (even while cross-compiling)
8775         * src/avr/gen.c:        remove old endianess stuff
8776         * src/mcs51/gen.c:      remove old endianess stuff
8777         * src/ds390/gen.c:      remove old endianess stuff
8778         * src/pic/gen.c:        remove old endianess stuff
8779         * src/pic/genarith.c:   remove old endianess stuff
8780         * src/pic/glue.c:       fix endianess check
8781         * src/pic16/gen.c:      remove old endianess stuff
8782         * src/pic16/genarith.c: remove old endianess stuff
8783         * src/pic16/glue.c:     fix endianess check
8784         * src/xa51/gen.c:       remove old endianess stuff
8785         * src/z80/gen.c:        fix endianess check
8786         * src/SDCCglue.c:       fix endianess check
8787         * src/ds390/peeph.def: fix bug 700036
8788
8789 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8790
8791         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8792         * src/configure: find appropriate data-types on host for SDCC's int and long
8793         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8794         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8795         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8796
8797 2003-03-07    <johan AT balder>
8798
8799         Just a big NOOP:
8800                 some minor cleanups before the big shot
8801                 OP_DEFS and OP_USES now use Kevin's protection
8802                 new option --nolabelopt
8803
8804         * src/SDCCBBlock.c:
8805         * src/SDCCast.c,:
8806         * src/SDCCcflow.c:
8807         * src/SDCCcse.c:
8808         * src/SDCCicode.c:
8809         * src/SDCCicode.h:
8810         * src/SDCClabel.c:
8811         * src/SDCCloop.c:
8812         * src/SDCCmain.c:
8813         * src/ds390/ralloc.c:
8814         * src/mcs51/ralloc.c:
8815         * src/pic/ralloc.c:
8816         * src/xa51/ralloc.c:
8817         * src/z80/ralloc.c:
8818
8819 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8820
8821         * src/pic/pcode.c (get_op): fix 64 bit warnings
8822         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8823         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8824         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8825         * support/regression/tests/malloc.c: fix 64 bit warnings
8826
8827 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8828
8829         * src/mcs51/gen.c (genMinus): fixed bug 696436
8830
8831 2003-03-02  Borut Razem <borut.razem AT siol.net>
8832
8833         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8834
8835 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8836
8837         * configure.in: test for mkstemp
8838         * sdccconf_in.h: add HAVE_MKSTEMP
8839
8840 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8841
8842         * device/include/ctype.h: removed warning while using --stack-auto
8843         * device/include/malloc.h: removed warning while using --stack-auto
8844         * device/include/string.h: removed warning while using --stack-auto
8845
8846 2003-02-23  Borut Razem <borut.razem AT siol.net>
8847
8848         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8849         because NDEBUG is defined (see man assert)
8850         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8851
8852 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8853
8854         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8855         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8856
8857 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8858
8859         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8860         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8861
8862 2003-02-18    <johan AT balder>
8863
8864         * as/mcs51/asmain.c (asmbl): module can start with a digit
8865         * as/z80/asmain.c (asmbl): module can start with a digit
8866
8867 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8868
8869         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8870         * src/asm.c: fix pipe() for Mingw32
8871
8872 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8873
8874         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8875         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8876         make -V work again; --c1mode reads now from stdin
8877         * doc/sdccman.lyx: added --c1mode
8878         * support/Util/SDCCerr.c: new messages for c1 mode
8879         * support/Util/SDCCerr.h: new messages for c1 mode
8880         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8881
8882 2003-02-15    <johan AT balder>
8883
8884         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8885
8886 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8887
8888         * doc/sdccman.lyx: Environment variables, -o and other minor things
8889
8890 2003-02-14    <johan AT balder>
8891
8892         * src/xa51/main.c: before anyone really tries to use it :)
8893
8894         * Install doc's in share/sdcc/doc
8895         * removed some obsolete files
8896         * Do a proper make distclean and uninstall
8897         M Makefile.common.in
8898         R sdccbuild.sh
8899         M as/Makefile
8900         M device/include/Makefile.in
8901         M device/lib/Makefile.in
8902         M doc/sdccman.lyx
8903         M link/Makefile
8904         M sim/ucsim/doc/Makefile.in
8905         M src/clean.mk
8906         R src/avr/peeph.rul
8907         R src/xa51/peeph.rul
8908         M support/cpp2/Makefile.in
8909         M support/makebin/Makefile
8910
8911
8912 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8913
8914         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8915
8916 2003-02-10  Borut Razem <borut.razem AT siol.net>
8917
8918         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8919         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8920         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8921         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8922         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8923         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8924         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8925         src/z80/Makefile.bcc: Borland Makefile cleanup
8926         * as/z80/Makefile.bcc: Added Borland Makefile
8927         * support/cpp2/borland.h: Removed
8928
8929 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8930
8931         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8932         * src/SDCC.lex: new pragma NOIV
8933         * src/SDCCglobl.h: new pragma NOIV
8934         * src/SDCCmem.c: new pragma NOIV
8935
8936 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8937
8938         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8939
8940 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8941
8942         * src/SDCCmain.c: signal handling is switched off by --debug
8943         * doc/Makefile: small fix for install; use clean.mk again
8944         * doc/clean.mk: clean *.pdf and *.html too
8945
8946 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8947
8948         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8949         * device/lib/printfl.c: fix a ds390 bug by making it portable
8950         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8951         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8952         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8953         * debugger/mcs51/cmd.c: converted multi-line string literals
8954         * sim/ucsim/globals.cc: converted multi-line string literals
8955         * src/SDCCmain.c: introduced signal handler to remove temp files
8956         * doc/Makefile: small tweaks, implement clean
8957         * doc: removed generated files
8958
8959 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8960
8961         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8962         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8963         Address Record is not correctly generated for DS390."
8964
8965 2003-02-02  Borut Razem <borut.razem AT siol.net>
8966
8967         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8968         * as/mcs51/asm.h: fixed compilation with Borland C
8969         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8970         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8971         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8972         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8973         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8974         src/z80/Makefile.bcc: delete $(LIB) only if exist
8975         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8976
8977 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8978
8979         * device/include/malloc.h: introduced NULL
8980         * device/include/string.h: introduced NULL
8981         * device/include/stdlib.h: introduced NULL
8982         * device/lib/_memcpy.c: removed NULL
8983         * device/lib/_strcat.c: removed NULL
8984         * device/lib/_strchr.c: removed NULL
8985         * device/lib/_strcmp.c: removed NULL
8986         * device/lib/_strcpy.c: removed NULL
8987         * device/lib/_strcspn.c: removed NULL
8988         * device/lib/_strlen.c: removed NULL
8989         * device/lib/_strncat.c: removed NULL
8990         * device/lib/_strncmp.c: removed NULL
8991         * device/lib/_strncpy.c: removed NULL
8992         * device/lib/_strpbrk.c: removed NULL
8993         * device/lib/_strrchr.c: removed NULL
8994         * device/lib/_strspn.c: removed NULL
8995         * device/lib/_strstr.c: removed NULL
8996         * device/lib/_strtok.c: removed NULL
8997         * device/lib/malloc.c: removed NULL, include own header
8998
8999 2003-02-02    <johan AT balder>
9000
9001         * 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
9002         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9003         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9004         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9005         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9006         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9007
9008 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9009
9010         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9011         area 'DATA'"
9012
9013 2003-02-01    <johan AT balder>
9014
9015         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9016
9017 2003-01-31    <johan AT CP255758-A>
9018
9019         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9020
9021 2003-01-30    <johan AT balder>
9022
9023         * src/SDCCBBlock.c: automatic bug detection
9024         * src/SDCCicode.c: automatic bug detection
9025
9026 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9027
9028         * src/SDCCglobl.h:   now --xram-size 0 works
9029         * src/SDCCmain.c:    now --xram-size 0 works
9030
9031 2003-01-29    <johan AT balder>
9032
9033         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9034
9035 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9036
9037         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9038         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9039         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9040         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9041         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9042         * src/SDCCmain.c:    Added options --xram-size and --code-size
9043
9044 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9045
9046         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9047         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9048
9049 2003-01-27    <johan AT balder>
9050
9051         * src/SDCC.y: fixed bug #613764
9052
9053 2003-01-26    <johan AT balder>
9054
9055         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9056         * src/SDCCsymt.h: fixed bug #673374
9057         * src/SDCCglue.c: fixed bug #661910
9058         * src/SDCCast.c: fixed bug #458099 and 673374
9059
9060 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9061
9062         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9063         * as/mcs51/strcmpi.h: added
9064         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9065         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9066         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9067         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9068         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9069         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9070         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9071         * as/mcs51/Makefile.aslink: new module strcmpi
9072         * as/mcs51/Makefile.asx8051: new module strcmpi
9073         * as/mcs51/Makefil.bcc: new module strcmpi
9074         * as/mcs51/Makefile.in: new module strcmpi
9075         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9076
9077 2003-01-26    <johan AT balder>
9078
9079         * src/SDCCglue.c: reverted back to 1.124
9080         * src/SDCCast.c: reverted back to 1.156
9081         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9082
9083 2003-01-25    <johan AT balder>
9084
9085         * src/SDCCglue.c: A better fix for bug #661910
9086         * src/SDCCast.c: A better fix for bug #661910
9087         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9088
9089 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9090
9091         * src/Makefile.in: remove spawn.o
9092         * src/SDCCmain.c: remove spawn.h
9093         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9094         * src/spawn.c: removed
9095         * src/spawn.h: removed
9096         * support/regression/ports/ds390/spec.mk: link with -r
9097
9098 2003-01-24    <johan AT CP255758-A>
9099
9100         * src/ds390/gen.c (aopOp): fixed bug #667458
9101         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9102         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9103         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9104
9105 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9106
9107         * src/mcs51/peeph.def: better assembler identation by Frieder
9108         * src/mcs51/gen.c: better assembler identation by Frieder
9109
9110 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9111
9112         * as/z80/string.h: removed for gcc 3.2
9113         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9114         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9115
9116 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9117
9118         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9119         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9120         * support/regression/Makefile: separate temp files for ports
9121         * support/regression/generate-cases.py: separate temp files for ports
9122         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9123         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9124
9125 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9126
9127         * moved tinitalk to device/examples/ds390
9128
9129 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9130
9131         * as/mcs51/lkmem.c: rflag is for DS390
9132         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9133         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9134                          (linkEdit): move mem- and map-files the same way as ihx-files
9135         * src/z80/main.c (_setDefaultOptions): removed --generic
9136         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9137         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9138         * src/pic/glue.c (picglue): --c1mode works again
9139         * src/pic16/glue.c (pic16glue): --c1mode works again
9140         * src/asm.c (printCLine): fix #660034
9141
9142 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9143
9144         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9145         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9146         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9147         * as/mcs51/lkmem (summary): better fix for sp problem
9148         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9149         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9150         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9151                                               remove --stack-after-data
9152
9153 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9154
9155         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9156         * src/SDCCutil.c (join): ugly bug: missing '\0'
9157         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9158
9159 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9160
9161         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9162         * src/port.h: typo
9163         * src/pic/main.c (_asmCmd): gpasm supports -o
9164         * src/z80/main.c: more general macros
9165         * device/lib/Makefile.in: remove intermediate files
9166
9167 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9168
9169         * .version: Bumped version number to 2.3.3
9170         * src/SDCCBBlock.c: new option -o
9171         * src/SDCCglobl.h: new option -o
9172         * src/SDCCglue.c: new option -o
9173         * src/SDCCmain.c: new option -o
9174         * src/asm.c: new option -o
9175         * src/ds390/main.c: new option -o
9176         * src/pic/glue.c: new option -o
9177         * src/pic/pcode.c: new option -o
9178         * src/pic/ralloc.c: new option -o
9179         * src/pic16/glue.c: new option -o
9180         * src/pic16/pcode.c: new option -o
9181         * src/pic16/ralloc.c: new option -o
9182         * src/z80/main.c: new option -o
9183         * device/lib/Makefile.in: use -o
9184         * support/regression/ports/ds390/spec.mk: use -o
9185         * support/regression/ports/gbz80/spec.mk: use -o
9186         * support/regression/ports/mcs51/spec.mk: use -o
9187         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9188         * support/regression/ports/z80/spec.mk: use -o
9189         * support/regression/ports/ucz80/spec.mk: use -o
9190         * support/regression/ports/xa51/spec.mk: use -o
9191         * support/regression/fwk/lib/timeout.c: fix usage string
9192
9193 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9194         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9195
9196 2003-01-07    <johan AT balder>
9197
9198         * src/SDCCast.c (decorateType): fixed bug #600035
9199
9200 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9201         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9202         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9203         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9204         * src/pic/pcode.c: outcommented unused variable to remove warnings
9205         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9206
9207 2003-01-06    <karl AT turbobit.com>
9208         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9209    regression tests.
9210
9211 2003-01-06    <johan AT balder>
9212
9213         * src/SDCCicode.c: fixed array add
9214
9215 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9216         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9217         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9218
9219 2003-01-04    <johan AT balder>
9220
9221         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9222
9223 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9224         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9225
9226 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9227         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9228         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9229
9230 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9231         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9232
9233 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9234         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9235
9236 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9237         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9238
9239 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9240
9241     * in \sdcc\as\mcs51\ changed these files in order to create an
9242     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9243     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9244     following files to include the previous two files: aslink.dsp,
9245     Makefile.aslink, Makefile.bcc, and Makefile.in.
9246
9247     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9248     .adb instead of .cdb
9249
9250 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9251
9252         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9253         value from option --iram-size.
9254
9255 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9256
9257         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9258         dram[] array.
9259
9260 2002-09-18    <wiml AT hhhh.org>
9261
9262         * SDCClrange.h: exposed setFromRange() and setToRange()
9263         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9264           packRegsForAccUse() (bug 542397)
9265         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9266           multiple times and emitting the fetch operations more than once
9267           added aopGetUsesAcc() function to allow binary operators to
9268           fetch their operands in the correct order; made genMinus() emit
9269           compact code for X = LITERAL - Y
9270
9271 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9272         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9273         sprintf() in line 1267.
9274
9275 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9276         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9277         like ports.
9278
9279 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9280         Changes to aslink (All the changes are marked with 'JCF'):
9281
9282         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9283         summary().
9284
9285         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9286         area BSEG.  Also moves, if possible, the DATA area down into the internal
9287         ram so more space is available.
9288
9289         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9290         sflag.
9291
9292         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9293         not bytes.  Function summary() which creates a memory usage summary
9294         file with extension .mem.  Reports of overlaping stack and small stack
9295         size.  If the space for the stack is less than 16 bytes aslink trows a
9296         warning.
9297
9298         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9299         the 8051.  Option 'y' for memory summary output file.
9300
9301         Changes to sdcc (All the changes are marked with 'JCF'):
9302
9303         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9304
9305         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9306         overlaying area for it (uses RegBankUsed[4]).
9307
9308         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9309         bank zero as used by default.  By default aslink locates the stack
9310         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9311         the creation of the .mem file.  Delegates the allocation of data area
9312         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9313         the begining of the stack area to aslink.
9314
9315         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9316         glue() in SDCCglue.c creates an area for it.
9317
9318 2002-09-03  Borut Razem <borut.razem AT siol.net>
9319         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9320         sdcc/src/pic/glue.c:
9321         introduced atexit() handler for teporay files removal in case of
9322         errors, assertions, ...
9323
9324 2002-08-29  Borut Razem <borut.razem AT siol.net>
9325         * sdcc/support/cpp2/auto-host_vc_in.h:
9326         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9327         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9328         Maybe there is a similar problem with BORLANDC? It should be checked!
9329
9330         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9331         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9332         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9333         was not executed, and the compiler (cl) launched a warning:
9334         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9335
9336 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9337         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9338
9339 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9340         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9341
9342         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9343           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9344           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9345           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9346           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9347           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9348           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9349         - added Release configuration in VS projects
9350         - review of compiler an linker options
9351         - VC .exe files are generated in bin_vc directory, not to interfere
9352           with binaries generated from other projects (cygwin, mingw, bcc ...)
9353
9354         * sdcc/src/yacc.dsp: added
9355
9356         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9357         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9358         and insert the version number definitions from .version
9359
9360         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9361
9362         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9363         added - genarate auto-host.h using auto-host_vc_in.h as template
9364
9365         * sdcc/sdcc_vc.h,
9366         removed from CVS, generated automatically
9367
9368 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9369         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9370
9371 2002-08-11  Borut Razem <borut.razem AT siol.net>
9372         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9373
9374 2002-08-10  Borut Razem <borut.razem AT siol.net>
9375         * src/SDCCmain.c (main):
9376         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9377         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9378         The consequence was that some temporary files were not removed.
9379
9380         * src/SDCCglue.c:
9381         unification of code in functions tempfilename() and tempfile():
9382         function tempnam() is defined in Visual Studio 6.0 and .NET
9383
9384         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9385
9386         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9387           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9388         - removed compiler command line option /WX: Treats all warnings as errors
9389         - update a list of source files, included into the project
9390
9391         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9392           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9393         changed project type to Generic Project so that can be correcly converted to VS.NET project
9394
9395         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9396
9397         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9398
9399         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9400
9401         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9402         added return 0 statements after assert() to make compiler happy
9403
9404         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9405         added newline in the def file to keep MSC compiler satisfied
9406
9407         * sdcc/src/z80/gen.c:
9408         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9409           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9410         - solved MSC error in function aopDump()
9411
9412         * sdcc_vc.h: define PREFIX as "\\sdcc"
9413
9414 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9415         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9416
9417 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9418         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9419         - Rewrote the register banking algorithm.
9420         - Added pCode live-range analysis to registers (for now, only non-used and
9421         singly-used registers optimized away)
9422
9423         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9424
9425         * 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.
9426
9427 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9428         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9429
9430 2002-04-22  Michael Hope  <michaelh AT vroom>
9431
9432         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9433
9434         * configure.in (DD_COPT): Added include support required for gbdk.
9435
9436         * .version: Bumped version number just to increase it.
9437
9438         * src/SDCCmain.c: Added -nostdinc to the default options.
9439
9440 2002-04-15  Michael Hope  <michaelh AT vroom>
9441
9442         * device/lib/z80/printf.c (sprintf): Added.
9443
9444         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9445
9446         * src/z80/peeph.def: Added transpose redundent load rule.
9447
9448         * src/z80/main.c: Added force callee saves for jaune.
9449
9450         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9451
9452         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9453
9454 2002-03-28  Johan Knol  <johan AT balder>
9455
9456         * src/SDCCval.c: fixed bug #532436
9457
9458 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9459         * /src/port.h:
9460         Added "char *Processor" field to the port structure.
9461
9462         * /src/SDCCmain.c:
9463         Added -p option. Allows port dependent processor to be specified.
9464
9465         * all ports:
9466         Initialized the new field char *Processor field to NULL in all ports
9467
9468         * /src/pic/*:
9469         Compiler generated registers for interrupt context saving
9470         were not getting allocated.
9471
9472 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9473
9474         * /src/SDCCast.c:
9475         Fixed left shift. Will promote the left side of a left shift
9476         if a) left shifting more than size of operand or b) when assigned
9477         to something size > size of left side
9478
9479 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9480         * src/pic/*
9481         tons of changes. Register allocation has been
9482         rewritten. Added customization for the various PICs. Flow
9483         analysis is restructured. ...
9484
9485         * src/pic/device.h:
9486         Added
9487
9488         * src/pic/device.c:
9489         Added. device.c is a PIC port hack to accomodate variations
9490         in PIC devices.
9491
9492 2002-03-13  Michael Hope  <michaelh AT vroom>
9493
9494         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9495
9496 2002-03-04  johanknol  <johanknol AT manik>
9497
9498         * /src/SDCCval.c: fixed
9499
9500         const unsigned char arr[][2] = { { 0, 1 } };
9501         t18.c:1: error: Initializer element is not constant
9502
9503 2002-03-04  bela  <bela AT manik>
9504
9505         * /device/include/mcs51reg.h:
9506         ds89c420 register definition update
9507
9508 2002-03-03    <johan AT FRIJA>
9509
9510         * support/Util/SDCCerr.c: did something, but don't no why anymore
9511
9512         * support/regression/tests/bug-524691.c: made it a little less shy
9513
9514         * src/SDCCast.c (decorateType): fixed bug #524697
9515
9516         * src/SDCCast.c: made some lineno improvements
9517
9518         * src/SDCCval.c (getNelements): changed warning to error
9519
9520         * src/SDCCglue.c (printIvalArray): changed warning to error
9521
9522         * src/SDCCicode.c: fixed a warning for mingw
9523
9524         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9525
9526         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9527
9528 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9529
9530         * src/ds390/peeph.def:
9531         Added some more peephole rules
9532
9533         * src/ds390/gen.c: Various fixes & enhancements
9534
9535         * src/SDCClrange.c, src/SDCClrange.h:
9536         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9537
9538         * src/ds390/ralloc.c:
9539         various fixes & enhancements (ds390) specific
9540
9541         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9542         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9543         from rallocs.
9544
9545         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9546
9547 2002-03-02    <johan AT FRIJA>
9548
9549         * src/SDCCast.c (decorateType): fixed bug #524708
9550
9551         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9552
9553         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9554
9555 2002-03-01  Michael Hope  <michaelh AT vroom>
9556
9557         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9558
9559         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9560
9561 2002-03-01    <johan AT FRIJA>
9562
9563         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9564
9565         * src/SDCCast.c (decorateType): fixed bug #524209
9566
9567         * src/SDCCval.c (valNot): fixed bug #524195
9568
9569 2002-02-26    <johan AT balder>
9570
9571         * src/xa51/gen.c: fixed a warning
9572
9573         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9574
9575         * src/SDCCast.c (decorateType): fixed bug #522534
9576
9577 2002-02-23    <johan AT balder>
9578
9579         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9580
9581 2002-02-22    <johan AT balder>
9582
9583         * src/SDCCast.c: fixed bug #514865
9584
9585         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9586
9587 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9588
9589         * sdcc/src/SDCCloop.c:
9590         Previous fix was not good. basic blocks that have "break" or "return" are
9591         not really partof a loop , but live ranges used in these blocks should
9592         be live thru the entire loop, so set partOfLoop but don't add them to
9593         loop region
9594
9595 2002-02-21    <johan AT FRIJA>
9596
9597         * src/SDCCcse.c: fixed bug #514308
9598
9599 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9600
9601         * src/SDCCloop.c:
9602         Fixed BUG #519583. If a conditional block ended in a return/break
9603         statement inside a loop, it was not being considered part of the loop.
9604
9605         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9606
9607 2002-02-10  Karl Bongers <karl AT turbobit.com>
9608
9609         * debugger/*:
9610         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9611         with lots of comments and notes.
9612
9613         * device/examples/test2.c:
9614         Fix bug, "red" variable not being initialized(compiler complained).
9615
9616         * device/examples/Makefile, examples/test3.c:
9617         Add Makefile in device/examples folder, compiles test3.c
9618         for use as a multiple module SDCDB test case.
9619
9620         * sim/ucsim/cmd.src/cmdset.cc:
9621         Took out debug printfs in ucsim "next" command.
9622
9623         * sim/ucsim/xa.src:
9624         Karl and Johan start ucsim XA support.  Most dissassembly working,
9625         about 75% emulation done(plenty of work remaining).
9626
9627         * sim/ucsim/z80.src:
9628         Add Z80 support to ucsim, add test-ucz80 regression test,
9629         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9630         Notice z80 compiler fails on examples/test3.c/crc code.
9631
9632 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9633
9634         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9635         Added support for --parms-in-bank1
9636
9637         * src/ds390/peeph.def:
9638         added a few more peephole optimzations
9639
9640         * src/ds390/main.c:
9641         1) added __builtin_inp & __builtin_outp used to read in data of given length
9642            from a memory mapped port
9643         2) added __builtin_memcmp
9644         3) added __builtin_swapw swap bytes of a short
9645
9646         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9647         1) handle multiple send & receives from register bank1
9648         2) ralloc can now allocate DPTR1 to some liveRanges
9649
9650         * src/SDCCsymt.c, src/SDCCsymt.h:
9651         changes to handle multiple sends & receives
9652
9653         * src/SDCCptropt.h:
9654         added some pointer arithmetic optimization
9655
9656         * src/SDCCptropt.c:
9657         added some pointer arithmetic optimizations but not stable yet so not
9658         called from anywhere (will get this working shortly)
9659
9660         * src/SDCCopt.c: fixed for multiple sends & receives
9661
9662         * src/SDCCmain.c:
9663         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9664         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9665            set preprocessor defines (depending on options)
9666
9667         * src/SDCCicode.c, src/SDCCicode.h:
9668         changes made to handle multiple sends & receives
9669
9670         * src/SDCCglobl.h:
9671         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9672
9673         * src/SDCCcse.c, src/SDCCcse.h:
9674         added function findbackward def (to be used in upcoming optimization)
9675
9676         * src/SDCCcflow.c, src/SDCCcflow.h:
9677         added function returnAtEnd - to determine if a basic block terminates with
9678         a RETURN iCode
9679
9680         * src/SDCCast.c, src/SDCCast.h:
9681         added option parms-in-bank1
9682
9683         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9684         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9685         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9686         adjusted for --parms-in-bank1 option
9687
9688         * device/include/string.h:
9689         donot redefine "reentrant" keyword
9690
9691         * device/include/ds80c390.h: Added some more SFRs
9692
9693 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9694
9695         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9696
9697 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9698
9699         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9700
9701 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9702
9703         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9704
9705 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9706
9707         * Added --xram-movc option
9708
9709 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9710
9711         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9712
9713 2002-01-11  Johan Knol
9714
9715         * Added math lib of Jesus Calvino-Fraga
9716
9717 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9718
9719         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9720         * support/regression/Makefile: new target test-mcs51-stack-auto
9721         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9722
9723 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9724
9725         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9726
9727 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9728
9729         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9730
9731 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9732
9733         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9734
9735         * src/SDCCglue.h: add definition for printIvalChar()
9736
9737 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9738
9739         * src/SDCCast.c: fix #498138 by Johan
9740
9741         * src/SDCCglue.c: fix #498138 by Johan
9742
9743 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9744
9745         * support/regression/Makefile: fix clean
9746
9747         * support/regression/ports/ds390/support.c: fix transmission of last character
9748
9749 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9750
9751         * /sdcc/src/ds390/gen.c:
9752         a) improved computing address of stack variable
9753         b) took out some #if 0 code
9754         c) improved parmBytes adjustment
9755         d) improved genPlusIncr & genMinusIncr
9756         e) genCmp could generate bad code (when left assigned to DPTR)
9757         f) Fixed bug in hasInc
9758
9759         * /sdcc/src/ds390/ralloc.c:
9760         a) packRegsForSupport could mess up live information (Fixed)
9761         b) packRegsDPTRuse could be incorrect for left & right shift
9762
9763         * /sdcc/src/mcs51/ralloc.c:
9764         packRegsForSupport could mess up the live information (Fixed)
9765
9766         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9767
9768         * /sdcc/src/SDCCast.c:
9769         can reverse a loop even if function call is present as long
9770         as the loop control variable is local & is not passed as parameter
9771
9772 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9773
9774         * /sdcc/ChangeLog: *** empty log message ***
9775
9776         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9777         More builtin function additions for TININative
9778
9779         * /sdcc/src/ds390/ralloc.c:
9780         Had broken the regression testsuite
9781
9782         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9783
9784         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9785         Added funcattr hasStackParms will be set for reentrant functions when there
9786         are paramteres on the stack, this helps in minimizing frame pointer generation
9787         typeFromStr can handle function pointers now
9788
9789         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9790         *** empty log message ***
9791
9792 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9793
9794         * /src/ds390/gen.c, /src/ds390/main.c:
9795         More builtin function additions for TININative
9796
9797         * /src/ds390/ralloc.c:
9798         Had broken the regression testsuite
9799
9800         * /src/SDCCast.c: Fixed a bug in dumptree
9801
9802         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9803         Added funcattr hasStackParms will be set for reentrant functions when there
9804         are paramteres on the stack, this helps in minimizing frame pointer generation
9805         typeFromStr can handle function pointers now
9806
9807         * /doc/builtins.txt, /doc/TININative.txt:
9808         *** empty log message ***
9809
9810
9811 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9812
9813         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9814         ALPHA version for -mTININative
9815
9816         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9817         updated to reflect changes in the port structure
9818
9819         * /src/port.h:
9820         added function do_assemble (similar to do_link) if non-null this function
9821         will be called to do assembly (-mTININative) requires a multi command
9822         assembly
9823         added function genAssemblerEnd will be called to generate assembler Epilogue
9824
9825         * /src/SDCCsymt.c:
9826         added _JavaNative to debug info printing
9827
9828         * /src/SDCCmain.c: added option --tini-libid
9829         added port->do_assemble function (-mTININative) has a multi command assemble
9830
9831         * /src/SDCCglue.c: Disabled "constExpr" check
9832         added port->genAssemblerEnd function
9833
9834         * /src/SDCCglobl.h: Added option --tini-libid value
9835
9836         * /src/SDCCast.h:
9837         tookout optimizeCompare from the header (has no external references)
9838
9839         * /src/SDCCast.c: made one more function "static"
9840
9841 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9842
9843         * src/z80/mappings.i: Added z80asm support.
9844
9845         * src/z80/main.c: Added z80asm support on --asm=z80asm
9846
9847         * src/z80/gen.c: Fixed asm portability issues.
9848
9849         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9850
9851         * src/SDCCglue.c (printExterns): Added global/extern split.
9852
9853 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9854
9855         * support/regression/Makefile: added test for mcs51 model large
9856
9857         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9858
9859         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9860
9861 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9862
9863         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9864
9865 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9866
9867         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9868
9869         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9870
9871 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9872
9873         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9874
9875         * support/regression/tests/simplefloat.c: Port to mcs51.
9876
9877 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9878         * support/regression/tests/bug-485362.c: Added.
9879
9880         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9881
9882         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9883
9884         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9885
9886         * src/z80/gen.c (aopDump): Added a dump function.
9887
9888 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9889         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9890
9891         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9892
9893         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9894
9895         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9896
9897         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9898
9899         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9900
9901         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9902
9903         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9904
9905         * support/regression/ports/ds390/support.c: Use tinibios.
9906
9907         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9908
9909 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9910
9911         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9912         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9913
9914         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9915
9916         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9917
9918 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9919
9920         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9921
9922         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9923         (packRegsForIYUse): Created and optimised.
9924
9925 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9926
9927         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9928 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9929
9930         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9931
9932         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9933
9934         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9935
9936 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9937
9938         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9939
9940         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9941
9942 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9943
9944         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9945
9946         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9947
9948         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9949
9950 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9951
9952         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9953         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9954         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9955
9956         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9957
9958         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9959         (genNotFloat): Added.
9960         (genUminusFloat): Added.
9961
9962         * device/lib/z80/Makefile: Added floating pt stubs.
9963
9964         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9965
9966         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9967
9968         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9969
9970 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9971
9972         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9973
9974         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9975
9976         * sdcc/support/regression/Makefile: Add port ds390.
9977
9978         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9979
9980         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9981
9982         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9983
9984         * sdcc/support/regression/ports/ds390/support.c: Added.
9985
9986         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9987
9988         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9989
9990         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9991
9992 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9993
9994         * device/include/malloc.h: Added z80 and gbz80 support.
9995
9996         * device/lib/gbz80/heap.s: Added.
9997
9998         * device/lib/z80/heap.s: Added.
9999
10000         * device/lib/malloc.c: Added z80 and gbz80 support.
10001
10002         * support/regression/tests/malloc.c (testMalloc): Added.
10003
10004         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10005
10006         * support/regression/tests/bug-478094.c: Added.
10007
10008         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10009
10010 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10011
10012         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10013
10014         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10015
10016         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10017
10018         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10019
10020         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10021
10022 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10023
10024         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10025
10026 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10027
10028         * support/regression/tests/bug-477927.c: Added.
10029
10030         * src/z80/peeph.def: Added minor rules.
10031
10032         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10033
10034         * src/z80/peeph.def: Added jump optimisation modification.
10035
10036 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10037
10038         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10039
10040 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10041
10042         * support/regression/tests/funptrs.c: Added.
10043
10044 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10045
10046         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10047
10048 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10049
10050         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10051
10052         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10053
10054         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10055         (movLeft2ResultLong): Created.
10056
10057         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10058         (joinPushes): Added.  Joins two char pushes into a word push.
10059
10060 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10061
10062         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10063
10064         * support/makebin/Makefile (install): Added creation of dest dir.
10065
10066 2001-10-24 Karl Bongers <karl AT turbobit.com>
10067
10068         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10069
10070 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10071
10072         * src/z80/ralloc.c: Turned off faulty pack for one use.
10073
10074         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10075
10076         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10077
10078 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10079
10080         * support/regression/Makefile: Improved clean
10081
10082         * support/regression/ports/gbz80/spec.mk: Added clean
10083
10084         * support/regression/ports/host/spec.mk: Added clean
10085
10086         * support/regression/ports/z80/spec.mk: Added clean
10087
10088         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10089
10090         * support/regression/ports/mcs51/timeout.c: little improvements
10091
10092 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10093
10094         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10095
10096         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10097
10098         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10099
10100 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10101
10102         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10103
10104         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10105
10106 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10107         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10108
10109         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10110
10111         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10112
10113         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10114
10115         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10116
10117         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10118
10119         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10120
10121         * support/regression/tests/longor.c: Added.
10122
10123 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10124
10125         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10126
10127         * as/mcs51/aslink.h: define PATH_MAX
10128
10129         * as/mcs51/asm.h: define PATH_MAX
10130
10131         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10132
10133         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10134
10135         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10136
10137         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10138
10139         * src/SDCCglobl.h: define PATH_MAX
10140
10141         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10142
10143         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10144
10145 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10146
10147         * src/z80/gen.c (gencjneshort): Fixed
10148
10149         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10150
10151 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10152
10153         * support/regression/tests/bug-469671.c: Added.
10154
10155         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10156
10157 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10158
10159         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10160
10161         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10162
10163 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10164
10165         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10166
10167         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10168
10169         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10170
10171         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10172
10173         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10174
10175         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10176
10177         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10178
10179 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10180
10181         * 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.
10182
10183         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10184
10185         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10186
10187 2001-10-07    <johan AT FRIJA>
10188
10189         * device/lib/gets.c (gets): fixed the return value.
10190
10191 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10192         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10193
10194         * 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.
10195
10196         * 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.
10197
10198         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10199
10200         * src/pic/gen.c: Removed Safe_strdup.
10201
10202         * configure.in: Added option to enable libgc support.
10203
10204         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10205         (bitVectUnion): Optimised.
10206         (bitVectIntersect): Optimised.
10207         (bitVectBitsInCommon): Optimised.
10208         (bitVectCplAnd): Optimised.
10209
10210         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10211
10212 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10213
10214         * src/SDCCmain.c: distinguish between assembler debug and plain options
10215
10216         * src/avr/main.c:   remove standard assembler options
10217
10218         * src/ds390/main.c: remove standard assembler options
10219
10220         * src/mcs51/main.c: remove standard assembler options
10221
10222         * src/port.h: removed "PENDING" comment
10223
10224 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10225
10226         * src/device/lib/_mulint.c  : new, with assember functions
10227
10228         * src/device/lib/_mullong.c : new, with assember functions
10229
10230         * src/device/lib/_divuint.c : with assember functions
10231
10232         * src/device/lib/_divsint.c : with assember functions
10233
10234         * src/device/lib/_divulong.c: with assember functions
10235
10236         * src/device/lib/_divslong.c: with assember functions
10237
10238         * src/device/lib/_moduint.c : with assember functions
10239
10240         * src/device/lib/_modsint.c : with assember functions
10241
10242         * src/device/lib/_modulong.c: with assember functions
10243
10244         * src/device/lib/_modslong.c: with assember functions
10245
10246         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10247
10248         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10249
10250         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10251                                       replaced _mululong.c and _mulslong.c by _mullong.c
10252
10253 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10254
10255         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10256
10257 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10258
10259         * src/SDCCglue.c: test, if win32api is available for MINGW
10260
10261 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10262
10263         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10264         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10265         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10266         * support/regression/ports/host/spec.mk: removed GENERIC
10267         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10268         * support/regression/ports/z80/spec.mk: removed GENERIC
10269
10270 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10271
10272         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10273
10274         * support/regression/tests/bug-467035.c: Created.
10275
10276 2001-10-01    <johan AT FRIJA>
10277
10278         * src/SDCC.y: fixed bug #466586 part 1
10279
10280 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10281
10282         * SDCCicode.c: z80 has no generic pointers
10283         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10284
10285 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10286
10287         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10288
10289 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10290
10291         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10292
10293         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10294
10295 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10296
10297         * configure.in: Fixed up so that ucsim is only configured once.
10298
10299         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10300
10301         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10302         (getPathDifference): As above.
10303
10304         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10305
10306         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10307
10308 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10309         * .version: Updated to 2.3.1
10310
10311         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10312         Added copyright header.
10313
10314         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10315         (assemble): Added support for macro based assembler commands.
10316         (linkEdit): Added support for macro based linker commands.
10317         (preProcess): Changed the pre-processor to use macros.
10318         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10319         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10320
10321         * device/lib/z80/crt0.s: Added module name for debugging.
10322
10323 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10324
10325         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10326
10327         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10328
10329         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10330
10331         * src/Makefile.in: Added SDCCmacro and SDCCutil
10332
10333 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10334
10335         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10336
10337 2001-09-16    <johan AT FRIJA>
10338
10339         * 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.
10340
10341 2001-09-15    <johan AT FRIJA>
10342
10343         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10344         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10345
10346 2001-09-11    <johan AT FRIJA>
10347
10348         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10349
10350 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10351
10352         * support/regression/tests/bug-460444.c: Added test case.
10353
10354         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10355         (genCast): Added justification for all of the asserts.
10356
10357 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10358
10359         * support/regression/support.c: _xdata replaced by xdata
10360
10361         * support/regression/spec.mk: removed _generic
10362
10363 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10364
10365         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10366
10367         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10368         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10369
10370         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10371
10372         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10373
10374         * support/regression/tests/bug-460010.c: Added test case.
10375
10376         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10377
10378 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10379
10380         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10381
10382         * support/regression/testfwk.c: removed workaround for bug #436344
10383
10384         * support/regression/tests/bp.c: use less memory with mcs51
10385
10386         * support/regression/tests/bug-441448.c: use less memory
10387
10388         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10389
10390         * support/regression/collate-results.py: typo
10391
10392 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10393
10394         * support/regression/tests/fetchoverlap.c: Added new test case.
10395
10396         * support/regression/tests/bp.c: Added new test case.
10397
10398         * support/regression/tests/bug-448984.c: Added new test case.
10399
10400         * support/regression/tests/pow2shifts.c: Added new test case.
10401
10402         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10403         (genlshTwo): Fixed right shift for count > 8.
10404
10405         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10406
10407 2001-09-08    <johan AT FRIJA>
10408
10409         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10410
10411 2001-09-07    <johan AT FRIJA>
10412
10413         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10414
10415         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10416
10417 2001-09-06    <johan AT FRIJA>
10418
10419         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10420         * bernhard noted me at this: "() equals to (void)" (1.38)
10421
10422 2001-09-05    <johan AT FRIJA>
10423
10424         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10425
10426 2001-09-04    <johan AT FRIJA>
10427
10428         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10429
10430
10431 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10432
10433         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10434
10435 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10436
10437         * link/z80/aslink.h: Fixed path for PATH_MAX
10438
10439 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10440
10441         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10442
10443         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10444
10445         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10446
10447         * 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.
10448
10449 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10450
10451         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10452         (genCmp): Fixed up genCmp for the GB with longs.
10453
10454         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10455
10456         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10457
10458         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10459
10460         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10461
10462 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10463
10464         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10465
10466 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10467
10468         * 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.
10469
10470         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10471
10472 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10473
10474         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10475
10476         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10477
10478 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10479
10480   * sim/ucsim/configure:    little improvement of Cygwin-detection
10481   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10482   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10483   * support/regression/tests/bug-221100.c: small changes for mcs51
10484   * support/regression/tests/bug-221168.c: small changes for mcs51
10485   * support/regression/tests/bug-227710.c: small changes for mcs51
10486   * support/regression/tests/staticinit.c: small changes for mcs51
10487   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10488   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10489   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10490
10491 $Revision$