* src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
[fw/sdcc] / ChangeLog
1 2005-11-11 Raphael Neider <rneider AT web.de>
2
3         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
4         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
5           compute pointer's type from operand,
6           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
7           improved single bit reads, fixes bug #1353379
8
9 2005-11-09 Borut Razem <borut.razem AT siol.net>
10
11         * support/scripts/sdcc.nsi: added lib/pic to the package
12
13 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
14
15         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
16
17 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
18
19         * support/regression/tests/bug1348008.c: added
20         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
21         * support/regression/tests/bug1337835.c: updated comment
22
23 2005-11-06 Borut Razem <borut.razem AT siol.net>
24
25         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
26           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
27           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
28           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
29           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
30           dynamic construction of cl_error_class and derivates - 2.nd try
31
32 2005-11-05 Borut Razem <borut.razem AT siol.net>
33
34         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
35           bug, which caused Bus Errors on sparc solaris
36
37 2005-11-04 Borut Razem <borut.razem AT siol.net>
38
39         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
40           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
41           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
42           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
43           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
44           and derivates to resolve the initialization problem on OSX
45
46 2005-11-02 Borut Razem <borut.razem AT siol.net>
47
48         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
49           corrected typo - #include <winsock2.h>
50
51 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
52
53         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
54           (_asxxxx_mapping): added org directive for future enhancements
55
56 2005-11-01 Borut Razem <borut.razem AT siol.net>
57
58         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
59           enabled sockets on WIN32
60         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
61
62 2005-10-31 Borut Razem <borut.razem AT siol.net>
63
64         * support/regression/generate-cases.py: escape backslashes in {testcase}:
65           WIN32 backslash path delimiters should be escaped when used in C strings
66         * support/regression/tests/bitfields.c: exclude failing assertions for
67           __CYGWIN32__ and __MINGW32__ hosts
68
69 2005-10-30 Borut Razem <borut.razem AT siol.net>
70
71         * src/SDCCutil.c: corrected double comparison typo
72
73 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
74
75         * device/lib/medium/Makefile: added for new memory model medium
76         * device/include/asm/mcs51/features.h: updated for medium/pdata
77         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
78           added Multiply & Accumulate sbit's and MAC0_PAGE define
79         * device/include/mcs51/c8051f300.h: added sfr16 definitions
80         * device/include/mcs51/c8051f310.h: added sfr16 definitions
81         * device/lib/_mullong.c: update for medium model
82         * device/lib/incl.mk: added medium model
83         * doc/sdccman.lyx: documented medium model
84         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
85         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
86         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
87         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
88           (allocParms): set SCLS and OCLS to pdata for medium model
89         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
90           for pdata,
91           (powof2): return <0 if not power of 2
92         * src/avr/gen.c (genBitWise): use updated powof2
93         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
94           (shiftR2Left2Result): small optimization in setup, save acc when storing,
95           (shiftLLeftOrResult): use B if necessary
96         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
97         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
98         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
99         * support/regression/Makefile.in: added test-mcs51-medium
100         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
101
102 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
103
104         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
105         specifier unsigned
106         * device/lib/time.c (mktime): fixed bug 1334315
107
108 2005-10-28 Raphael Neider <rneider AT web.de>
109
110         * device/include/pic/p16f_common.inc: added common declarations
111         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
112
113 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
114
115         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
116           (aopPutUsesAcc): added to predict accumulator use,
117           (assignResultValue): save acc if necessary,
118           (genMinusDec): store result if indirectly addressed,
119           (genDivOneByte):  save acc if necessary,
120           (movLeft2Result): bugfix if left already in acc,
121           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
122             attention to accumulator use (esp. pdata),
123           (genReceive): receive pdata correctly
124         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
125         * src/SDCCicode.h: added isOperandInPagedSpace prototype
126
127 2005-10-27 Raphael Neider <rneider AT web.de>
128
129         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
130
131 2005-10-27 Raphael Neider <rneider AT web.de>
132
133         * .version: changed version to 2.5.4
134         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
135         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
136           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
137             arithmetics support routines
138         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
139         * device/lib/Makefile.in: also create installdir for pic
140
141         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
142           pic14 port as well
143         * src/pic/device.c (dump_sfr): rewritten to delegate register
144           placement to the linker (use `extern sym' rather than sym EQU addr),
145           (validAddress): fixed to check last specified address
146         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
147           (popGetLit): truncate literal value to 8 bit,
148           (popGet): moved assert to more appropriate place
149           (popGetExternal): create pCode operand from and mark the according
150             symbol as being `extern'
151           (popGetAddr): added sanity check on immediate's offset, provide
152             GPOINTER tag on demand
153           (aopPut): fixed for immediates,
154           (mov2w_op): move operand's address or contents to WREG (depending on
155             operand type), safer variant of mov2w,
156           (movwf,call_libraryfunc): NEW, handy abbreviations,
157           (get_argument_pcop,get_return_val_pcop,pass_argument,
158           get_returnvalue): interface for accessing function parameters and
159             return values,
160           (assignResultValuei,genRet): use new parameter/return value interface
161           (pic14_getDataSize): back to old version handling generic pointers,
162           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
163             provided implementation and/or fixed old one,
164           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
165             calls, removed legacy 8051 reference code
166           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
167           (loadSignToC): NEW, move the operands sign bit to CARRY,
168           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
169             genRightShiftSigned, accepts negative shift counts,
170           (setup_fsr): load FSR and adjust IRP (indirect memory access),
171           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
172             generic pointers, __data pointers and __code pointers,
173           (genUnpackBits,genPackBits): rewritten to work with generic pointers
174             and signed bitfields, limit bitfields to 8 bit,
175           (genDataPointerGet): fixed number of bytes read,
176           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
177           (genPointerGet,genPointerSet): fixed handling of __code pointers,
178             pointers to constant data are no longer assumed to point to __code
179             space, removed invalid pointer types,
180           (bitpatternFromVal): retrieve the PICs representation of an integer
181             or float literal,
182           (genDataPointerSet): fixed assigning to po_immediate operands,
183           (genGenPointerSet): implemented as library call,
184           (genIfx): fixed incorrect condition,
185           (genAddrOf): limit generic pointers' addresses to 2 bytes,
186             provide GPOINTER tag according to destination's storage class,
187           (genCast): added code to handle casting to generic pointers, added
188             sign-/zero extension of the result
189           (aop_isLitLike,op_isLitLike): fixed handling of immediates
190         * src/pic/gen.h: added macros to access IRP bit in STATUS register
191         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
192           extend the result
193         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
194           address/register resides in the shared banks
195           (emitSymbolToFile): improved to handle global and `pinned' symbols,
196             put all variables into separate sections (have the linker arrange
197             them)
198           (picglue): put init code and interrupt handlers in separate sections
199         * src/pic/main.c: added port specific options table, modified to PORT
200           structure to make GPOINTERs 3 byte, added pic14_options
201           (_pic14_do_link): private linking routine (update paths to libraries,
202             add libsdcc.lib by default)
203         * src/pic/main.h: declare pic14_options
204         * src/pic/pcode.c: fixed instructions i/o relations,
205           (RegCond): reverted to correct version,
206           (newpCodeOpLit): truncate literals to 8 bit,
207           (genericPrint): added debug output,
208           (getRegFromInstruction): fixed for various operand types, simplified
209           (BuildFlow): fixed broken handling of isntructions with labels
210           (LinkFlow): start at last instruction in flow (skip trailing comments),
211             pass the flow on to the next instruction after CALL
212           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
213           (insertPCodeInstruction): fixed inserting after a skip instruction,
214           (DoBankSelect): fixed for labeled instructions
215           (OptimizepBlock): honor --nopeep switch
216           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
217         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
218         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
219           (pCodeOptime2pCodes): allow disabling this optimization via
220             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
221             but is still buggy), started implementation of a dataflow based
222             pCode optimization (CSE + dead code elimination)
223           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
224         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
225           names are independant of the stack location and therefore portable across
226           devices
227
228 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
229
230         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
231           (selectSpil): fixed bug 1337835 by not spilling bit variables
232         * support/regression/tests/bug1337835.c: added test for this bug
233         * src/mcs51/peeph.def: restart after rule 3.c,
234           addded rules 263.x to optimize loading constants
235
236 2005-10-26 Raphael Neider <rneider AT web.de>
237
238         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
239         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
240           (genAssign): emit warning when casting literals to generic pointer
241             type, also applies when taking the address of a fixed variable,
242           (genCast): improved casting to generic pointers
243         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
244           extern variables, added verbose error message
245         * device/include/pic16/{string.h,errno.h}: added #pragma library c
246
247 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
248
249         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
250         carry must be complemented too
251         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
252         could be emitted by genMinus
253         * src/SDCCval.c (constVal): fixed bug 1305065
254
255 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
256
257         * src/SDCCast.c (addCast): added promotion for bit variables
258         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
259         promotion casts + optimisation
260         (optimizeGetWord): fix warning 'i' might be used uninitialized
261         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
262         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
263
264 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
265
266         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
267         all chars are promoted to int; promotion should be handled in SDCCast.c
268
269 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
270
271         * device/lib/_strcmp.c: Fixed bug 1326457
272
273 2005-10-11 Raphael Neider <rneider AT web.de>
274
275         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
276         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
277
278 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
279
280         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
281         * support/regression/tests/sfr16.c: added test for the sfr32 bug
282
283 2005-10-04 Raphael Neider <rneider AT web.de>
284
285         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
286           device/lib/pic16/pics.all: added pic18f1320
287         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
288
289 2005-09-30 Raphael Neider <rneider AT web.de>
290
291         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
292         * src/pic16/devices.inc: NEW, provides device descriptions
293         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
294
295 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
296
297         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
298           GETHBIT
299
300 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
301
302         * doc/sdccman.lyx: updated Highest Order Bit documentation,
303           documented Any Order Bit, Higher Order Byte and Higher Order Word
304         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
305         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
306           (optimizeGetAbit): new, to get any bit, not only the high bit,
307           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
308           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
309           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
310           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
311             RIGHT_OP: also try GETBYTE, GETWORD optimization,
312             GETABIT, GETBYTE, GETWORD: decorate them,
313           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
314           (ast_print): added GETABIT, GETBYTE, GETWORD
315         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
316         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
317           (geniCodeBinary): new generic binary icode,
318           (ast2iCode): added GETABIT, GETBYTE, GETWORD
319         * src/port.h: updated comment for PORT.hasExtBitOp
320         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
321           (genGetByte): new, to get a single byte,
322           (genGetWord): new, to get a word from a long,
323           (gen51Code): added GETABIT, GETBYTE, GETWORD
324         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
325
326 2005-09-23 Raphael Neider <rneider AT web.de>
327
328         * configure.in, configure: have device/lib/pic configured
329         * device/lib/Makefile.in: added model-pic14
330         * device/lib/clean.mk: added pic/ to clean rule
331         * device/lib/pic: added rudimentary pic14 library providing support
332           functions for multiplication/division/generic pointer access
333         * src/SDCCopt.c (convilong): mark support functions as extern
334           for pic14 port as well
335         * src/pic/gen.c (genMult): added assertions,
336           (genpic14Code): emit warning on unhandled iCodes
337         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
338         * src/pic/pcode.c (pCodeOpCopy),
339         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
340           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
341           SFR_REGISTER}), made safe for future extensions
342         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
343           instructions even if preceeded by SKIP instructions (also remove
344           them); removed unused code
345         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
346           prevents leaving parts of the structure uninitialized after copying
347
348 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
349
350         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
351           ago by me
352         * support/regression/tests/addsub.c: added test for the bug
353
354 2005-09-21 Raphael Neider <rneider AT web.de>
355
356         * device/include/pic16/pic18f1220.h,
357           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
358         * device/lib/pic16/Makefile.rules: added missing opening paren
359         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
360           are provided in genutils.c,
361           (genUminusFloat,genUminus,genCmpEq): added asserts on different
362           operand/result sizes,
363           (genCmp): assert on NULL pointers first, then check deref'ed values
364         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
365           result size
366
367 2005-09-18 Raphael Neider <rneider AT web.de>
368
369         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
370           as these are now unused,
371           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
372         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
373           local, avoids uninitialized pointer dereference on r->name
374         * src/pic16/ralloc.c (newReg): fixed indentation
375
376 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
377
378         * src/SDCCval.c (constVal): fixed bug 730366
379         * support/Util/SDCCerr.c,
380         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
381
382 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
383
384         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
385
386 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
387
388         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
389
390 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
391
392         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
393           (hex2dec): made hex_digit unsigned char, removed ascii dependance
394         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
395           (hex2dec): made hex_digit unsigned char, removed ascii dependance
396         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
397         * packihx/packihx.c (hexDigit): made c unsigned char
398         * as/mcs51/lklibr.c (fndsym),
399         * link/z80/lkgb.c (gb),
400         * link/z80/lklibr.c (fndsym),
401         * link/z80/lkrloc.c (relr),
402         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
403         * src/SDCC.lex (checkCurrFile, process_pragma),
404         * src/SDCCglue.c (spacesToUnderscores),
405         * src/SDCCmain.c (setParseWithComma, processFile),
406         * src/asm.c (tvsprintf, printCLine),
407         * src/avr/gen.c (emitcode, aopPut),
408         * src/ds390/gen.c (emitcode),
409         * src/hc08/gen.c (emitcode, emitinline),
410         * src/mcs51/gen.c (emitcode, genInline),
411         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
412           tokenizeLineNode),
413         * src/pic/ralloc.c (debugLog),
414         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
415           tokenizeLineNode),
416         * src/pic16/ralloc.c (debugLog),
417         * src/z80/main.c (_process_pragma):
418            made all ctype.h function calls safe
419         * src/SDCCopt.c: include math.h for fabs
420         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
421           and used them throughout the code to make ctype.h function calls safe
422         * src/ds390/main.c (asmLineNodeFromLineNode),
423         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
424         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
425            unsigned char*
426         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
427           (newpCodeAsmDir): made ctype.h function calls safe
428         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
429           pic16_emitcode):  made lbp unsigned char*
430         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
431           (pic16_newpCodeAsmDir): made ctype.h function calls safe
432         * src/xa51/gen.c (emitcode),
433         * src/z80/gen.c (_emit2): made lbp unsigned char*
434         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
435            char*
436
437 2005-09-05 Raphael Neider <rneider AT web.de>
438
439         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
440           access bank splitpoint
441
442 2005-09-05 Raphael Neider <rneider AT web.de>
443
444         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
445
446 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
447
448         * .version: changed to version 2.5.3
449         * doc/sdccman.lyx: changed version to 2.5.3,
450           documented --codeseg and --constseg and pragma codeseg and constseg,
451           documented bit parameters (reentrant) and bit returning
452         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
453            currFunc->recvSize, but is this ok for all ports?
454           (ast2iCode): result of ~ on unsigned char must be cast to int for
455            bool to work
456         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
457           function pointers in bit space
458         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
459           (processFuncArgs): call port.reg_parm() with reentrancy info
460         * src/port.h,
461         * src/avr/main.c,
462         * src/ds390/main.c,
463         * src/hc08/main.c,
464         * src/pic/main.c,
465         * src/pic16/main.c,
466         * src/xa51/main.c,
467         * src/z80/main.c: port.reg_parm prototype extended with
468           "bool reentrant" parameter
469         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
470           options.stackAuto for allocating bit register parameters
471         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
472           (genSend): set BitBankUsed if it is,
473           (selectRegBank): factored out of genCall for use in genPcall,
474           (genCall): removed redundant dtype assignmen, use selectRegBank,
475           (genPcall): handle returning in Carry properly, save in F0 if needed,
476           (genReceive): handle bit register parameters
477         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
478           (mcs51_assignRegisters): enable bit registers for all reentrant
479            functions and don't set BitBankUsed unconditionally
480         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
481         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
482         * support/regression/tests/funptrs.c: added tests for BOOL and for return
483
484 2005-08-27 Borut Razem <borut.razem AT siol.net>
485
486         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
487         ppc-osx (Darwin) does not support -u option. It seems that it is
488         supported only on Linux - GNU cp
489
490 2005-08-25 Borut Razem <borut.razem AT siol.net>
491
492         * sim/ucsim/gui.src/serio.src/Makefile.in,
493           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
494           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
495           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
496           install and strip, since the strip at /usr/ccs/bin should be used
497           on solaris
498
499 2005-08-24 Borut Razem <borut.razem AT siol.net>
500
501         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
502
503 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
504
505         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
506         ffffffffu
507
508 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
509
510         * as/mcs51/aslink.h: completed lkrloc.c prototypes
511         * as/mcs51/lkmain.c (link_main): fixed warning
512         * device/include/stdbool.h: ds390 has no advanced bit support yet
513         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
514         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
515         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
516           and updated their macros
517         * src/SDCCval.c (constVal): updated comment for renamed b_long
518
519 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
520
521         * as/mcs51/asdata.c: changed ctype['['] to BINOP
522         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
523           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
524           (oprio): set priority for '['
525         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
526            and adb_24_bit
527         * as/mcs51/asm.h: added defines R_BIT and S_BIT
528         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
529         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
530         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
531           added overlayable BIT_BANK area
532         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
533           (summary2): explain 'T' in legenda
534         * as/mcs51/lkrloc.c: replaced old K&R style,
535           (relr): added R_BIT processing,
536           (errmsg): added "Bit-addressable relocation error",
537           (adb_bit): added for converting from byte- to bit-addressable space,
538           (adb_24_bit): added for converting from byte- to bit-addressable space
539         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
540            used in reentrant functions now even as return value
541         * device/lib/_gptrput.c (_gptrput): removed obsolete code
542         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
543           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
544         * src/SDCCglobl.h: added indicator BitBankUsed
545         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
546            the bit registers b0-b7
547         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
548           (geniCodeCast): fixed bug 1263853,
549           (geniCodeLogicAndOr): put result in bool or char,
550           (geniCodeReceive): added parameter func for accessing the return type,
551           (geniCodeFunctionBody): pass func to geniCodeReceive
552         * src/SDCCmain.c: added indicator BitBankUsed
553         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
554         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
555           (checkSClass): don't put automatic bool/bit on stack,
556           (checkFunction): removed check on function cannot return bit
557         * src/SDCCsymt.h: added newBoolLink prototype
558         * src/mcs51/gen.c (rb1regs): added bit registers,
559           (movc): created for assigning to carry,
560           (pushReg, popReg): created for pushing registers,
561           (sameRegs): check both AOP_REG and AOP_CRY types,
562           (aopOp): handle bit registers,
563           (aopPut): optimization no self-assign,
564           (saveRegisters): push reg->base (bits) only once for bit registers,
565            and use pushReg,
566           (unsaveRegisters): pop reg->base only once and use popReg,
567           (assignResultValue): added parameter func and return in carry for bits,
568           (genIpush): optimization no reload in A if not changed,
569           (genSend): bit parameters in reentrant functions are passed in bit
570            registers by first assigning to bits in B, then save registers and
571            copy B to bits,
572           (genCall): handle returning in Carry properly, save it in F0 if needed,
573           (genPcall): updated assignResultValue call, this is not safe yet for bit
574            returning function !!!
575           (genFunction): don't generate equ's for bit registers and use pushReg,
576           (genEndFunction): take care of bit returning functions and use popReg,
577           (genRet): return bit in Carry,
578           (genIfx): optimize bit registers and other directly addressable bits,
579           (genReceive): updated assignResultValue call
580         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
581           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
582            registers when using stack-auto
583         * src/mcs51/ralloc.c (_G): added allBitregs,
584           (regs8051): added the bit registers,
585           (createStackSpil): use macro IS_BIT,
586           (getRegBit): added to allocate a bit register, else spill,
587           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
588           (updateRegUsage): factored out to ease stepping while debugging,
589           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
590            also allocate bit registers,
591           (fillGaps): handle bit registers,
592           (findAllBitregs): added to create bit vector with all bit registers,
593           (mcs51_allBitregs): returns this bit vector,
594           (mcs51_assignRegisters): when using stack-auto use bit registers for
595            passing parameters and creating local variables
596         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
597
598 2005-08-22 Borut Razem <borut.razem AT siol.net>
599
600         * device/lib/Makefile.in: replaced find option -or with -o
601           to make it run on solaris
602
603 2005-08-22 Raphael Neider <rneider AT web.de>
604
605         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
606           fixes #1265442 (crash on Solaris)
607
608 2005-08-20 Borut Razem <borut.razem AT siol.net>
609
610         * configure, configure.in: added tests for libsocket and libnsl libraries,
611           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
612           from support/regression/Makefile.in
613         * support/regression/Makefile.in: added
614         * device/lib/pic16/Makefile.common.in: force make to use bash shell
615         * sim/ucsim/libtool: regenerated on sparc-solaris
616         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
617           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
618           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
619           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
620           sparc-solaris, which doesn't use GNU ld linker
621         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
622         * as/Makefile: find on sparc-solaris does not support -maxdepth option
623
624 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
625
626         * src/mcs51/peeph.def: updated comments
627
628 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
629
630         * device/lib/_gptrget.c,
631         * device/lib/_gptrput.c: slightly shorter
632         * doc/sdccman.lyx: incremented version
633         * src/mcs51/peeph.def: moved peephole comments to the line of first
634           change to better keep line correlation, reanimated 186.e
635         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
636
637 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
638
639         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
640           David Saxton with quotes around file name.
641
642 2005-08-15 Borut Razem <borut.razem AT siol.net>
643
644         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
645           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
646           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
647           make tests run on x86_64 platform
648
649 2005-08-13 Raphael Neider <rneider AT web.de>
650
651         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
652           as it might be executed DURING a build (parallel make is wonderful)
653
654 2005-08-13 Raphael Neider <rneider AT web.de>
655
656         * device/lib/Makefile.in (port-specific-objects-pic16):
657           revert to cp $(PORT)/bin/*.* $(PORTDIR)
658         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
659           dependency
660         * device/lib/pic16/Makefile.rules: build subdirs before creating
661           the library, removed builddir rule, create $(builddir) early in
662           recurse rule, use empty recurse rule for leaf directories
663         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
664           mkdir errors (race condition), removed duplicate suffix "hex"
665           from clean rules
666         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
667         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
668           prevents mkdir -p from aborting on Alpha
669
670 2005-08-12 Raphael Neider <rneider AT web.de>
671
672         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
673           db-statements in order to allow for arrays of pointers in code
674           sections to be placed without interspersed 0-padding, fixes
675           bug #1256215
676         * (emitStatistics): fixed division by zero for pic18f1220
677         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
678           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
679         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
680         * (pic16_pCodeConstString): keep track of already emitted string
681           literals to prevent "duplicate definitions of symbol _str_NR"
682         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
683           debug message
684         * device/lib/Makefile.in: ignore failing PIC16 library builds
685         * device/lib/pic16/Makefile: do not build if gputils are missing
686         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
687
688 2005-08-10 Raphael Neider <rneider AT web.de>
689
690         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
691           my last commit)
692
693 2005-08-10 Raphael Neider <rneider AT web.de>
694
695         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
696           Rokas' patch to add the new fixed point type "__fixed16x16"
697         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
698           functions for __fixed16x16 arithmetics
699         * device/lib/pic16: reimplemented the build system to support
700           a separate build directory, better handling of libio (create
701           the library in a separate subdir for each architecture) and
702           easier configuration (centralized in Makefile.common)
703
704 2005-08-07 Raphael Neider <rneider AT web.de>
705
706         * src/pic16/gen.c (genrshTwo): fixed sign extension
707         * src/pic16/device.c: added pic18f2320, 4220 and 4320
708         * device/include/pic16/pic18f2220.h: changed some bit definitions,
709           added T0CONbits
710         * device/include/pic16/pic18f4220.h: NEW, header for
711           pic18f4220 and pic18f4320
712         * device/include/pic16/pic18fregs.h: added new devices,
713           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
714         * device/include/pic16/signal.h: resolved name clashes
715           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
716           to also allow testing for interrupt enable bits, added
717           comments on how to use the macros
718         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
719         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
720           register definitions for the devices
721         * device/lib/pic16/pics.all: added new devices
722         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
723           allocated memory
724         * device/lib/pic16/libc/stdlib/memfree: do not count
725           the block header as free memory
726         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
727           simplified and added missing end-of-blocklist-marker
728           (reported by Peter Onion, fixes #1252814)
729         * (_mergeHeapBlock): fixed loop condition
730         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
731           len==0, restructured code
732         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
733           up a bit, reduced bitfield accesses, prevent endless loops
734           in case of heap corruption
735         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
736           "unreferenced arguments/must return a value" warnings
737         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
738           replaced BAUDREG with SPBRG
739         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
740           device/lib/pic16/debug/gstack/gstack.c: replaced
741           _naked, _asm, _endasm with __naked, __asm, __endasm
742
743 2005-08-05 Raphael Neider <rneider AT web.de>
744
745         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
746           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
747
748 2005-08-05 Borut Razem <borut.razem AT siol.net>
749
750         * device/lib/Makefile.in: added missing ';'
751         * configure: removed ^M characters
752
753 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
754
755         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
756           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
757           License
758
759 2005-08-04 Borut Razem <borut.razem AT siol.net>
760
761         * configure.in: pic16 libraries build 2nd try - enable running
762           configure in device/lib/pic16
763         * configure: regenerated from configure.in
764         * device/lib/Makefile.in: create $(PORT)/bin directory
765
766 2005-08-03 Raphael Neider <rneider AT web.de>
767
768         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
769           to get/set values via pointers
770         * (genUnpackBits,genPackBits): changed detection of
771           ptr->bitfield vs. sym.bitfield, fixed access via generic
772           pointers, removed dead (wrong) code for multibyte bitfields
773         * (genNearPointerGet, genGenPointerGet): removed useless code,
774           fixed bitfield detection, fixes #1250594
775         * (genNearPointerSet): removed useless code
776         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
777           and introduced macro pic16_emitpcode that conditionally emits
778           the origin of the following pCode (useful for debugging SDCC)
779         * src/pic16/pcode.c: changed (and disabled) some debug outputs
780         * (createDefmap): fixed handling of LFSR for --optimize-df
781
782 2005-08-02 Borut Razem <borut.razem AT siol.net>
783
784         * device/lib/Makefile.in: pic16 libraries build enabled since
785           gputils-0.13.2 are now localy installed at sourceforge's compile farm
786
787 2005-08-02 Raphael Neider <rneider AT web.de>
788
789         * src/pic16/gen.c (genPackBits): removed deprecated warning
790         * (genGenPointerSet): fixed bitfield detection
791
792 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
793
794         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
795
796 2005-07-31 Raphael Neider <rneider AT web.de>
797
798         * device/lib/pic16/libdev/pic18f458.c,
799           device/include/pic16/pic18f458.h: added missing T0CONbits
800
801 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
802
803         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
804
805 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
806
807         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
808
809 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
810
811         * device/include/mcs51/at89c51ed2.h: added.
812
813 2005-07-23 Raphael Neider <rneider AT web.de>
814
815         * src/pic/gen.h: added emitpcode macro for debugging
816         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
817           and replace by macro adding debug information on demand
818         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
819         * (gencjne): tried to fix; replaced with correct (slower) code
820         * (gen{Unp,P}ackBits): fixed single bit access
821         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
822         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
823           previous instruction
824         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
825           register has to be handled with care (forbidding movement
826           of assignments/uses, removing assignments completely, ...)
827         * (pCodeOptime2pCodes): make use of regIsSpecial
828         * added lots of debugging output (commented out)
829         * src/pic/rallloc.c (deassignLRs): prevent operand registers
830           from being reused as result UNLESS it is known to work
831
832 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
833
834         * support/Util/dbuf.h: include <stddef.h> for size_t
835         * .version: changed to version 2.5.2
836
837 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
838
839         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
840
841 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
842
843         * src/hc08/gen.c (genMinus): fixed bug #1241835,
844           (genModOneByte): removed needless psha/pula
845
846 2005-07-22 Raphael Neider <rneider AT web.de>
847
848         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
849           have PIC14 handled like PIC16, fixes broken pic14 linker calls
850         * src/pic/gen.c (resolveIfx): do not "invent" labels
851         * (genSkipc): changed to positive logic
852         * (genSkipCond): removed as no longer needed
853         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
854           backport from PIC16
855         * (genLeftShift): check operands are in different registers
856         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
857           INCF does not update CARRY...
858         * src/pic/main.c: fixed _linkCmd
859         * src/pic/pcode.c (unlinkpCode): added inactive code
860         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
861           alive (do not assign result and operand overlapping registers)
862
863 2005-07-22 Raphael Neider <rneider AT web.de>
864
865         * src/pic/device.c (dump_sfr): replaced register declaration with
866           call to emitSymbolToFile() to avoid duplicate symbols
867         * (assignRelocatableRegisters): do not declare external symbols
868         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
869           right (take size of type, not etype)
870         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
871         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
872         * (packRegsForAccUse): disabled assignment of WREG as
873           the result reg to prevent occurence of just fixed #1235003,
874           fixes #1242954
875         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
876           symbols (avoids duplicate symbols in .asm file)
877         * (pic14emitRegularMap): use emitSymbolToFile()
878         * src/pic/gen.c (aopOp): fixed spillLocation handling
879         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
880         * (genDataPointerSet): removed unneccessary variables/output
881
882 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
883
884         * as/mcs51/lkarea.c: enlarged codemap for banked memory
885         * device/lib/mcs51/crtbank.asm: added # to 0x0F
886
887 2005-07-21 Raphael Neider <rneider AT web.de>
888
889         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
890           architecture cannot handle them efficiently, fixes bug #1235003
891         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
892           check for empty sets before using them (fixes bug #1232190)
893
894 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
895
896         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
897           (lnksect2): generate warnings for memory overlap
898         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
899           constseg to set the name of these segments so you can instruct the linker
900           to place them in banks
901         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
902         * src/SDCCglobl.h: added MODEL_HUGE to enum,
903           added code_seg and const_seg to options
904         * src/SDCCglue.c (emitMaps): use options.const_seg,
905           (createInterruptVect): put interrupt vectors in segment HOME,
906           (glue): put HOME before static segment and put the main glue in HOME,
907           (glue): use options.code_seg
908         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
909         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
910           these segments so you can instruct the linker to place them in banks
911           (linkEdit): use code_loc for HOME segment which should be the first
912           segment in code memory now
913         * src/SDCCmem.c: fixed more stuff like bug 1238386
914         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
915           (changePointer): don't change function pointers to code pointers for
916           banked functions,
917           (compareType): added exceptional check for banked function pointers
918         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
919         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
920           after static in code memory
921         * src/mcs51/gen.c: added aopLiteralLong prototype,
922           (aopForSym): use getSize for functions,
923           (genCall): generate banked calls over one trampoline __sdcc_banked_call
924           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
925           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
926           the segment,
927           (genPcall): use call for literal function pointers and generate banked
928           calls over the one trampoline so there's only one place for the user to
929           modify according to his/hers hardware,
930           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
931           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
932         * src/mcs51/main.c: added keyword banked,
933           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
934         * support/Util/SDCCerr.c,
935         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
936           needed for passing the bank and address to the trampoline
937         * device/lib/mcs51/crtbank.asm: added for bankswitching
938         * device/lib/mcs51/Makefile: added crtbank
939
940 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
941
942         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
943           for fields at offset 0 of a struct or union as reported
944           on 2005-07-07 in the developer mailing list.
945
946 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
947
948         * src/SDCCmem.c: fixed bug 1238386
949
950 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
951
952         * src/mcs51/peeph.def: added labelrefcounting for peepholes
953           (patch #1144962), added peephole 300, enabled 259.x
954         * doc/sdccman.lyx: removed screenshot and provided link instead
955
956 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
957
958         * doc/sdccman.lyx: added section about debugging with ddd
959         * doc/figures/ddd_example.eps: screenshot of debugging session
960
961 2005-07-04 Raphael Neider <rneider AT web.de>
962
963         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
964           like CODE pointers, fixes #1115683
965         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
966           call, fixes bugs #1232211, #1228110,
967           fixed wrong casts to pCodeFlow from pCodeInstructions
968
969 2005-07-04 Raphael Neider <rneider AT web.de>
970
971         * src/pic/gen.c (popGet): changed assert to allow for
972           bit operands
973         * (popGetAddr): changed signature to provide
974           an additional index, patched all call sites
975         * (genCmpEq): handle literal-like operands correctly
976         * (genAddrOf): added sanity checks on __code/__data pointers
977         * (genAssign): added handling of symbols from __code section
978         * (gencjne): do not generate code for comparisons whose result
979           is neither stored nor used, fixes bug #1171114
980         * (AccLsh, AccRsh): operate on operand instead of WREG
981         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
982           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
983           by known count
984         * rewrote complete shift-by-literal logic, commented unused
985           functions out
986         * (genConstPointerGet): get multiple bytes (if result size > 1),
987           fixed handling of non-immediate addresses
988         * (genPointerGet): handle CODE pointers like CONST pointers
989         * (genpic14Code): insert C-SRC lines as Cource-pCodes
990         * ({aop,op}_isLitLike): NEW, single place to decide whether an
991           operand is to be treated as a literal or not
992         * (mov2w,genPcall,genCmpEq),
993           src/pic/genarith.c: use aop_isLitLike() to decide between
994           literal/register contents
995         * (addSign): added missing offset
996         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
997           only emit comment in debug-mode,
998           use {aop,op}_isLitLike throughout the file
999         * src/pic/glue.c: fix initializers for pointers (work in progress)
1000         * src/pic/pcode.c (get_op): honor index on _const symbols
1001         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1002         * (dumppBlock): added pCode size estimation
1003         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1004           check for IS_SYMOP before OP_SYMBOL'ing
1005         * fixed indentation, compacted switch-statements
1006         * (allocReg): find free register and allocate it instead of
1007           allocating new registers all the time
1008         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1009           registers as its operands (necessary only for multibyte GETs)
1010
1011 2005-07-01 Raphael Neider <rneider AT web.de>
1012
1013         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1014           debugging .asm-output macros FENTRY + FEXIT
1015         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1016           way... I wonder...
1017         * (emitpComment): NEW, printf to pCode
1018         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1019           offset handling
1020         * (popGetAddr): NEW, variant of popGet to access an immediates
1021           high(er) bytes instead of the n'th byte of memory they reference,
1022           replaced popGet with popGetAddr where neccessary
1023         * (genDataPointerGet): reactivated and fixed implementation
1024         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1025           accesses
1026         * (genDataPointerSet): fixed multibyte assignments
1027         * (genpic14Code): fixed --i-code-in-asm handling
1028         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1029         * (genPlus): fixed index-out-of-bounds error
1030         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1031         * src/pic/ralloc.c: added debugging output macro FENTRY2
1032         * (spillThis): fixed indentation, enbraced for-body for clarity
1033         * (rematStr): commented out as now unused
1034         * (regTypeNum): commented out special spill case (overwrites
1035           arbitrary values)
1036         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1037
1038 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1039
1040         * doc/sdccman.lyx: documented sfr16/sfr32,
1041           added example for using storage class with function pointers
1042         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1043
1044 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1045
1046         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1047         * device/lib/_itoa.c,
1048         * device/lib/_ltoa.c: optimized codesize
1049         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1050           but don't know how to suppress the double warning.
1051         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1052         * support/Util/SDCCerr.c,
1053         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1054
1055 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1056
1057         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1058           fixed old K&R prototypes
1059         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1060         * device/lib/_gptrget.c,
1061         * device/lib/_gptrgetc.c,
1062         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1063           also new versions for small generic pointers and banked generic pointers
1064         * src/port.h: added const_name
1065         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1066         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1067         * src/SDCCcse.c (findPrevIc): check all associative operators
1068         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1069         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1070         * src/SDCCmem.c: updated comments,
1071           set far-space to 0 for pdata, results in optimized code
1072         * src/SDCCmem.h: added macro CONST_NAME
1073         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1074           moving the info into the highest bits, see also gptrget/gptrput
1075         * src/src.dsp: added sdcc.ico to project files
1076         * src/avr/gen.c (genCast): fixed bug 0x%d
1077         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1078         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1079           relation between ptr_type and DCL_TYPE,
1080           (genCast): fixed bug 0x%d
1081         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1082           (CODE)" for const_name
1083         * src/hc08/gen.c (genCast): fixed bug 0x%d
1084         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1085           (hc08_port): added "CONST (CODE)" for const_name
1086         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1087           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1088           between ptr_type and DCL_TYPE,
1089           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1090           operand* and took AOP() inside function so sfr-ness can be checked,
1091           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1092           new prototype,
1093           (genFunction, genEndFunction): optimized stack setup,
1094           (genMinus): optimized for literals with ending zeroes (in bytes),
1095           (genCast): fixed bug 0x%d
1096         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1097           (mcs51_port): added "CONST (CODE)" for const_name
1098         * src/mcs51/peeph.def: made rule 226 more generic
1099         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1100         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1101         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1102         * src/z80/main.c (z80_port): added NULL for const_name,
1103           (gbz80_port): added NULL for const_name
1104         * support/regression/tests/bug663539.c,
1105         * support/regression/tests/sfr16.c: new tests
1106
1107 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1108
1109         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1110
1111 2005-06-24 Raphael Neider <rneider AT web.de>
1112
1113         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1114           corrected typos...
1115         * device/include/pic16/signal.h: added USBIF
1116           and SIG_USB
1117
1118 2005-06-24 Raphael Neider <rneider AT web.de>
1119
1120         * device/lib/pic16/libdev/pic18f2455.c,
1121           device/include/pic16/pic18f2455.h: NEW
1122         * device/include/pic16/pic18fregs.h,
1123           device/lib/pic16/pics.all,
1124           src/pic16/device.c: added 18f2455
1125         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1126           device/include/pic16/{pic18f[68][567].h,usart.h}:
1127           replaced MULTIPLE_USARTS define with more relaible
1128           compatibility sfrs (for USART access)
1129
1130 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1131
1132         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1133           and the output asm file line is printed on two lines.
1134
1135 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1136
1137         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1138           BGT, BLE, BHI, and BLS instructions
1139         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1140           genCmpEq): removed
1141         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1142           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1143           fixes bug #1216342
1144         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1145
1146 2005-06-15 Raphael Neider <rneider AT web.de>
1147
1148         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1149         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1150         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1151           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1152           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1153
1154 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1155
1156         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1157           Marcel Telka in bug #1215704
1158
1159 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1160
1161         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1162           located in shared memory bank.
1163
1164 2005-05-31 Raphael Neider <rneider AT web.de>
1165
1166         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1167           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1168           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1169
1170 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1171
1172         * device/lib/_strncpy.c: fixed the fix
1173
1174 2005-05-26 Raphael Neider <rneider AT web.de>
1175
1176         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1177           initializers with \0, bug #1208187
1178         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1179           intializers with \0, bug #1208187
1180
1181 2005-05-26 Raphael Neider <rneider AT web.de>
1182
1183         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1184           initializers with \0, bug #1208187
1185         * src/pic16/main.c (_process_pragma): added sanity checks
1186           for stack position and size, emit warnings when appropriate
1187
1188 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1189
1190         * device/lib/_strncpy.c: fixed not filling with \0
1191
1192 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1193
1194         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1195           createFunction),
1196         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1197           compound_statement),
1198         * src/SDCCsymt.h,
1199         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1200
1201 2005-05-24 Raphael Neider <rneider AT web.de>
1202
1203         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1204
1205 2005-05-24 Raphael Neider <rneider AT web.de>
1206
1207         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1208           TRISE definitions, closes bug #1162453
1209
1210 2005-05-22 Raphael Neider <rneider AT web.de>
1211
1212         * src/pic16/main.c (_process_pragma): check for missing
1213           arguments to pragmas code and udata
1214         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
1215           consistency fixes to match other headers (thanks to Jim Paris)
1216         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
1217
1218 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1219
1220         * src/SDCCicode.c (isOperandEqual): fixed missing ;
1221
1222 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
1223
1224         * support/regression/tests/bug1198642.c: new test
1225         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
1226         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1227         * support/scripts/resource.h,
1228         * support/scripts/resource.rc,
1229         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1230         * support/scripts/sdcc.ico: added 32x32 icon
1231
1232 2005-05-18 Raphael Neider <rneider AT web.de>
1233
1234         * device/lib/pic16/libdev/pic18f*.c,
1235         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1236           keywords to "__sfr" and "__at (X)"
1237         * device/include/pic16/pic18fregs.h: added pic18f4520
1238         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1239           #1203088 (MPLAB compatibility)
1240
1241 2005-05-17 Raphael Neider <rneider AT web.de>
1242
1243         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1244         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1245         * device/lib/pic16/pics.all: added new devices
1246         * src/pic16/device.c: added support for pic18f4520
1247
1248 2005-05-16 Raphael Neider <rneider AT web.de>
1249         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1250         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1251         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1252           convenience function for bit access
1253
1254 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1255
1256         * device/lib/printf_large.c: fixed bug 1193299
1257         * support/regression/tests/bug1057979.c: added test %3.3s
1258
1259 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1260
1261         * device/include/mcs51/8051.h,
1262         * device/include/mcs51/8052.h: made parseable with lint
1263         * device/include/mcs51/lint.h: added include file for (sp)lint
1264         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1265         * doc/cdbfileformat.lyx,
1266         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1267
1268 2005-05-14 Raphael Neider <rneider AT web.de>
1269
1270         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1271         * device/lib/pic16/libc/stdlib/itoa.c (new)
1272         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1273         * device/lib/pic16/libio/Makefile: exclude subdir according to
1274           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1275         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1276         * src/pic16/gen.c (genFunction): prevent annoying warning
1277         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1278           nameclashes on BeOS
1279         * support/cpp2/cppmain.c (cpp_output_string): new
1280         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1281           fixes bug 1116802
1282
1283 2005-05-13 Borut Razem <borut.razem AT siol.net>
1284
1285         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1286
1287 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1288
1289         * .version: changed to version 2.5.1; back to bleeding edge development
1290
1291 2005-05-11 Borut Razem <borut.razem AT siol.net>
1292
1293         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1294           generate PDF version 1.3 documents
1295
1296 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1297
1298         * .version: changed to version 2.5.0
1299
1300 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1301
1302         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1303
1304 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1305
1306         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1307         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1308         well as many smaller updates.
1309         * .version: changed to version 2.5.0-pre1
1310
1311 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1312
1313         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1314
1315 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1316
1317         * support/regression/tests/bug1185672.c: added
1318         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1319           bug 1185672
1320         * src/mcs51/gen.c (genCall): added comments, made it look safer
1321         * src/mcs51/gen.c (genEndFunction): simplified
1322
1323 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1324
1325         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1326
1327 2005-04-14 Borut Razem <borut.razem AT siol.net>
1328
1329         * fixed bug 1045046 - SIGSEGV with really simple code?:
1330           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1331           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1332
1333 2005-04-14 Borut Razem <borut.razem AT siol.net>
1334
1335         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1336           src/pic16/device.h: temporarily disabled experimental #inline pragma
1337           for 2.5.0 release
1338
1339 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1340
1341         * device/include/z80/stdio.h,
1342         * device/include/z80/string.h: removed these highly incomplete files so
1343           SDCC can use the default ones in device/include/
1344
1345 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1346
1347         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1348         gcc warning.
1349         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1350         fix sdcpp warnings.
1351
1352 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1353
1354         * device/include/malloc.h: removed redundant __reentrant prototypes
1355         * device/lib/_mullong.c: added working xstack variant in asm (C version
1356           doesn't pass regression tests)
1357         * device/lib/bpx.c: used __data and made bpx char for mcs51
1358         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1359           (createFunction): fixed bug with xstackPtr
1360         * src/SDCCcse.c: corrected comments
1361         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1362           (killDeadCode, eBBlockFromiCode): removed unused code
1363         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1364           corrected comments
1365         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1366           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1367           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1368           (genModOneByte): fixed warning in MSVC
1369         * src/mcs51/main.c (): added comments
1370         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1371
1372 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1373
1374         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1375
1376 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1377
1378         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1379
1380 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1381
1382         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1383         characters arrays of larger size than the declared one.
1384
1385 2005-04-10 Borut Razem <borut.razem AT siol.net>
1386
1387         * src/pic/gen.c (genInline),
1388           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1389           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1390           (findNextInstruction), (findPrevInstruction),
1391           (findInstructionUsingLabel),
1392           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1393         * src/pic/pcode.c (findLabel): added missing '\n'
1394         * src/src.dsp: added SDCCdwarf2.c to the project
1395
1396 2005-04-09 Borut Razem <borut.razem AT siol.net>
1397
1398         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1399
1400 2005-04-08 Raphael Neider <rneider AT web.de>
1401
1402         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1403           into the chain after a given one) and mergeDefmapSymbols (combine
1404           defmap entries for each symbol per pcode)
1405         * (createDefmap): have defmap entries merged in the end
1406         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1407           a symbol before replacing one access type's symbol, merge symbols in
1408           the end (replacement symbol might already have an entry)
1409         * (assignValnums): keep reference to written WREG intact
1410
1411 2005-04-08 Raphael Neider <rneider AT web.de>
1412
1413         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1414           Alpha)
1415
1416 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1417
1418         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1419         bytes
1420
1421 2005-04-07 Raphael Neider <rneider AT web.de>
1422
1423         * device/include/pic16/usart.h: added compatibility defines for
1424           devices with more than one USART
1425         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1426
1427 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1428
1429         * device/lib/Makefile.in: updated for port specific include
1430
1431 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1432
1433         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1434
1435 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1436
1437         * device/include/8051.h,
1438         * device/include/8052.h,
1439         * device/include/at89S8252.h,
1440         * device/include/at89c55.h,
1441         * device/include/at89x051.h,
1442         * device/include/at89x51.h,
1443         * device/include/at89x52.h,
1444         * device/include/mcs51reg.h,
1445         * device/include/reg51.h,
1446         * device/include/reg764.h,
1447         * device/include/regc515c.h,
1448         * device/include/sab80515.h: (re)moved these 12 files
1449         * device/include/mcs51/8051.h,
1450         * device/include/mcs51/8052.h,
1451         * device/include/mcs51/at89S8252.h,
1452         * device/include/mcs51/at89c55.h,
1453         * device/include/mcs51/at89x051.h,
1454         * device/include/mcs51/at89x51.h,
1455         * device/include/mcs51/at89x52.h,
1456         * device/include/mcs51/mcs51reg.h,
1457         * device/include/mcs51/reg51.h,
1458         * device/include/mcs51/reg764.h,
1459         * device/include/mcs51/regc515c.h,
1460         * device/include/mcs51/sab80515.h: and added them here
1461
1462 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1463
1464         * device/include/stdarg.h: changed SDCC specific keywords to double
1465           underlined form.
1466         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1467           mcs51 and ds390.
1468         * device/include/hc08/mc68hc908gp32.h,
1469         * device/include/hc08/mc68hc908jb8.h,
1470         * device/include/hc08/mc68hc908jkjl.h,
1471         * device/include/hc08/mc68hc908qy.h: fixed comments
1472         * device/include/mcs51/README: updated
1473         * device/include/mcs51/c8051f120.h: added PINRSF
1474         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1475         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1476           amidst code. Also inline is not supported.
1477
1478 2005-04-06 Raphael Neider <rneider AT web.de>
1479
1480         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1481         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1482           callers stack/frame pointers
1483
1484 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1485
1486         * device/include/pic16/usart.h: added, missing in previous commit,
1487         * device/include/pic16/adc.h: fixed typo,
1488         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1489         commit,
1490         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1491         <p18fxxx.inc>
1492         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1493         uninitialized because a bug appears with gplink
1494         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1495         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1496         complains for unrecognised option
1497
1498 2005-04-05 Raphael Neider <rneider AT web.de>
1499
1500         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1501           structs as well (using memcpy)
1502         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1503           on ISRs (GOTO has no label)
1504         * src/pic16/device.h: added OF_OPTIMIZE_DF
1505         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1506           new data flow analysis/optimization
1507         * src/pic16/pcode.c: added (prototypes for and implementation of)
1508           dataflow analysis functions, fixed pCodeInstructions' inCond and
1509           outCond values, made RCALL a branch instruction
1510         * (pic16_unlinkpCode): keep C line if possible
1511         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1512           C line moved if possible
1513         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1514         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1515           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1516         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1517           new flow)
1518         * (pic16_getJumptabpCode): NEW, needed in...
1519         * (LinkFlow): fixed handling of jumptables, calls and conditional
1520           branches
1521         * (pic16_InsertCommentAfter): NEW
1522         * (pic16_pCodeReplace): made verbose and flow preserving
1523         * (AnalyzeFlow): added call to data flow analysis
1524         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1525         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1526         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1527
1528 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1529
1530         * src/SDCCast.c (decorateType): fixed bug #1105626
1531
1532 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1533
1534         * device/include/asm/pic16/features.h,
1535         * pic18f*.h headers,
1536         * device/include/pic16/adc.h,
1537         * device/include/pic16/delay.h,
1538         * device/include/pic16/i2c.h,
1539         * device/include/pic16/malloc.h,
1540         * device/include/pic16/stdio.h,
1541         * device/include/pic16/stdlib.h,
1542         * device/include/pic16/string.h,
1543         * device/lib/pic16/libc/stdio/printf_tiny.c,
1544         * device/lib/pic16/libc/stdio/printf_small.c,
1545         * device/lib/pic16/libc/stdio/strmgpsim.c,
1546         * device/lib/pic16/libc/stdio/strmmssp.c,
1547         * device/lib/pic16/libc/stdio/strmusart.c,
1548         * device/lib/pic16/libc/stdio/vfprintf.c,
1549         * device/lib/pic16/libc/stdlib/ltoa.c,
1550         * device/lib/pic16/libc/stdlib/putchar.c,
1551         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1552         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1553         * device/lib/pic16/libc/stdlib/memchrram.c,
1554         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1555         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1556         * device/lib/pic16/libio/adc/adcbusy.c,
1557         * device/lib/pic16/libio/adc/adcread.c,
1558         * device/lib/pic16/libio/adc/adcsetch.c,
1559         * device/lib/pic16/libio/usart/ubaud.c,
1560         * device/lib/pic16/libio/usart/ubusy.c,
1561         * device/lib/pic16/libio/usart/udrdy.c,
1562         * device/lib/pic16/libio/usart/uopen.c,
1563         * device/lib/pic16/libio/usart/uputc.c,
1564         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1565         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1566         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1567         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1568         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1569         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1570         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1571         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1572         specific keywords to double underlined form,
1573         * device/lib/pic16/libc/Makefile.rules,
1574         * device/lib/pic16/libsdcc/Makefile.rules,
1575         * device/lib/pic16/libm/Makefile,
1576         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1577         to compile with C standard set in Makefile.common
1578         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1579         rand.c and crc.c in compilation process,
1580         * device/lib/pic16/libsdcc/int/divuint.c,
1581         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1582         `c' from signed to unsigned,
1583         * device/lib/pic16/startup/crt0.c,
1584         * device/lib/pic16/startup/crt0i.c,
1585         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1586         keywords to double underlined form, bug fixes in _do_cinit function
1587         which prevented the correct initialization of the .idata segment,
1588         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1589         core to enter a infinite loop
1590         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1591
1592 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1593
1594         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1595
1596 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1597
1598         * device/include/Makefile.in: add support for hc08 subdirectory
1599         * device/include/hc08/: new subdirectory
1600         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1601         Lucas Loizaga, thanks!
1602         * device/include/hc08/mc68hc908qy.h,
1603         * device/include/hc08/mc68hc908gp32.h,
1604         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1605         their own directory. Changed internal macro names to use the compiler
1606         reserved namespace. Changed SDCC specific keywords to double
1607         underlined form.
1608         * device/include/math.h,
1609         * device/include/malloc.h,
1610         * device/include/stdarg.h,
1611         * device/include/stdbool.h
1612         * device/include/string.h,
1613         * device/include/tinibios.h,
1614         * device/include/ds400rom.h,
1615         * device/include/8051.h,
1616         * device/include/8052.h,
1617         * device/include/80c51xa.h,
1618         * device/include/at89c55.h,
1619         * device/include/at89S8252.h,
1620         * device/include/at89x51.h,
1621         * device/include/at89x52.h,
1622         * device/include/ds80c390.h,
1623         * device/include/reg764.h,
1624         * device/include/regc515c.h,
1625         * device/include/sab80515.h,
1626         * device/include/mcs51/c8051f000.h,
1627         * device/include/mcs51/c8051f018.h,
1628         * device/include/mcs51/c8051f020.h,
1629         * device/include/mcs51/c8051f040.h,
1630         * device/include/mcs51/c8051f060.h,
1631         * device/include/mcs51/c8051f120.h,
1632         * device/include/mcs51/c8051f300.h,
1633         * device/include/mcs51/c8051f310.h,
1634         * device/include/mcs51/c8051f320.h,
1635         * device/include/mcs51/c8051f330.h,
1636         * device/include/mcs51/c8051f350.h,
1637         * device/include/z180.h: Changed SDCC specific keywords to double
1638         underlined form.
1639
1640 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1641
1642         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1643         18F4455,
1644         * (pic16_assignConfigWordValue): disable testing of configuration
1645         register value with config mask,
1646         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1647         function with port->fun_prefix,
1648         * (genFunction): when generating a naked interrupt function never
1649         create an absolute segment placed in interrupt vector address, place
1650         the actual interrupt function at IVA instead, when an interrupt
1651         function is generated with unspecified interrupt then do not create
1652         the absolute section,
1653         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1654         code for generating a call to generic pointer get/put function with
1655         a call to function pic16_callGenericPointer(),
1656         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1657         the call to the generic pointer get/put functions with prefixing the
1658         function name with port->fun_prefix,
1659         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1660         * src/pic16/main.c (_process_pragma): prefix function with
1661         port->fun_prefix,
1662         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1663         calling assembler, old 18Fxxxx macro is deprecated,
1664         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1665         PC_ASMDIR in while condition,
1666         * (findInstruction): add PC_ASMDIR in while condition,
1667         * (buildCallTree): prefix main with port->fun_prefix,
1668         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1669         identifier for variable with banked access in instructions BTFSS,
1670         BTFSC, BCF, BSF, BTG
1671         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1672         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1673         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1674         perform optimization when enviroment variable NO_REG_OPT is set,
1675         * (insideLRBlock): NEW, return 1 if register is inside an
1676         INF_LOCALREGS block,
1677         * (RemoveRegFromLRBlock): remove a register that is completely
1678         eliminated by register optimization, but it is still left in local
1679         register store/restore in/from stack block,
1680         * (Remove2pcodes): after removing register, check to see if it
1681         should be removed from local register store/restore in/from stack
1682         block,
1683         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1684         DUMMY_READ_VOLATILE,
1685
1686         * device/include/pic16/adc.h: minor prototype modifications and
1687         update,
1688         * device/include/pic16/malloc.h: added GPL notice various
1689         modifications,
1690         * device/include/pic16/stdint.h: NEW, standard header for ints
1691         * device/include/pic16/delay.h: NEW, header for delay functions,
1692         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1693         delay1mtcy,
1694         * device/include/pic16/signal.h: NEW, header providing helper macros
1695         for implementing signal handlers,
1696         * device/include/pic16/stdio.h: added prototypes for functions,
1697         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1698         prototypes for stdin and stdout, added macro PUTCHAR to
1699         automatically implement putchar function prototype,
1700         * device/include/pic16/usart.h: modified and updated USART library,
1701         * device/lib/pic16/libio/adc/,
1702         * device/lib/pic16/libio/i2c: some modifications to improve library
1703         performance,
1704         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1705         family of functions,
1706         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1707         family of functions and other sources,
1708         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1709         of the PIC18Fxx[28] devices,
1710         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1711         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1712         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1713         _do_cinit function, because the previous failed when local variables
1714         where not placed in the same memory bank,
1715         * device/lib/pic16/libsdcc/char/: various modifications to improve
1716         library performance,
1717         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1718         information on the new functions of the c library and more...
1719
1720 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1721
1722         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1723
1724 2005-03-26 Raphael Neider <rneider AT web.de>
1725
1726         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1727           if condition == CARRY)
1728         * (genCmp): adapted to new genSkipc semantics
1729         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1730           on rIfx (genCmp was broken)
1731
1732 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1733
1734         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1735         * src/z80/main.c (_keywords[]),
1736         * src/SDCCglobal.h (struct options),
1737         * src/SDCC.y,
1738         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1739         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1740         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1741         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1742         always available in leading double underscore form. The C99 support is
1743         mostly missing, but it's a start.
1744         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1745         reserved identifier "__data".
1746
1747 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1748
1749         * src/mcs51/peeph.def: fixed bug 1170013
1750
1751 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1752
1753         * device/include/mcs51reg.h: fixed bug 842007
1754
1755 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1756
1757         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1758         last time.
1759
1760 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1761
1762         * src/port.h (struct PORT),
1763         * src/avr/ralloc.c (avr_assignRegisters),
1764         * src/avr/main.c,
1765         * src/ds390/ralloc.c (ds390_assignRegisters),
1766         * src/ds390/main.c,
1767         * src/hc08/ralloc.c (hc08_assignRegisters),
1768         * src/hc08/main.c,
1769         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1770         * src/mcs51/main.c,
1771         * src/pic/ralloc.c (pic14_assignRegisters),
1772         * src/pic/main.c,
1773         * src/pic16/ralloc.c (pic16_assignRegisters),
1774         * src/pic16/main.c,
1775         * src/xa51/ralloc.c (xa51_assignRegisters),
1776         * src/xa51/main.c,
1777         * src/z80/ralloc.c (z80_assignRegisters),
1778         * src/z80/ralloc.h,
1779         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1780         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1781         * src/SDCCcse.h,
1782         * src/SDCCdflow.c (computeDataFlow),
1783         * src/SDCCdflow.h,
1784         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1785         * src/SDCCloop.h,
1786         * src/SDCCcflow.c (*),
1787         * src/SDCCcflow.h,
1788         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1789         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1790         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1791         immedDom() returning wrong block; probably fixes bug #1160833)
1792
1793 2005-03-20 Borut Razem <borut.razem AT siol.net>
1794
1795         * support/scripts/inc2h.pl: WIN32 port
1796
1797 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1798
1799         * device/lib/makefile.in: added abs.c and labs.c
1800
1801 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1802
1803         * device/include/stdint.h: added
1804         * device/lib/abs.c: added
1805         * device/lib/labs.c: added
1806         * device/include/stdlib.h: added abs() and labs() prototypes
1807         * device/lib/libsdcc.lib: added abs and labs
1808         * device/include/float.h,
1809         * device/lib/_fsmul.c,
1810         * device/lib/printf_fast.c,
1811         * device/lib/printf_tiny.c: updated comments
1812
1813 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1814
1815         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1816         bug #1164313
1817
1818 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1819
1820         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1821         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1822
1823 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1824
1825         * device/lib/printf_large.c: removed inline assembly for portability and
1826           readability. Use printf_fast if speed or size are more important.
1827         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1828         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1829
1830 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1831
1832         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1833         prevent compiler warning
1834
1835 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1836
1837         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1838         moved to level 0 and declared as static. Also they are explicit
1839         placed in access bank. This was necessery because some times they
1840         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1841         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1842         optimizations. Currently only compare to unsigned char is implemented,
1843         * src/pic16/gen.c: added fReturnIdx array,
1844         * (struct resolvedIfx) is moved to gen.h and made public,
1845         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1846         * (aopForSym): added an optimization to directly store in stack of
1847         the operand of a SEND iCode,
1848         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1849         but as registers instead (AOP_REG) using the fReturnIdx array,
1850         * (pic16_freeAsmop): remove the freed register from the
1851         _G.sregsAlloc field,
1852         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1853         a compare of 'WREG',
1854         * (pic16_popGetTempRegCond): changed function prototype, now
1855         function takes also a bitVector argument v which holds the current
1856         set of registers that are allocated for stack access by aopForSym,
1857         registers allocated in aopForSym for accessing stack symbols are not
1858         any more part of the functions usedRegs field,
1859         * (genCall): some times aopOp is called for a stack variable to be
1860         send, aopForSym might perform the push, if this is true make sure
1861         that genCall doesn't push the variable twice by testing _G.resDirect,
1862         * (genFunction): changed testing for unspecified interrupt number
1863         from 256 to INTNO_UNSPEC,
1864         * modified selection scheme of frame pointer generation. Previously
1865         if function did use local registers a frame pointer was generated,
1866         now a frame pointer is generated only if function has arguments
1867         (that need PLUSW2 register access), or has stack arguments, or the
1868         compiler is not instructed to omit the frame pointer,
1869         * (genEndFunction): before restoring local registers that were saved
1870         in the function preamble, also restore the registers that *might*
1871         have been allocated for stack access,
1872         * (genRet): removed some old comments,
1873         * (genCmp, the active (RN's) version): added a call to the
1874         pic16_genCmp_special function to perform the compare with a more
1875         robust and optimized way,
1876         * (genInline): a feature has been added in inline code generation,
1877         which allows a wildcard variable substitution when writing inline
1878         assembly. Code is incomplete and experimental therefore undocumented,
1879         * (genCast): changed order of aopOp for result and right to allow
1880         aopForSym to directly load the result if possible,
1881         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1882         perform an optimized compare on some selected special occasions,
1883         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1884         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1885         generate an IVT any more,
1886         * src/pic16/main.c (pic16_optionsTable): added command line option
1887         --optimize-cmp,
1888         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1889         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1890         macros,
1891         * src/pic16/NOTES: Raphael Neider added in list of active developers
1892         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1893         jumptable_end to prevent bug #,
1894         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1895         inCond and outCond fields,
1896         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1897         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1898         turn off register spilling,
1899         * (packRegsForOneUse): synced with other ports' versions although it
1900         is not used currently,
1901         * (pic16_packRegisters): added an optimization while reading
1902         structure bitfields, some registers may be saved (malloc code is
1903         decreased by 80 bytes)
1904
1905 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1906
1907         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1908         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1909         this can be optimized more?
1910
1911 2005-03-10 Raphael Neider <rneider AT web.de>
1912
1913         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1914           genNearPointerGet): (hopefully) fixed access to bitfields via
1915           pointers (p->bitN = x; and x = p->bitN; failed)
1916
1917 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1918
1919         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1920
1921 2005-03-09 Raphael Neider <rneider AT web.de>
1922
1923         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1924
1925 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1926
1927         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1928         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1929           (regTypeNum): set REG_BIT type if necessary
1930         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1931         * support/regression/tests/critical.c: check bug 1144613
1932
1933 2005-03-02 Raphael Neider <rneider AT web.de>
1934
1935         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1936
1937 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1938
1939         * src/avr/ralloc.c (serialRegAssign),
1940         * src/ds390/ralloc.c (serialRegAssign),
1941         * src/hc08/ralloc.c (serialRegAssign),
1942         * src/mcs51/ralloc.c (serialRegAssign),
1943         * src/pic/ralloc.c (serialRegAssign),
1944         * src/pic16/ralloc.c (serialRegAssign),
1945         * src/xa51/ralloc.c (serialRegAssign),
1946         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1947
1948 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1949
1950         * src/SDCCast.c (decorateType): fixed bug 1124787
1951
1952 2005-02-20 Hubert Sack <sack AT digiplan.de>
1953         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1954
1955         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1956         patch #1121755
1957
1958 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1959
1960         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1961         to keep the correct label reference count when adding/removing references
1962         to labels. A peephole file using this is appended to patch #1144962.
1963
1964 2005-02-14 Raphael Neider <rneider AT web.de>
1965
1966         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1967         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1968         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1969           retrievals of result operand's value on assignment
1970
1971 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1972
1973         * device/include/pic16/string.h: modified prototype for memccpy()
1974         to memccpy(void *, void *, char, size_t)
1975         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1976         check whether to omit frame pointer or not,
1977         * (genInline): convert all occurences of "\n" to LF in inline
1978         assembler blocks, this helps formatting the inline text,
1979         * (pic16_loadFSR0): modified prototype,
1980         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1981         removed some 8051 legacy code,
1982         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1983         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1984         before allocating temporary registers in functions,
1985
1986 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1987
1988         * support/regression/tests/bitvars.c: corrected the "fix"
1989
1990 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1991
1992         * support/regression/tests/bitvars.c,
1993         * support/regression/tests/bitwise.c,
1994         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1995
1996 2005-02-10 Raphael Neider <rneider AT web.de>
1997
1998         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1999           different size for Alpha
2000         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2001
2002 2005-02-09 Raphael Neider <rneider AT web.de>
2003
2004         * src/SDCC.lex(doPragma) : save and restore warning options as well
2005           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2006         * have #pragma less_pedantic set the errorlevel to WARNING
2007           (fixes #1117001)
2008         * (cloneOptimize) : fixed wrong malloc's size
2009         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2010           facilitate correct handling of #pragma (save|restore)
2011
2012 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2013
2014         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2015
2016 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2017
2018         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2019
2020 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2021
2022         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2023
2024 2005-02-02 Raphael Neider <rneider AT web.de>
2025
2026         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2027         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2028         * (pic16_storeForReturn): fixed to allow returning function pointers
2029         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2030         * device/include/pic16/{stddef.h,stdbool.h}: added
2031
2032 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2033
2034         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2035
2036 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2037
2038         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2039         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2040          appeared to be required
2041
2042 2005-01-31 Borut Razem <borut.razem AT siol.net>
2043
2044         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2045           include/mcs51 and include/z80 directories to the package
2046
2047 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2048
2049         * src/hc08/gen.c (genFunction): fixed bug #1112752
2050
2051 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2052
2053         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2054
2055 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2056
2057         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2058
2059 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2060
2061         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2062
2063 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2064
2065         * device/include/c8051fxxx.h: removed these 6 files
2066         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2067
2068 2005-01-26 Raphael Neider <rneider AT web.de>
2069
2070         * src/pic16/gen.c (genAssign): fixed assignment from longs
2071           in codespace (were cut to three bytes)
2072         * (genDummyRead): implemented (except for CODESPACE...),
2073           fixed bug #1108575
2074         * src/pic16/glue.c (emitStatistics): beautified
2075         * device/lib/pic16/libm/Makefile: added include path
2076
2077 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2078
2079         * src/z80/gen.c (aopPut): fixed bug #1103902
2080
2081 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2082
2083         * device/lib/expf.c: fixed bug #1095792
2084
2085 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2086
2087         * device/lib/pic16/libm: added Math library sources
2088
2089 2005-01-24 Raphael Neider <rneider AT web.de>
2090
2091         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2092           to enable upcast to pCodeOpReg2 (there is no type tag to
2093           differenciate the two and pic16_popGet2p cast into PCOR2)
2094         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2095           (sizeof(sectNames) changed to sizeof(sectName))
2096           Both patches fix segfaults under MinGW.
2097
2098 2005-01-23 Raphael Neider <rneider AT web.de>
2099
2100         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2101           Safe_[mc]?alloc()'ed variables
2102         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2103           of (byte sized) temporaries (assign them to WREG for now)
2104         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2105           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2106           this might fix SIGSEGVs on MinGW...
2107         * src/SDCCopt.c (killDeadCode): restored original behaviour
2108           (volatile operands might get thrown away though)
2109
2110 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2111
2112         * src/pic16/gen.c: fixed bug #1106975,
2113         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2114         pointer update, INTCON is saved, global interrupts are disabled and
2115         restored after updateing TOS.
2116         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2117         * added function attribute 'shadowregs' to take advantage of shadow
2118         registers,
2119         * added function attribute 'wparam' as an alternative to the wparam
2120         pragma,
2121         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2122         user declares a non-ISR function as 'shadowregs',
2123         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2124
2125 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2126
2127         * .version: bumped version number to 2.4.8
2128         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2129         pic16 port,
2130         * device/lib/pic16/libio/i2c/: I2C module support library,
2131         * device/include/pic16/i2c.h: I2C support library header,
2132         * device/lib/pic16/libc/stdio/: standard IO support sources,
2133         * (printf_small.c): printf_small() source, supports float print,
2134         * (printf_tiny.c): printf_tiny() source, does not support floats,
2135         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2136         enable global optimizations for entire library source, other
2137         Makefiles in the source tree are also modified to reflect this,
2138         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2139         function,
2140         * doc/sdccman.lyx: updated to reflect new changes,
2141         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2142         sym->onStack if-case,
2143         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2144         sbit, idata, _idata, xdata, _xdata,
2145         * added pragma library, to link an external library, (see doc),
2146         * removed command line options, --pomit-config-words, --pomit-ivt,
2147         --pleave-reset-vector,
2148         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2149         when calling assembler to reflect memory model used, also define
2150         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2151         reflect stack model used,
2152         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2153         on stack return NULL,
2154
2155 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2156
2157         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2158           of the operands is volatile. Fixes #1020220
2159
2160 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2161
2162         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2163         * (OptimizeRegUsage): make sure that there is really no other flow where
2164           the first pCode is used
2165
2166 2005-01-22 Raphael Neider <rneider AT web.de>
2167
2168         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2169           to fix #1106967 (pCode->seq are not set up correctly)
2170
2171 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2172
2173         * src/SDCCglue.c (glue): make sure code area is declared before the
2174         static initialization area.
2175
2176 2005-01-21 Raphael Neider <rneider AT web.de>
2177
2178         * device/lib/Makefile.in: fixed test for pic16 install dir
2179         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2180           optimizations
2181         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2182           added --optimize-goto compiler switch and pragma wparam documentation
2183         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2184         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2185           and PRODH closing bug #1071770 (peephole optimizer)
2186
2187 2005-01-19 Raphael Neider <rneider AT web.de>
2188
2189         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2190           cmdLine buffers (used when calling sdcpp...) are large enough
2191           (MAX_PATH=256 truncates arguments leading to system halts when
2192           used in MinGW...)
2193         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2194         * (genUminus): rewritten to for efficiency
2195         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2196           used uninitialized in some cases)
2197         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2198           copy the third byte from the int -- now assumes 0x80 (data memory)
2199         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2200           operands (genAddLit expects the iCode's operands to swapped as
2201           well), fixed leftover bytes (crashed for short left operands)
2202         * (pic16_genMinusDec): performance improvements, removed false
2203           PIC14 emitSKPNCs
2204         * (pic16_genMinus): fixed to cope with differently sized operands
2205         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2206           for --obanksel > 1
2207         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2208         * src/pic16/graph.[ch]: implementation of directed graphs, used by
2209           new banksel optimization
2210         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
2211           analysis for temporary registers (segfaults...)
2212         * src/pic16/peeph.def: added rule
2213
2214 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
2215
2216         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
2217         which converts a float number to its ASCII representation
2218         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
2219         functions to convert the fractional and integer part of a float to ASCII,
2220         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
2221         realloc.c): added _MALLOC_SPEC to explicit place variables in data
2222         ram
2223         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
2224         _STATMEM macros,
2225         * device/include/pic16/adc.h: added GPL info,
2226         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2227         a pCodeOp as tested operand,
2228         * (genNearPointerGet): optimized bit testing, does not use
2229         intermediate register for bit value, test directly instead with
2230         BTFSS, BTFSC, works only for single bits,
2231         * (genpic16Code): dump the name of the iCode in the asm,
2232         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2233         renamed to pic16_decodeOp,
2234         * (serialRegAssign): do not allocate a temporary register for iCode
2235         sequences that test a single bit for 1/0
2236
2237 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2238
2239         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2240         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2241         access stack and frame pointers. They are initially assigned to
2242         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2243         accessing SFRs. Updated all occurences of modification of stack or
2244         frame pointer in gen.c and pcode.c,
2245         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2246         assigning of a literal value to pointers,
2247         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2248         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2249         selected
2250
2251 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2252
2253         * doc/sdccman.lyx: update documentation about stack pragma, added
2254         some info for stack memory models
2255
2256 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2257
2258         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2259
2260 2005-01-08 Raphael Neider <rneider AT web.de>
2261
2262         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2263           udata sections to fix bug #1097823
2264
2265 2005-01-05 Raphael Neider <rneider AT web.de>
2266
2267         * src/pic16/gen.c (genGenericShift): added handling of differently
2268           sized left operand and result
2269
2270 2005-01-04 Raphael Neider <rneider AT web.de>
2271
2272         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2273         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2274           to hold the condition bit)
2275         * added new version of genCmp (old code available via #define)
2276         * added new version of genShiftLeft/genShiftRight in a generic
2277           way, now supports shifting by negative values
2278         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2279           shiftCount (expected by genGenericShift)
2280         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2281         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2282           dump
2283         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2284           is an invalid literal too...)
2285
2286 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2287
2288         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2289         from Raphael Neider,
2290         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2291         for 8-bit literals. This fixes some literal operands which are sign
2292         extended to 16-bits ints when instruction needs only 8-bits.
2293
2294 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2295
2296         * device/lib/logf.c: added mcs51 assembly version
2297         * device/lib/expf.c: added mcs51 assembly version
2298         * device/lib/_logexpf.c: new shared asm code for expf and logf
2299         * device/include/math.h: add defines for assembly math library
2300         * device/lib/Makefile.in: build new _logexpf.c
2301         * device/lib/libfloat.lib: use new _logexpf.c
2302
2303 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2304
2305         * src/pic/device.c
2306         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2307           device types which have less than 0x7f registers.
2308
2309 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2310
2311         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2312
2313 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2314
2315         * device/lib/printf_fast.c: only build on supported arch.
2316         * device/lib/printf_tiny.c: only build on supported arch.
2317         * device/lib/printf_fast_f.c: only build if asm float lib
2318         * device/lib/_fsget1arg.c: only build if asm float lib
2319         * device/lib/_fsget2args.c: only build if asm float lib
2320         * device/lib/_fsnormalize.c: only build if asm float lib
2321         * device/lib/_fsreturnval.c: only build if asm float lib
2322         * device/lib/_fsrshift.c: only build if asm float lib
2323         * device/lib/_fsswapargs.c: only build if asm float lib
2324         * device/include/stdio.h: don't provide print_fast,
2325           print_fast_f, print_tiny prototypes if --xstack used
2326
2327 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2328
2329         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2330         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2331           to the SOURCES
2332
2333 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2334
2335         * device/lib/printf_fast_f.c: same as printf_fast, but
2336           with floating point enabled
2337         * device/lib/printf_fast.c: minor tweaks
2338         * device/include/stdio.h: add printf_fast_f
2339
2340 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2341
2342         * src/SDCCmain.c: make --float-reent default for mcs51
2343         * device/lib/_fsadd.c: added mcs51 assembly version
2344         * device/lib/_fssub.c: added mcs51 assembly version
2345         * device/lib/_fsmul.c: added mcs51 assembly version
2346         * device/lib/_fsdiv.c: added mcs51 assembly version
2347         * device/lib/_fseq.c: added mcs51 assembly version
2348         * device/lib/_fsneq.c: added mcs51 assembly version
2349         * device/lib/_fsgt.c: added mcs51 assembly version
2350         * device/lib/_fslt.c: added mcs51 assembly version
2351         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2352         * device/lib/Makefile.in: add _fscmp to build
2353         * device/lib/libfloat.lib: add _fscmp to build
2354
2355 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2356
2357         * device/lib/_fs2slong.c: added mcs51 assembly version
2358         * device/lib/_fs2sint.c: added mcs51 assembly version
2359         * device/lib/_fs2schar.c: added mcs51 assembly version
2360         * device/lib/_fs2ulong.c: added mcs51 assembly version
2361         * device/lib/_fs2uint.c: added mcs51 assembly version
2362         * device/lib/_fs2uchar.c: added mcs51 assembly version
2363         * device/lib/_slong2fs.c: added mcs51 assembly version
2364         * device/lib/_sint2fs.c: added mcs51 assembly version
2365         * device/lib/_schar2fs.c: added mcs51 assembly version
2366         * device/lib/_ulong2fs.c: added mcs51 assembly version
2367         * device/lib/_uint2fs.c: added mcs51 assembly version
2368         * device/lib/_uchar2fs.c: added mcs51 assembly version
2369         * device/include/float.h: added #define to select asm vs c
2370
2371 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2372
2373         * device/lib/printf_fast.c: improvements to float output
2374         * device/include/float.h: add defines for assembly float library
2375         * device/lib/_fsget1arg.c: receive 1 float arg
2376         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2377         * device/lib/_fsnormalize.c: normalize a float
2378         * device/lib/_fsreturnval.c: return float, various helper routines
2379         * device/lib/_fsrshift.c: right shift a float's mantissa
2380         * device/lib/_fsswapargs.c: swap 2 floats
2381         * device/lib/Makefile.in: build these 6 new files for mcs51
2382         * device/lib/libfloat.lib: add these 6 files to the library
2383
2384 2004-12-26 Borut Razem <borut.razem AT siol.net>
2385
2386         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2387           built by gcc 3.4.2
2388
2389 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2390
2391         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2392           and fully reentrant and register bank neutral.
2393         * device/lib/printf_fast.c: added float (not enabled by default),
2394           added compact/slower integer (also not enabled by default),
2395           improved size/speed of fast integer code, other minor changes
2396         * device/include/stdio.h, device/lib/Makefile.in,
2397           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2398
2399 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2400
2401         * src/pic16/pcode.c: declaring variables other than at the start of a
2402           block is not supported in C by VC6.
2403
2404 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2405
2406         * applied a previous patch from Raphael Neider that wasn't included
2407         in the previous commits, which fixes infinite loops within jumptable
2408         improvements,
2409         * made some fixes that previous patches introduced
2410
2411 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2412
2413         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2414         that fixes an issue with AOP_PCODE asmop's offset,
2415         * (pic16_popCopyReg): update instance field too,
2416         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2417         function of pic port,
2418         * (genCmp, genAnd, genAssign),
2419         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2420
2421 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2422
2423         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2424         variables initial values to idata section,
2425         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2426         variables in some functions. This utilizes parmBytes field of iCode
2427         structure to hold the offset of the variable in stack. (might be
2428         able to use the stack field too?)
2429         * applied patch from Raphael Neider # ### , # ###
2430         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2431         variable initial values in idata section,
2432         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2433         for static variables with initial value
2434         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2435         applied fix in while loop from Raphael Neider.
2436
2437 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2438
2439         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2440         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2441         * src/ds390/ralloc.c (serialRegAssign): spill bits
2442         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2443         * support/Util/SDCCerr.c,
2444         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2445         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2446         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2447
2448 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2449
2450         * device/include/sdcc-lib.h: inserted LGPL, added includes
2451           asm/ds390/features.h and asm/mcs51/features.h
2452         * device/include/asm/default/features.h,
2453         * device/include/asm/gbz80/features.h,
2454         * device/include/asm/z80/features.h: added empty _AUTOMEM
2455           and _STATMEM
2456         * device/include/asm/ds390/features.h,
2457         * device/include/asm/mcs51/features.h: added files with defines for
2458           _AUTOMEM and _STATMEM indicating automatic and static storage class
2459         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2460         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2461         * src/SDCCicode.c (geniCodeCast),
2462         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2463         * src/SDCCloop.c (loopInduction): removed unused variable lr
2464         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2465           to convertToFcall to include char modulo (RFE 1065037), added check
2466           if left operand is unsigned and use abs of literal value
2467         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2468           as it doesn't work after conversion from peephole.def to peephole.rul
2469         * src/mcs51/gen.c (toBoolean): added check for size,
2470           (genModOneByte): optimized code for signed char modulo a literal
2471           power of 2 (thanks to Hubert Sack),
2472           (genRRC): removed unnecessary "clr c",
2473           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2474         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2475           jump optimization,
2476           swapped rules 256.c and 256.d,
2477           extended 256.d by using new multiple checks (thanks Erik),
2478           added rules 256.e and 256.f,
2479           updated rule 261.a and 261.b to new generated code
2480         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2481
2482 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2483
2484         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2485           induction related bugs, including first part of bug #1074377
2486
2487 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2488
2489         * applied patch from bug-report #1076292,
2490         * applied patches for genAnd and Goto-optimizations for Raphael
2491         Neider,
2492         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2493         dump a less iCode information,
2494         * src/pic16/device.h (pic16_options_t): added field debgen,
2495         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2496         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2497         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2498         puclic,
2499         * (various functions): added macros FENTRY and FENTRY2 to functions,
2500         to emit function prologue,
2501         * (various functions): fixed indentation,
2502         * (genNearPointerGet): fixed loading of FSR0,
2503         * (genPackBits): applied patch from Raphael Neider to fix updating
2504         of FSR0 and touching only the modified bits,
2505         * src/pic16/genarith.c (various functions): added macros FENTRY to
2506         emit function prologue in comments,
2507         * src/pic16/pcode.h: added functions debugf2, debugf3,
2508         * src/pic16/ralloc.c: partial fix for packForPush caused
2509         segmentation fault,
2510
2511 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2512
2513         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2514           <stsp AT users.sourceforge.net> with reversed byte order
2515         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2516
2517 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2518
2519         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2520           bug #1074377
2521         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2522         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2523
2524 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2525
2526         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2527
2528 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2529
2530         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2531           conditions,
2532           (setFromConditionArgs): friendly operand parser for peephole rules,
2533           (operandBaseName, operandsNotRelated): new peephole condition
2534           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2535           architecture specific register naming into account, handles n-way
2536           comparisons, and supports quoted literals
2537         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2538
2539 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2540
2541         * src/mcs51/peeph.def: fixed bug #1076940
2542
2543 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2544
2545         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2546
2547 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2548
2549         Adding support for replacing ljmps with sjmps in jumptables
2550         generated for switch statements. For now you need to set the
2551         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2552         Now 4 algorithms for mcs51 jumptable generation are used:
2553         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2554         addresses loaded pc-relative for up to 112 cases and stack-pushing
2555         target addresses loaded with offset from dptr for up to 256 cases.
2556
2557         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2558         * src/mcs51/main.c: adapted constants for switch table generation
2559         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2560
2561 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2562
2563         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2564         * support/regression/tests/bug1057979.c: added test for bug 1073386
2565
2566 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2567
2568         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2569         compilers
2570
2571 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2572
2573         * src/pic16/device.h,
2574         * src/pic16/genarith.c,
2575         * src/pic16/glue.c,
2576         * src/pic16/main.c,
2577         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2578
2579 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2580
2581         Large cummulative patch for pic16 port.
2582         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2583         to call when a stack overflow occurs,
2584         * (malloc.h): added CVS Id tag,
2585         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2586         variable,
2587         * added libc directory. The current version of LibC contains string
2588         functions, ctype functions and macros and some functions of the
2589         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2590         be extensively tested in the future. Standard disclaimer here.
2591         Library is not automatically build yet. But one can build it by
2592         invoking 'make' inside the libc directory.
2593         * added ADC library under libio. Preliminary version yet.
2594
2595         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2596         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2597         aopForRemat() now and not by pic16_aopOp(),
2598         * (pic16_popGetTempReg): removed warning messgae when allocating
2599         temporary registers, its a buggy feature and will be removed,
2600         * (pic16_popGet): set register instance field in AOP_CRY,
2601         * (pic16_outBitC): fixed for results in size greater than 1,
2602         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2603         * (pic16_storeForReturn): optimized return of 0,
2604         * (genCmp): experimental code for new genCmp which uses PIC18's
2605         special compare&skip instructions. Initial tests fail some times
2606         with variables grater than 1 byte in size, so new code is disabled,
2607         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2608         a single bit,
2609         * (genCast): began a fix to optimize the casting of a bit to another
2610         bit, now assigning a bitfield to another bitfield will fail, sorry,
2611         * src/pic16/main.c: disabled the use of lr-support feature,
2612         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2613         * added some function prototypes, added function _debugf prototype,
2614         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2615         bits with offset (case PO_GPR_BIT),
2616         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2617         command line,
2618         * (isBankInstruction): modified to return 0 for no banking instruction,
2619         and 1 for banking instruction,
2620         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2621         caused stop processing pCodes after a inline assembly block,
2622         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2623         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2624         registers when it shouldn't,
2625         * src/pic16/ralloc.c (allocReg): add preliminary support for
2626         supporting a limited set of temporary registers,
2627
2628 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2629
2630         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2631           genDataPointerSet): ensure assignments always copy in MSB to LSB
2632           order,
2633           (loadRegFromAop): recognize CLRH optimization,
2634           (genFunction): optimize RECEIVE iCodes in reentrant functions
2635
2636 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2637
2638         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2639           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2640           selected.
2641         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2642         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2643           contiguous with data
2644
2645 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2646
2647         * device/lib/_gptrget.c (_gptrget),
2648         * device/lib/_gptrgetc.c (_gptrgetc),
2649         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2650           instead of sjmp to ret
2651         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2652           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2653
2654 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2655
2656         * .version: bumped version to 2.4.7
2657         * device/lib/_gptrget.c (_gptrget): is now _naked
2658         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2659         * device/lib/_gptrput.c (_gptrput): is now _naked
2660         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2661           (createFunction): fixed xstack
2662         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2663         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2664           or bit either,
2665           (geniCodeCritical): store original interrupt state in an iTemp bit
2666           var unless stack-auto
2667         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2668         * src/SDCCmain.c (setIncludePath): added include/target to search path
2669         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2670         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2671           prototype,
2672           (processFuncArgs): put bit vars in bit area
2673         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2674           unsaveRBank): fixed xstack,
2675           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2676           (genFunction, genEndFunction): fixed xstack,
2677           (genAssign): optimization don't walk backwards through mem
2678         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2679         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2680         * support/regression/Makefile: also make library (for stack-auto) when
2681           making "all" and added "test-mcs51-xstack-auto"
2682         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2683         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2684         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2685         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2686         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2687           make-library by MAKE_LIBRARY
2688         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2689           regression tests for xstack
2690         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2691         * support/regression/tests/critical.c: test for critical on mcs51
2692
2693 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2694
2695         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2696           built version of sdcc instead of installed version
2697
2698 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2699
2700         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2701         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2702           vprintf.c now
2703         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2704         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2705           WARNING: remove device/lib/build/z80/printf.o by hand when
2706           updating from previous build!
2707         * device/lib/z80/printf.c: updated comment
2708         * support/regression/tests/bug1057979.c: test all ports now
2709         * support/regression/tests/bug1065458.c: file added
2710
2711 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2712
2713         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2714           *_start and *_end symbols for static functions
2715
2716 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2717
2718         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2719           and search crt0.o in all library paths,
2720           (setIncludePath): proper handling of --nostdinc,
2721           (setLibPath): proper handling of --nostdlib
2722         * support/regression/Makefile,
2723         * support/regression/ports/ds390/spec.mk,
2724         * support/regression/ports/gbz80/spec.mk,
2725         * support/regression/ports/hc08/spec.mk,
2726         * support/regression/ports/mcs51/spec.mk,
2727         * support/regression/ports/mcs51-large/spec.mk,
2728         * support/regression/ports/mcs51-stack-auto/spec.mk,
2729         * support/regression/ports/z80/spec.mk: use include and lib files from
2730           built version of sdcc instead of installed version
2731         * doc/sdccman.lyx: fixed typo in --nostdinc
2732
2733 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2734
2735         * src/pic/pcode.c,
2736         * src/pic/device.c,
2737         * src/pic/ralloc.c,
2738         * src/pic/gen.c : added support to generate code for struct bit fields.
2739
2740 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2741
2742         * as/xa51/xa_version.h,
2743         * device/include/errno.h,
2744         * device/include/regc515c.h,
2745         * device/lib/_itoa.c,
2746         * device/lib/_ltoa.c,
2747         * device/lib/ser_ir_cts_rts.c,
2748         * sim/ucsim/xa.src/glob.cc,
2749         * sim/ucsim/xa.src/inst_gen.cc,
2750         * sim/ucsim/xa.src/xa_bit.cc,
2751         * sim/ucsim/xa.src/xa_sfr.cc,
2752         * sim/ucsim/z80.src/inst_dd.cc,
2753         * sim/ucsim/z80.src/inst_fdcb.cc,
2754         * support/scripts/keil2sdcc.pl,
2755         * src/pic16/pic16.dsp,
2756         * src/pic16/pic16a.dsp: corrected cvs line endings
2757         * device/lib/printf_large.c: fixed bug 1057979
2758         * src/pic16/gen.c: fixed non-C standard code
2759         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2760         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2761         * support/regression/ports/mcs51/support.c: reload T1 asap
2762         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2763           pdata use and clear idata startup behaviour
2764         * support/regression/tests/bug1057979.c: added
2765
2766 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2767
2768         * device/examples/ds390/ow390/ad26.h,
2769         * device/examples/ds390/ow390/cnt1d.h,
2770         * device/examples/ds390/ow390/crcutil.c,
2771         * device/examples/ds390/ow390/ownet.h,
2772         * device/examples/ds390/ow390/owsesu.c,
2773         * device/examples/ds390/ow390/swt12.h,
2774         * device/examples/ds390/ow390/swtoper.c,
2775         * device/examples/ds390/ow390/temp10.h,
2776         * device/examples/ds390/ow390/thermodl.c,
2777         * device/examples/ds390/tinitalk/tinitalk.dsp,
2778         * device/examples/ds390/tinitalk/tinitalk.dsw,
2779         * device/examples/mcs51/clock/hw.h,
2780         * device/examples/mcs51/simple2/go.bat,
2781         * device/examples/serialcomm/windows/serial.h,
2782         * device/examples/xa51/dummy.c,
2783         * device/examples/xa51/hello.c,
2784         * device/include/80c51xa.h,
2785         * device/include/at89x051.h: corrected cvs line endings
2786
2787 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2788
2789         * src/pic16/main.c (options): added command line --gstack, to trace
2790         stack over/under flows,
2791         * added pragma 'wparam' to allow passing first byte of function
2792         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2793         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2794         call to __gstack_test function and sets up the symbol as extern,
2795         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2796         * popaop): added call to pic16_testStackOverflow,
2797         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2798         wparamList list,
2799         * (genCall, genPcall): now all parameters are passed via stack
2800         except in functions that are pass to wparam pragma in which WREG is
2801         used too,
2802         * (genPcall): REENTRANT flag is checked to see if variable prototype
2803         contains reentrant keyword, don't call a non-reentrant function, via
2804         a reentrant function pointer or vice versa, functions are never
2805         passed via WREG,
2806         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2807         D.Winkler,
2808         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2809         SIGSEGV when accessing a NULL register stucture,
2810         * (pic16_printGPointerType): modified to handle UPPER modifier for
2811         function initializers, changed prototype of function to simpler one,
2812         * (pic16_printIvalFuncPtr): check to see if function is already
2813         added in externs list,
2814         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2815         optimized a move from W to SFR with a move to the same register
2816         later after a CALL,
2817         * device/lib/pic16/debug: NEW directory, contains debug features
2818         which are enabled when linking with libdebug.lib, currently command
2819         line option --gstack enables stack pointer tracing for over/under
2820         flow, corresponding sources are in debug/gstack
2821
2822 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2823
2824         * doc/sdccman.lyx: updated SDCC version,
2825         * (PIC16 port): update list of command line options,
2826         * src/pic16/device.h (structure pic16_options_t): added field gstack
2827         to enable stack overflow tracing on push/pops,
2828         * src/pic16/device.c (statistics structure): added statistics
2829         structure,
2830         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2831         pic16_dump_int_registers): increase statistics counters for each
2832         * variable which is encountered
2833         * (pic16_dump_usection): emit each .udata variable to its own udata
2834         section,
2835         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2836         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2837         parameters via stack, otherwise use old scheme,
2838         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2839         assembler output file,
2840         * src/pic16/main.c: added command line options --gstack to enable
2841         push/pop tracing for stack overflow,
2842         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2843         instructions): added size of each instruction,
2844         * (pic16_countInstruction): estimate size of instructions in
2845         the_pFile list, inline assembly blocks are not counted,
2846         * (pic16_FixRegisterBanking): trace previous register usage, when
2847         banksel optimizations is greater than 0, don't emit a redudant
2848         banksel directive,
2849
2850 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2851
2852         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2853         * src/pic16/ralloc.c : applied same fix for pic16.
2854         * src/pic/gen.c : tidied it up a little.
2855
2856 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2857
2858         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2859         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2860
2861 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2862
2863         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2864
2865 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2866
2867         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2868         non-reentrant function __modsint in the interrupt function (thus
2869         corrupting math operations during serial I/O)
2870         * device/lib/ser_ir.c: as above, changed buffersize
2871         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2872         256.c,d for zeroing
2873         * doc/Makefile: added option -t for rsync
2874
2875 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2876
2877         * src/SDCCast.h (struct ast),
2878         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2879
2880 2004-10-20 Borut Razem <borut.razem AT siol.net>
2881
2882         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2883         package
2884
2885 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2886
2887         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2888         makefile targets,
2889         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2890         support functions to replace long sequences of MOVFF's from access
2891         bank registers to stack and vice versa,
2892         * src/pic16/device.h: added new field opt_flags, where optimization
2893         flags can be set to enable certain features,
2894         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2895         * pBlock, (genFunction, genEndFunction): surroung loop for
2896         saving/loading used registers in stack with PC_INFO pCodes,
2897         INF_LREGS. Code in between can then be optimized by pCode optimizer
2898         to support function calls,
2899         * (genDataPointerSet): fixed bug which loaded float fields in
2900         structures with corrupt data,
2901         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2902         in a standard way debug info on stderr. Feature used for developing
2903         and debugging only,
2904         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2905         obsolete chunks of code,
2906         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2907         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2908         * pic16/src/pcode.c (pic16_newpCodeInfo,
2909         * (pic16_newpCodeOpLocalRegs),
2910         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2911         feature,
2912         * (pic16_pCodeConstString): printing of the initial value of a
2913         symbol as a comment is inhibited since parsing was already done by
2914         copyStr and output is corrupt,
2915         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2916
2917 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2918
2919         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2920
2921 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2922
2923         * as/mcs51/lkarea.c: removed old K&R style,
2924           (lnksect): changed check on boundary error,
2925           (lnksect2): changed check on boundary error,
2926           (lnksect2): extend XSTK to end of page if size = 1
2927         * as/mcs51/lkmain.c: removed old K&R style,
2928           (Areas51): create l_IRAM symbol
2929         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2930         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2931           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2932         * device/lib/_mullong.c: added version to be compiled with xstack
2933         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2934         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2935         * device/lib/mcs51/crtxstack.asm: fixed comment
2936         * src/SDCCglue.c: maxInterrupts defaults to 0,
2937           (emitMaps): added pdata,
2938           (createInterruptVect): (re)moved default,
2939           (glue): added pdata,
2940           (glue): moved __start__xstack to XSTK with default size 1
2941         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2942           and options.float_rent when options.stackAuto is set,
2943           (linkEdit): only write XDATA_NAME if provided on command line
2944         * src/SDCCmem.h,
2945         * src/SDCCmem.c: added pdata
2946         * src/port.h: added pdata_name to PORT
2947         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2948           (saveRegisters, unsaveRegisters): removed usage of B,
2949           (genMinus): fixed accumulator clash,
2950           (genJumpTab): added comment, this needs another look
2951         * src/mcs51/gen.c: added check for "B in use" paranoia,
2952           added pushB() and popB()
2953         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2954           chance
2955         * src/avr/main.c,
2956         * src/ds390/main.c,
2957         * src/hc08/main.c,
2958         * src/mcs51/main.c,
2959         * src/pic/main.c,
2960         * src/pic16/main.c,
2961         * src/xa51/main.c,
2962         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2963           added PSEG (PAG,XDATA) or NULL to port specifier
2964         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2965         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2966           (_mcs51_genInitStartup): removed __start__xstack equ,
2967           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2968         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2969         * src/z80/gen.c (_rleAppend): fixed warnings
2970         * support/regression/tests/zeropad.c: added pdata test
2971         * .version: bumped to 2.4.6
2972
2973 2004-10-17 Borut Razem <borut.razem AT siol.net>
2974
2975         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2976         as a part of nightly build
2977
2978 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2979
2980         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2981         WREG holds the first byte function parameters,
2982         * (aopForSym): take special case for symbols which are in FARSPACE
2983         but in CODESPACE too,
2984         * (assignResultValue): modified to take into account _G.useWreg,
2985         * (genCall): don't use wreg for parameter passing when function is
2986         declared as reentrant, too, added optimization INCF to stack
2987         pointer when stack parameter count is 1,
2988         * (genFunction, genEndFunction): refurnished and fixed to not using
2989         wreg for passing parameters when function has varargs or is
2990         reentrant, fixed bug with symbol name compare for generating
2991         functions in absolute address,
2992         * (pic16_storeForReturn): refurnished,
2993         * (genCmp): began writing a new version of the function, not ready
2994         yet, therefore it is disabled,
2995         * (genAssign): do not read code memory when assigning a function to
2996         a pointer function,
2997         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2998         array of characters, not pointer,
2999         * (pic16initialComments): in debug mode emit an .ident directive for
3000         the assembler,
3001         * (_process_pragma): emit a new warning type (internal to pic16)
3002         when setting stack to default length, emit a similar warning when
3003         placing a function at absolute address and address is not word aligned
3004         * (_pic16_parseOptions): added 'return TRUE' statement,
3005         * (_pic16_linkEdit): if compiling a source, then add the source's
3006         file object, first in the list of objects to link,
3007
3008 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3009
3010         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3011         * src/pic/main.c : removed VC warning.
3012         * src/pic/gen.c : changed comment.
3013
3014 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3015
3016         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3017         reference to a deprecated symbol _GPTRREG was causing failure to
3018         link. Thanks G. M. Gallant for the info.
3019
3020 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3021
3022         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3023         comments for Bugs item #954788.
3024
3025 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3026
3027         * src/pic16/device.c (pic16_dump_gsection,
3028         * pic16_groupRegistersInSection): handle symbols declared to be in
3029         access bank differently,
3030         * src/pic16/gen.c (struct _G): added field resDirect,
3031         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3032         send values read from stack directly to result and don't allocate
3033         temporary values,
3034         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3035         same registers,
3036         * (pic16_sameRegsOfs): NEW,
3037         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3038         free because they were not allocated from temporary pool,
3039         * pic16_popRegFromString): workaround to fix a problem with
3040         allocating variables twice or never,
3041         * (genGenPointerGet): using PRODL instead of FSR0H,
3042         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3043         instead of FSR0H,
3044         * (genAssign): take advantage of the _G.resDirect flag,
3045         * (genCast): around line 11844, use mov2f instead of directly
3046         MOVFF'ing between operands to account for literal values,
3047         * src/pic16/genutils.c: some new debug functions for gpsim have been
3048         added,
3049         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3050         float with integer part only,
3051         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3052         place variables in access bank
3053         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3054         updated sources to reflect recent changes in gen.c
3055
3056 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3057
3058         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3059         sources that searched for headers in installation path, now the
3060         device/include/pic16 is used,
3061         * src/pic16/glue.c (pic16glue),
3062         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3063         .line directives if not in debug mode, this suppresses assembler's
3064         warnings for ignored directives
3065
3066 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3067
3068         * src/port.h: made reset_regparms prototype void parameter explicit.
3069         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3070         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3071         * doc/sdccman.lyx: documented warning disabling and how to use
3072           printf_large to make it print floats.
3073         * device/include/stdbool.h: NEW
3074         * device/lib/_atof.c,
3075         * device/lib/_divuint.c,
3076         * device/lib/_divulong.c,
3077         * device/lib/expf.c,
3078         * device/lib/printf_large.c,
3079         * device/lib/sincosf.c,
3080         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3081         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3082           a completely reentrant lib.
3083
3084 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3085
3086         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3087         * device/include/pic16/stdio.h: fixed bug with colon
3088
3089 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3090
3091         * device/include/pic16/stdio.h,
3092         * device/include/pic16/stdlib.h,
3093         * device/include/pic16/math.h: NEW
3094         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3095         declared as _naked to reduce overhead
3096         * device/lib/Makefile.in (target port-specific-objects-pic16):
3097         changed * to *.* so to ignore the CVS directory,
3098         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3099         stacked variables back in stack,
3100         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3101         corruption
3102
3103 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3104
3105         * .version: bumped version number to 2.4.5
3106         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3107         * support/Util/SDCCerr.c (messages structure): added entry for
3108         W_POSSBUG2
3109
3110         Large cumulative patch for pic16 port and libraries.
3111         * device/include/pic16/sdcc-lib.h,
3112         * device/include/pic16/stdarg.h,
3113         * device/include/asm/pic16/features.h,
3114         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3115         * device/include/pic16/float.h: changes reentrant keyword with
3116         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3117         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3118         updated target build-libraries to include objects from gptr,
3119         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3120         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3121         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3122         all function headings,
3123         * src/SDCCmain.c: added global parameter userIncDirsSet,
3124         * (parseCmdLine): when option -I is encountered add directory to
3125         userIncDirsSet too,
3126         * src/version.awk: added space between control and long,
3127         * src/pic16/NOTES: added some notes for the port,
3128         * src/pic16/gen.c: added prototype for mov2fp function,
3129         * (fReturnpic16[]): properly named return value registers,
3130         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3131         * (aopForSym): added code to handle symbols with onStack flag set,
3132         symbols onStack are allocated PTRSIZE bytes,
3133         * (aopFreeAsmop): handles special case where asmops are stack objects,
3134         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3135         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3136         added argument lock to trace flaws in allocating temporary registers
3137         when developing port,
3138         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3139         * (pic16_popRegFromString): reenabled allocating a direct register
3140         from string,
3141         * (assignResultValue): various beautifications,
3142         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3143         referenced function argument,
3144         * (genIpush): reenabled to allow stacked arguments, handles only
3145         ic->parmPush iCodes,
3146         * (genCall, genPcall): major changes to allow for variable argument
3147         functions, fixed a bug with falsely restoring stack pointer after
3148         returning from call,
3149         * (genFunction): pending code for critical function,
3150         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3151         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3152         * (genNearPointerGet): fixed bug with indirect reading, was always
3153         reading from INDF0
3154         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3155         pointers,
3156         * (genAddrOf): rewrote code to take address of a stacked function parameter
3157         * (genCast): fixed casting to generic pointer type,
3158         * src/pic16/gen.h: added AOP_STA,
3159         * (struct asmop): added field stk,
3160         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3161         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3162         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3163         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3164         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3165         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3166         generic pointers,
3167         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3168         and library paths,
3169         * (pic16_port structure): generic pointer size is set to 3,
3170         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3171         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3172         compiler warning,
3173         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3174         operand is an iTemp,
3175
3176 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3177
3178         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3179         * debugger/mcs51/simi.c: addapt new syntax of s51
3180
3181 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3182
3183         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3184         * src/pic16/pcode.c: commented out some calls to free() in order to
3185         fix bug #989576,
3186
3187 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3188
3189         * src/SDCCicode.h,
3190         * src/SDCCicode.c (isiCodeInFunctionCall),
3191         * src/avr/ralloc.c (selectSpil),
3192         * src/pic/ralloc.c (selectSpil),
3193         * src/pic16/ralloc.c (selectSpil),
3194         * src/ds390/ralloc.c (selectSpil),
3195         * src/hc08/ralloc.c (selectSpil),
3196         * src/xa51/ralloc.c (selectSpil),
3197         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3198         stack in the middle of a function call sequence (fixes bug #1020268)
3199         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3200         costs associated with the minimum switch case.
3201
3202 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3203
3204         * src/SDCC.lex: fixed bug #1030549
3205
3206 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3207
3208         * src/SDCCcse.h (struct cseDef),
3209         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
3210         over a function call if the CSE is derived from a symbol whose
3211         address has been taken (fixes bug #1029883)
3212         * support/regression/tests/bug-1029883: a new regression test for
3213         this bug
3214
3215 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3216
3217         * src/hc08/gen.c (emitinline): fixed bug #1029778
3218         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
3219         to a cast object is no longer a syntax error ("fixes" bug #1030006,
3220         and starts toward RFE #905167)
3221
3222 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
3223
3224         * src/pic16/gen.c (mov2f): New function to move an operand to
3225         another without considering if it is a literal or a register,
3226         * (pic16_sameRegs): don't check if they are both AOP_REG,
3227         * (AccRsh): removed andmask=0 lines,
3228         * (genLeftShift): duplicated to be improved in future versions,
3229         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3230         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3231         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3232         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3233         * (insertBankSwitch): fixed inserting banksel directives algorithm
3234         for instructions that follow a skip instruction, this fixes a report
3235         for broken subtraction code generation,
3236         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3237         iCode is a left op, just in case result and right share the same
3238         registers
3239
3240 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3241
3242         * src/hc08/main.c,
3243         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3244         preservation of HX
3245         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3246         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3247         on 2004-09-12; it was buggy
3248
3249 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3250
3251         * src/SDCCsymt.h: removed RESULT_CHECK
3252         * src/SDCCast.c,
3253         * src/SDCCglue.c,
3254         * src/SDCCval.c,
3255         * src/pic/glue.c,
3256         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3257
3258 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3259
3260         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3261         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3262         configuration values no more rejected by compiler, they are assigned
3263         to configuration registers with a warning message instead,
3264         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3265         the for-loop so last conf register is emitted too,
3266         * (_pic16_initPaths): link library libsdcc.lib by default,
3267         * (_hasNativeMulFor): modified test for multiplication according to
3268         Raphael Neider's remarks. Integer multiplication is also done with
3269         support functions,
3270         * device/include/pic16/pic18fregs.h: corrected type error in while
3271         testing and including 18f6720 header file
3272
3273 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3274
3275         * src/pic16/device.h (pic16_options): removed field use_crt,
3276         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3277         until an optimization to handle single bits is added,
3278         * (pic16_loadFSR0): moved before genUnpackBits,
3279         * (genAnd): some white lines removed,
3280         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3281         leave_reset flags in pic16_options when using crt modules,
3282
3283 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3284
3285         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3286           for bugs 898889 & 979599. Also used some safer print instructions.
3287
3288 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3289
3290         * src/pic16/device.h (pic16_options_t): added field use_crt,
3291         crt_name, no_crt,
3292         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3293         catch a probable future bug,
3294         * src/pic16/gen.c: aopIdx function commented out,
3295         * (genAssign): commented out old code which used aopIdx,
3296         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3297         code, added if conditionals to take into account the --use-crt
3298         command line options,
3299         * src/pic16/main.c (pic16_optionsTable): added new command line
3300         options, --use-crt= and --no-crt,
3301         * (_pic16_linkEdit): now the proper crt object is added in the
3302         linker command line except than when --no-crt is specified,
3303         * src/pic16/pcode.c,
3304         * src/pic16/pcode.h: added some structures and functions for a new
3305         optimization scheme to compansate for instruction overhead between
3306         same iCodes, this scheme is currently under development and is not
3307         working in any way,
3308         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3309         to && operator,
3310         * device/lib/pic16/startup/crt0i.c,
3311         * device/lib/pic16/startup/crt0iz.c: added global char variable
3312         __uflags to force the generation of an idata section
3313
3314 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3315
3316         * doc/Makefile,
3317         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3318         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3319
3320 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3321
3322         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3323         Frieder) and clarified the default code optimization mode
3324
3325 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3326
3327         * src/SDCC.lex (doPragma, process_pragma),
3328         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3329         "opt_code_size", and "opt_code_balanced"
3330         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3331         regrouped options by category, added support for category headers
3332         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3333         and "--opt-code-size"
3334         * doc/sdccman.lyx: documented these new options and pragmas
3335         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3336         preference into account
3337
3338 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3339
3340         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3341           geniCodePreDec): Fixed bug 904237 by generating a warning
3342         * src/SDCCerr.h,
3343         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3344
3345 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3346
3347         * src/pic/device.c : When no max ram set validate full memory range.
3348         * src/pic/pcode.c,
3349         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3350
3351 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3352
3353         * device/lib/_gptrget.c,
3354         * device/lib/_gptrput.c: updated comment
3355         * device/lib/calloc.c,
3356         * device/lib/free.c,
3357         * device/lib/malloc.c,
3358         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3359         * src/SDCCcse.c (cseBBlock),
3360         * src/SDCCicode.c (printOperand, geniCodeArray),
3361         * src/SDCCicode.h (struct operand): fixed bug 868103
3362         * support/regression/tests/bug-868103.c: added
3363         * src/SDCCast.c (searchLitOp),
3364         * src/SDCCcse.h (struct cseDef),
3365         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3366         * src/SDCCicode.h (struct operand),
3367         * src/SDCCsymt.h (struct sym_link),
3368         * src/avr/gen.c (hasInc),
3369         * src/ds390/gen.c (hasInc),
3370         * src/hc08/gen.c (genPlusIncr, hasInc),
3371         * src/mcs51/gen.c (hasInc),
3372         * src/pic16/glue.c (pic16_printIvalChar),
3373         * src/pic16/ralloc.c (regWithIdx),
3374         * src/xa51/gen.c (hasInc) : removed warnings
3375         * src/SDCCast.c (createBlock): added comment ???
3376         * src/hc08/ralloc.c: updated comments
3377
3378 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3379
3380         * doc/sdccman.lyx: updated section on switch statements, added
3381         section about semaphore locking
3382         * doc/Makefile: added option -info for latex2html
3383         * device/lib/_gptrget.c,
3384         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3385
3386 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3387
3388         * src/pic/device.h,
3389         * src/pic/device.c,
3390         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3391          maxram is less than 0x100.
3392
3393 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3394
3395         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3396
3397 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3398
3399         * src/port.h,
3400         * src/mcs51/main.c,
3401         * src/ds390/main.c,
3402         * src/z80/main.c,
3403         * src/hc08/main.c,
3404         * src/pic/main.c,
3405         * src/pic16/main.c,
3406         * src/avr/main.c,
3407         * src/xa51/main.c
3408         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3409         a jump table is the best form for a switch statement, including
3410         automatic insertion of missing cases to make the case range
3411         continuous. Developed in collaboration with Frieder Ferlemann.
3412
3413 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3414
3415         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3416         accumulator result if it needs sign extension
3417
3418 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3419
3420         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3421
3422 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3423
3424         * device/lib/gbz80/printf.c,
3425         * device/lib/z80/printf.c: removed define for NULL
3426
3427 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3428
3429         * as/xa51/xa_link.c,
3430         * device/examples/ds390/ow390/ad26.c,
3431         * device/examples/ds390/ow390/cnt1d.c,
3432         * device/examples/ds390/ow390/counter.c,
3433         * device/examples/ds390/ow390/ds2480.h,
3434         * device/examples/ds390/ow390/ds2480ut.c,
3435         * device/examples/ds390/ow390/findtype.c,
3436         * device/examples/ds390/ow390/gethumd.c,
3437         * device/examples/ds390/ow390/owllu.c,
3438         * device/examples/ds390/ow390/ownetu.c,
3439         * device/examples/ds390/ow390/swt12.c,
3440         * device/examples/ds390/ow390/swtloop.c,
3441         * device/examples/ds390/ow390/temp.c,
3442         * device/examples/ds390/ow390/temp10.c,
3443         * device/examples/ds390/ow390/thermo21.c,
3444         * device/examples/ds390/ow390/tinilnk.c,
3445         * device/examples/ds390/ow390/tstfind.c,
3446         * device/examples/serialcomm/windows/serial.cpp,
3447         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3448         * device/include/reg51.h: fixed line endings for cvs
3449
3450 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3451
3452         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3453         packRegsForAccUse, packRegisters): new accumulator register
3454         packing algorithm
3455         * support/regression/ports/hc08/support.c (_putchar): suppress
3456         warning of unused variable
3457         * src/SDCCicode.c: added SWAP entry to codeTable
3458
3459 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3460
3461         * device/lib/sprintf.c: forgot to add this file before previous commit
3462
3463 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3464
3465         * src/pic16/gen.c (genPackBits): added operand right in function
3466         parameters, load result directly if p_type is POINTER (that is
3467         called by genNearPointerSet)
3468         * (genUnPackBits): added operand left in function parameters,
3469         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3470         FSR0 if accessing bitfields,
3471
3472 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3473
3474         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3475           _print_format; updated printf, sprintf, vsprintf
3476         * device/include/asm/default/features.h: corrected comment/define
3477         * device/lib/Makefile.in: added sprintf.c
3478         * device/lib/libsdcc.lib: added sprintf module
3479         * device/lib/printf_large.c,
3480         * device/lib/vprintf.c,
3481         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3482           into these 3 files
3483         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3484         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3485         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3486           hc08 test
3487         * support/regression/tests/zeropad.c: define idata as data for hc08
3488
3489 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3490
3491         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3492         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3493         labels are referenced at least once (even if a reference is not found)
3494         * src/hc08/gen.c (emitcode): set isComment flag for comments
3495         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3496         loads), rules 6a..6b (optimize jumps to return)
3497
3498 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3499
3500         * device/lib/acosf.c (acosf),
3501         * device/lib/asinf.c (asinf),
3502         * device/lib/atanf.c (atanf),
3503         * device/lib/ceilf.c (ceilf),
3504         * device/lib/cosf.c (cosf),
3505         * device/lib/coshf.c (coshf),
3506         * device/lib/cotf.c (cotf),
3507         * device/lib/fabsf.c (fabsf),
3508         * device/lib/floorf.c (floorf),
3509         * device/lib/log10f.c (log10f),
3510         * device/lib/logf.c (logf),
3511         * device/lib/sinf.c (sinf),
3512         * device/lib/sinhf.c (sinhf),
3513         * device/lib/sqrtf.c (sqrtf),
3514         * device/lib/tanf.c (tanf),
3515         * device/lib/tanhf.c (tanhf),
3516         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3517         replaced all instances of "reentrant" in the library functions
3518         defined in math.h with this macro.
3519         * support/regression/tests/float_trans.c: reenabled test for hc08
3520
3521 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3522
3523         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3524         erroneously deleted
3525
3526 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3527
3528         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3529         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3530         multi-byte volatile operands are used
3531         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3532         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3533         initialization to area GSINIT0 so that it would always precede
3534         any static initializers in GSINIT
3535         * support/regression/tests/zeropad.c: fixed idata define for hc08
3536         * support/regression/tests/bug-927659.c,
3537         * support/regression/tests/float_trans.c: disabled tests for hc08
3538         pending missing library routines
3539         * .version: increased version number to 2.4.4 - hc08 port now passes
3540         regression tests
3541
3542
3543 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3544
3545         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3546         * Makefile.common.in,
3547         * as/Makefile,
3548         * as/hc08/Makefile.in,
3549         * as/mcs51/Makefile.in,
3550         * as/z80/Makefile.in,
3551         * debugger/mcs51/Makefile.in,
3552         * device/include/Makefile.in,
3553         * device/lib/Makefile.in,
3554         * doc/Makefile,
3555         * link/Makefile,
3556         * link/z80/Makefile.in,
3557         * packihx/Makefile.in,
3558         * sim/ucsim/main_in.mk,
3559         * sim/ucsim/avr.src/Makefile.in,
3560         * sim/ucsim/doc/Makefile.in,
3561         * sim/ucsim/gui.src/serio.src/Makefile.in,
3562         * sim/ucsim/hc08.src/Makefile.in,
3563         * sim/ucsim/s51.src/Makefile.in,
3564         * sim/ucsim/xa.src/Makefile.in,
3565         * sim/ucsim/z80.src/Makefile.in,
3566         * src/Makefile.in,
3567         * support/cpp2/Makefile.in,
3568         * support/librarian/Makefile,
3569         * support/makebin/Makefile: added DESTDIR to the install path proposed
3570         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3571         * doc/sdccman.lyx: added DESTDIR documentation
3572
3573 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3574
3575         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3576         instruction for interrupt handlers, use fast returns when returning
3577         from high priority interrupts
3578
3579 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3580
3581         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3582         code generation
3583         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3584         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3585         bugs, ported much of Bernhard's code from mcs51
3586         * src/mcs51/gen.c (genSend),
3587         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3588         than one when calling a reentrant function
3589         * device/lib/_mullong.c: defined an alternate struct layout for big
3590         endian ports (hc08)
3591
3592 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3593
3594         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3595         test
3596
3597 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3598
3599         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3600         are sane and complete before asking the port its prefered parameter
3601         passing method (fixes bug #1017633)
3602         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3603         and _ret3
3604
3605 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3606
3607         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3608         problem in bitfields >= 8 bits.
3609
3610 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3611
3612         * src/SDCCsymt.c: undid changes that were not meant to be committed
3613
3614 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3615
3616         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3617
3618 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3619
3620         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3621           copied and wrong bit got inverted
3622
3623 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3624
3625         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3626         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3627         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3628         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3629         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3630         assignments to bitfields at known addresses
3631         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3632         reads from bitfields at known addresses
3633         * src/hc08/ralloc.c (packRegisters),
3634         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3635         genhc08Code): optimize pointer get values used as conditionals
3636         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3637         and branch
3638
3639 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3640
3641         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3642         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3643         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3644         as conditionals
3645
3646 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3647
3648         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3649
3650 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3651
3652         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3653         related problems
3654
3655 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3656
3657         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3658
3659 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3660
3661         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3662         mcs51 port
3663
3664 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3665
3666         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3667
3668 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3669
3670         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3671         cases use more compact code.
3672
3673 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3674
3675         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3676
3677 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3678
3679         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3680
3681 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3682
3683         * src/SDCCsymt.h,
3684         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3685         parameter of changePointer() from symbol* to sym_link*
3686         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3687         * src/SDCCsymt.c (compareType): void* type is castable to other
3688         pointers, but not necesarily an exact match.
3689         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3690         is no longer blindly treated as an exact match.
3691         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3692
3693 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3694
3695         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3696
3697 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3698
3699         * src/pic/gen.c,
3700         * src/pic/pcode.c,
3701         * src/pic/ralloc.h,
3702         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3703
3704 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3705
3706         * src/pic/device.c,
3707         * src/pic/device.h,
3708         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3709
3710 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3711
3712         * src/mcs51/gen.c (emitcode): fixed bug #992819
3713
3714 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3715
3716         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3717           there's no need to make it worse
3718
3719 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3720
3721         * src/mcs51/ralloc.c (deassignLR),
3722         * src/ds390/ralloc.c (deassignLR),
3723         * src/hc08/ralloc.c (deassignLR),
3724         * src/z80/ralloc.c (deassignLR),
3725         * src/pic/ralloc.c (deassignLR),
3726         * src/pic16/ralloc.c (deassignLR),
3727         * src/avr/ralloc.c (deassignLR),
3728         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3729         rlivePoint): fixed another part of bug #971834
3730
3731 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3732
3733         * src/z80/main.c: enabled "critical" keyword
3734         * src/z80/mappings.i,
3735         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3736         functions (fixes bug #979646)
3737         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3738
3739 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3740
3741         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3742           such as c:\mydir.
3743
3744 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3745
3746         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3747           doesn't disable too much optimizations
3748
3749 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3750
3751         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3752
3753 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3754
3755         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3756
3757 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3758
3759         * src/pic/gen.c tidied up tabs
3760         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3761         * src/pic/main.c tidied up tabs
3762         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3763         * src/pic/pcoderegs.c tidied up tabs
3764         * src/pic/ralloc.c tidied up tabs
3765
3766 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3767
3768         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3769         to S_FIXED for pic16 port and when symbol is not in level 0,
3770         allocate for S_REGISTER storage class and pic16 port, too,
3771         * src/pic16/device.h: prototype for checkSym,
3772         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3773         * (pic16_assignConfigWordValue): test the value and the mask to
3774         validate that the value is suitable for the configuration word,
3775         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3776         collect extern declared symbols, don't emit symbol twice, check
3777         first if symbol is in publics set first,
3778         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3779         * added command line '--fstack' which enables an experimental
3780         feature for stack access, too buggy to be used yet...
3781         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3782         * (pic16_allocDirReg): when register has storage class S_REGISTER
3783         allocate in pic16_dynAccessRegs,
3784         * device/include/pic16/pic18f????.h: modified configuration word
3785         naming convention, words started as CONFIG0H but should be CONFIG1H
3786
3787 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3788
3789         * device/include/mcs51reg.h: fixed bug 970993
3790
3791 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3792
3793         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3794         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3795         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3796         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3797         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3798         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3799           error/warning numbers,
3800           added function setWarningDisabled()
3801         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3802         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3803           _memcmp.c _memmove.c calloc.c realloc.c free.c
3804         * support/regression/tests/malloc.c: added tests for new functionality
3805         * support/regression/tests/zeropad.c: added tests for truncated initializers
3806           and initialized char arrays starting with '\x0'
3807         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3808
3809 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3810
3811         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3812
3813 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3814
3815         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3816         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3817         peephole 177.e. Thanks to anonymous
3818
3819 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3820
3821         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3822         function isn't used in the source but referenced as a
3823         variable initializer then declare it as extern in .asm file
3824
3825 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3826
3827         * .version: increased version number to 2.4.3
3828
3829         Adding version extension according to ChangeLog CVS revision
3830         * src/Makefile.in (target all): added dependency 'version.h'
3831         * (rule version.h): added rule to create version.h from ChangeLog,
3832         * (rule dep): added dependency version.h,
3833         * src/version.awk: AWK script to create version.h
3834         * src/SDCCdwarf2.c (dwWriteModule),
3835         * src/SDCCglue.c (initialComments),
3836         * src/SDCCmain.c (printVersionInfo): modified to write after
3837         version string the version extension number,
3838         * src/SDCCutil.c: included "version.h"
3839         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3840         number,
3841         * src/SDCCutil.h: added prototype for getBuildNumber
3842
3843         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3844         includeDirsSet, too,
3845         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3846         const char [] is found in function prototype...
3847
3848         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3849         moving to WREG with source is already in WREG,
3850         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3851         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3852         * (aopForSym): stack'ed symbols are partially supported, added
3853         if-clause to support symbols in FARSPACE,
3854         * (sameRegs): added test for AOP_ACC to see if registers are same,
3855         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3856         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3857         * (pic16_popRegFromString): will not allocate a new register if it
3858         doesn't find one by name, bug may have introduced...
3859         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3860         * (genIpush): revived to use pic16 port's stack,
3861         * (genAddrOf): added incomplete case for stack'ed operand,
3862         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3863         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3864         can handle multibyte operands,
3865         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3866         * (pic16initialComments): added message for MPLAB compatibility
3867         mode enabled,
3868         * src/pic16/main.h: prototype for pic16_mplab_comp,
3869         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3870         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3871         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3872         because of increased complexity of procedure,
3873         * (_process_pragma): stack pragma changed to format 'stack pos len',
3874         emit symbol '_stack_end' to conform with gplink,
3875         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3876         to search for register,
3877         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3878         PO_GPR_REGISTER,
3879         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3880         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3881         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3882         case for PO_GPR_REGISTER,
3883         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3884         dies, the new era is ahead !...
3885         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3886         pic16_dynInternalRegs,
3887         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3888         * (pic16_allocDirReg): minor optimizations and bug fixes,
3889         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3890
3891         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3892         load stack and frame pointer with address of 'stack_end' symbol
3893
3894 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3895
3896         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3897         without source code but only variable initializers
3898
3899 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3900
3901         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3902         external are not declared as extern to reduce overhead while linking
3903
3904 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3905
3906         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3907
3908 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3909
3910         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3911           Yee Keat for the patch
3912         * src/SDCCast.c (decorateType): fixed bug #979599
3913         * src/ds390/gen.h: removed local fReturnSizeDS390
3914         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3915         * src/ds390/gen.c (genAnd, genOr, genXor),
3916         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3917
3918 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3919
3920         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3921         add relFilesSet to $3, manipulate $2 to handle linking of object
3922         files without source files in command line,
3923         * device/include/pic16 (all headers): added ID location macros,
3924         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3925         entries for ID location bytes,
3926         * (pic16_assignIdByteValue): NEW,
3927         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3928         added field dumpcalltree to pic16_options_t,
3929         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3930         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3931         emitting rFalseIfx label after check_carry label,
3932         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3933         pic16_emitDIRegs), NEW
3934         * (pic16glue): dump .calltree file when option --calltree found,
3935         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3936         * (_pic16_genAssemblerPreamble): emit ID locations after
3937         configuration registers,
3938         * (pic16_linkCmd): modifications of the link command,
3939         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3940         * (pic16_pCodeInitRegisters): don't init stack registers,
3941         * (pic16_findPrevInstruction): fixed bug,
3942         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3943         bug with immediate registers,
3944         * (buildCallTree): traces stack push and pop,
3945         * (pct2): dump also stack usage for each function,
3946         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3947         * (pic16_allocDirReg): various modifications,
3948         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3949         fixed to 1,
3950
3951 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3952
3953         * src/pic16/pcode.c: removed buggy double colon
3954
3955 2004-07-01 Borut Razem <borut.razem AT siol.net>
3956
3957         * support/scripts/sdcc.nsi: added include/pic16 to setup
3958
3959 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3960
3961         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3962         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3963         target 'clean',
3964         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3965         specific command line arguments. Also added sample lkr script
3966         for placing a variable at a specific memory bank.
3967         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3968         at a specific memory bank,
3969         * (pic16_dump_isection): fixed bug which caused string literals to
3970         be omitted when dumping idata section,
3971         * (pic16_groupRegistersInSection): added code to handle registers
3972         in specific memory banks,
3973         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3974         public, all references are renamed too,
3975         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3976         AOP_DPTR2,
3977         * (pic16_storeForReturn): added case to handle when dest is WREG,
3978         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3979         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3980         pic16_rel_udata, check to see if that register is marked as being
3981         a member of a specific memory bank,
3982         * (pic16_printIvalCharPtr): added code to add string literals either
3983         to code or the idata sections,
3984         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3985         also accept the 'udata' pragma,
3986         * src/pic16/main.h: new structure types sectName and sectSym
3987         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3988         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3989         * (pic16_findPrevInstruction): fixed, it returned nothing,
3990         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3991         instruction combinations,
3992         * (pic16_FixRegisterBanking): heavily reorganised,
3993         * (pic16_AnalyzeBanking): if generating banksel directives is
3994         disabled, then don't call FixRegisterBanking at all,
3995         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3996         completely removed,
3997         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3998
3999 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4000
4001         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4002         Phuah Yee Keat <yk.phuah AT nestac.com>
4003
4004 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4005
4006         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4007         correctly the IVT even if it is relocated to some other location
4008
4009 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4010
4011         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4012         * device/include/pic16/pic18f2220.h: NEW,
4013         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4014         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4015         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4016         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4017         nodefaultlibs, ivt_loc is the location of the interrupt vector
4018         table, and nodefaultlibs signs that default libraries should not be
4019         linked in link stage,
4020         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4021         according to --ivt-loc argument,
4022         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4023         when pragma stack is found,
4024
4025 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4026
4027         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4028         256 (range check), 257 (do while), 258.a-f (bit banging
4029         f.e. on 3-wire SPI bus)
4030
4031 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4032
4033         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4034         variables used exclusively within a loop
4035
4036 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4037
4038         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4039
4040 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4041
4042         * src/SDCClrange.c (computeClash): fixed bug #971834
4043
4044 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4045
4046         * src/mcs51/gen.c (genCmp): fixed bug #975903
4047         * src/hc08/gen.c (operandsEqu),
4048         * src/ds390/gen.c (operandsEqu),
4049         * src/z80/gen.c (operandsEqu),
4050         * src/pic/gen.c (operandsEqu),
4051         * src/pic16/gen.c (operandsEqu),
4052         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4053         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4054
4055 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4056
4057         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4058
4059 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4060
4061         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4062         default case in switch statement,
4063         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4064         to eliminate problem with initialisation of pointers, but problem
4065         still exists,
4066         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4067         * (emitStaticSegment): removed various lines emitting debug info,
4068         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4069         added processor registers for utilizing EEPROM,
4070         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4071         configurable and set 8
4072
4073 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4074
4075         * .version: increased version number to 2.4.2,
4076
4077         Cumulative patch for pic16 port
4078         * src/pic16/device.c: changed scheme to dump initial values for
4079         variables in idata segment, all print_idata* functions were removed,
4080         now the pic16_printIval* will be called,
4081         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4082         * _pic16_printPointerType, pic16_printPointerType,
4083         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4084         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4085         NEW, similar to the respective functions in SDCCglue.c,
4086         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4087         way, emitting hex bytes,
4088         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4089
4090 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4091
4092         * src/avr/ralloc.c (serialRegAssign),
4093         * src/xa51/ralloc.c (serialRegAssign),
4094         * src/pic/ralloc.c (serialRegAssign),
4095         * src/pic16/ralloc.c (serialRegAssign),
4096         * src/hc08/ralloc.c (serialRegAssign),
4097         * src/z80/ralloc.c (serialRegAssign),
4098         * src/ds390/ralloc.c (serialRegAssign),
4099         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4100
4101 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4102
4103         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4104         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4105
4106 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4107
4108         Cumulative patch for pic16 port:
4109         * src/pic16/device.h (typedef PIC16_device) modified fields for
4110         defining microcontrollers,
4111         * src/pic16/device.c: added new info for all devices in Pics16 array,
4112         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4113         to be optimised out by the pCode optimiser,
4114         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4115         specially, bug reported by G.M. Gallant,
4116         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4117         as force'd so that cannot be optimised out by pCode optimiser,
4118         * src/pic16/pcode.c,
4119         * src/pic16/pcodepeeph.c,
4120         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4121         they are disabled by default, but can be enabled explicit with
4122         command argument --denable-peeps, for testing,
4123         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4124         --pomit-ivt in COMPILE_FLAGS
4125
4126 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4127
4128         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4129           compilation on MSVC
4130
4131 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4132
4133         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4134
4135 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4136
4137         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4138         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4139
4140 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4141
4142         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4143         would only assign 0x300001 register.
4144
4145 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4146
4147         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4148         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4149
4150 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4151
4152         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4153         for ds80c400
4154         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4155         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4156         added peephole 254 (left shift), 255 (jump table)
4157
4158 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4159
4160         * device/lib/Makefile.in: removed comment line with model-pic16,
4161         * (target port-specific-objects-pic16): the libraries and objects
4162         are copied to the build directory form the device/lib/pic16/bin
4163         directory
4164
4165         Cumulative patch concerning pic16 port:
4166         * library directory has been re-organized,
4167         * added support for PIC18F1220,
4168         * added headers and library sources for chips 18f1220,18f6520,
4169         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4170
4171         * configuration registers setting has changed, now each supported
4172         device has a complete description of the registers it uses,
4173         * all initialisations are moved to idata sections, these section
4174         can be absolute or relocatable,
4175         * fixed initialisation of codespace variables,
4176         * fixed warning about PCLATU and gpsim,
4177         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4178         * (genAssign): use table reads when assigning from variables in codespace,
4179         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4180         char/int variables placed in codespace,
4181         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4182         registers set in .asm file, no need for --pomit-config-words anymore,
4183         * (pic16glue): some 8051 legacy segments are commented out
4184         (to be removed completely),
4185         * added support for alternative assembler and linker with --asm=
4186         and --link= command line arguments,
4187         * peepholes are disabled automatically in the port, no need to
4188         specify on command line,
4189         * port supports natively char/int/long multiplication, but converts
4190         all divisions to support functions,
4191         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4192         to the file set in variable $2,
4193         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4194         strings in ASCII format and not in hex,
4195         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4196         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4197         allocate proper register if iCodes aren't temporary,
4198
4199 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4200
4201         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4202
4203 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4204
4205         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4206         is commented out
4207
4208 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4209
4210         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
4211         computed address is reused
4212         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
4213         multi-byte bitfields
4214
4215 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4216
4217         * src/z80/gen.c: (genArrayInit): must check for pointers too
4218
4219 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
4220
4221         * support/regression/tests/zeropad.c: never meant to commit the
4222           nestedstruct test: removed, added check for GCC version
4223
4224 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
4225
4226         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4227         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4228         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4229           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4230           bugs 928906 and 954082 half-empty initializers
4231         * src/SDCCsymt.h,
4232         * src/SDCCsymt.c (getAllocSize): added for above fix
4233         * src/z80/gen.c (genArrayInit): fixed bug 741044
4234         * support/regression/tests/zeropad.c: added tests
4235
4236 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4237
4238         * src/pic16/device.c (pic16_dump_section): corrected bug which
4239         caused some symbols of the libraries to be misplaced
4240
4241 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4242
4243         * src/pic16/glue.c,
4244         * src/pic16/ralloc.h,
4245         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4246         to fix conflict with pic port
4247
4248 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4249
4250         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4251         externs configuration variables,
4252         * src/pic16/ralloc.h,
4253         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4254         prototype in header, commented out some debug messages
4255
4256 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4257
4258         * src/pic16/glue.c,
4259         * src/pic16/main.c,
4260         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4261         for gpasm COFF object generation. Thanks to D. Hawkins for
4262         his patch info
4263
4264 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4265
4266         * src/ds390/main.c,
4267         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4268         Brock for spotting this)
4269         * src/ds390/gen.c (genEndFunction),
4270         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4271         interrupt handler and critical. Disable push/pop optimizations when
4272         peephole optimizations disabled.
4273
4274 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4275
4276         Updated pic16 library sources and headers.
4277         * device/lib/pic16/pic18f*/ ,
4278         * device/include/pic16/*.h: modified to handle structured SFR
4279         definitions
4280
4281 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4282
4283         * src/port.h (PORT structure): added hook initPaths, now each
4284         port can declare its own default search paths,
4285         which can been seen with the --print-search-dirs option,
4286         see pic16 port for example,
4287         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4288         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4289         * (doPrintSearchDirs): NEW, replaces in a central manner the
4290         printing of search dirs which was split in set*Paths functions,
4291         * (main): added call to port->initPaths and doPrintSearchDirs,
4292         * src/avr/main.c,
4293         * src/ds390/main.c,
4294         * src/hc08/main.c,
4295         * src/izt/i186.c,
4296         * src/izt/tlcs900h.c,
4297         * src/mcs51/main.c,
4298         * src/pic/main.c,
4299         * src/pic16/main.c: modified port structures to reflect addition of
4300         initPaths hook,
4301
4302         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4303         * (pic16_dump_section): for registers in same address reserve memory once,
4304         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4305         to no_banksel,
4306         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4307         result is greater in size than right or left,
4308         * (pic16_genUMult8X8_8): there are some cases where the result can
4309         be 16 bits size, so handle these,
4310         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4311         * (pic16_outBitC): modified to emit pcodes,
4312         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4313         or not,
4314         * (genDivOneByte): implemented algorithm to divide 8-bits,
4315         * (genCmp): uncommented goto, but issues still exist,
4316         * (genAnd): fixed a bug with variables >8bits,
4317         * (genPackBits): optimization added that uses BCF/BSF to change a
4318         single bit,
4319         * (genAssign): fixed bug when assigning floating point literals,
4320         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4321         __sdcc_gsinit_startup label,
4322         * src/pic16/main.c (_pic16_init): removed search directory
4323         initialisations,
4324         * (_pic16_initPaths): NEW, used to initialise search directories,
4325         * (_hasNativeMulFor): support functions for all except char/int
4326         multiplication, and char division,
4327         * (PIC16_port struct): modified entry for native mul support,
4328         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4329         no_banksel option,
4330         * (buildCallTree): call to register_usage is ifdef'ed out,
4331
4332 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4333
4334         * device/include/string.h: applied Stas Sergeev's patch to make this
4335         header file compatible with the preprocessor -Wundef option
4336         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4337         failure (fixes bug #941458)
4338
4339 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4340
4341         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4342         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4343         that the variable, not the function, should be static
4344         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4345         to be consistent with non-literal case
4346
4347 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4348
4349         * src/SDCCast.c (isConformingBody): fixed bug #949967
4350         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4351         convilong): fixed bug #952086
4352
4353 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4354
4355         * src/SDCCmem.c (allocVariables): fixed bug #955321
4356
4357 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4358
4359         * src/hc08/main.c (_hc08_genAssemblerEnd),
4360         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4361         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4362         completely eliminated the use of a temporary file
4363         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4364         when more than one file linked
4365         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4366
4367 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4368
4369         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4370         which fixes bug #543481
4371         * support/regression/tests/bug-751703.c: fixed comments left from a
4372         cut and paste error
4373         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4374         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4375         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4376         scopes
4377         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4378         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4379         are now changed to underscores in moduleName
4380
4381 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4382
4383         * as/mcs51/lkmem.c: better fix for bug #954173
4384
4385 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4386         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4387
4388         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4389         * device/include/c8051f000.h,
4390         * device/include/c8051f120.h,
4391         * device/include/c8051f300.h,
4392         * device/include/c8051f310.h,
4393         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4394         PWM16) and detab'ed
4395
4396 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4397
4398         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4399         and mailing lists, doc'ed --no-peep-comments, removed reference
4400         to knoppix (newest version has no LyX/LaTeX), other minor changes
4401         * src/SDCCglue.c (glue): save 2 bytes stack space with
4402         option --main-return. The ljmp could probably be avoided too
4403
4404 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4405
4406         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4407
4408 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4409
4410         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4411         * src/SDCCopt.c (isLocalWithoutDef),
4412         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4413         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4414         (credit to Maarten Brock for patch #949363, on which this is based)
4415         * support/regression/tests/bug-751703.c: some test cases of extern used
4416         within inner scopes.
4417
4418 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4419
4420         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4421         SPEC_STRUCT
4422         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4423         struct definitions
4424         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4425         dwWriteLabel): fix to create valid debugger symbols even when
4426         the module name has non-alphanumeric symbols in it
4427         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4428         when a variable's allocation has been optimized away
4429
4430
4431 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4432
4433         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4434         * src/hc08/main.c,
4435         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4436         * src/mcs51/main.c,
4437         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4438         * src/ds390/main.c,
4439         * src/z80/gen.c (z80_emitDebuggerSymbol),
4440         * src/z80/main.c,
4441         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4442         * src/pic/main.c,
4443         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4444         * src/pic16/main.c,
4445         * src/avr/gen.c (avr_emitDebuggerSymbol),
4446         * src/avr/main.c,
4447         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4448         * src/xa51/main.c,
4449         * src/SDCCdebug.c (emitDebuggerSymbol),
4450         * src/SDCCdebug.h,
4451         * src/port.h: added a debugger struct to the port struct. Added a
4452         callback for defining debugger symbols
4453
4454         * src/SDCCast.c (createLabel),
4455         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4456         with isitmp = 1
4457         * src/SDCCicode.h,
4458         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4459         iCode back to the ast for the function
4460
4461         * src/hc08/ralloc.c (hc08_assignRegisters),
4462         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4463         unneeded fields from the regs struct.
4464         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4465         pushReg() & pullReg() functions instead of emitcode()
4466
4467         * src/hc08/gen.c (genLabel, genhc08Code),
4468         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4469
4470         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4471         debugger hooks
4472
4473         * src/hc08/gen.c (genEndFunction, genhc08Code),
4474         * src/hc08/gen.h,
4475         * src/mcs51/gen.c (genEndFunction, gen51Code),
4476         * src/mcs51/gen.h,
4477         * src/ds390/gen.c (genEndFunction, gen390Code),
4478         * src/ds390/gen.h,
4479         * src/z80/gen.c (genEndFunction, genZ80Code),
4480         * src/z80/gen.h,
4481         * src/z80/z80.h,
4482         * src/pic/gen.c (genEndFunction, genpic14Code),
4483         * src/pic/gen.h,
4484         * src/pic16/gen.c (genEndFunction, genpic16Code),
4485         * src/pic16/gen.h,
4486         * src/avr/gen.c (genEndFunction, genAVRCode),
4487         * src/avr/gen.h,
4488         * src/xa51/gen.c (genEndFunction, genXA51Code),
4489         * src/xa51/gen.h,
4490         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4491         specific code to cdbFile.c and out of the backend code generators
4492
4493         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4494         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4495         starting address is now 0
4496
4497         * as/hc08/asm.h,
4498         * as/hc08/m08pst.c,
4499         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4500         assembler directive for DWARF support
4501         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4502
4503         * src/src.dsp,
4504         * src/Makefile.in,
4505         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4506
4507 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4508
4509         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4510         and inappropriate peephole optimization in jump tables
4511
4512 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4513
4514         * as/hc08/m08pst.c,
4515         * src/SDCCglue.c: sdccopt works for the hc08 port now
4516
4517 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4518
4519         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4520
4521 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4522
4523         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4524
4525 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4526
4527         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4528         rules
4529         * src/SDCCmain.c,
4530         * src/SDCCglobl.h,
4531         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4532         comments from the peephole optimizer replacement rules
4533         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4534         symbols
4535         * src/SDCCcse.c (updateSpillLocation),
4536         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4537         equivalents
4538         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4539         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4540         objects far pointers
4541
4542 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4543
4544         * src/SDCCsymt.h: a missing part of my last change
4545         * src/pic/ralloc.c (regTypeNum),
4546         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4547
4548 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4549
4550         * src/SDCCicode.h,
4551         * src/SDCCicode.c (aggrToPtrDclType),
4552         * src/SDCCptropt.h,
4553         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4554         ptrPseudoSymConvert),
4555         * src/pic/ralloc.c (regTypeNum),
4556         * src/pic16/ralloc.c (regTypeNum),
4557         * src/hc08/ralloc.c (regTypeNum),
4558         * src/ds390/ralloc.c (regTypeNum),
4559         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4560         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4561
4562 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4563
4564         * link/z80/lkmain.c (afile),
4565         * as/hc08/lkmain.c (afile),
4566         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4567         prevent a pointer problem when a filename has no directory and
4568         no extension specified.
4569
4570 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4571
4572         * link/z80/lkmain.c (afile): allow periods in directory names
4573         * link/z80/lkmain.c (afile),
4574         * as/mcs51/lkmain.c (afile),
4575         * as/hc08/lkmain.c (afile): allow linker script file to have an
4576         extension other than ".lnk"
4577         * link/z80/lklex.c (getfid),
4578         * link/z80/lkmain.c (parse),
4579         * as/mcs51/lklex.c (getfid),
4580         * as/mcs51/lkmain.c (parse),
4581         * as/hc08/lklex.c (getfid),
4582         * as/hc08/lkmain.c (parse): Support comments in the linker script
4583         file on lines by themselves and after filenames
4584
4585 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4586
4587         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4588
4589 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4590
4591         * src/z80/peeph-z80.def: removed some peephole rules that don't
4592         work with multibyte arithmetic (fixed bug #937126)
4593         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4594         to registers and not global variables
4595         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4596         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4597         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4598         checking for assignments not internally generated (fixed bug #931895)
4599         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4600         structure member (fixed bug #930072)
4601
4602 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4603
4604         * src/SDCCmain.c (linkEdit),
4605         * src/hc08/main.c (_hc08_parseOptions),
4606         * as/hc08/Makefile.in,
4607         * as/hc08/aslink.h,
4608         * as/hc08/asm.h,
4609         * as/hc08/m08pst.c,
4610         * as/hc08/lkrloc.c (relr, rele),
4611         * as/hc08/lkarea.c (lnkarea)
4612         * as/hc08/lkmain.c (afile, parse),
4613         * as/hc08/lkelf.c: support for ELF output
4614         * as/hc08/lks19.c (s19),
4615         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4616
4617 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4618
4619         * as/mcs51/lkihx.c: Fixed bug #899105.
4620
4621 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4622
4623         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4624         .dsp files from Unix to DOS.
4625
4626 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4627
4628         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4629         function pointers; we have been compliant for several months now.
4630         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4631         change that was accidently commented out
4632         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4633         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4634         bug #922319
4635
4636 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4637
4638         * src/hc08/gen.c: output of all of the internal debugging information
4639         is now controlled by the D() macro; it is disabled by default
4640
4641 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4642
4643         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4644         harder to keep the same registers during a CAST iCode
4645         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4646         long via int can be done in a single cast, if the signedness is
4647         correct.
4648         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4649         putchar() in tinibios.c in ds390's library
4650
4651 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4652
4653         * src/SDCCast.c (decorateType): fixed bug #898889,
4654         cast result of a literal complement too
4655         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4656         fixed check for bitfields
4657
4658 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4659
4660         * src/SDCCicode.c (geniCodeLogic): made it static,
4661         (geniCodeLogicAndOr): added in order to fix bug #905492,
4662         (ast2iCode): fixed bug #905492
4663         * support/regression/tests/bug-905492.c: added
4664         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4665         (processParms): fixed bug #927659: don't copy parms, this will clear
4666         decorated flag
4667         * support/regression/tests/bug-927659.c: added
4668
4669 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4670
4671         * src/SDCCast.c (addCast): don't cast float to char
4672         * device/lib/libsdcc.lib: added _memmove
4673
4674 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4675
4676         * device/lib/large/Makefile: fixed parallel execution by
4677         replacing `make` by `$(MAKE)`
4678
4679 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4680
4681         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4682         offsets (fixes bug #923936)
4683
4684 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4685
4686         * device/lib/small/Makefile: fixed parallel execution by
4687         replacing `make` by `$(MAKE)`
4688
4689 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4690
4691         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4692
4693 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4694
4695         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4696         * src/regression/Makefile: Regression test was not running.
4697
4698 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4699
4700         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4701         complement if possible
4702         * src/SDCCval.c (valComplement),
4703         * src/SDCCicode.c (operandOperation): fixed complement of literal
4704         * support/regression/tests/onebyte.c (testComplement): added
4705
4706 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4707
4708         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4709         return an optimized tree; actually replace actParm with the new tree
4710         * src/SDCCast.h: added some parantheses to remove side effects
4711         * support/regression/tests/bug-920866.c
4712
4713 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4714         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4715         Bit operands were not being handled properly in the pic14 port.
4716         (now src/regression/add.c passes again).
4717
4718 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4719
4720         * src/SDCC.y (labeled_statement): case and default no longer require
4721         a following statement (RFE #893037)
4722
4723 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4724
4725         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4726         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4727         disabled (fixes bug #916294)
4728         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4729         "mov a,acc"; patch provided by Lenny Story
4730         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4731
4732 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4733
4734         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4735         functions
4736         * src/ds390/gen.c (genFunction, genEndFunction),
4737         * src/ds390/ralloc.c (ds390_assignRegisters),
4738         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4739         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4740         pushed if there are parameters passed on the stack. Also, a cleaner
4741         way to decide if r0/r1 should be pushed/popped. (Together they fix
4742         bug #918693)
4743
4744 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4745
4746         * doc/sdccman.lyx,
4747         * device/lib/mcs51/crtpagesfr.asm,
4748         * device/lib/mcs51/crtxinit.asm,
4749         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4750         to avoid confusion with Si Lab's SFRPAGE register.
4751
4752 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4753
4754         * src/SDCCglue.c (emitMaps): allow public sfr variables
4755         * src/SDCCglue.c (initialComments): include compiler build date
4756         with compiler version and put the timestamp of the generated
4757         assembly file on a serperate line to be less confusing.
4758         * src/port.h: added genInitStartup hook
4759         * src/avr/main.c,
4760         * src/ds390/main.c,
4761         * src/hc08/main.c,
4762         * src/pic/main.c,
4763         * src/pic16/main.c,
4764         * src/xa51/main.c,
4765         * src/z80/main.c: genInitStartup initialize as NULL (default to
4766         historical behaviour)
4767         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4768         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4769         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4770         library instead of hard coding it into the compiler.
4771         * support/regression/ports/mcs51-stack-auto/spec.mk,
4772         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4773         * device/lib/mcs51/Makefile,
4774         * device/lib/small/Makefile,
4775         * device/lib/large/Makefile,
4776         * device/lib/mcs51/crtpagesfr.asm,
4777         * device/lib/mcs51/crtstart.asm,
4778         * device/lib/mcs51/crtxclear.asm,
4779         * device/lib/mcs51/crtxinit.asm,
4780         * device/lib/mcs51/crtclear.asm,
4781         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4782         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4783         and into user configurable files.
4784         * device/lib/clean.mk: clean mcs51 directory too
4785         * support/regression/tests/longlit.c: added static to T1 declaration
4786         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4787         accesses in the initialization code
4788
4789 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4790
4791         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4792         OSCTRIMVAL as noted in bug #916008
4793
4794 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4795
4796         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4797         in loops with multiple exits (reported as incorrect registers
4798         used by Martin Helmling in Sdcc-user list)
4799
4800 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4801
4802         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4803         made ds390 register extensions look less like error messages
4804
4805 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4806
4807         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4808         reported by Adam Wozniak in Sdcc-user list
4809
4810 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4811
4812         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4813         arithmetic optimizations, added debug output
4814
4815 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4816
4817         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4818         * sdcc.spec: updated and split sdcc into 3 rpms
4819         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4820         needed for literals of LEFT_OP and '+'
4821         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4822         introduced RESULT_TYPE_NOPROM
4823         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4824         left shift
4825         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4826         limited promotion to int only for '*'
4827         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4828
4829 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4830
4831         * src/pic16/gen.c (genSkip),
4832         (genc16bit2lit), (gencjneshort): commented out
4833         (is_LitOp): new helper function, checks operand type
4834         (genCmpEq): rewritten
4835
4836 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4837
4838         * support/regression/tests/bug-908454.c: added
4839
4840 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4841
4842         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4843         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4844         (geniCodeCast): cosmetic, don't preserve bit storage class
4845         (geniCodeLeftShift): added promotion
4846         (geniCodeLogic): fixed regression
4847         * src/SDCCsymt.c (computeTypeOr): accept bits too
4848         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4849
4850 2004-03-07  Borut Razem <borut.razem AT siol.net>
4851
4852         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4853
4854 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4855
4856         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4857         version of pic16_genPackRegisters which does not check if ic is a
4858         CAST operator,
4859         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4860         function cause string1.c regression test fails
4861
4862 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4863
4864         * sim/ucsim/configure.in,
4865         * sim/ucsim/configure,
4866         * sim/ucsim/doc/Makefile.in: use docdir
4867         * src/SDCC.y: fixed sbit atrributes
4868         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4869         * src/SDCCast.c (decorateType): |^& need special promotion handling
4870         * src/SDCCast.h,
4871         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4872         * src/SDCCsymt.h (computeType),
4873         * src/SDCCicode.c: computeType() needs op
4874         * src/SDCCsymt.c (checkTypeSanity),
4875         * doc/sddman.lyx: "plain" bitfields are unsigned
4876         * src/SDCCsymt.c (computeTypeOr): added
4877         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4878         |^& ops
4879         * src/SDCCval.c (val*): computeType() needs op
4880         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4881         * support/regression/tests/onebyte.c: added tests for |^&
4882
4883 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4884
4885         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4886         for writing icode into asm output.
4887
4888 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4889
4890         * src/pic16/device.c: added some debug lines enabled
4891         with macro DEBUG_CHECK,
4892         * src/pic16/genarith.c: more debug in genPlus,
4893         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4894         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4895         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4896         * (aopForSym): onStack symbols are re-placed in data memspace,
4897         and onStack flag is cleared,
4898         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4899         copy temporary pcodeop,
4900         * (genPcall): added warning for not updating PCLATU,
4901         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4902         always true for pic16 port,
4903         * (genMultOneWord): NEW, supports integer multiplication,
4904         * (genMult): modified to call genMultOneWord,
4905         * (ifxForOp): added warning when return NULL,
4906         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4907         flag is set before call to operandFromSymbol for implicit
4908         added structures,
4909         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4910         options.intlong_rent are set by default,
4911         * (_hasNativeMulFor): modified to allow port generation of integer
4912         multiplication,
4913         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4914         set regtype to REG_SFR for all registers, restricting seting the
4915         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4916
4917 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4918
4919         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4920         more than 500 times in the regression tests
4921
4922 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4923
4924         * support/Util/SDCCerr.h,
4925         * support/Util/SDCCerr.c,
4926         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4927         enumerator_list),
4928         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4929         for symbol conflicts.
4930         * support/valdiags/tests/enum.c,
4931         * support/valdiags/tests/tentdecl.c,
4932         * support/valdiags/tests/struct.c: expect possible error messages
4933         referring to original symbol definitions.
4934         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4935         * src/SDCCsymt.h,
4936         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4937
4938 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4939
4940         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4941
4942 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4943
4944         * src/pic16/ralloc.c (newReg): fixed bug #908929
4945
4946 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4947
4948         * src/ds390/gen.c: added missing #include "main.h"
4949
4950 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4951
4952         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4953         checking if symbol is already in set,
4954         * src/pic16/device.h: prototype for checkAddSym,
4955         * src/pic16/gen.c: (_G): added entry interruptvector,
4956         * (assignResultValue): removed some commented out lines,
4957         * (genFunction): check for ISR via sym->type, absolute section for
4958         interrupt code is created via a new pBlock, the goto instruction is
4959         placed now correctly at the interrupt vector position, changed all
4960         references from ivec to _G.interruptvector,
4961         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4962         is the interrupt is a high priority one, same for return from ISR,
4963         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4964         externs to calls of checkAddSym,
4965         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4966         pic16_pcode_verbose flag is set,
4967         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4968         * src/pic16/pcoderegs.c: message about how many registers are saved
4969         will only be emitted if pic16_pcode_verbose flag is set,
4970
4971 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4972
4973         * src/ds390/ralloc.h,
4974         * src/ds390/ralloc.c (ds390_regWithIdx),
4975         * src/ds390/gen.c (emitcode),
4976         * src/ds390/main.h,
4977         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4978         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4979         ds390operandCompare, getRegsRead, getRegsWritten,
4980         initializeAsmLineNode): customized instruction size calculation for
4981         ds390, started basis for some register optimizations
4982         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4983         corresponding assembly output
4984         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4985         missing push/pop of r0/r1. Optimized push/pops
4986
4987 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4988
4989         * src/mcs51/main.c (instructionSize): fixed ACALL size
4990         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4991
4992 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4993
4994         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4995         the sorting of rlist with NULL elements
4996         * (print_idataType, print_idata): NEW to create idata sections
4997         * src/pic16/device.h: idataSymSet new variable
4998         * src/pic16/gen.c (genFunction): fixed some bugs in string
4999         comparing, improved the absolute section creation for ISRs,
5000         added FSR0L/FSR0H in registers that are saved in an ISR,
5001         * (genInline): fixed the processing of inline snippets,
5002         now they undergo no process by the peephole optimizer
5003         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5004         are placed in idataSymSet,
5005         * (pic16emitStaticSeg): extern symbols are added in externs,
5006         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5007         switching when aboslute variables are placed in access bank memory
5008         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5009         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5010         commented out with #if,
5011         * (pic16_packRegisters): reintroduce the check for CAST because some
5012         symbols are not correctly handled,
5013         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5014         pCodeInstruction instead of pCode,
5015         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5016         pCodeAsmDir definition,
5017         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5018         directive, then the argument directive is emitted without the leading
5019         tab, hack for inline labels which must be in the first column,
5020         * (compareLabel,pic16_findNextInstruction),
5021         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5022         * (insertBankSwitch): modified for the new pCodeAsmDir,
5023
5024 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5025         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5026
5027         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5028         instance,
5029         * (pushSide): commented out with #if,
5030         * (assignResultValue): fixed some typos in saving
5031         registers,
5032         * (genPcall): FIXED and sync'ed with genCall,
5033         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5034         * (genNearPointerGet): fixed to handle some more cases,
5035         implementation scheme via table reads,
5036         * (genConstPointerGet): modified to access code memory correct,
5037         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5038         and improved to handle some cases
5039         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5040         instead of "RETLW" for init data
5041         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5042         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5043         variables are placed in access bank memory (<0x80 and >=0xf80),
5044         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5045         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5046         TBLWT_POSTDEC,TBLWT_PREINC
5047         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5048         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5049         directives
5050         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5051         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5052         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5053         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5054
5055 2004-02-29  Borut Razem <borut.razem AT siol.net>
5056
5057         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5058         support/Util/findme.h, support/Util/system.h: enhance binary relative
5059         search for lib and include by using findProgramPath()
5060
5061 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5062
5063         * src/SDCCpeeph.h,
5064         * src/SDCCpeeph.c (pcDistance),
5065         * src/port.h,
5066         * src/mcs51/ralloc.h,
5067         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5068         * src/mcs51/main.h,
5069         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5070         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5071         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5072         size calculation port specific, started basis for some register
5073         optimizations
5074         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5075         missing push/pop of r0/r1. Optimized push/pops
5076         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5077         * device/lib/_modsint.c (_modsint),
5078         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5079         and stack version so regression tests pass
5080
5081 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5082
5083         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5084         * src/SDCCast.c (decorateType): catch another small optimization
5085         with '?' operator
5086         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5087         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5088         modified to finally use computeType() all over SDCC,
5089         see Feature Request #877103
5090         * src/SDCCval.h: cosmetic
5091         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5092         valCompare(); regression tested in muldiv.c
5093         * support/regression/tests/muldiv.c (testMod): mod sign follows
5094         dividend only
5095
5096 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5097
5098         * src/SDCCast.c (decorateType): fixed bug #902362
5099         * doc/INSTALL.txt: fixed install instructions for win32
5100
5101 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5102
5103         * device/include/Makefile.in (install): fixed by replacing spaces
5104         by tabs
5105         * doc/README.txt,
5106         * doc/INSTALL.txt: updated for release
5107         * doc/sdccman.lyx: added warning for --xstack being buggy
5108
5109 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5110
5111         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5112         to eliminate build warnings.
5113         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5114
5115 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5116            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5117
5118         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5119         removed -penable-stack, added comment for stack pragma, added
5120         warning for not initializing the stack/frame registers, removed
5121         comment at interrupts section
5122
5123         Stack is made permanent, there is no ability to disable stack usage.
5124         * src/pic16/device.h,
5125         * src/pic16/device.c: removed all references to USE_STACK macro,
5126         * src/pic16/device.c (pic16_dump_section): when no elements in
5127         rlist, free rlist before return,
5128         * (pic16_dump_int_registers): NEW, internal registers are a new set
5129         of general purpose registers reused by each function,
5130         * (checkAddReg): returns 1 if registers is added to set,
5131         * (pic16_groupRegistersInSection): when a registers is of type
5132         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5133         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5134         SRCASECMP macro is moved here from device.c
5135         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5136         PO_PCLATU, PO_PRODL, PO_PRODH,
5137         * (pic16_pCodeOpType, genMinus,
5138         changed compares to "a" register, with AOP_ACC,
5139         * (pic16_genPlus): fixed some bugs and indented properly,
5140         * (pic16_addSign): changed size to size+offset in the MOVWF
5141         instruction,
5142         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5143         multiply 8-bit operand by literal, result is 8-bit,
5144         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5145         multiply 2 8-bit operand, result is 8-bit,
5146         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5147         genUMult8X*_16,
5148         * src/pic16/gen.c: changed accUse to contain WREG only,
5149         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5150         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5151         true, do not use immediate addressing any more unless sym is a
5152         pointer in codespace,
5153         * (aopForRemat): do not use immediate addressing when symbol not in
5154         codespace and when symbol's address is requested,
5155         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5156         accUse size (= 1),
5157         * (aopGet): added case for AOP_ACC and don't return "accumulator
5158         bug" but WREG instead,
5159         * (popGetTempReg): pushes contents of temporary register in stack,
5160         * (popReleaseTempReg): pops contents of temporary register from
5161         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5162         * (pic16_popGet): separated case AOP_ACC to return register WREG
5163         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5164         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5165         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5166         the use of immediate pointers to certain cases only.
5167
5168         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5169         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5170         * (assignResultValue, genCall, genRet): modified to use the new
5171         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5172         genPcall is still broken,
5173         * (genFunction): added code to create 'A' type pBlocks when
5174         interrupt functions are generated, code not extensively tested yet,
5175         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5176         * (genEndFunction): modified so ISRs pop stored registers from stack,
5177         * (genMultOneByte): cleanup,
5178         * (AccRsh): added flag andmask, to and result with appropriate mask,
5179         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5180         * (genDataPointerGet): fixed and reenabled its use,
5181         * (genNearDataPointerGet): bugs fixed,
5182         * (genDataPointerSet): bugs fixed,
5183         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5184         pic16_DumpSymbol, pic16_DumpOp,
5185         * src/pic16/genutils.h: function prototypes for the above functions,
5186         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5187         pointers,
5188         * (pic16emitRegularMap): many many many improvements, but needs a
5189         major cleanup,
5190         * src/pic16/main.c: enable_stack in pic16_options is removed,
5191         * (_pic16_parseOptions): removed command line options -penable-stack,
5192         * (_process_pragma): emit stack symbol only when stack pragma is
5193         processed,
5194         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5195         redirected to FSR0L/FSR0H pair,
5196         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5197         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5198         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5199         for immediates,
5200         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5201         * (dumpPicOptype): NEW,
5202         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5203         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5204         with movff instruction,
5205         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5206         added pic16_int_regs, some packRegsFor* functions are commented out,
5207         because produce errors,
5208         * src/pic16/NOTES: minor modifications
5209
5210 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5211
5212         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
5213         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
5214         --pack-iram.
5215         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
5216         * as/mcs51/lkaomf51.c: fixed bug #895763
5217
5218 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
5219
5220         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
5221
5222 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5223
5224         * doc/sdccman.lyx: added details about the HC08 storage classes and
5225         interrupts, fixed the register usage info for z80 & gbz80
5226
5227 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5228
5229         * doc/sdccman.lyx: added more pic16 port documentation
5230         * device/include/pic16/: added header pic18fregs.h
5231
5232 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5233
5234         * doc/sdccman.lyx: added Vangelis' contribution
5235
5236 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5237
5238         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5239         extend to the next CALL or PCALL, not just to the next CALL.
5240
5241 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5242
5243         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5244
5245 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5246
5247         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5248         bug #895752 and a better fix for bug #716790
5249
5250 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5251
5252         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5253
5254 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5255
5256         * doc/sdccman.lyx: minor changes, minor changed
5257
5258 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5259
5260         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5261         which can't handle SDCC_NEWONEBYTEOPS,
5262         (geniCodeMultiply): removed conversion from mult to shift for pic14
5263         and pic16
5264
5265 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5266
5267         * src/hc08/gen.h,
5268         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5269         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5270         thus fixing bug #895406
5271
5272 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5273
5274         * device/lib/_modsint.c,
5275         * device/lib/_modslong.c: sign follows divisor only
5276         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5277         signs or signedness can be ignored
5278         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5279         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5280         added optimization for IFX,
5281         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5282         arguments;
5283         reenabled optimization for IFX, which was removed on 2004-01-11
5284         * src/SDCCast.h: added return type IFX
5285         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5286         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5287         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5288         SDCC_OLDONEBYTEOPS selects the old behaviour
5289         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5290         changed again and commented promotion rule
5291         * src/SDCCval.c (valDiv): promotion no longer necessary
5292         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5293         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5294         rewritten
5295         * support/regression/tests/onebyte.c: added
5296
5297 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5298
5299         * gen.c (genInline): reverted to old code for assemnling inline
5300         code because of bug reported James Chadd
5301
5302 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5303
5304         * ralloc.h: missing declarations from previous patch,
5305         seems that patch for ralloc.h was never applied, fixed
5306
5307 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5308            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5309
5310         * pcode.c,
5311         * pcode.h,
5312         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5313         indirect addressing. Marked FSR0 as deprecated
5314         * gen.c (pointerCode): commented out, not needed now
5315         (pic16_popGet2p): new MOVFF helper function
5316         (genGenPointerGet),
5317         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5318         (shiftRLong): removed duplicate debugging info
5319
5320 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5321
5322         * src/ds390/gen.c (genNearPointerGet),
5323         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5324         optimization with bits, but not bitfields.
5325         * src/ds390/ralloc.c (packRegisters),
5326         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5327
5328 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5329
5330         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5331
5332 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/SDCCsymt.h,
5335         * src/SDCCicode.c (operandFromSymbol),
5336         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5337         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5338         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5339         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5340         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5341         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5342         bug #892038
5343         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5344         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5345         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5346         * src/SDCCsymt.c (newSymbol),
5347         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5348         enumerator_list),
5349         * src/SDCCval.h,
5350         * src/SDCCval.c (newiList): fixed bug #885705
5351
5352 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5353
5354         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5355         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5356
5357 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5358
5359         * device/include/c8051f120.h,
5360         * device/include/c8051f300.h,
5361         * device/include/c8051f310.h: added/updated header files for Silicon
5362         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5363         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5364         in new section Submitting patches
5365
5366 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5367
5368         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5369         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5370         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5371         genGenPointerSet),
5372         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5373         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5374         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5375         genGenPointerSet),
5376         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5377         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5378         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5379         genGenPointerSet),
5380         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5381         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5382         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5383         genGenPointerSet): fixed bug #892400
5384         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5385         to eliminate build warnings.
5386         * src/SDCCast.c (processParms),
5387         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5388         fixed bug 751859
5389         * support/valdiag/valdiag.py: added GCC to the list of defines active
5390         when compiling with gcc
5391
5392 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5393
5394         * support/Util/SDCCerr.h,
5395         * support/Util/SDCCerr.c,
5396         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5397         with an incomplete type (fixed bug #883734)
5398         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5399
5400 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5401
5402         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5403
5404 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5405
5406         * src/SDCCast.c (decorateType),
5407         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5408         function pointer implementation
5409         * support/regression/tests/funptrs.c: added tests to verify both forms
5410         of function pointers work correctly. Added tests to verify parameters
5411         are passed in the correct order.
5412
5413 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5414
5415         * device.c (regCompare): registers are sorted by ascending
5416         address and increasing size,
5417         * main.c (_pic16_finaliseOptions): removed the declaration
5418         of compiler macro MCU. Now a macro of the format pic18fxxxx
5419         will be defined from the command line
5420
5421 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5422             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5423
5424         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5425         PCOP_RLCF was overwritten!
5426         * gen.c (genSkip): commented out calls to pic16_emitcode,
5427         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5428         * (genlshTwo),
5429         * (genRRC): added debugging info,
5430         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5431         overwritten while shifting,
5432         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5433         overwritten while shifting,
5434         * (AccLsh),
5435         * (AccRsh),
5436         * (shiftLLeftOrResult),
5437         * (shiftRLeftOrResult),
5438         * (shiftRLong),
5439         * (shiftLLong): Implemented with pic16_emitpcode
5440         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5441         * (genLeftShift): Fixed bug, operand for shift by variable always
5442         was "and"ed with 0x0f,
5443         * (genLeftShiftLiteral),
5444         * (genrshTwo),
5445         * (genRightShiftLiteral): added debugging info,
5446         * (genrshFour): added comment,
5447         * (genRightShift): determined signedness from operand "left"
5448         instead of "result"
5449
5450 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5451
5452         * src/SDCCicode.c (geniCodeParms),
5453         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5454         function pointers, fixed function pointer bugs #861242 and #861896
5455
5456 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5457
5458         * device/include/c8051f000.h,
5459         * device/include/c8051f120.h,
5460         * device/include/c8051f300.h: added header files for Silicon
5461         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5462
5463 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5464
5465         * src/SDCCast.c (processParams): added new type flow and restructured
5466         (gatherAutoInit): added new type flow
5467         (addCast): cosmetic changes
5468         (getLeftResultType): added new type flow for array indices, patch
5469         provided by Stas, see FR #877103
5470         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5471         array index patch by Stas
5472         * src/SDCCast.h: added prototype getResultTypeFromType()
5473         * src/SDCCval.h,
5474         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5475         * src/pic/glue.c (pic14emitStaticSeg),
5476         * src/pic16/glue.c (pic16emitStaticSeg),
5477         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5478         for initialization of symbols
5479         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5480         * support/Util/SDCCerr.h:
5481         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5482         * .version: bumped version number to 2.3.8
5483         * device/include/Makefile.in (install),
5484         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5485         avoid warnings
5486
5487 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5488
5489         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5490         Slade Rich fixed an optimization bug
5491         * src/pic/pcodepeep.c,
5492         * src/pic/pcoderegs.c
5493         * doc/Makefile (install): added test for directory
5494
5495 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5496
5497         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5498         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5499         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5500         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5501         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5502         * as/mcs51/asexpr.c (term),
5503         * as/hc08/asexpr.c (term): fixed bug #887146
5504
5505 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5506
5507         * src/z80/gen.c (genMult): handle single byte result product
5508         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5509         DUMMY_READ_VOLATILE (fixed bug #886367)
5510
5511 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5512
5513         * support/regression/tests/libmullong.c: fixed logic, on little endian
5514         hosts we ended without a mullong_wrapper()
5515
5516 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5517
5518         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5519         virus/worm forged address usage.
5520
5521 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5522
5523         Fixed promotion, it should be done on AST level:
5524         * src/SDCCast.c (addCast): added promotion to int
5525         (decorateType): updated call to upCast()
5526         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5527         usualUnaryConversions()
5528
5529 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5530
5531         * support/regression/tests/literalop.c (mulWrapper): Added a
5532         wrapper to remove integer overflow warnings.
5533
5534         * support/regression/tests/float_trans.c: Made work on host.
5535
5536         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5537         location of sz80.
5538
5539         * support/regression/generate-cases.py (main): Changed from inline
5540         to a main method.
5541
5542         * doc/Makefile (install): Changed to depth first to get rid of
5543         missing directory install warning.
5544
5545         * as/Makefile (install-doc): Made work on Mac.
5546
5547 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5548
5549         * src/SDCCast.c: added an additional type flow in decorateType() of
5550         opposite direction, see feature request #860006; it's enabled at runtime
5551         by setting the environment variable SDCC_NEWTYPEFLOW
5552         * src/SDCCast.h: changed prototype of decorateType()
5553         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5554         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5555         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5556         see feature request #877103
5557         * src/SDCCval.c: updated call of decorateType()
5558         (valBitwise): fixed bug #882876
5559         (valMinus): added promotion
5560         (valLogicAndOr): result is unsigned
5561         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5562         * src/SDCCsymt.c (computeType),
5563         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5564         must not cause an unsigned operation
5565         * src/pic/glue (pic14emitRegularMap),
5566         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5567
5568 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5569
5570         * src/pic/pcode.c (PCodeID): commented out left over debug code
5571
5572 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         * support/valdiag/tests/overflow.c: added shift tests
5575         * src/pic/device.c,
5576         * src/pic/gen.c,
5577         * src/pic/gen.h,
5578         * src/pic/glue.c,
5579         * src/pic/main.c,
5580         * src/pic/pcode.c,
5581         * src/pic/pcode.h,
5582         * src/pic/pcodepeep.c,
5583         * src/pic/pcoderegs.c,
5584         * src/pic/ralloc.c,
5585         * src/pic/ralloc.h: applied patch from Slade Rich;
5586         added support for multiple code pages and multiple RAM banks on the
5587         PIC 14 port. The ASM files now no longer simply assume all the
5588         code / RAM are in the same page / bank. This means the linker can
5589         safely allocate code/RAM of separate ASM files to different pages/banks.
5590         * doc/sdccman.lyx: added Slade's tips
5591         * src/mcs51/peeph.def: fixed bug #880768
5592
5593 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5594
5595         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5596         * src/SDCCast.c (decorateType): fixed bug #880197
5597
5598 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5599
5600         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5601         getopt.h.
5602
5603         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5604         strtof is not part of C89 and isn't included with Mac OS X.
5605
5606 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5607
5608         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5609         shiftL2Left2Result): fixed bug #879326
5610         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5611         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5612         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5613         address fetch for clr instruction
5614         * device/lib/hc08/_mulint.c: created optimized assembly version
5615         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5616
5617 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5618
5619         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5620         proposed in FR #877103
5621
5622 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5623
5624         * src/SDCCval.c (cheapestVal): added missing checks
5625         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5626         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5627
5628 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5629
5630         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5631         equal operands
5632
5633 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5634
5635         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5636         loaded with the linker search paths (-L arguments) and the libraries
5637         to be linked with the current source (-l arguments). Changes
5638         currently will affect only the pic16 port.
5639         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5640         include path the port specific paths and port specific libraries,
5641         * gplink command now contains the $3 argument,
5642         * src/pic16/device.h,
5643         * src/pic16/device.c,: structure PIC_device is made public and
5644         renamed to PIC16_device, the same for variable Pics which is renamed
5645         to Pics16. Updated all references to them.
5646         * src/pic16/glue.c (pic16glue): corrected bug with code
5647         initialization which bypassed the variable initializations block.
5648
5649         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5650         COMPILE_FLAGS and added the --nostdinc option
5651
5652 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5653
5654         * device/include/mc68hc908jb8.h: Register defs for another member
5655         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5656
5657 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5658
5659         Documenting changes from previous commits.
5660         * configure.in (version 1.56),
5661         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5662         when generating output files to configure the pic16 library,
5663         but now I've commented it out, since gputils aren't installed in the
5664         SF compile farm, so library won't compile
5665
5666         * device/lib/Makefile.in (version 1.56): initially I've added in
5667         target 'all' the prerequestive 'model-pic16' so it compiled the
5668         pic16 library, but now I've commented it out for the same reasons
5669         above,
5670         * added targets 'model-pic16' and 'objects-pic16' to compile the
5671         library
5672         * added target 'port-specific-objects-pic16' to handle the
5673         generated libraries and copy them into the build/ directory
5674         * added target 'clean-intermediate-pic16' to clean intermediate
5675         files into pic16 directory
5676         * in target 'installdirs' added line to create directory pic16 in
5677         the installation path
5678
5679         * device/include/Makefile.in (version 1.11): in target 'install'
5680         added lines to copy all header files to installation path,
5681         * in target 'installdirs' added line create directory for pic16
5682         headers in the installation path
5683
5684 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5685
5686         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5687          a function call
5688
5689 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5690
5691         * configure,
5692         * device/lib/configure.in,
5693         * device/lib/configure: fixed for autoconf 2.57
5694
5695 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5696
5697         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5698         option so that it actually works. Made it specific to the z80, since
5699         the gbz80 doesn't have these kinds of I/O ports.
5700
5701 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5702
5703         * device/include/z180.h,
5704         * device/lib/_memcpy.c,
5705         * device/lib/_memmove.c,
5706         * device/lib/_mulint.c,
5707         * device/lib/ser_ir.c,
5708         * device/lib/ser_ir_cts_rts.c,
5709         * device/lib/_strcmp.c,
5710         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5711         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5712         portmode; added deprecation warning for bank= and protmode= forms.
5713         Also, guard against buffer overflow.
5714         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5715
5716 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5717
5718         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5719         changed interrupt vector table generation to only emit declared vectors.
5720         * device/include/Makefile.in: added missing backslash
5721         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5722
5723 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5724
5725         Mainly changes to support compilation of the device libraries
5726         * src/pic16/device.c: stack is allocated via symbol and not
5727         via literal number. The symbol is placed in the corresponding
5728         position of the data ram
5729         * (pic16_dump_section): relocatable and absolute uninitialized
5730         data are now emitted in sorted order to reduce section naming,
5731         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5732         weren't marked as being in the access bank,
5733
5734 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5735
5736         Added portion of GNU PIC Library under the directory
5737         device/include/pic16 and device/lib/pic16. These files
5738         contain the declarations of SFRs for the PIC18Fxx2 devices.
5739         The directory is initialized via configure from toplevel.
5740
5741 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5742
5743         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5744         the spilllocations to be compared correctly
5745
5746 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5747
5748         * src/SDCCast.c (decorateType): fixed bug introduced today
5749
5750 2004-01-12  Borut Razem <borut.razem AT siol.net>
5751
5752         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5753         doc/sdccman.lyx: upper case pragmas are deprecated
5754
5755 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5756
5757         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5758         in simpler and even better code
5759
5760 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5761
5762         * src/SDCCicode.c (operandOperation): fixed bug #874819
5763         * src/SDCCast.c (decorateType): fixed
5764         char foo (unsigned long ul) { return ul > 0; }
5765
5766 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5767
5768         * doc/sdccman.lyx: Moved and added some sections, small changes
5769         all over. Telling LaTeX to be less strict with word spacing
5770         to better keep the right margin. Changed some notes about
5771         maintainance of the ports in section 3.2.1 - is it OK like this?
5772
5773 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5774
5775         SDCC source changes:
5776         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5777         convilong): modified to inform the pic16 port that builtin functions
5778         are external
5779
5780         PIC16 PORT specific changes:
5781         * src/pic16/device.c pic16_dump_equates() added,
5782         processor registers declared internally by the port are emitted in
5783         the translation as equates,
5784         * src/pic16/gen.c: inline code is passed unprocessed to the
5785         translation,
5786         * (pic16_popGetLit2): fnuction modified to take second operand as
5787         pCodeOp pointer and not as literal,
5788         * (popRegFromIdx): prefixed with pic16_,
5789         * (pic16_popCombine2): modified to receive already allocated pCode
5790         operands,
5791         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5792         * (genFunction): initializes local stack frame and pushes on stack
5793         all the registers used by this function,
5794         * (genEndFunction): restores all registers from stack and restores
5795         stack frame,
5796         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5797         improvements,
5798         * (pic16glue): changed the program startup sequence,
5799         * added new dbName code 'A' for functions placed in absolute section
5800         * src/pic16/main.c: added function attribute _naked,
5801         * added pragma 'code' to place a fnuction at an absolute address,
5802         * added command line arguments --debug-ralloc and --pcode-verbose,
5803         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5804         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5805         * (pic16_newpCodeOpLit2): modified to take the second operand as
5806         pCodeOp pointer,
5807         * (pic16_printpBlock): modified to emit each function in a separate
5808         section,
5809         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5810         UPPER for immediate operands,
5811         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5812         instruction,
5813         * src/pic16/peeph.def: all peepholes with movff are commented out,
5814         because there is a problem in the pcode peep optimizer,
5815         * src/pic16/ralloc.c: the register allocator can now reuse local
5816         function symbols for another function. This saves register usage.
5817         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5818
5819         Added file src/pic16/NOTES with information about program writing on
5820         the current port version.
5821
5822 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5823
5824         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5825         and peephole 252 (array access)
5826
5827 2004-01-09  Borut Razem <borut.razem AT siol.net>
5828
5829         * src/SDCCmain.c : fixed #872250: -l command line defined library
5830           files are scanned before standard library files
5831
5832 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5833
5834         * src/SDCCast.c (decorateType): fixed bug #874046
5835
5836 2004-01-09  Borut Razem <borut.razem AT siol.net>
5837
5838         * support/scripts/sdcc.nsi: remove previous installation
5839
5840 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5841
5842         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5843         bytes for last interrupt vector (mcs51)
5844         * sdcc.spec: fixed typo
5845
5846 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5847
5848         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5849         gen51Code): more efficient parameter receive for --model-large
5850         ("bug" #845294)
5851
5852 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5853
5854         * src/ds390/main.c,
5855         * src/z80/main.c: added missed needLinkerScript flags (more than
5856         one port structure defined in these file)
5857         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5858         bug #795325
5859
5860 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5861
5862         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5863         * src/port.h: added flag needLinkerScript in port->linker
5864         structure to inform whether to create a .lnk file or not,
5865         * src/avr/main.c,
5866         * src/ds390/main.c,
5867         * src/hc08/main.c,
5868         * src/mcs51/main.c,
5869         * src/pic/main.c,
5870         * src/pic16/main.c,
5871         * src/xa51/main.c,
5872         * src/z80/main.c: changed appropriately to configure
5873         needLinkerScript flag
5874         * src/pic/gen.c,
5875         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5876         * src/pic/glue.c: added variable udata_section_name to
5877         override default uninitialized data segment definition for
5878         devices only with SHAREBANK memory (reported from Erik Epetrich)
5879         * (pic14emitOverlay): modified to emit a commented overlay segment
5880         directive when no overlay data exist
5881         * (picglue): modified to emit uninitialized data segment
5882         according to udata_section_name
5883         * src/pic/main.c (_pic14_parseOptions): added command line
5884         options --udata-section-name=[name] to override default
5885         udata definition name
5886         * modified _linkCmd and _asmCmd to include compiler passed
5887         arguments via -W option
5888         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5889         object file from '.rel' to '.o' in port->linker structure,
5890         changed size of fptr from 2 to 3 in port structure
5891
5892 2004-01-07  Borut Razem <borut.razem AT siol.net>
5893
5894         * support/scripts/sdcc.nsi: update PATH
5895         * support/scripts/sdcc.ico: craeted
5896
5897 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5898
5899         * device/include/Makefile.in: fix install
5900         * doc/Makefile: fix install
5901
5902 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5903
5904         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5905         in bug #860505
5906         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5907         how the function variable allocation summary is displayed; also
5908         include information about variables allocated to the overlay
5909         segment
5910
5911 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5912
5913         * as/mcs51/lkmain.c: Help about -Y option
5914         * as/mcs51/lkarea.c: Fixed gcc warnings
5915
5916 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5917
5918         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5919         fixed warning
5920         * support/valdiag/tests/overflow.c: added
5921         * src/SDCCast.c (decorateType),
5922         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5923         LEFT_OP (left shift)
5924
5925 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5926
5927         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5928         (default behaviour).
5929
5930 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5931
5932         A python script to validate compiler diagnostic messages. It can be
5933         used to verify that sdcc complains about bad c source code and
5934         gives a good location of the error.
5935         * support/valdiag/Makefile,
5936         * support/valdiag/valdiag.py,
5937         * support/valdiag/tests/*
5938
5939 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5940
5941         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5942         * src/SDCCsymt.c (newEnumType),
5943         * src/SDCCsymt.h
5944         * support/Util/SDCCerr.c,
5945         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5946         enum related bugs.
5947         * support/regression/tests/enum.c: added test for enum values that
5948         require at least 2 bytes of storage.
5949
5950 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5951
5952         * src/common.h: added ifndef/define/endif macros
5953         around the header file.
5954         Bug reported from Jesus Calvino-Fraga
5955
5956 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5957
5958         * sdcc.spec: updated
5959         * device/include/Makefile.in: don't install CVS directories
5960         * device/lib/Makefile.in: added removal of CVS directories after install
5961         * doc/Makefile: fixed install, added local_icons
5962         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5963         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5964         * src/ds390/gen.c (genRightShift): fixed bug #870788
5965         * src/SDCCast.c (decorateType): fixed bug #870781
5966
5967 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5968
5969         PIC16 port related changes:
5970         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5971         added variable stackPos,
5972
5973         * gen.c: genCall, assignResultValue: added support for
5974         pushing/retrieving function parameters to/from stack,
5975         genFunction,genEndFunction: setup stack frame for the
5976         generated function,
5977         genAddrOf: will be changed according to bug 863624
5978
5979         * added files genutils.c and genutils.h which contain gen*
5980         debugged and optimised functions extracted from gen.c
5981
5982         * glue.c: added variable 'externs' which holds extern symbols,
5983         pic16emitRegularMap: is modified to properly handle relocatable
5984          symbols under the new scheme,
5985         pic16createInterruptVect: is modified
5986         pic16printPublics: is modified to emit 'global' assembler directives,
5987         added pic16_printExterns to print extern symbols,
5988         pic16glue: initializes stack/frame pointer in the beginning of
5989         the assembly output. Temporary hack, will be corrected later,
5990         because gplink yet does not support stack and SDCC does not
5991         yet support a type of crt0.o object to create the final binary.
5992
5993         * Removed many lines that contain 8051 legacy code.
5994         * The code is finally placed under a 'code' directive.
5995         * Added port specific options.
5996
5997         * _process_pragma: simplified since now we do not need *special*
5998         include file to define SFR registers. But a separate header
5999         will be needed. This will be developed later.
6000         * _pic16_parseOptions: added, parses port specific options:
6001         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6002         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6003         --preplace-udata-with=
6004
6005         * _pic16_setDefaultOptions: modified to initialize section names,
6006         but hack is temporarly out of order since it needs improvement.
6007         * _pic16_genAssemblerPreamble: configuration words are emitted by
6008         their address instead of their name. This part is incomplete and
6009         supports only the 18Fxx2 devices. Other devices will emit an error
6010         during assembly since they do not contain the same set of config
6011         registers
6012         * _pic16_genIVT: is modified,
6013
6014         * pcode.c: added definitions for some hardware registers that are needed
6015         for stack support
6016         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6017         All PCI entries are updated. Now LFSR is supported.
6018         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6019         * added pic16_newpCodeOpLit2 to support instructions with
6020         two literal arguments
6021         * pic16_pCode2str: corrected code that emits assembler instructions
6022         with two literal operands and those that have an access bit modifier
6023         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6024         this fixes a bug which caused some labels to be lost, when an
6025         assembler directive was added, i.e. banksel,
6026         * pic16_FixRegisterBanking: improved logic that causes the insertion
6027         of bank switching,
6028         * InlineFunction: functions that are called once, are not any more
6029         inlined. This can be a port option in the future,
6030
6031         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6032
6033         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6034         hold the corresponding uninitialized symbols,
6035         * pic16_allocProcessorRegister: registers have explicit marked the
6036         accessBank field,
6037         * pic16_allocInternalRegister: registers are explicit marked as
6038         not used,
6039         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6040         processing list, so bit registers were lost,
6041         *
6042
6043         * ralloc.h: added field 'accessBank' and original symbol operand
6044         in register definition,
6045         * removed the field isMapped from register definition,
6046
6047         ** Several functions have been removed from various sources:
6048         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6049         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6050         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6051         pic16_assignRelocatableRegisters
6052
6053         ** others have been introduced:
6054         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6055         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6056
6057 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6058
6059         * support/scripts/inc2h.pl: changed definition of BIT_AT
6060         to emit 'sbit at' instead of 'bit at'. This was a request.
6061
6062         PIC16 port related preliminary changes:
6063         * gen.c: prefixed function popRegFromString with
6064         pic16_ and all references to it corrected
6065         * pcode.c: all pic16_pc_* hardware registers prefixed
6066         with underscore (_),
6067         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6068         * ralloc.c: newReg(): when register is REG_SFR then
6069         set address to rIdx,
6070         pic16_allocProcessorRegister(): marks register wasUsed=0
6071         pic16_writeUsedRegs(): added a call to assign processor
6072         registers via pic16_assignFixedRegisters
6073
6074 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6075
6076         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6077         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6078         variables in unused register banks.  Also the SSEG is placed
6079         wherever there is enough space for it, and IDATA can be anywhere
6080         in internal RAM.  For now compile using -Wl-Y[stack_size].
6081         The mem file is different for this option as well, since it
6082         makes no sense of talking about DSEG lenght.
6083
6084 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6085
6086         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6087         in certain cases, e.g. when ROM assignment, patch provided
6088         from Albert den Haan.
6089
6090 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6091
6092         Many signedness and type propagation fixes:
6093         * src/SDCCicode.c: made geniCodeCast() static
6094         replaced SPEC_ by IS_ (cosmetic)
6095         (operandOperation): fixed div and mod operation
6096         (usualBinaryConversions): added support for promotion of char
6097         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6098         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6099         (geniCodeAdd): an array index will stay unsigned, even if promoted
6100         from char to int
6101         (geniCodeArray): ditto
6102         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6103         * src/SDCCsymt.c (computeType): added more support for char;
6104         promotion of char is selectable by promoteCharToInt, fixed signedness
6105         for all cases
6106         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6107         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6108         * src/SDCCval (val*): replaced signedness calculation by
6109         computeType()
6110         rearranged if-branches (cosmetic)
6111         (valShift): added warning W_SHIFT_CHANGED
6112         (valCompare): fixed problem with different types
6113         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6114         * support/regression/tests/literalop.c: added many cases
6115         * support/regression/tests/ast_constant_folding.c: changed finally to
6116         'unsigned int'
6117         * .version: new year, new version: 2.3.7
6118         * src/SDCCmain.c (main): applied patch #866468
6119         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6120         provided by Scott Bronson
6121         * doc/sdccman.lyx: updated documentation for sdcdb
6122         updated and added chapter tips
6123
6124 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6125
6126         * src/SDCCsymt.h: missing from yesterday's commits
6127
6128 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6129
6130         * src/SDCC.y (struct_or_union_specifier),
6131         * support/Util/SDCCerr.c,
6132         * support/Util/SDCCerr.h: verify that struct & union tags are used
6133         as declared.
6134
6135 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6136
6137         * src/SDCCglobl.h: missing from yesterday's commits
6138
6139 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6140
6141         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6142         sft_attributes, struct_declaration, parameter_declaration,
6143         type_name, start_block, declaration_list),
6144         * src/SDCC.lex (check_type): support redefinition of typedef names
6145
6146 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6147
6148         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6149         aligned xdata arrays. Erik helped me with the if clause.
6150
6151 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6152
6153         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6154         warning
6155
6156 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6157
6158         * src/SDCCast.h,
6159         * src/SDCCast.c (newAst_),
6160         * src/SDCCicode.h,
6161         * src/SDCCicode.c (ast2iCode, newiCode),
6162         * src/SDCCglobl.h,
6163         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6164         expr, statement, expression_statement, selection_statement,
6165         iteration_statement, expr_opt, jump_statement): foundation for tracking
6166         sequence points
6167         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6168         point code too)
6169
6170 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6171
6172         * support/Util/SDCCerr.c,
6173         * src/SDCCast.h,
6174         * src/SDCCast.c (createCase, createDefault, decorateType),
6175         * src/SDCClabel.c (labelUnreach),
6176         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6177         to error messages.
6178         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6179         (with thanks to Stas Sergeev)
6180         * device/include/time.h,
6181         * device/lib/time.c (CheckTime): suppress unreachable code warning
6182
6183 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6184
6185         * src/SDCCast.c (createIvalCharPtr),
6186         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6187         bug #753752)
6188         * support/regression/tests/nullstring.c: tests for these two bugs
6189
6190 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6191
6192         * support/Util/SDCCerr.h,
6193         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6194         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6195         about storage class and 'at' used inside struct or union
6196         * src/SDCCBBlock.c (iCodeFromeBBlock),
6197         * src/SDCCcse.c (ifxOptimize),
6198         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6199         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6200         printIval, emitStaticSeg, emitOverlay),
6201         * src/SDCClabel.c (deleteIfx),
6202         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6203         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6204         gatherAutoInit, processParms),
6205         * support/Util/SDCCerr.h,
6206         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6207         reporting for post-parse errors.
6208
6209 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6210
6211         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
6212         implicit casts via union; they don't work on big endian systems
6213         (possible fix for bug #861138)
6214
6215 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6216
6217         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
6218         * src/mcs51/main.c: fixed the fix for bug #737001
6219
6220 2003-12-15  Borut Razem <borut.razem AT siol.net>
6221
6222         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
6223
6224 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6225
6226         * support/makebin/makebin.c: put output in binary mode
6227
6228 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6229
6230         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6231         xdata and data memory on startup. Set the environment variable
6232         SDCC_NOGENRAMCLEAR to disable this.
6233         * src/mcs51/peephole.def,
6234         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6235         (allows non-interrupt and interrupt code to safely compete for a resource
6236         without the non-interrupt code having to disable interrupts)
6237
6238 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6239
6240         * src/SDCCicode.c (geniCodeAdd),
6241         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6242         with valFromType if type might be a pointer and host is big endian).
6243         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6244         types, not just integer types.
6245         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6246         multiply defined with mismatching "at" address.
6247
6248 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6249
6250         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6251         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6252         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6253         with embedded nulls (fixed bug #753752)
6254
6255 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6256
6257         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6258         Apparently this did not see much testing (endless loop)
6259
6260 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6261
6262         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6263
6264 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6265
6266         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6267         gracefully handle NULL memmap pointers
6268
6269 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6270
6271         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6272         instead of deleting the iCode when an operand is volatile
6273         * src/z80/gen.c (genDummyRead),
6274         * src/mcs51/gen.c (genDummyRead),
6275         * src/ds390/gen.c (genDummyRead),
6276         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6277         not just IC_RIGHT
6278         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6279         * src/SDCC.y: fixed bug #850420
6280
6281 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6282
6283         Applied z80 i/o port patch from Peter Townson and fixed some operators
6284         to better handle operands in A register.
6285         * device/include/z180.h
6286         * src/SDCC.y
6287         * src/SDCCglue.c
6288         * src/z80/gen.c
6289         * src/z80/gen.h
6290         * src/z80/main.c
6291         * src/z80/peeph-z80.def
6292         * src/z80/peeph.def
6293         * src/z80/z80.h
6294
6295 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6296
6297         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6298
6299 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6300
6301         * device/lib/hc08/_mullong.c: Removed extra #endif
6302
6303 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6304
6305         * sim/ucsim/hc08.src/inst.cc,
6306         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6307         carries from x to h
6308         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6309         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6310         * device/include/stdarg.h: fixed varargs for hc08
6311         * device/lib/Makefile.in,
6312         * device/lib/hc08/Makefile,
6313         * device/lib/hc08/_mulint.c,
6314         * device/lib/hc08/_mullong.c: fixed some endian problems
6315
6316 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6317
6318         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6319         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6320         * device/lib/_gptrget.c,
6321         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6322
6323 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6324
6325         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6326         * src/SDCCast.c (astErrors): fixed bug #846007
6327         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6328
6329 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6330
6331         * src/SDCCast.c (decorateType): disabled a transformation I added in
6332         revision 1.188 (access to fields of a structure at an absolute address);
6333         it breaks with bitfields, extern declarations, and gcse analysis.
6334         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6335         could be assigned through a pointer, so don't complain.
6336         * src/SDCCast.c (astErrors),
6337         * src/SDCCast.h,
6338         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6339
6340 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6341
6342         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6343         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6344         output of __config directives, since gpasm now supports them
6345         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6346         pre-processor macro, i.e. -DMCU=p18f452
6347         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6348         and modified to handle 'cast' icode similarly to '=' icode
6349         * src/pic16/device.h (typedef struct PIC_device): added field
6350         'extMIface' to indicate that chip has external memory interface
6351         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6352         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6353         18F8720
6354
6355 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6356
6357         * src/SDCC.y (pointer): fixed bug #846006
6358         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6359         * src/SDCCast.c (decorateType): fixed bug #846009
6360         * src/ds390/peeph.def,
6361         * src/ds390/gen.c (genAnd, genOr),
6362         * src/mcs51/peeph.def,
6363         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6364
6365 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6366
6367         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6368         * src/SDCCdflow.c
6369         * src/SDCCcse.c
6370         * src/SDCCcse.h
6371         * src/SDCCBBlock.h
6372         * src/SDCCBBlock.c
6373
6374 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6375
6376         fixed bug #845089
6377         * src/SDCCbitv.h,
6378         * src/SDCCbitv.c: added function to free a bitvector
6379         * src/SDCClrange.h,
6380         * src/SDCClrange.c: added function to recompute the liveranges
6381         * src/avr/ralloc.c,
6382         * src/ds390/ralloc.c,
6383         * src/hc08/ralloc.c,
6384         * src/mcs51/ralloc.c,
6385         * src/pic/ralloc.c,
6386         * src/pic16/ralloc.c,
6387         * src/xa51/ralloc.c,
6388         * src/z80/ralloc.c: recompute the liveranges after register packing
6389
6390 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6391
6392         * src/SDCCloop.c (newInduction): fixed bug #845630
6393
6394 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6395
6396         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6397         inadvertantly left behind from my 2003-11-12 change
6398
6399 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6400
6401         Updated headers I neglected to commit yesterday.
6402         * src/SDCClrange.h,
6403         * src/SDCCicode.h
6404
6405 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6406
6407         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6408         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6409         * src/SDCCopt.c (eBBlockFromiCode),
6410         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6411         the creation of the key hash table from the sequencing so it can be used
6412         earlier (for some GCSE bug fixes still pending)
6413
6414 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6415
6416         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6417         * support/regression/tests/addsub.c: testing genPlus shortcut
6418
6419 2003-11-15  Borut Razem <borut.razem AT siol.net>
6420
6421         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6422
6423 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6424
6425         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6426         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6427         ordering is immaterial.
6428         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6429
6430 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6433         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6434         (SIGSEV) of bug #840381
6435         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6436         unlink new file before rename if new and old filenames are the same)
6437
6438 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6439
6440         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6441         uninitialized variables) for the mcs51. Set environment variable
6442         SDCC_GENRAMCLEAR to test.
6443         xdata initialization slightly shorter
6444
6445 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6446
6447         * src/SDCCsymt.h,
6448         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6449         #838241 & 780691 (basicly the same bug)
6450         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6451         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6452
6453 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6454
6455         * src/SDCCmain.c (linkEdit): "fix" #834252
6456
6457 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6458
6459         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6460         * src/SDCCast.h,
6461         * src/SDCC.y: fixed bug #819403
6462
6463 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6464
6465         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6466         the reentrant attribute.
6467         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6468         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6469         simulation
6470         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6471         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6472         erroneously reduced to a literal.
6473         * src/hc08/ralloc.c (packRegisters, rematStr),
6474         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6475         some cases
6476
6477 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6478
6479         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6480         * doc/sdccman.lyx: changed from 'article' to 'book'
6481         * doc/Makefile: readded test_suite_spec and cdbfileformat
6482
6483 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6484
6485         * device/include/stdlib.h: include malloc.h to comply with ANSI
6486         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6487
6488 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6489
6490         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6491         * doc/clean.mk: also remove *.out files
6492         * doc/sdccman.lyx: some additions, larger top/bottom margins
6493
6494 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6495
6496         * src/SDCC.y: fixed bug #837365
6497         * support/regression/tests/bitopcse.c
6498         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6499         a symbol (might be valop instead)
6500         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6501         * device/lib/clean.mk: added hc08 to the cleaning list
6502
6503 2003-11-04  Borut Razem <borut.razem AT siol.net>
6504
6505         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6506           made 2003-11-04
6507         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6508           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6509           malloc is declared in standard stdlib.h
6510
6511 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6512
6513         * device/lib/hc08/Makefile: need to clean .rel not .o files
6514         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6515
6516 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6517
6518         * src/port.h,
6519         * src/hc08/main.c,
6520         * src/mcs51/main.c,
6521         * src/ds390/main.c,
6522         * src/z80/main.c,
6523         * src/avr/main.c,
6524         * src/pic/main.c,
6525         * src/pic16/main.c,
6526         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6527         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6528         tests (which uses the port's oclsExpense function)
6529         * src/SDCC.y,
6530         * src/SDCCast.c,
6531         * src/SDCCicode.c,
6532         * src/hc08/gen.c,
6533         * src/ds390/gen.c,
6534         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6535
6536 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6537
6538         * src/SDCCcse.c (ifxOptimize),
6539         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6540         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6541         deleting the IFX iCode.
6542         * src/hc08/ralloc.c: reduced unneeded slocs
6543         * src/hc08/gen.c: fixed bug in asmopToBoolean
6544
6545 2003-11-04  Borut Razem <borut.razem AT siol.net>
6546
6547         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6548           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6549           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6550           transferred to configure
6551
6552 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6553
6554         Use headers defined in the C[++] standards:
6555         * sim/ucsim/gui.src/serio.src/fileio.cc
6556         * sim/ucsim/gui.src/serio.src/frontend.cc
6557         * sim/ucsim/gui.src/serio.src/main.cc
6558         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6559         * support/Util/NewAlloc.c
6560         * as/hc08/lklibr.c
6561         * as/mcs51/lklibr.c
6562         * as/z80/aslist.c
6563         * as/z80/assym.c
6564
6565 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6566
6567         * Added MSVC projects for hc08 assembler and linker:
6568         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6569         /as/hc08/link_hc08.dsp
6570
6571 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6572
6573         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6574
6575 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6576
6577         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6578
6579 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6580
6581         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6582
6583 2003-10-31  Borut Razem <borut.razem AT siol.net>
6584
6585         * support/cpp2/cpplib.h,
6586           support/cpp2/cpplib.c,
6587           support/cpp2/cpplex.c,
6588           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6589           to switch _asm block preprocessing on / off. Default is
6590           #pragma preproc_asm +
6591
6592 2003-10-31  Borut Razem <borut.razem AT siol.net>
6593
6594         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6595           when outputting comment blocks (when executed with -C option) and
6596           _asm (SDCPP specific) blocks
6597
6598 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6599
6600         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6601
6602 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6603
6604         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6605
6606 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6607
6608         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6609         * src/SDCCast.c (decorateType): fixed bug #832664
6610
6611 2003-10-31  Borut Razem <borut.razem AT siol.net>
6612
6613         * support\cpp2\cpplex.c: fixed for SDCPP:
6614           comments(when executed with -C option) and _asm blocks
6615           were included even if they where in skipped #if block.
6616           Applied solution from GCC cpp 3.3.2
6617
6618 2003-10-31  Borut Razem <borut.razem AT siol.net>
6619
6620         * src/SDCC.lex: sdcc now understands both formats:
6621           '# <line_number> <file_name>' and
6622           '#line <line_number> <file_name>'
6623         * support/cpp2/cppmain.c: sdcpp now generates the standard
6624           '# <line_number> <file_name>' instead of former
6625           '#line <line_number> <file_name>'
6626
6627 2003-10-30  Borut Razem <borut.razem AT siol.net>
6628
6629         * support/cpp2/cpphash.h,
6630         * support/cpp2/cpplib.h
6631         * support/cpp2/cpplex.c,
6632         * support/cpp2/cppmain.c,
6633         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6634
6635 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6636
6637         Fixed a number of problems revealed by bug #827883.
6638         * src/SDCCloop.c (loopInvariants): Spill location of the
6639         result operand should be recomputed if extracted from
6640         a loop. Also, don't extract assignments of an iTemp
6641         from a literal.
6642         * src/SDCCast.c (isConformingBody): loop reversal should
6643         not occur if the control variable is involved with a
6644         relational operator.
6645
6646 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6647
6648         * .version: bumped to 2.3.6 to reflect the big improvements
6649         made by Erik and Klaus. Thanks!
6650
6651 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6652
6653         Replaced the livrange code.
6654         * src/SDCClrange.c: added new LR code
6655         * src/SDCCloop.c,
6656         * src/SDCCBBlock.h: removed remainig parts from old LR code
6657         * src/ds390/ralloc.c,
6658         * src/ds390/gen.c: minor fixes to make it work with new code
6659
6660 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6661
6662         * as/hc08/asm.h,
6663         * as/hc08/lkrloc.c,
6664         * src/hc08/gen.c,
6665         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6666         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6667         (tweaked fix for bug #818696)
6668
6669 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6670
6671         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6672
6673 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6674
6675         * src/SDCCmain.c,
6676         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6677         * src/mcs51/gen.c (gencjneshort),
6678         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6679         more efficient (per Scott Bronson's suggestion)
6680
6681 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6682
6683         Extended the semantics of the critical keyword to include
6684         individual statements. See RFE #827755 and #799831
6685         * src/SDCC.y
6686         * src/SDCCicode.c
6687         * src/SDCCopt.c
6688         * src/SDCCast.c
6689         * support/Util/SDCCerr.c
6690         * support/Util/SDCCerr.h
6691         * src/mcs51/gen.c
6692         * src/ds390/gen.c
6693         * src/hc08/gen.c
6694
6695 2003-10-19  Borut Razem <borut.razem AT siol.net>
6696
6697         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6698
6699 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6700
6701         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6702         Fixed bug #818696
6703         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6704         and predecrement operand is displayed
6705
6706 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6707
6708         * src/SDCCval.c (valMinus): fixed bug #826041
6709
6710 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6711
6712         Some hc08 related updates that I missed earlier
6713         * sim/ucsim/stypes.h
6714         * support/regression/ports/hc08/spec.mk
6715
6716 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6717
6718         New target "hc08" for the Motorola 68hc08 family of micros
6719
6720         * configure
6721         * configure.in
6722         * Makefile
6723         * src/hc08/*
6724         * src/SDCCmain.c
6725         * src/port.h
6726         * sim/ucsim/hc08.src/*
6727         * sim/ucsim/configure.in
6728         * src/ucsim/configure
6729         * sim/ucsim/packages_in.mk
6730         * as/hc08/*
6731         * as/Makefile
6732         * device/include/mc68hc908qy.h
6733         * device/lib/hc08/*
6734         * device/lib/Makefile.in
6735         * support/regression/ports/hc08/*
6736         * support/regression/Makefile
6737
6738 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6739
6740         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6741         regression test
6742         * src/ds390/gen.c (genCast): fixed bug #821957
6743
6744 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6745
6746         * device/lib/logf.c: "fixed" overlay bug
6747         * support/regression/ports/host/spec.mk: added m library
6748         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6749         * support/regression/tests/float_trans: added (for Eric)
6750
6751 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6752
6753         * src/mcs51/gen.c (genCpl): fixed bug
6754         http://sf.net/mailarchive/message.php?msg_id=6263915
6755
6756 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6757
6758         * src/SDCCast.c (decorateType): added extended constant folding
6759         * src/SDCCsymt.c (computeType): cleanup
6760         * src/SDCCval.c (valShift): minor optimization
6761         * support/regression/tests/ast_constant_folding.c: added
6762
6763 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6764
6765         * src/SDCCmain.c: removed some unintended changes
6766
6767 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6768
6769         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6770         * src/z80/gen.c: fixed part of bug #817589
6771         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6772
6773 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6774
6775         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6776         * src/SDCCcflow.c
6777         * src/SDCCcse.c
6778         * src/SDCCdflow.c
6779         * src/SDCClabel.c
6780         * src/SDCClrange.c
6781         * src/SDCCmem.c
6782         * src/SDCCopt.c
6783         * src/SDCCpeeph.c
6784         * src/SDCCset.c
6785         * src/avr/ralloc.c
6786         * src/ds390/ralloc.c
6787         * src/izt/ralloc.c
6788         * src/mcs51/ralloc.c
6789         * src/pic/ralloc.c
6790         * src/pic16/ralloc.c
6791         * src/xa51/ralloc.c
6792         * src/z80/ralloc.c
6793         * src/z80/gen.c: removed unused label "release:"
6794
6795 2003-10-06  Borut Razem <borut.razem AT siol.net>
6796
6797         * src/SDCC.lex: removed definition of unused variables
6798           save_optimize and save_options
6799
6800 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6801
6802         * clean.mk: removed '=' in "-maxdepth=1"
6803         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6804         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6805
6806 2003-10-06  Borut Razem <borut.razem AT siol.net>
6807
6808         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6809           my_unput() replaced by unput()
6810
6811 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6812
6813         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6814         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6815         type-punned pointer will break strict-aliasing rules"
6816         Old LR behaviour is again default; Klaus' LR can be choosen by
6817         defining the environment variable LRKLAUS
6818         * src/SDCCBBlock.h
6819         * src/SDCCloop.c
6820         * src/SDCClrange.c
6821         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6822         * clean.mk: fixed removal of files in bin/CVS/
6823         * device/lib/clean.mk: fixed removal of directories small and large
6824         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6825         * src/SDCCicode.c,
6826         * src/SDCCval.c: removed superflous test for pedantic
6827
6828 2003-10-05  Borut Razem <borut.razem AT siol.net>
6829
6830         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6831           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6832           message "unmatched #pragma SAVE and #pragma RESTORE"
6833
6834 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6835
6836         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6837           assembly, critical functions, atomic, nojtbound)
6838
6839 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6840
6841         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6842         * src/SDCCBBlock.h
6843         * src/SDCCloop.c
6844         * src/SDCCloop.h
6845         * src/SDCClrange.c
6846
6847 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6848
6849         * src/z80/gen.h,
6850         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6851         * src/mcs51/gen.h
6852         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6853         * src/ds390/gen.h
6854         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6855         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6856         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6857
6858 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6859
6860         * src/z80/gen.c (genRet): fixed bug #524753
6861         * src/z80/gen.c (genCast): fixed internal error on cast from
6862         pointer to long
6863         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6864         fix for bug #477835 to the z80
6865         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6866         for tracking iCodes in the peephole optimizer for z80
6867
6868 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6869
6870         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6871         the other part of bug #814548
6872         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6873
6874 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6875
6876         * src/SDCCcse.c: fixed part of bug #814548
6877
6878 2003-09-28  Borut Razem <borut.razem AT siol.net>
6879
6880         * src/asm.c: rewrite of printILine() to use temporary file instead
6881           a pipe
6882         * src/xa51/main.c: commented out declaration of int rewinds
6883
6884 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6885
6886         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6887
6888 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6889
6890         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6891         * src/asm.c (printILine): Fixed bug #811015
6892
6893 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6894
6895         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6896         freeing.
6897
6898 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6899
6900         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6901         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6902         to correctly handle general case of AOP_PAIRPTR
6903         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6904
6905 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6906
6907         * src/mcs51/ralloc.c (fillGaps),
6908         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6909         register positioning bug)
6910
6911 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6912
6913         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6914
6915 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6916
6917         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6918         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6919         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6920         (ralloc doesn't intentionally do this now, but perhaps later)
6921         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6922         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6923         register positioning bugs (Fixed bug #762602 and #795325)
6924         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6925         (Fixed bug #808779)
6926         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6927         lines that --i-code-in-asm generates
6928
6929 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6930
6931         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6932         trying to fclose a FILE* that was already closed.
6933
6934 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6935
6936         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6937         of const struct should be treated as if const themselves)
6938
6939 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6940
6941         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6942
6943 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6944
6945         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6946         Unix (/n) and DOS (/r/n) line terminations.
6947
6948 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6949
6950         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6951         bug #613775
6952
6953 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6954
6955         * src/mcs51/gen.c (genFunction, genEndFunction),
6956         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6957         and restore of EA so that stack offsets to parameters are
6958         correct when using both critical and reentrant/stack-auto.
6959         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6960         size (can be triggered in error if sloc is shared between
6961         different sized objects)
6962         * device/include/float.h: fixed macros to explicitly use
6963         unsigned long where needed
6964
6965 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6966
6967         Feature req. 799831: added code to allow nesting of critical functions
6968         * src/mcs51/gen.c (genFunction, genEndFunction)
6969         * src/ds390/gen.c (genFunction, genEndFunction)
6970
6971 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6972
6973         * src/SDCCsymt.c (sclsFromPtr),
6974         * src/SDCCsymt.h,
6975         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6976         support for standard C idiom of memory mapped variables; for
6977         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6978         to xdata int at 0x1234 tempvar = 1.
6979         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6980         provided by Akiya ISHIDA
6981
6982 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6983
6984         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6985         * src/SDCCval.c (constVal): added reduction from int to char
6986         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6987         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6988         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6989         to ignore the sign
6990         * support/regression/tests/shifts.c: fixed
6991
6992 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6993
6994         * src/z80/gen.c (genXor): Fixed bug #805445
6995
6996 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6997
6998         Fixed bug #621531 (const & volatile confusion in the type chain).
6999         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7000         refer to the const or volatile state of the pointer itself.
7001
7002         * src/SDCCast.c
7003         * src/SDCCglue.c
7004         * src/SDCCicode.c
7005         * src/SDCCsymt.c
7006         * src/SDCCval.c
7007         * src/SDCC.y
7008         * src/SDCCsymt.h
7009         * src/pic/gen.c
7010         * src/pic/ralloc.c
7011         * src/pic16/gen.c
7012         * src/pic16/ralloc.c
7013         * support/regression/tests/const.c
7014
7015 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7016
7017         When checking for duplicated modules, use absolute paths
7018         instead of relative paths.  Files changed:
7019
7020         * as/mcs51/lklib.c
7021         * link/z80/lklib.c
7022
7023 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7024
7025         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7026
7027 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7028
7029         * device/include/string.h: added size_t typedef, changed
7030         prototypes to use size_t, eliminated separate reentrant and
7031         non-reentrant declarations, added _memmove declaration
7032         * device/lib/_memcpy.c: changed to use size_t instead of int,
7033         changed /4 to >>2 to avoid division library call
7034         * device/lib/_memcmp.c,
7035         * device/lib/_memset.c,
7036         * device/lib/_strncat.c,
7037         * device/lib/_strncpy.c,
7038         * device/lib/_strncmp.c: changed to use size_t instead of int
7039         * device/lib/_memmove.c: new file (fixed bug #772294)
7040         * device/lib/Makefile.in: added _memmove.c
7041         * device/lib/z80/asm_strings.s: fixed bug #772290
7042         * support/regression/tests/bitfields.c: attempt to fix host assertion
7043         failure on amd64-unknown-linux2.2
7044
7045 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7046
7047         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7048         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7049         * as/z80/asmain.c (main): fixed bug #801766
7050
7051 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7052
7053         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7054         compilers
7055
7056 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7057
7058         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7059         reported in bug #800609
7060
7061 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7062
7063         * Top header beautifications in src/pic16 directory:
7064           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7065           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7066           pcoderegs.h, ralloc.c, ralloc.h
7067         * main.c: added top header and GPL license notice
7068         * pcode.c: fixed the if-conditional warning
7069
7070 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7071
7072         * device/lib/_mullong.c: replaced int by short for gcc
7073
7074 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7075
7076         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7077         and JUMPTABLE iCodes properly now (worked by accident before)
7078         * src/mcs51/gen.c (leftRightUseAcc),
7079         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7080         iCode properly now. Use getSize instead of nRegs since a & b
7081         aren't part of the nRegs tally.
7082
7083 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7084
7085         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7086         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7087           before instructions that use the _STATUS register
7088
7089 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7090
7091         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7092         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7093         fetching of the pointer
7094         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7095         copied from genNearPointerSet()
7096         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7097         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7098         If they pop r0/r1 they must be called in the opposite order than aopOp().
7099         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7100         (resp. --stack-auto), prepared for --xstack
7101
7102 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7103
7104         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7105
7106 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7107
7108         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7109         these ports have their own __sdcc_external_start()
7110
7111 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7112
7113         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7114         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7115         type for bits was changed. It resulted in bit variables becoming
7116         global, which is not permitted in PIC 14 assembly output.
7117
7118 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7119
7120         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7121
7122 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7123
7124         Z80 and MCS51 linkers complaint if a public symbol is defined
7125         in more than one library module:
7126
7127         * as/mcs51/lklib.c
7128         * link/z80/lklib.c
7129         * as/mcs51/Makefile.in
7130
7131 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7132
7133         A few small changes that speed up the peephole optimizer.
7134
7135         * src/SDCCpeeph.c
7136
7137 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7138
7139         Try to make the peephole optimizer smarter by maintaining
7140         an association between the assembly source code and the
7141         iCodes that originated them. Put this information to use
7142         with a new peephole rule condition "notVolatile" so that
7143         the rules can be aggressive yet still safe.
7144
7145         * src/SDCCpeeph.c
7146         * src/SDCCpeeph.h
7147         * src/mcs51/gen.c
7148         * src/mcs51/peeph.def
7149
7150 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7151
7152         Fixed bug #741761
7153
7154         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7155         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7156         if the left or right operand symbols have the accuse flag set.
7157
7158 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         Changed the type of the result of the ! (NOT) operator to char;
7161         previously it returned the same type as the source. This allows
7162         us to eliminate all the genFloatNot functions (all of its target
7163         implementations were very buggy) since !float can use the same
7164         code as !long now.
7165
7166         * src/SDCCicode.c (ast2iCode): ! returns char
7167         * src/mcs51/gen.c (genNot, genNotFloat),
7168         * src/ds390/gen.c (genNot, genNotFloat),
7169         * src/z80/gen.c (genNot, genNotFloat),
7170         * src/pic/gen.c (genNot, genNotFloat),
7171         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7172
7173 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7174
7175         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7176         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7177            during interrupts. Ensure WSAVE is located at a shared bank address.
7178         2. Fixed page selection in some places
7179         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7180            the registers name strings.
7181         4. Fixed "signed / unsigned compare" compiler warnings.
7182         5. The PIC port manages its own allocation of the general purpose
7183            registers, but makes no attempt to reuse them. As a result when
7184            compiling it soon runs out of general purpose registers. Some
7185            additional code was added to the files pcode.c and device.c to walk
7186            through the function call tree and rename the registers so that they
7187            get reused.
7188
7189         * src/pic/device.c
7190         * src/pic/gen.c
7191         * src/pic/glue.c
7192         * src/pic/pcode.c
7193         * src/pic/pcode.h
7194         * src/pic/ralloc.c
7195         * src/pic/ralloc.h
7196         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7197         genPlus() & genMinus() when the result is the same as left or right
7198
7199 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7200
7201         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7202
7203 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7204
7205         Made bitfield a distinct type from bit so that bitfields
7206         convert as per ANSI C and bits retain their traditional
7207         boolean style behaviour. Implemented bitfield support in
7208         the z80 port.
7209
7210         * src/SDCCsymt.h,
7211         * src/SDCCsymt.c,
7212         * src/SDCCast.c,
7213         * src/cdbFile.c,
7214         * src/mcs51/gen.c,
7215         * src/ds390/gen.c: bit v bitfield split
7216         * src/z80/gen.c: New support for bitfields
7217         * support/regression/tests/bitfields.c: reenabled z80,
7218         added more tests
7219
7220 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7221
7222         Rules 246.x, 247.x relate to bitfields, the others speed up
7223         access to xdata mapped I/O devices.
7224
7225         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
7226
7227 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7228
7229         Cleaned up genPackBits and genUnpackBits and added two helper
7230         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7231         for literal assignments in genPackBits (thanks to Frieder for
7232         reminding me).
7233
7234         * src/mcs51/gen.c
7235         * src/ds390/gen.c
7236
7237 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7238
7239         Fixed bug #748310 (pointer to function type mishandled when the
7240         function name is omitted). Also fixed a SIGSEGV when a function
7241         attribute (reentrant, etc) is used on a non-function or on a
7242         function but misplaced before the parameter list.
7243
7244         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7245         bug #748310
7246         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7247         * support/Util/SDCCerr.h,
7248         * support/Util/SDCCerr.c: Added func attr misuse error msg
7249
7250 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7251
7252         Fixed bug #787649 by anonymous
7253         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7254         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7255
7256 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7257
7258         Fixed numerous bitfield problems.
7259
7260         * src/SDCC.y: More bitfield related error checking
7261         * src/SDCCsymt.h,
7262         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7263         * support/Util/SDCCerr.h,
7264         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7265         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7266         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7267         * support/regression/tests/bitfields.c: tests added
7268
7269 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7270
7271         Made the constant following the "interrupt" keyword optional. If
7272         omitted, the function will not automatically be given an entry
7273         in the interrupt vector table (similar to #pragma NOIV, but
7274         less syntacticly kludgy). The interrupt number is also now
7275         range checked. Also fixed a bug in the high order bit example
7276         in the manual.
7277
7278         * src/SDCC.y
7279         * src/SDCCmem.c
7280         * src/SDCCglue.c
7281         * src/SDCCsymt.h
7282         * support/Util/SDCCerr.c
7283         * support/Util/SDCCerr.h
7284         * doc/sdccman.lyx
7285
7286 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7287
7288         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7289         * src/SDCCicode.c (operandOperation): rewritten some ops
7290         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7291         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7292         other type
7293         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7294         be re-activated by defining REDUCE_LITERALS)
7295         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7296         unsigned, but are signed by default
7297         * src/SDCCval.c (constVal): rearranged
7298         * src/SDCCval.c (valMod): preliminary fix
7299         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7300         * support/regression/literalop.c: added, work in progress
7301
7302 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7303
7304         Generate warnings for useless declarations like "char data;"
7305         that don't do what new users expect.
7306
7307         * src/SDCC.y
7308         * support/Util/SDCCerr.h
7309         * support/Util/SDCCerr.c
7310
7311 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7312
7313         * src/SDCCval.c (valMult): fix overflow detection of negative int
7314
7315 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7316
7317         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7318
7319         Changes to support big endian targets:
7320
7321         * src/ports.h
7322         * src/SDCCglue.c
7323         * src/avr/main.c
7324         * src/ds390/main.c
7325         * src/izt/i186.c
7326         * src/mcs51/main.c
7327         * src/pic/main.c
7328         * src/pic16/main.c
7329         * src/xa51/main.c
7330         * src/z80/main.c
7331
7332 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7333
7334         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7335         * device/lib/time.c: fixed warning "integer overflow in expression"
7336
7337 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7338
7339         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7340         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7341         constants are unsigned; added recognition of "u" flag for unsigned
7342         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7343         * src/SDCCval.c (valDiv, valMod): fixed signdness
7344         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7345         signedness of modulo, left and right shift
7346         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7347         * support/Util/SDCCerr.h: added warning W_INT_OVL
7348         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7349         * src/SDCCast.c (ast_print): improved output of constants
7350
7351 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7352
7353         Fixed some warnings when building with MSVC:
7354
7355         * as\mcs51\asdata.c
7356         * as\z80\asdata.c
7357         * as\mcs51\asm.h
7358         * as\z80\asm.h
7359         * link\z80\aslink.h
7360         * link\z80\lkdata.c
7361         * link\z80\lkeval.c
7362         * link\z80\lkgb.c
7363         * link\z80\lkihx.c
7364         * link\z80\lks19.c
7365         * link\z80\lksym.c
7366         * support\cpp2\cpplib.c
7367         * src\ds390\gen.c
7368         * src\mcs51\gen.c
7369
7370 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7371
7372         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7373
7374 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7375
7376         * support\librarian\clean.mk: Do not remove Makefile.
7377         * support\librarian\Makefile: added.
7378
7379 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7380
7381         Added librarian to MSVC build:
7382         * all.dsp
7383         * sdcc.dsw
7384         * support\librarian\librarian.dsp
7385
7386         'configure' not needed for librarian, removed:
7387         * support\librarian\configure
7388         * support\librarian\configure.in
7389         * support\librarian\config_in.h
7390         * support\librarian\Makefile.in
7391
7392         Hopefully these ones built the librarian and the rest of sdcc properly:
7393         * Makefile
7394         * Makefile.common.in
7395
7396         Messed up 'configure', so revert to previous version:
7397         * configure
7398         * configure.in
7399
7400 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7401
7402         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7403         there, while the mantissa of a double is "only" 53 bits wide.
7404
7405 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7406
7407         Adding sdcclib to the build.  MSVC project coming soon.
7408         Files added/changed:
7409
7410         * support\librarian\clean.mk
7411         * support\librarian\configure
7412         * support\librarian\configure.in
7413         * support\librarian\config_in.h
7414         * support\librarian\Makefile.bcc
7415         * support\librarian\Makefile.in
7416         * support\librarian\sdcclib.c
7417         * Makefile.bcc
7418         * Makefile
7419         * Makefile.common.in
7420         * configure
7421         * configure.in
7422
7423 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7424
7425         Linker now complaints if linked modules have conflicting options, for
7426         example, one compiled using --model-large and another one compiled with
7427         --model-small.  The following files were modified:
7428
7429         * as\mcs51\asdata.c
7430         * as\mcs51\aslink.h
7431         * as\mcs51\asm.h
7432         * as\mcs51\asmain.c
7433         * as\mcs51\asout.c
7434         * as\mcs51\i51pst.c
7435         * as\mcs51\lkdata.c
7436         * as\mcs51\lklibr.c
7437         * as\mcs51\lkmain.c
7438         * as\z80\asdata.c
7439         * as\z80\asm.h
7440         * as\z80\asmain.c
7441         * as\z80\asout.c
7442         * as\z80\z80pst.c
7443         * link\z80\aslink.h
7444         * link\z80\lkdata.c
7445         * link\z80\lklibr.c
7446         * link\z80\lkmain.c
7447         * src\SDCCglue.c
7448
7449 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7450
7451         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7452         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7453
7454 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7455
7456         * src/z80/mappings.i: fix _mul[us][int,long] entries
7457
7458 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7459
7460         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7461
7462 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7463
7464         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7465         * support/regression/tests/bitopcse.c: added
7466         fixed warning:
7467         * src/avr/gen.c:
7468         * src/pic/gen.c:
7469         * src/pic16/gen.c:
7470         * src/z80/gen.c:
7471         * src/xa51/gen.c:
7472
7473 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7474
7475         added support for new library format to z80, gbz80 linkers:
7476         *link/z80/aslink.h
7477         *link/z80/lklex.c
7478         *link/z80/lklib.c
7479         *link/z80/lklist.c
7480
7481 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7482
7483         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7484         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7485
7486 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7487
7488         added DUMMY_READ_VOLATILE:
7489         * src/SDCC.y:
7490         * src/avr/gen.c:
7491         * src/xa51/gen.c:
7492         * src/z80/gen.c:
7493         * src/pic/gen.c:
7494         * src/pic16/gen.c:
7495         * src/mcs51/gen.c:
7496         * src/ds390/gen.c:
7497         * src/SDCCcse.c (algebraicOpts): many improvements
7498         * src/SDCCcse.h: removed algebraicOpts()
7499         * src/SDCCicode.c (picDummyRead): added
7500
7501 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7502
7503         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7504         "Insufficient space in data memory".
7505
7506 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7507
7508         * src/mcs51/gen.c: fixed bug #771358
7509         * src/z80/gen.c: fixed bug #759087
7510
7511 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7512
7513         * src/pic16/glue.c: minor cleanup by Vangelis
7514
7515 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7516
7517         * device/include/regc515c.h: fixed #758477
7518         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7519         * device/lib/_gptrput.c: saved a few bytes
7520         * my tab spacing is 8, yours too?)
7521         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7522         * device/lib/serial.c: process RX bytes earlier than TX bytes
7523         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7524
7525 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7526
7527         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7528
7529 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7530
7531     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7532
7533 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7534
7535         * device/lib/Makefile.in: bad fix, reverted to 1.43
7536
7537 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7538
7539         * device/lib/Makefile.in: added missing z80 object files
7540
7541 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7542
7543         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7544         pic16 progress by Vangelis:
7545         * src/SDCCglobl.h:
7546         * src/SDCCmain.c:
7547         * src/pic/Makefile:
7548         * src/pic:
7549         * pic/Makefile:
7550         * pic16/device.c:
7551         * pic16/device.h:
7552         * pic16/gen.c:
7553         * pic16/gen.h:
7554         * pic16/genarith.c:
7555         * pic16/glue.c:
7556         * pic16/main.c:
7557         * pic16/pcode.c:
7558         * pic16/pcode.h:
7559         * pic16/pcodepeep.c:
7560         * pic16/peeph.def:
7561
7562 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7563
7564     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7565
7566 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7567
7568     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7569     added gbz80 build to MSVC project.
7570     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7571     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7572     from 8051 stuff and setup so it links using a .lnk file.
7573
7574 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7575
7576     * support/librarian/sdcclib.c: sdcc librarian.
7577     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7578     with sdcclib.
7579
7580 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7581
7582     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7583
7584 2003-07-02  Borut Razem <borut.razem AT siol.net>
7585
7586         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7587         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7588         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7589         src/xa51/main.c, src/z80/main.c:
7590         virtualization of glue() function: each port has it's own glue function,
7591         which is accessed by do_glue function pointer in PORT.general structure
7592
7593 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7594
7595         * DS800C400 fun, improved ROM interface and tinibios.
7596
7597 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7598
7599         * More support for DS80C400. Now includes beginning of interface to ROM.
7600
7601 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7602
7603         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7604
7605 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7606
7607         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7608
7609 2003-06-19  Borut Razem <borut.razem AT siol.net>
7610
7611         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7612
7613 2003-06-19  Borut Razem <borut.razem AT siol.net>
7614
7615         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7616         fixed Z80 port - crt0.o: cannot open.
7617
7618 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7619
7620         * support/Util/MySystem.c (merge_command): revert bad fix
7621
7622 2003-06-18  Borut Razem <borut.razem AT siol.net>
7623
7624         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7625
7626 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7627
7628         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7629         option --use-stdout sends errors to stdout instead of stderr.
7630
7631 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7632
7633         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7634
7635 2003-06-15  Borut Razem <borut.razem AT siol.net>
7636
7637         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7638         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7639         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7640         fixed width array of pointers replaced with sets;
7641         multiple include and lib paths ared transferred to preprocessor and linker
7642         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7643         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7644         fixed width array of pointers
7645         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7646         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7647         fixupPath(), getPathDifference()
7648         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7649         fixed width array of pointers
7650
7651 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7652
7653         * src/pic16/ralloc.c: fix warnings
7654         * src/pic16/pcode.c: fix warning
7655
7656 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7657
7658          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7659         know all the details, but essentially this set of changes enable
7660         the pic16 port to generate movff instructions and generate assembler
7661         directives,
7662         * src/SDCCmain.c:
7663         * src/pic16/gen.c:
7664         * src/pic16/glue.c:
7665         * src/pic16/pcode.c:
7666         * src/pic16/device.c:
7667         * src/pic16/main.c:
7668         * src/pic16/pcode.h:
7669         * src/pic16/pcoderegs.c:
7670         * src/pic16/ralloc.c:
7671         * src/pic16/ralloc.h:
7672
7673 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7674
7675         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7676         added option --vc, so sdcc errors and warnings are compatible with
7677         Microsoft Visual Studio.
7678
7679 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7680
7681         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7682           device/lib/libfloat.lib: added atof function.
7683
7684 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7685
7686         * doc/sdccman.lyx: updated to Lyx 1.3
7687         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7688         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7689         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7690
7691 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7692
7693         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7694
7695 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7696
7697         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7698           additions to the "related tools/documentation" section
7699
7700 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7701
7702         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7703
7704 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7705
7706         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7707         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7708
7709 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7710
7711         * doc/sdccman.lyx: fix double dash and other minor things
7712         * doc/Makefile: fix double dash
7713
7714 2003-05-28  Karl Bongers(patches from Martin Helmling)
7715         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7716           condition and ignore commands.
7717
7718 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7719
7720         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7721           is in parts still quite out of date, I did changes as far as I felt makes sense
7722           for a non-native english speaker.
7723           Please feel free to add to the manual or to correct my changes.
7724         * doc/Makefile: undid touching the date of intermediate tex files.
7725
7726 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7727
7728         * doc/sdccman.lyx: Manual has an index now
7729
7730 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7731
7732         Finalize muluint/mulsint and mululong/mulslong merging:
7733         * device/lib/_mulint.c
7734         * device/lib/_mullong.c
7735         * device/lib/gbz80/mul.s
7736         * device/lib/gbz80/stubs.s
7737         * device/lib/z80/mul.s
7738         * device/lib/z80/stubs.s
7739         * src/SDCCsymt.c (initCSupport)
7740
7741 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7742
7743         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7744         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7745           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7746           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7747           instead of /Zm500.
7748
7749 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7750
7751         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7752           the regression tests I'm not brave enough to enable 245.b, 245.c
7753         * doc/sdccman.lyx: added latex preamble for hyperref package.
7754           Using pdflatex this will give you a hyperlinked pdf file with
7755           bookmarks. (prepend '%' before /usepackage if this breaks something)
7756
7757 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7758
7759          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7760
7761 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7762
7763         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7764
7765 2003-05-21    <johan AT balder>
7766
7767         * src/SDCCglue.c (printIval): fixed bug #739934
7768
7769 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7770
7771         Applied patch from bug 737905 (renamed yylineo to mylineno):
7772         * src/altlex.c
7773         * src/SDCCast.c
7774         * src/SDCglobl.h
7775         * src/SDCC.lex
7776         * src/SDCCsymt.c
7777         * src/SDCCval.c
7778         * src/pic16/pcode.c: Cleaned warnings
7779         * src/pic16/pcodeflow.c: Cleaned warnings
7780         * src/pic16/pcoderegs.c: Cleaned warnings
7781
7782 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7783
7784         * src/pic16/pcode.c: Cleaned warnings
7785         * src/pic16/pcodepeep.c: Cleaned warnings
7786         * src/pic16/ralloc.c: Cleaned warnings
7787
7788 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7789
7790         * doc/sdccman.lyx: fixed bug 739745
7791         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7792
7793 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7794
7795         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7796         it can be defined with CFLAGS when running configure
7797         * src/SDCCmain.c: fixed compiling + linking with object files
7798
7799 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7800
7801         * configure.in: configure for pic16 port,
7802             added --disable-pic16-port
7803         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7804         * src/SDCCmain.c: linkOptions is changed to set *,
7805             added if/endif conditional macros to remove options help
7806             messages from optionsTable when a port is not configured, added
7807             support for the PIc16 port in the ports table, when executing
7808             the compiler with no port specified on command line, a default
7809             port is selected with the new macro DEFAULT_PORT which is
7810             defined in port.h, in setDefaultOptions() linkOptions is removed
7811             from initialization assignment, since now it is a set,
7812             parseCmdLine uses setParseWithComma for linkOptions, in
7813             linkEdit() linkOptions are accessed with new function indexSet()
7814             which returns the i'th item of a set variable. See SDCCset.c, in
7815             linkEdit() when calling buildCmdLine(), added linkOptions as
7816             last argument. Now users can pass arguments to gplink via the
7817             -Wl option, main() uses pic16glue() to glue up pic16 programs
7818         * src/SDCCpeeph.c: various changes to support pic16
7819         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7820             return the i'th item of the set
7821         * src/SDCCset.h: added function prototype for indexSet()
7822         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7823         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7824         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7825             added macro DEFAULT_PORT
7826         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7827         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7828             generated
7829         * src/pic16/glue.c: commented out some error producing lines
7830         * src/pic16/main.c: __config directives are commented out to stop
7831             gpasm complaining and test the linkage with gplink, _linkCmd and
7832             _asmCmd changed to be more gplink and gpasm friendly
7833         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7834             produced an error when parsed, peep rule 12 is added to utilize
7835             movff, but it is commented out since the pCode does not support
7836             yet a command with 2 address arguments
7837
7838 2003-05-18    <johan AT balder>
7839
7840         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7841         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7842 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7843
7844         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7845   Added feature to script commands from file.
7846
7847 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7848
7849         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7850         * src/SDCCutil.c: include ctype.h for win32
7851
7852 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7853
7854         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7855
7856 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7857
7858         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7859   Fixed so you can set breakpoints prior to run, run does not stop
7860   on entry now.  Add tbreak.  Other enhancements and fixes for use
7861   with ddd.
7862
7863 2003-05-12  Borut Razem <borut.razem AT siol.net>
7864
7865         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7866
7867 2003-05-11  Borut Razem <borut.razem AT siol.net>
7868
7869         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7870         the path of bin directory, so that PATH is the only env. variable, which has to be set
7871         in case of standard installation.
7872         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7873         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7874         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7875
7876 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7877
7878         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7879         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7880         temp files are in the port dir; clean the gen/test directory when
7881         generating new test.c
7882         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7883         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7884         * support/regression/tests/zeropad.c: added
7885
7886 2003-05-09    <johan AT balder>
7887
7888         * src/SDCCglue.c: fixed bug #597940
7889
7890 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7891
7892         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7893   cache sfr, optimize next,step, fix off by one sourceline,
7894   support ddd list function.
7895         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7896
7897 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7898
7899         * support/regression/HTMLgen.py: added compare_s2f()
7900         * support/regression/Makefile: redo 1.27
7901         * support/regression/generate-cases.py: redo 1.5
7902
7903 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7904
7905         * support/regression/tests/float.c: workaround 33 bit hex constant
7906         * support/regression/tests/simplefloat.c: fix division for host
7907
7908 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7909
7910         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7911         that tame's the PIC's over-aggressive optimizer.
7912
7913 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7914
7915          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7916          support for MSVC.
7917
7918 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7919
7920         Initial support for DS80C400. "Hello world" runs on TINIm400
7921         (with polled I/O).
7922
7923 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7924
7925          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7926          * Some notes on ddd usage added in debugger/README
7927          Martin Helmling adding more features and fixes for ddd GUI debugger.
7928          Code added for nexti, stepi, up, down, and other adjustments.
7929
7930 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7931
7932         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7933         * src/pic/peeph.def Added two rules to optimize carry manipulation
7934         * src/pic/* removed debug printfs
7935
7936 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7937
7938         * debugger/mcs51/cmd.c: added header newalloc.h
7939
7940 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7941
7942         * as/Makefile: new EXEEXT
7943         * as/z80/Makefile: remove trailing slash of BUILDIR
7944         * as/z80/clean.mk: new EXEEXT
7945         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7946         * support/cpp2/Makefile.in: new EXEEXT
7947         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7948
7949 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7950
7951         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7952         EXEEXT was introduced to fix all related problems with targets
7953         "clean", "install" and "uninstall"; a couple of further flaws
7954         especially with "clean" have been fixed too
7955         * as/mcs51/Makefile.in
7956         * as/mcs51/clean.mk
7957         * as/z80/Makefile
7958         * Makefile
7959         * clean.mk
7960         * debugger/mcs51/Makefile.in
7961         * debugger/mcs51/clean.mk
7962         * link/z80/Makefile
7963         * link/z80/Makefile.in
7964         * link/z80/clean.mk
7965         * link/Makefile
7966         * packihx/Makefile.in
7967         * packihx/clean.mk
7968         * sim/ucsim/Makefile
7969         * sim/ucsim/clean.mk
7970         * sim/ucsim/avr.src/Makefile.in
7971         * sim/ucsim/avr.src/clean.mk
7972         * sim/ucsim/s51.src/Makefile.in
7973         * sim/ucsim/s51.src/clean.mk
7974         * sim/ucsim/xa.src/Makefile.in
7975         * sim/ucsim/xa.src/clean.mk
7976         * sim/ucsim/z80.src/Makefile.in
7977         * sim/ucsim/z80.src/clean.mk
7978         * sim/ucsim/main_in.mk
7979         * sim/ucsim/packages_in.mk
7980         * sim/ucsim/gui.src/Makefile.in
7981         * sim/ucsim/gui.src/serio.src/Makefile.in
7982         * sim/ucsim/gui.src/serio.src/clean.mk
7983         * src/Makefile.in
7984         * src/clean.mk
7985         * support/cpp2/Makefile.in
7986         * support/cpp2/clean.mk
7987         * support/makebin/Makefile
7988         * support/makebin/clean.mk
7989         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7990         * doc/sdccman.lyx: --program-suffix no longer needed
7991
7992 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7993
7994          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7995          Martin Helmling added support for ddd GUI debugger.
7996          Code added to display assembly, set variables, and other commands
7997          to interface to ddd.
7998
7999 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8000
8001         * as/Makefile: fix target clean
8002         * as/clean.mk: fix target clean
8003         * as/z80/clean.mk: fix target clean
8004
8005 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8006
8007         * Makefile.common.in: added  AT EXEEXT AT
8008         * configure.in: removed all mingw32 stuff
8009         * configure: rebuilt from configure.in
8010         * doc/sdccman.lyx: updated section "installation"
8011         * support/scripts/sdcc_mingw32: adapted to configure
8012         * support/scripts/sdcc_cygwin_mingw32: added
8013
8014 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8015
8016         * src/pic Added object file support for the PIC port
8017         * src/pic Applied patch from Craig Franklin (this started the object file support)
8018         * src/regression Updated the PIC regression tests for object files
8019
8020 2003-04-20  Borut Razem <borut.razem AT siol.net>
8021
8022         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8023           lklex.c: In function `getfid':
8024           lklex.c:203: warning: array subscript has type `char'
8025         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8026           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8027         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8028           stack handling macros
8029
8030 2003-04-19  Borut Razem <borut.razem AT siol.net>
8031
8032         * "handling space characters in file path" task:
8033         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8034         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8035         * support/Util/MySystem.h: make it self-sufficient
8036         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8037           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8038           handling space characters in file path
8039         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8040           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8041         * support/Util/MySystem.c: handling space characters in executable's path
8042
8043 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8044
8045         * as/z80/Makefile: fix permanent rebuild of z80
8046         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8047         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8048
8049 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8050
8051         * src/SDCCopt.c: add special case optimization to replace modulo by
8052           a power of two with a bitwise AND.
8053
8054 2003-04-18    <johan AT balder>
8055
8056         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8057
8058 2003-04-17    <johan AT balder>
8059
8060         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8061         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8062
8063 2003-04-13  Borut Razem <borut.razem AT siol.net>
8064
8065         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8066         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8067           fixed mingw problem in adl_NORMALIZE_PATH
8068
8069 2003-04-12  Borut Razem <borut.razem AT siol.net>
8070
8071         * fixed "#pragma SAVE/RESTORE can not be nested":
8072         * src/SDCC.lex: reworked pragma handling functions
8073         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8074         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8075
8076 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8077
8078         * src/SDCCutil.c (pathEquivalent): defined but not used
8079         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8080         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8081         * configure: rebuilt from configure.in
8082         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8083         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8084         * device/include/Makefile.in: replace sdcc_datadir
8085         * device/lib/Makefile.in: replace sdcc_datadir
8086         * Makefile.common.in: add LDFLAGS from configure
8087         * packihx/Makefile.in: use LDFLAGS
8088         * src/Makefile.in: use LDFLAGS
8089         * support/cpp2/Makefile.in: add LDFLAGS from configure
8090         * support/makebin/Makefile: use LDFLAGS
8091         * .version: bumped version number to 2.3.5
8092
8093 2003-04-12  Borut Razem <borut.razem AT siol.net>
8094
8095         * completed "different paths" task:
8096         * src/SDCCmacro.c: fixed bug in handling quotes
8097         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8098         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8099
8100 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8101
8102         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8103
8104 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8105
8106         * ds390/gen.c ds390/peeph.def: fix bug 706781
8107
8108 2003-04-11  Borut Razem <borut.razem AT siol.net>
8109
8110         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8111
8112 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8113
8114         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8115         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8116          set - this bit used to not be set...).
8117         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8118           bad code in PIC Port
8119         * src/regression/and2.c added to test bug 609268
8120         * src/regression/Makefile added and2.c to regression test
8121
8122
8123 2003-04-08    <johan AT CP255758-A>
8124
8125         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8126         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8127         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8128
8129 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8130
8131         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8132         fix bug #487815
8133         * support/cpp2/Makefile.in: fix bug #487815
8134         * configure: rebuilt from configure.in
8135         * Makefile.common.in: docdir changed, new path suffixes
8136         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8137         * sdcc_vc_in.h: reflect changes from sdccconf.h
8138         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8139         * src/SDCCutil.h: remove BINDIR hack
8140         * doc/sdccman.lyx: update new path hierarchy
8141
8142 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8143
8144         * src/SDCCpeeph.c: added okToRemoveSLOC test
8145
8146 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8147
8148         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8149
8150 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8151
8152         * src/SDCCpeeph.c: added labelIsReturnOnly test
8153         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8154
8155 2003-04-05    <johan AT balder>
8156
8157         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8158         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8159         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8160         * src/SDCCast.c: fixed a warning
8161         * src/SDCCast.h: fixed a warning
8162         * src/SDCCicode.c (operandFromAst): fixed a warning
8163
8164 2003-04-04    <johan AT balder>
8165
8166         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8167         * src/SDCCast.c (decorateType): fixed bug #715076
8168         * src/SDCC.y: fixed bug #702907
8169
8170 2003-04-03    <johan AT balder>
8171
8172         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8173         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8174         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8175         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8176         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8177
8178 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8179
8180         * _decdptr.c: fix return values
8181         * _gptrget.c: fix return values
8182         * _gptrgetc.c: fix return values
8183         * _gptrput.c: fix return values
8184         * _mulint.c: fix return values
8185         * as/z80/Makefile: fix 'make -j' problem
8186
8187 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8188
8189         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8190         * configure.in: big cleanup, updated to autoconf 2.5x
8191         * configure: rebuilt from configure.in
8192         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8193         * sdcc_vc_in.h: reflect changes from sdccconf.h
8194         * doc/Makefile: fixed a flaw in "make install"
8195
8196 2003-04-02    <johan AT balder>
8197
8198         * src/ds390/gen.c (genCmp): no comments
8199         * src/mcs51/gen.c (genCmp): no comments
8200         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8201         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8202
8203 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8204
8205         * support/regression/generate-cases.py: place generated file in given sub directory
8206         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8207         * support/regression/Makefile: improvements for 'make -j';
8208         side effect: it's simpler and faster now
8209
8210 2003-03-31  Borut Razem <borut.razem AT siol.net>
8211
8212         * src/z80/main.c: link-{port} and as-{port} defined without path
8213         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
8214
8215 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
8216
8217         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
8218
8219 2003-03-30  Borut Razem <borut.razem AT siol.net>
8220
8221         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
8222           changed type of list parameter to set
8223         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
8224         * src/port.h: changed type of do_assemble() parameter to set
8225         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
8226           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8227           definition of "cppoutfilename" macro with NULL value in preProcess()
8228         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8229         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8230         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8231           replaced with set *binPathSet
8232         * shash_add() deallocates the item, if allready exsists, before adding the new one
8233         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8234
8235 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8236
8237         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8238           a nested for loop bug in the PIC port
8239         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8240           for loops
8241
8242 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8243
8244         * support/Util/dbuf.h: remove C++ stuff to make it portable
8245
8246 2003-03-28  Borut Razem <borut.razem AT siol.net>
8247
8248         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8249           literal strings in stringLiteral()
8250         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8251         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8252           to the project
8253
8254 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8255
8256         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8257
8258 2003-03-26    <johan AT balder>
8259
8260         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8261         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8262         * src/SDCCast.c (decorateType): fixed " -v < 3"
8263
8264 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8265
8266         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8267         Added Lenny Story's debug infrastructure changes:
8268         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8269         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8270         * src/cdbFile.c: added
8271         * src/SDCCdebug.c: added
8272         * src/SDCCdebug.h: added
8273         * src/SDCCast.c (createFunction)
8274         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8275         * src/SDCCmain.c (parseCmdLine, main)
8276         * src/SDCCmem.c (redoStackOffsets)
8277         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8278         * src/SDCCsymt.h
8279         * src/common.h
8280         * src/avr/gen.c (genAVRCode)
8281         * src/ds390/gen.c (gen390Code)
8282         * src/mcs51/gen.c (gen51Code)
8283         * src/pic/gen.c (genpic14Code)
8284         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8285         * src/xa51/gen.c (genXA51Code)
8286         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8287
8288 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8289
8290         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8291         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8292
8293 2003-03-22    <johan AT balder>
8294
8295         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8296
8297 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8298
8299         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8300         * doc/cdbfileformat.lyx: added, written by Lenny Story
8301         * doc/Makefile: added cdbfileformat.lyx
8302         * doc/clean.mk: added cdbfileformat.lyx
8303
8304 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8305
8306         * src/mcs51/peeph.def: fix bug #705773
8307
8308 2003-03-20    <johan AT balder>
8309
8310         An sfr/sbit can have an "at #" AND an initializer
8311         * src/SDCCsymt.c (checkSClass):
8312         * src/SDCCmem.c (allocGlobal):
8313         * src/SDCCmem.c (allocLocal):
8314         * src/SDCCast.c (createBlock):
8315
8316 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8317
8318         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8319
8320 2003-03-16    <johan AT balder>
8321
8322         Undid the hackup of const and volatile, the problem is much bigger
8323         * src/SDCC.y:1.65
8324         * src/SDCCast.c:1.171
8325         * src/SDCCglue.c:1.138
8326         * src/SDCCicode.c:1.146
8327         * src/SDCCsymt.c:1.150
8328         * src/SDCCval.c:1.65
8329
8330 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8331
8332         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8333         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8334
8335 2003-03-13    <johan AT balder>
8336
8337         Hackup const and volatile modifiers in type chains a bit:
8338         * src/SDCC.y:1.63
8339         * src/SDCCast.c:1.169
8340         * src/SDCCglue.c:1.136
8341         * src/SDCCicode.c:1.143
8342         * src/SDCCsymt.c1.146
8343         * src/SDCCsymt.h1.59
8344         * src/SDCCval.c:1.63
8345
8346 2003-03-12    <johan AT balder>
8347
8348         * src/SDCCBBlock.h: more LRH debugging junk
8349         * src/SDCCcflow.h: more LRH debugging junk
8350         * src/SDCCloop.c: more LRH debugging junk
8351         * src/SDCC.y (struct_declaration): fixed bug #697590
8352         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8353         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8354         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8355
8356 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8357         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8358         test function names must now match exactly).
8359         * src/SDCCcse.c: added special case in findCheaperOp to allow
8360         extending a short integer. Makes less awful code for bug 700121 test case.
8361
8362 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8363
8364         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8365         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8366
8367 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8368
8369         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8370         actually called (operandsNotEqual() was called for all
8371         operandsNotEqualX tests).
8372
8373 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8374
8375         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8376         with shorter literals. Fixes bug 700121.
8377
8378 2003-03-11    <johan AT balder>
8379
8380         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8381
8382 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8383
8384         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8385         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8386
8387 2003-03-10  Borut Razem <borut.razem AT siol.net>
8388
8389         * src/SDCCmain.c: pipe preprocessor's output
8390         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8391         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8392         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8393         which closes all pipes in pipeSet set
8394         * src/SDCCset.c: free deleted item in function deleteSetItem()
8395         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8396         moved from z80 to src subproject
8397         * .version: increased version number to 2.3.4
8398
8399 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8400
8401         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8402         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8403         * support/regression/ports/xa51/spec.mk: fix typo
8404
8405 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8406
8407         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8408
8409 2003-03-09  Borut Razem <borut.razem AT siol.net>
8410
8411         * src/SDCCmain.c: pipe preprocessor's output
8412         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8413         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8414         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8415         which closes all pipes in pipeSet set
8416         * src/SDCCset.c: free deleted item in function deleteSetItem()
8417         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8418         moved from z80 to src subproject
8419
8420 2003-03-09  Borut Razem <borut.razem AT siol.net>
8421
8422         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8423         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8424         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8425         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8426         * src/SDCCglobl.h: unification of WIN32 native definitions
8427
8428 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8429
8430         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8431
8432 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8433
8434         * src/configure.in:   check for endianess (even while cross-compiling)
8435         * src/configure:      check for endianess (even while cross-compiling)
8436         * src/configure_in.h: check for endianess (even while cross-compiling)
8437         * src/avr/gen.c:        remove old endianess stuff
8438         * src/mcs51/gen.c:      remove old endianess stuff
8439         * src/ds390/gen.c:      remove old endianess stuff
8440         * src/pic/gen.c:        remove old endianess stuff
8441         * src/pic/genarith.c:   remove old endianess stuff
8442         * src/pic/glue.c:       fix endianess check
8443         * src/pic16/gen.c:      remove old endianess stuff
8444         * src/pic16/genarith.c: remove old endianess stuff
8445         * src/pic16/glue.c:     fix endianess check
8446         * src/xa51/gen.c:       remove old endianess stuff
8447         * src/z80/gen.c:        fix endianess check
8448         * src/SDCCglue.c:       fix endianess check
8449         * src/ds390/peeph.def: fix bug 700036
8450
8451 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8452
8453         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8454         * src/configure: find appropriate data-types on host for SDCC's int and long
8455         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8456         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8457         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8458
8459 2003-03-07    <johan AT balder>
8460
8461         Just a big NOOP:
8462                 some minor cleanups before the big shot
8463                 OP_DEFS and OP_USES now use Kevin's protection
8464                 new option --nolabelopt
8465
8466         * src/SDCCBBlock.c:
8467         * src/SDCCast.c,:
8468         * src/SDCCcflow.c:
8469         * src/SDCCcse.c:
8470         * src/SDCCicode.c:
8471         * src/SDCCicode.h:
8472         * src/SDCClabel.c:
8473         * src/SDCCloop.c:
8474         * src/SDCCmain.c:
8475         * src/ds390/ralloc.c:
8476         * src/mcs51/ralloc.c:
8477         * src/pic/ralloc.c:
8478         * src/xa51/ralloc.c:
8479         * src/z80/ralloc.c:
8480
8481 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8482
8483         * src/pic/pcode.c (get_op): fix 64 bit warnings
8484         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8485         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8486         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8487         * support/regression/tests/malloc.c: fix 64 bit warnings
8488
8489 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8490
8491         * src/mcs51/gen.c (genMinus): fixed bug 696436
8492
8493 2003-03-02  Borut Razem <borut.razem AT siol.net>
8494
8495         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8496
8497 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8498
8499         * configure.in: test for mkstemp
8500         * sdccconf_in.h: add HAVE_MKSTEMP
8501
8502 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8503
8504         * device/include/ctype.h: removed warning while using --stack-auto
8505         * device/include/malloc.h: removed warning while using --stack-auto
8506         * device/include/string.h: removed warning while using --stack-auto
8507
8508 2003-02-23  Borut Razem <borut.razem AT siol.net>
8509
8510         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8511         because NDEBUG is defined (see man assert)
8512         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8513
8514 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8515
8516         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8517         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8518
8519 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8520
8521         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8522         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8523
8524 2003-02-18    <johan AT balder>
8525
8526         * as/mcs51/asmain.c (asmbl): module can start with a digit
8527         * as/z80/asmain.c (asmbl): module can start with a digit
8528
8529 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8530
8531         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8532         * src/asm.c: fix pipe() for Mingw32
8533
8534 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8535
8536         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8537         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8538         make -V work again; --c1mode reads now from stdin
8539         * doc/sdccman.lyx: added --c1mode
8540         * support/Util/SDCCerr.c: new messages for c1 mode
8541         * support/Util/SDCCerr.h: new messages for c1 mode
8542         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8543
8544 2003-02-15    <johan AT balder>
8545
8546         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8547
8548 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8549
8550         * doc/sdccman.lyx: Environment variables, -o and other minor things
8551
8552 2003-02-14    <johan AT balder>
8553
8554         * src/xa51/main.c: before anyone really tries to use it :)
8555
8556         * Install doc's in share/sdcc/doc
8557         * removed some obsolete files
8558         * Do a proper make distclean and uninstall
8559         M Makefile.common.in
8560         R sdccbuild.sh
8561         M as/Makefile
8562         M device/include/Makefile.in
8563         M device/lib/Makefile.in
8564         M doc/sdccman.lyx
8565         M link/Makefile
8566         M sim/ucsim/doc/Makefile.in
8567         M src/clean.mk
8568         R src/avr/peeph.rul
8569         R src/xa51/peeph.rul
8570         M support/cpp2/Makefile.in
8571         M support/makebin/Makefile
8572
8573
8574 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8575
8576         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8577
8578 2003-02-10  Borut Razem <borut.razem AT siol.net>
8579
8580         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8581         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8582         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8583         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8584         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8585         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8586         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8587         src/z80/Makefile.bcc: Borland Makefile cleanup
8588         * as/z80/Makefile.bcc: Added Borland Makefile
8589         * support/cpp2/borland.h: Removed
8590
8591 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8592
8593         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8594         * src/SDCC.lex: new pragma NOIV
8595         * src/SDCCglobl.h: new pragma NOIV
8596         * src/SDCCmem.c: new pragma NOIV
8597
8598 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8599
8600         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8601
8602 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8603
8604         * src/SDCCmain.c: signal handling is switched off by --debug
8605         * doc/Makefile: small fix for install; use clean.mk again
8606         * doc/clean.mk: clean *.pdf and *.html too
8607
8608 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8609
8610         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8611         * device/lib/printfl.c: fix a ds390 bug by making it portable
8612         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8613         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8614         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8615         * debugger/mcs51/cmd.c: converted multi-line string literals
8616         * sim/ucsim/globals.cc: converted multi-line string literals
8617         * src/SDCCmain.c: introduced signal handler to remove temp files
8618         * doc/Makefile: small tweaks, implement clean
8619         * doc: removed generated files
8620
8621 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8622
8623         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8624         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8625         Address Record is not correctly generated for DS390."
8626
8627 2003-02-02  Borut Razem <borut.razem AT siol.net>
8628
8629         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8630         * as/mcs51/asm.h: fixed compilation with Borland C
8631         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8632         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8633         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8634         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8635         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8636         src/z80/Makefile.bcc: delete $(LIB) only if exist
8637         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8638
8639 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8640
8641         * device/include/malloc.h: introduced NULL
8642         * device/include/string.h: introduced NULL
8643         * device/include/stdlib.h: introduced NULL
8644         * device/lib/_memcpy.c: removed NULL
8645         * device/lib/_strcat.c: removed NULL
8646         * device/lib/_strchr.c: removed NULL
8647         * device/lib/_strcmp.c: removed NULL
8648         * device/lib/_strcpy.c: removed NULL
8649         * device/lib/_strcspn.c: removed NULL
8650         * device/lib/_strlen.c: removed NULL
8651         * device/lib/_strncat.c: removed NULL
8652         * device/lib/_strncmp.c: removed NULL
8653         * device/lib/_strncpy.c: removed NULL
8654         * device/lib/_strpbrk.c: removed NULL
8655         * device/lib/_strrchr.c: removed NULL
8656         * device/lib/_strspn.c: removed NULL
8657         * device/lib/_strstr.c: removed NULL
8658         * device/lib/_strtok.c: removed NULL
8659         * device/lib/malloc.c: removed NULL, include own header
8660
8661 2003-02-02    <johan AT balder>
8662
8663         * 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
8664         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8665         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8666         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8667         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8668         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8669
8670 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8671
8672         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8673         area 'DATA'"
8674
8675 2003-02-01    <johan AT balder>
8676
8677         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8678
8679 2003-01-31    <johan AT CP255758-A>
8680
8681         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8682
8683 2003-01-30    <johan AT balder>
8684
8685         * src/SDCCBBlock.c: automatic bug detection
8686         * src/SDCCicode.c: automatic bug detection
8687
8688 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8689
8690         * src/SDCCglobl.h:   now --xram-size 0 works
8691         * src/SDCCmain.c:    now --xram-size 0 works
8692
8693 2003-01-29    <johan AT balder>
8694
8695         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8696
8697 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8698
8699         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8700         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8701         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8702         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8703         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8704         * src/SDCCmain.c:    Added options --xram-size and --code-size
8705
8706 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8707
8708         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8709         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8710
8711 2003-01-27    <johan AT balder>
8712
8713         * src/SDCC.y: fixed bug #613764
8714
8715 2003-01-26    <johan AT balder>
8716
8717         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8718         * src/SDCCsymt.h: fixed bug #673374
8719         * src/SDCCglue.c: fixed bug #661910
8720         * src/SDCCast.c: fixed bug #458099 and 673374
8721
8722 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8723
8724         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8725         * as/mcs51/strcmpi.h: added
8726         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8727         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8728         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8729         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8730         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8731         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8732         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8733         * as/mcs51/Makefile.aslink: new module strcmpi
8734         * as/mcs51/Makefile.asx8051: new module strcmpi
8735         * as/mcs51/Makefil.bcc: new module strcmpi
8736         * as/mcs51/Makefile.in: new module strcmpi
8737         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8738
8739 2003-01-26    <johan AT balder>
8740
8741         * src/SDCCglue.c: reverted back to 1.124
8742         * src/SDCCast.c: reverted back to 1.156
8743         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8744
8745 2003-01-25    <johan AT balder>
8746
8747         * src/SDCCglue.c: A better fix for bug #661910
8748         * src/SDCCast.c: A better fix for bug #661910
8749         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8750
8751 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8752
8753         * src/Makefile.in: remove spawn.o
8754         * src/SDCCmain.c: remove spawn.h
8755         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8756         * src/spawn.c: removed
8757         * src/spawn.h: removed
8758         * support/regression/ports/ds390/spec.mk: link with -r
8759
8760 2003-01-24    <johan AT CP255758-A>
8761
8762         * src/ds390/gen.c (aopOp): fixed bug #667458
8763         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8764         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8765         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8766
8767 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8768
8769         * src/mcs51/peeph.def: better assembler identation by Frieder
8770         * src/mcs51/gen.c: better assembler identation by Frieder
8771
8772 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8773
8774         * as/z80/string.h: removed for gcc 3.2
8775         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8776         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8777
8778 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8779
8780         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8781         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8782         * support/regression/Makefile: separate temp files for ports
8783         * support/regression/generate-cases.py: separate temp files for ports
8784         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8785         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8786
8787 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8788
8789         * moved tinitalk to device/examples/ds390
8790
8791 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8792
8793         * as/mcs51/lkmem.c: rflag is for DS390
8794         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8795         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8796                          (linkEdit): move mem- and map-files the same way as ihx-files
8797         * src/z80/main.c (_setDefaultOptions): removed --generic
8798         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8799         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8800         * src/pic/glue.c (picglue): --c1mode works again
8801         * src/pic16/glue.c (pic16glue): --c1mode works again
8802         * src/asm.c (printCLine): fix #660034
8803
8804 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8805
8806         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8807         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8808         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8809         * as/mcs51/lkmem (summary): better fix for sp problem
8810         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8811         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8812         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8813                                               remove --stack-after-data
8814
8815 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8816
8817         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8818         * src/SDCCutil.c (join): ugly bug: missing '\0'
8819         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8820
8821 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8822
8823         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8824         * src/port.h: typo
8825         * src/pic/main.c (_asmCmd): gpasm supports -o
8826         * src/z80/main.c: more general macros
8827         * device/lib/Makefile.in: remove intermediate files
8828
8829 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8830
8831         * .version: Bumped version number to 2.3.3
8832         * src/SDCCBBlock.c: new option -o
8833         * src/SDCCglobl.h: new option -o
8834         * src/SDCCglue.c: new option -o
8835         * src/SDCCmain.c: new option -o
8836         * src/asm.c: new option -o
8837         * src/ds390/main.c: new option -o
8838         * src/pic/glue.c: new option -o
8839         * src/pic/pcode.c: new option -o
8840         * src/pic/ralloc.c: new option -o
8841         * src/pic16/glue.c: new option -o
8842         * src/pic16/pcode.c: new option -o
8843         * src/pic16/ralloc.c: new option -o
8844         * src/z80/main.c: new option -o
8845         * device/lib/Makefile.in: use -o
8846         * support/regression/ports/ds390/spec.mk: use -o
8847         * support/regression/ports/gbz80/spec.mk: use -o
8848         * support/regression/ports/mcs51/spec.mk: use -o
8849         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8850         * support/regression/ports/z80/spec.mk: use -o
8851         * support/regression/ports/ucz80/spec.mk: use -o
8852         * support/regression/ports/xa51/spec.mk: use -o
8853         * support/regression/fwk/lib/timeout.c: fix usage string
8854
8855 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8856         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8857
8858 2003-01-07    <johan AT balder>
8859
8860         * src/SDCCast.c (decorateType): fixed bug #600035
8861
8862 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8863         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8864         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8865         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8866         * src/pic/pcode.c: outcommented unused variable to remove warnings
8867         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8868
8869 2003-01-06    <karl AT turbobit.com>
8870         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8871    regression tests.
8872
8873 2003-01-06    <johan AT balder>
8874
8875         * src/SDCCicode.c: fixed array add
8876
8877 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8878         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8879         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8880
8881 2003-01-04    <johan AT balder>
8882
8883         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8884
8885 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8886         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8887
8888 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8889         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8890         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8891
8892 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8893         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8894
8895 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8896         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8897
8898 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8899         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8900
8901 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8902
8903     * in \sdcc\as\mcs51\ changed these files in order to create an
8904     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8905     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8906     following files to include the previous two files: aslink.dsp,
8907     Makefile.aslink, Makefile.bcc, and Makefile.in.
8908
8909     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8910     .adb instead of .cdb
8911
8912 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8913
8914         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8915         value from option --iram-size.
8916
8917 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8918
8919         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8920         dram[] array.
8921
8922 2002-09-18    <wiml AT hhhh.org>
8923
8924         * SDCClrange.h: exposed setFromRange() and setToRange()
8925         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8926           packRegsForAccUse() (bug 542397)
8927         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8928           multiple times and emitting the fetch operations more than once
8929           added aopGetUsesAcc() function to allow binary operators to
8930           fetch their operands in the correct order; made genMinus() emit
8931           compact code for X = LITERAL - Y
8932
8933 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8934         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8935         sprintf() in line 1267.
8936
8937 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8938         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8939         like ports.
8940
8941 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8942         Changes to aslink (All the changes are marked with 'JCF'):
8943
8944         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8945         summary().
8946
8947         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8948         area BSEG.  Also moves, if possible, the DATA area down into the internal
8949         ram so more space is available.
8950
8951         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8952         sflag.
8953
8954         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8955         not bytes.  Function summary() which creates a memory usage summary
8956         file with extension .mem.  Reports of overlaping stack and small stack
8957         size.  If the space for the stack is less than 16 bytes aslink trows a
8958         warning.
8959
8960         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8961         the 8051.  Option 'y' for memory summary output file.
8962
8963         Changes to sdcc (All the changes are marked with 'JCF'):
8964
8965         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8966
8967         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8968         overlaying area for it (uses RegBankUsed[4]).
8969
8970         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8971         bank zero as used by default.  By default aslink locates the stack
8972         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8973         the creation of the .mem file.  Delegates the allocation of data area
8974         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8975         the begining of the stack area to aslink.
8976
8977         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8978         glue() in SDCCglue.c creates an area for it.
8979
8980 2002-09-03  Borut Razem <borut.razem AT siol.net>
8981         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8982         sdcc/src/pic/glue.c:
8983         introduced atexit() handler for teporay files removal in case of
8984         errors, assertions, ...
8985
8986 2002-08-29  Borut Razem <borut.razem AT siol.net>
8987         * sdcc/support/cpp2/auto-host_vc_in.h:
8988         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8989         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8990         Maybe there is a similar problem with BORLANDC? It should be checked!
8991
8992         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8993         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8994         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8995         was not executed, and the compiler (cl) launched a warning:
8996         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8997
8998 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8999         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9000
9001 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9002         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9003
9004         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9005           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9006           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9007           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9008           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9009           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9010           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9011         - added Release configuration in VS projects
9012         - review of compiler an linker options
9013         - VC .exe files are generated in bin_vc directory, not to interfere
9014           with binaries generated from other projects (cygwin, mingw, bcc ...)
9015
9016         * sdcc/src/yacc.dsp: added
9017
9018         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9019         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9020         and insert the version number definitions from .version
9021
9022         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9023
9024         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9025         added - genarate auto-host.h using auto-host_vc_in.h as template
9026
9027         * sdcc/sdcc_vc.h,
9028         removed from CVS, generated automatically
9029
9030 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9031         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9032
9033 2002-08-11  Borut Razem <borut.razem AT siol.net>
9034         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9035
9036 2002-08-10  Borut Razem <borut.razem AT siol.net>
9037         * src/SDCCmain.c (main):
9038         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9039         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9040         The consequence was that some temporary files were not removed.
9041
9042         * src/SDCCglue.c:
9043         unification of code in functions tempfilename() and tempfile():
9044         function tempnam() is defined in Visual Studio 6.0 and .NET
9045
9046         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9047
9048         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9049           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9050         - removed compiler command line option /WX: Treats all warnings as errors
9051         - update a list of source files, included into the project
9052
9053         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9054           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9055         changed project type to Generic Project so that can be correcly converted to VS.NET project
9056
9057         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9058
9059         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9060
9061         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9062
9063         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9064         added return 0 statements after assert() to make compiler happy
9065
9066         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9067         added newline in the def file to keep MSC compiler satisfied
9068
9069         * sdcc/src/z80/gen.c:
9070         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9071           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9072         - solved MSC error in function aopDump()
9073
9074         * sdcc_vc.h: define PREFIX as "\\sdcc"
9075
9076 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9077         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9078
9079 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9080         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9081         - Rewrote the register banking algorithm.
9082         - Added pCode live-range analysis to registers (for now, only non-used and
9083         singly-used registers optimized away)
9084
9085         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9086
9087         * 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.
9088
9089 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9090         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9091
9092 2002-04-22  Michael Hope  <michaelh AT vroom>
9093
9094         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9095
9096         * configure.in (DD_COPT): Added include support required for gbdk.
9097
9098         * .version: Bumped version number just to increase it.
9099
9100         * src/SDCCmain.c: Added -nostdinc to the default options.
9101
9102 2002-04-15  Michael Hope  <michaelh AT vroom>
9103
9104         * device/lib/z80/printf.c (sprintf): Added.
9105
9106         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9107
9108         * src/z80/peeph.def: Added transpose redundent load rule.
9109
9110         * src/z80/main.c: Added force callee saves for jaune.
9111
9112         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9113
9114         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9115
9116 2002-03-28  Johan Knol  <johan AT balder>
9117
9118         * src/SDCCval.c: fixed bug #532436
9119
9120 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9121         * /src/port.h:
9122         Added "char *Processor" field to the port structure.
9123
9124         * /src/SDCCmain.c:
9125         Added -p option. Allows port dependent processor to be specified.
9126
9127         * all ports:
9128         Initialized the new field char *Processor field to NULL in all ports
9129
9130         * /src/pic/*:
9131         Compiler generated registers for interrupt context saving
9132         were not getting allocated.
9133
9134 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9135
9136         * /src/SDCCast.c:
9137         Fixed left shift. Will promote the left side of a left shift
9138         if a) left shifting more than size of operand or b) when assigned
9139         to something size > size of left side
9140
9141 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9142         * src/pic/*
9143         tons of changes. Register allocation has been
9144         rewritten. Added customization for the various PICs. Flow
9145         analysis is restructured. ...
9146
9147         * src/pic/device.h:
9148         Added
9149
9150         * src/pic/device.c:
9151         Added. device.c is a PIC port hack to accomodate variations
9152         in PIC devices.
9153
9154 2002-03-13  Michael Hope  <michaelh AT vroom>
9155
9156         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9157
9158 2002-03-04  johanknol  <johanknol AT manik>
9159
9160         * /src/SDCCval.c: fixed
9161
9162         const unsigned char arr[][2] = { { 0, 1 } };
9163         t18.c:1: error: Initializer element is not constant
9164
9165 2002-03-04  bela  <bela AT manik>
9166
9167         * /device/include/mcs51reg.h:
9168         ds89c420 register definition update
9169
9170 2002-03-03    <johan AT FRIJA>
9171
9172         * support/Util/SDCCerr.c: did something, but don't no why anymore
9173
9174         * support/regression/tests/bug-524691.c: made it a little less shy
9175
9176         * src/SDCCast.c (decorateType): fixed bug #524697
9177
9178         * src/SDCCast.c: made some lineno improvements
9179
9180         * src/SDCCval.c (getNelements): changed warning to error
9181
9182         * src/SDCCglue.c (printIvalArray): changed warning to error
9183
9184         * src/SDCCicode.c: fixed a warning for mingw
9185
9186         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9187
9188         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9189
9190 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9191
9192         * src/ds390/peeph.def:
9193         Added some more peephole rules
9194
9195         * src/ds390/gen.c: Various fixes & enhancements
9196
9197         * src/SDCClrange.c, src/SDCClrange.h:
9198         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9199
9200         * src/ds390/ralloc.c:
9201         various fixes & enhancements (ds390) specific
9202
9203         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9204         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9205         from rallocs.
9206
9207         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9208
9209 2002-03-02    <johan AT FRIJA>
9210
9211         * src/SDCCast.c (decorateType): fixed bug #524708
9212
9213         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
9214
9215         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
9216
9217 2002-03-01  Michael Hope  <michaelh AT vroom>
9218
9219         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
9220
9221         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
9222
9223 2002-03-01    <johan AT FRIJA>
9224
9225         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
9226
9227         * src/SDCCast.c (decorateType): fixed bug #524209
9228
9229         * src/SDCCval.c (valNot): fixed bug #524195
9230
9231 2002-02-26    <johan AT balder>
9232
9233         * src/xa51/gen.c: fixed a warning
9234
9235         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9236
9237         * src/SDCCast.c (decorateType): fixed bug #522534
9238
9239 2002-02-23    <johan AT balder>
9240
9241         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9242
9243 2002-02-22    <johan AT balder>
9244
9245         * src/SDCCast.c: fixed bug #514865
9246
9247         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9248
9249 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9250
9251         * sdcc/src/SDCCloop.c:
9252         Previous fix was not good. basic blocks that have "break" or "return" are
9253         not really partof a loop , but live ranges used in these blocks should
9254         be live thru the entire loop, so set partOfLoop but don't add them to
9255         loop region
9256
9257 2002-02-21    <johan AT FRIJA>
9258
9259         * src/SDCCcse.c: fixed bug #514308
9260
9261 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9262
9263         * src/SDCCloop.c:
9264         Fixed BUG #519583. If a conditional block ended in a return/break
9265         statement inside a loop, it was not being considered part of the loop.
9266
9267         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9268
9269 2002-02-10  Karl Bongers <karl AT turbobit.com>
9270
9271         * debugger/*:
9272         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9273         with lots of comments and notes.
9274
9275         * device/examples/test2.c:
9276         Fix bug, "red" variable not being initialized(compiler complained).
9277
9278         * device/examples/Makefile, examples/test3.c:
9279         Add Makefile in device/examples folder, compiles test3.c
9280         for use as a multiple module SDCDB test case.
9281
9282         * sim/ucsim/cmd.src/cmdset.cc:
9283         Took out debug printfs in ucsim "next" command.
9284
9285         * sim/ucsim/xa.src:
9286         Karl and Johan start ucsim XA support.  Most dissassembly working,
9287         about 75% emulation done(plenty of work remaining).
9288
9289         * sim/ucsim/z80.src:
9290         Add Z80 support to ucsim, add test-ucz80 regression test,
9291         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9292         Notice z80 compiler fails on examples/test3.c/crc code.
9293
9294 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9295
9296         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9297         Added support for --parms-in-bank1
9298
9299         * src/ds390/peeph.def:
9300         added a few more peephole optimzations
9301
9302         * src/ds390/main.c:
9303         1) added __builtin_inp & __builtin_outp used to read in data of given length
9304            from a memory mapped port
9305         2) added __builtin_memcmp
9306         3) added __builtin_swapw swap bytes of a short
9307
9308         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9309         1) handle multiple send & receives from register bank1
9310         2) ralloc can now allocate DPTR1 to some liveRanges
9311
9312         * src/SDCCsymt.c, src/SDCCsymt.h:
9313         changes to handle multiple sends & receives
9314
9315         * src/SDCCptropt.h:
9316         added some pointer arithmetic optimization
9317
9318         * src/SDCCptropt.c:
9319         added some pointer arithmetic optimizations but not stable yet so not
9320         called from anywhere (will get this working shortly)
9321
9322         * src/SDCCopt.c: fixed for multiple sends & receives
9323
9324         * src/SDCCmain.c:
9325         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9326         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9327            set preprocessor defines (depending on options)
9328
9329         * src/SDCCicode.c, src/SDCCicode.h:
9330         changes made to handle multiple sends & receives
9331
9332         * src/SDCCglobl.h:
9333         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9334
9335         * src/SDCCcse.c, src/SDCCcse.h:
9336         added function findbackward def (to be used in upcoming optimization)
9337
9338         * src/SDCCcflow.c, src/SDCCcflow.h:
9339         added function returnAtEnd - to determine if a basic block terminates with
9340         a RETURN iCode
9341
9342         * src/SDCCast.c, src/SDCCast.h:
9343         added option parms-in-bank1
9344
9345         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9346         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9347         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9348         adjusted for --parms-in-bank1 option
9349
9350         * device/include/string.h:
9351         donot redefine "reentrant" keyword
9352
9353         * device/include/ds80c390.h: Added some more SFRs
9354
9355 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9356
9357         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9358
9359 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9360
9361         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9362
9363 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9364
9365         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9366
9367 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9368
9369         * Added --xram-movc option
9370
9371 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9372
9373         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9374
9375 2002-01-11  Johan Knol
9376
9377         * Added math lib of Jesus Calvino-Fraga
9378
9379 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9380
9381         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9382         * support/regression/Makefile: new target test-mcs51-stack-auto
9383         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9384
9385 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9386
9387         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9388
9389 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9390
9391         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9392
9393 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9394
9395         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9396
9397         * src/SDCCglue.h: add definition for printIvalChar()
9398
9399 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9400
9401         * src/SDCCast.c: fix #498138 by Johan
9402
9403         * src/SDCCglue.c: fix #498138 by Johan
9404
9405 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9406
9407         * support/regression/Makefile: fix clean
9408
9409         * support/regression/ports/ds390/support.c: fix transmission of last character
9410
9411 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9412
9413         * /sdcc/src/ds390/gen.c:
9414         a) improved computing address of stack variable
9415         b) took out some #if 0 code
9416         c) improved parmBytes adjustment
9417         d) improved genPlusIncr & genMinusIncr
9418         e) genCmp could generate bad code (when left assigned to DPTR)
9419         f) Fixed bug in hasInc
9420
9421         * /sdcc/src/ds390/ralloc.c:
9422         a) packRegsForSupport could mess up live information (Fixed)
9423         b) packRegsDPTRuse could be incorrect for left & right shift
9424
9425         * /sdcc/src/mcs51/ralloc.c:
9426         packRegsForSupport could mess up the live information (Fixed)
9427
9428         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9429
9430         * /sdcc/src/SDCCast.c:
9431         can reverse a loop even if function call is present as long
9432         as the loop control variable is local & is not passed as parameter
9433
9434 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9435
9436         * /sdcc/ChangeLog: *** empty log message ***
9437
9438         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9439         More builtin function additions for TININative
9440
9441         * /sdcc/src/ds390/ralloc.c:
9442         Had broken the regression testsuite
9443
9444         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9445
9446         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9447         Added funcattr hasStackParms will be set for reentrant functions when there
9448         are paramteres on the stack, this helps in minimizing frame pointer generation
9449         typeFromStr can handle function pointers now
9450
9451         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9452         *** empty log message ***
9453
9454 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9455
9456         * /src/ds390/gen.c, /src/ds390/main.c:
9457         More builtin function additions for TININative
9458
9459         * /src/ds390/ralloc.c:
9460         Had broken the regression testsuite
9461
9462         * /src/SDCCast.c: Fixed a bug in dumptree
9463
9464         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9465         Added funcattr hasStackParms will be set for reentrant functions when there
9466         are paramteres on the stack, this helps in minimizing frame pointer generation
9467         typeFromStr can handle function pointers now
9468
9469         * /doc/builtins.txt, /doc/TININative.txt:
9470         *** empty log message ***
9471
9472
9473 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9474
9475         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9476         ALPHA version for -mTININative
9477
9478         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9479         updated to reflect changes in the port structure
9480
9481         * /src/port.h:
9482         added function do_assemble (similar to do_link) if non-null this function
9483         will be called to do assembly (-mTININative) requires a multi command
9484         assembly
9485         added function genAssemblerEnd will be called to generate assembler Epilogue
9486
9487         * /src/SDCCsymt.c:
9488         added _JavaNative to debug info printing
9489
9490         * /src/SDCCmain.c: added option --tini-libid
9491         added port->do_assemble function (-mTININative) has a multi command assemble
9492
9493         * /src/SDCCglue.c: Disabled "constExpr" check
9494         added port->genAssemblerEnd function
9495
9496         * /src/SDCCglobl.h: Added option --tini-libid value
9497
9498         * /src/SDCCast.h:
9499         tookout optimizeCompare from the header (has no external references)
9500
9501         * /src/SDCCast.c: made one more function "static"
9502
9503 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9504
9505         * src/z80/mappings.i: Added z80asm support.
9506
9507         * src/z80/main.c: Added z80asm support on --asm=z80asm
9508
9509         * src/z80/gen.c: Fixed asm portability issues.
9510
9511         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9512
9513         * src/SDCCglue.c (printExterns): Added global/extern split.
9514
9515 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9516
9517         * support/regression/Makefile: added test for mcs51 model large
9518
9519         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9520
9521         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9522
9523 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9524
9525         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9526
9527 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9528
9529         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9530
9531         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9532
9533 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9534
9535         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9536
9537         * support/regression/tests/simplefloat.c: Port to mcs51.
9538
9539 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9540         * support/regression/tests/bug-485362.c: Added.
9541
9542         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9543
9544         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9545
9546         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9547
9548         * src/z80/gen.c (aopDump): Added a dump function.
9549
9550 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9551         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9552
9553         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9554
9555         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9556
9557         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9558
9559         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9560
9561         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9562
9563         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9564
9565         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9566
9567         * support/regression/ports/ds390/support.c: Use tinibios.
9568
9569         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9570
9571 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9572
9573         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9574         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9575
9576         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9577
9578         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9579
9580 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9581
9582         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9583
9584         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9585         (packRegsForIYUse): Created and optimised.
9586
9587 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9588
9589         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9590 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9591
9592         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9593
9594         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9595
9596         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9597
9598 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9599
9600         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9601
9602         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9603
9604 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9605
9606         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9607
9608         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9609
9610         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9611
9612 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9613
9614         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9615         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9616         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9617
9618         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9619
9620         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9621         (genNotFloat): Added.
9622         (genUminusFloat): Added.
9623
9624         * device/lib/z80/Makefile: Added floating pt stubs.
9625
9626         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9627
9628         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9629
9630         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9631
9632 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9633
9634         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9635
9636         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9637
9638         * sdcc/support/regression/Makefile: Add port ds390.
9639
9640         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9641
9642         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9643
9644         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9645
9646         * sdcc/support/regression/ports/ds390/support.c: Added.
9647
9648         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9649
9650         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9651
9652         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9653
9654 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9655
9656         * device/include/malloc.h: Added z80 and gbz80 support.
9657
9658         * device/lib/gbz80/heap.s: Added.
9659
9660         * device/lib/z80/heap.s: Added.
9661
9662         * device/lib/malloc.c: Added z80 and gbz80 support.
9663
9664         * support/regression/tests/malloc.c (testMalloc): Added.
9665
9666         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9667
9668         * support/regression/tests/bug-478094.c: Added.
9669
9670         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9671
9672 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9673
9674         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9675
9676         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9677
9678         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9679
9680         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9681
9682         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9683
9684 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9685
9686         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9687
9688 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9689
9690         * support/regression/tests/bug-477927.c: Added.
9691
9692         * src/z80/peeph.def: Added minor rules.
9693
9694         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9695
9696         * src/z80/peeph.def: Added jump optimisation modification.
9697
9698 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9699
9700         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9701
9702 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9703
9704         * support/regression/tests/funptrs.c: Added.
9705
9706 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9707
9708         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9709
9710 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9711
9712         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9713
9714         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9715
9716         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9717         (movLeft2ResultLong): Created.
9718
9719         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9720         (joinPushes): Added.  Joins two char pushes into a word push.
9721
9722 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9723
9724         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9725
9726         * support/makebin/Makefile (install): Added creation of dest dir.
9727
9728 2001-10-24 Karl Bongers <karl AT turbobit.com>
9729
9730         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9731
9732 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9733
9734         * src/z80/ralloc.c: Turned off faulty pack for one use.
9735
9736         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9737
9738         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9739
9740 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9741
9742         * support/regression/Makefile: Improved clean
9743
9744         * support/regression/ports/gbz80/spec.mk: Added clean
9745
9746         * support/regression/ports/host/spec.mk: Added clean
9747
9748         * support/regression/ports/z80/spec.mk: Added clean
9749
9750         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9751
9752         * support/regression/ports/mcs51/timeout.c: little improvements
9753
9754 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9755
9756         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9757
9758         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9759
9760         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9761
9762 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9763
9764         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9765
9766         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9767
9768 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9769         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9770
9771         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9772
9773         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9774
9775         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9776
9777         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9778
9779         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9780
9781         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9782
9783         * support/regression/tests/longor.c: Added.
9784
9785 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9786
9787         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9788
9789         * as/mcs51/aslink.h: define PATH_MAX
9790
9791         * as/mcs51/asm.h: define PATH_MAX
9792
9793         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9794
9795         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9796
9797         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9798
9799         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9800
9801         * src/SDCCglobl.h: define PATH_MAX
9802
9803         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9804
9805         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9806
9807 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9808
9809         * src/z80/gen.c (gencjneshort): Fixed
9810
9811         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9812
9813 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9814
9815         * support/regression/tests/bug-469671.c: Added.
9816
9817         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9818
9819 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9820
9821         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9822
9823         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9824
9825 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9826
9827         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9828
9829         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9830
9831         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9832
9833         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9834
9835         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9836
9837         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9838
9839         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9840
9841 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9842
9843         * 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.
9844
9845         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9846
9847         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9848
9849 2001-10-07    <johan AT FRIJA>
9850
9851         * device/lib/gets.c (gets): fixed the return value.
9852
9853 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9854         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9855
9856         * 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.
9857
9858         * 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.
9859
9860         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9861
9862         * src/pic/gen.c: Removed Safe_strdup.
9863
9864         * configure.in: Added option to enable libgc support.
9865
9866         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9867         (bitVectUnion): Optimised.
9868         (bitVectIntersect): Optimised.
9869         (bitVectBitsInCommon): Optimised.
9870         (bitVectCplAnd): Optimised.
9871
9872         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9873
9874 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9875
9876         * src/SDCCmain.c: distinguish between assembler debug and plain options
9877
9878         * src/avr/main.c:   remove standard assembler options
9879
9880         * src/ds390/main.c: remove standard assembler options
9881
9882         * src/mcs51/main.c: remove standard assembler options
9883
9884         * src/port.h: removed "PENDING" comment
9885
9886 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9887
9888         * src/device/lib/_mulint.c  : new, with assember functions
9889
9890         * src/device/lib/_mullong.c : new, with assember functions
9891
9892         * src/device/lib/_divuint.c : with assember functions
9893
9894         * src/device/lib/_divsint.c : with assember functions
9895
9896         * src/device/lib/_divulong.c: with assember functions
9897
9898         * src/device/lib/_divslong.c: with assember functions
9899
9900         * src/device/lib/_moduint.c : with assember functions
9901
9902         * src/device/lib/_modsint.c : with assember functions
9903
9904         * src/device/lib/_modulong.c: with assember functions
9905
9906         * src/device/lib/_modslong.c: with assember functions
9907
9908         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9909
9910         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9911
9912         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9913                                       replaced _mululong.c and _mulslong.c by _mullong.c
9914
9915 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9916
9917         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9918
9919 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9920
9921         * src/SDCCglue.c: test, if win32api is available for MINGW
9922
9923 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9924
9925         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9926         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9927         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9928         * support/regression/ports/host/spec.mk: removed GENERIC
9929         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9930         * support/regression/ports/z80/spec.mk: removed GENERIC
9931
9932 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9933
9934         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9935
9936         * support/regression/tests/bug-467035.c: Created.
9937
9938 2001-10-01    <johan AT FRIJA>
9939
9940         * src/SDCC.y: fixed bug #466586 part 1
9941
9942 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9943
9944         * SDCCicode.c: z80 has no generic pointers
9945         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9946
9947 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9948
9949         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9950
9951 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9952
9953         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9954
9955         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9956
9957 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9958
9959         * configure.in: Fixed up so that ucsim is only configured once.
9960
9961         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9962
9963         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9964         (getPathDifference): As above.
9965
9966         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9967
9968         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9969
9970 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9971         * .version: Updated to 2.3.1
9972
9973         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9974         Added copyright header.
9975
9976         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9977         (assemble): Added support for macro based assembler commands.
9978         (linkEdit): Added support for macro based linker commands.
9979         (preProcess): Changed the pre-processor to use macros.
9980         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9981         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9982
9983         * device/lib/z80/crt0.s: Added module name for debugging.
9984
9985 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9986
9987         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9988
9989         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9990
9991         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9992
9993         * src/Makefile.in: Added SDCCmacro and SDCCutil
9994
9995 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9996
9997         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9998
9999 2001-09-16    <johan AT FRIJA>
10000
10001         * 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.
10002
10003 2001-09-15    <johan AT FRIJA>
10004
10005         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10006         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10007
10008 2001-09-11    <johan AT FRIJA>
10009
10010         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10011
10012 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10013
10014         * support/regression/tests/bug-460444.c: Added test case.
10015
10016         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10017         (genCast): Added justification for all of the asserts.
10018
10019 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10020
10021         * support/regression/support.c: _xdata replaced by xdata
10022
10023         * support/regression/spec.mk: removed _generic
10024
10025 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10026
10027         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10028
10029         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10030         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10031
10032         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10033
10034         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10035
10036         * support/regression/tests/bug-460010.c: Added test case.
10037
10038         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10039
10040 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10041
10042         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10043
10044         * support/regression/testfwk.c: removed workaround for bug #436344
10045
10046         * support/regression/tests/bp.c: use less memory with mcs51
10047
10048         * support/regression/tests/bug-441448.c: use less memory
10049
10050         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10051
10052         * support/regression/collate-results.py: typo
10053
10054 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10055
10056         * support/regression/tests/fetchoverlap.c: Added new test case.
10057
10058         * support/regression/tests/bp.c: Added new test case.
10059
10060         * support/regression/tests/bug-448984.c: Added new test case.
10061
10062         * support/regression/tests/pow2shifts.c: Added new test case.
10063
10064         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10065         (genlshTwo): Fixed right shift for count > 8.
10066
10067         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10068
10069 2001-09-08    <johan AT FRIJA>
10070
10071         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10072
10073 2001-09-07    <johan AT FRIJA>
10074
10075         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10076
10077         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10078
10079 2001-09-06    <johan AT FRIJA>
10080
10081         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10082         * bernhard noted me at this: "() equals to (void)" (1.38)
10083
10084 2001-09-05    <johan AT FRIJA>
10085
10086         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10087
10088 2001-09-04    <johan AT FRIJA>
10089
10090         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10091
10092
10093 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10094
10095         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10096
10097 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10098
10099         * link/z80/aslink.h: Fixed path for PATH_MAX
10100
10101 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10102
10103         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10104
10105         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10106
10107         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10108
10109         * 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.
10110
10111 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10112
10113         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10114         (genCmp): Fixed up genCmp for the GB with longs.
10115
10116         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10117
10118         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10119
10120         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10121
10122         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10123
10124 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10125
10126         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10127
10128 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10129
10130         * 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.
10131
10132         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10133
10134 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10135
10136         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10137
10138         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10139
10140 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10141
10142   * sim/ucsim/configure:    little improvement of Cygwin-detection
10143   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10144   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10145   * support/regression/tests/bug-221100.c: small changes for mcs51
10146   * support/regression/tests/bug-221168.c: small changes for mcs51
10147   * support/regression/tests/bug-227710.c: small changes for mcs51
10148   * support/regression/tests/staticinit.c: small changes for mcs51
10149   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10150   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10151   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10152
10153 $Revision$