e5d46f807b90f42d26a8d2e012393084b227aaf5
[fw/sdcc] / ChangeLog
1 2005-08-24 Borut Razem <borut.razem AT siol.net>
2
3         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
4
5 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
6
7         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
8         ffffffffu
9
10 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
11
12         * as/mcs51/aslink.h: completed lkrloc.c prototypes
13         * as/mcs51/lkmain.c (link_main): fixed warning
14         * device/include/stdbool.h: ds390 has no advanced bit support yet
15         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
16         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
17         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
18           and updated their macros
19         * src/SDCCval.c (constVal): updated comment for renamed b_long
20
21 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
22
23         * as/mcs51/asdata.c: changed ctype['['] to BINOP
24         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
25           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
26           (oprio): set priority for '['
27         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
28            and adb_24_bit
29         * as/mcs51/asm.h: added defines R_BIT and S_BIT
30         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
31         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
32         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
33           added overlayable BIT_BANK area
34         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
35           (summary2): explain 'T' in legenda
36         * as/mcs51/lkrloc.c: replaced old K&R style,
37           (relr): added R_BIT processing,
38           (errmsg): added "Bit-addressable relocation error",
39           (adb_bit): added for converting from byte- to bit-addressable space,
40           (adb_24_bit): added for converting from byte- to bit-addressable space
41         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
42            used in reentrant functions now even as return value
43         * device/lib/_gptrput.c (_gptrput): removed obsolete code
44         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
45           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
46         * src/SDCCglobl.h: added indicator BitBankUsed
47         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
48            the bit registers b0-b7
49         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
50           (geniCodeCast): fixed bug 1263853,
51           (geniCodeLogicAndOr): put result in bool or char,
52           (geniCodeReceive): added parameter func for accessing the return type,
53           (geniCodeFunctionBody): pass func to geniCodeReceive
54         * src/SDCCmain.c: added indicator BitBankUsed
55         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
56         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
57           (checkSClass): don't put automatic bool/bit on stack,
58           (checkFunction): removed check on function cannot return bit
59         * src/SDCCsymt.h: added newBoolLink prototype
60         * src/mcs51/gen.c (rb1regs): added bit registers,
61           (movc): created for assigning to carry,
62           (pushReg, popReg): created for pushing registers,
63           (sameRegs): check both AOP_REG and AOP_CRY types,
64           (aopOp): handle bit registers,
65           (aopPut): optimization no self-assign,
66           (saveRegisters): push reg->base (bits) only once for bit registers,
67            and use pushReg,
68           (unsaveRegisters): pop reg->base only once and use popReg,
69           (assignResultValue): added parameter func and return in carry for bits,
70           (genIpush): optimization no reload in A if not changed,
71           (genSend): bit parameters in reentrant functions are passed in bit
72            registers by first assigning to bits in B, then save registers and
73            copy B to bits,
74           (genCall): handle returning in Carry properly, save it in F0 if needed,
75           (genPcall): updated assignResultValue call, this is not safe yet for bit
76            returning function !!!
77           (genFunction): don't generate equ's for bit registers and use pushReg,
78           (genEndFunction): take care of bit returning functions and use popReg,
79           (genRet): return bit in Carry,
80           (genIfx): optimize bit registers and other directly addressable bits,
81           (genReceive): updated assignResultValue call
82         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
83           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
84            registers when using stack-auto
85         * src/mcs51/ralloc.c (_G): added allBitregs,
86           (regs8051): added the bit registers,
87           (createStackSpil): use macro IS_BIT,
88           (getRegBit): added to allocate a bit register, else spill,
89           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
90           (updateRegUsage): factored out to ease stepping while debugging,
91           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
92            also allocate bit registers,
93           (fillGaps): handle bit registers,
94           (findAllBitregs): added to create bit vector with all bit registers,
95           (mcs51_allBitregs): returns this bit vector,
96           (mcs51_assignRegisters): when using stack-auto use bit registers for
97            passing parameters and creating local variables
98         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
99
100 2005-08-22 Borut Razem <borut.razem AT siol.net>
101
102         * device/lib/Makefile.in: replaced find option -or with -o
103           to make it run on solaris
104
105 2005-08-22 Raphael Neider <rneider AT web.de>
106
107         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
108           fixes #1265442 (crash on Solaris)
109
110 2005-08-20 Borut Razem <borut.razem AT siol.net>
111
112         * configure, configure.in: added tests for libsocket and libnsl libraries,
113           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
114           from support/regression/Makefile.in
115         * support/regression/Makefile.in: added
116         * device/lib/pic16/Makefile.common.in: force make to use bash shell
117         * sim/ucsim/libtool: regenerated on sparc-solaris
118         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
119           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
120           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
121           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
122           sparc-solaris, which doesn't use GNU ld linker
123         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
124         * as/Makefile: find on sparc-solaris does not support -maxdepth option
125
126 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
127
128         * src/mcs51/peeph.def: updated comments
129
130 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
131
132         * device/lib/_gptrget.c,
133         * device/lib/_gptrput.c: slightly shorter
134         * doc/sdccman.lyx: incremented version
135         * src/mcs51/peeph.def: moved peephole comments to the line of first
136           change to better keep line correlation, reanimated 186.e
137         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
138
139 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
140
141         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
142           David Saxton with quotes around file name.
143
144 2005-08-15 Borut Razem <borut.razem AT siol.net>
145
146         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
147           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
148           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
149           make tests run on x86_64 platform
150
151 2005-08-13 Raphael Neider <rneider AT web.de>
152
153         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
154           as it might be executed DURING a build (parallel make is wonderful)
155
156 2005-08-13 Raphael Neider <rneider AT web.de>
157
158         * device/lib/Makefile.in (port-specific-objects-pic16):
159           revert to cp $(PORT)/bin/*.* $(PORTDIR)
160         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
161           dependency
162         * device/lib/pic16/Makefile.rules: build subdirs before creating
163           the library, removed builddir rule, create $(builddir) early in
164           recurse rule, use empty recurse rule for leaf directories
165         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
166           mkdir errors (race condition), removed duplicate suffix "hex"
167           from clean rules
168         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
169         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
170           prevents mkdir -p from aborting on Alpha
171
172 2005-08-12 Raphael Neider <rneider AT web.de>
173
174         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
175           db-statements in order to allow for arrays of pointers in code
176           sections to be placed without interspersed 0-padding, fixes
177           bug #1256215
178         * (emitStatistics): fixed division by zero for pic18f1220
179         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
180           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
181         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
182         * (pic16_pCodeConstString): keep track of already emitted string
183           literals to prevent "duplicate definitions of symbol _str_NR"
184         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
185           debug message
186         * device/lib/Makefile.in: ignore failing PIC16 library builds
187         * device/lib/pic16/Makefile: do not build if gputils are missing
188         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
189
190 2005-08-10 Raphael Neider <rneider AT web.de>
191
192         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
193           my last commit)
194
195 2005-08-10 Raphael Neider <rneider AT web.de>
196
197         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
198           Rokas' patch to add the new fixed point type "__fixed16x16"
199         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
200           functions for __fixed16x16 arithmetics
201         * device/lib/pic16: reimplemented the build system to support
202           a separate build directory, better handling of libio (create
203           the library in a separate subdir for each architecture) and
204           easier configuration (centralized in Makefile.common)
205
206 2005-08-07 Raphael Neider <rneider AT web.de>
207
208         * src/pic16/gen.c (genrshTwo): fixed sign extension
209         * src/pic16/device.c: added pic18f2320, 4220 and 4320
210         * device/include/pic16/pic18f2220.h: changed some bit definitions,
211           added T0CONbits
212         * device/include/pic16/pic18f4220.h: NEW, header for
213           pic18f4220 and pic18f4320
214         * device/include/pic16/pic18fregs.h: added new devices,
215           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
216         * device/include/pic16/signal.h: resolved name clashes
217           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
218           to also allow testing for interrupt enable bits, added
219           comments on how to use the macros
220         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
221         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
222           register definitions for the devices
223         * device/lib/pic16/pics.all: added new devices
224         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
225           allocated memory
226         * device/lib/pic16/libc/stdlib/memfree: do not count
227           the block header as free memory
228         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
229           simplified and added missing end-of-blocklist-marker
230           (reported by Peter Onion, fixes #1252814)
231         * (_mergeHeapBlock): fixed loop condition
232         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
233           len==0, restructured code
234         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
235           up a bit, reduced bitfield accesses, prevent endless loops
236           in case of heap corruption
237         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
238           "unreferenced arguments/must return a value" warnings
239         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
240           replaced BAUDREG with SPBRG
241         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
242           device/lib/pic16/debug/gstack/gstack.c: replaced
243           _naked, _asm, _endasm with __naked, __asm, __endasm
244
245 2005-08-05 Raphael Neider <rneider AT web.de>
246
247         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
248           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
249
250 2005-08-05 Borut Razem <borut.razem AT siol.net>
251
252         * device/lib/Makefile.in: added missing ';'
253         * configure: removed ^M characters
254
255 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
256
257         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
258           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
259           License
260
261 2005-08-04 Borut Razem <borut.razem AT siol.net>
262
263         * configure.in: pic16 libraries build 2nd try - enable running
264           configure in device/lib/pic16
265         * configure: regenerated from configure.in
266         * device/lib/Makefile.in: create $(PORT)/bin directory
267
268 2005-08-03 Raphael Neider <rneider AT web.de>
269
270         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
271           to get/set values via pointers
272         * (genUnpackBits,genPackBits): changed detection of
273           ptr->bitfield vs. sym.bitfield, fixed access via generic
274           pointers, removed dead (wrong) code for multibyte bitfields
275         * (genNearPointerGet, genGenPointerGet): removed useless code,
276           fixed bitfield detection, fixes #1250594
277         * (genNearPointerSet): removed useless code
278         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
279           and introduced macro pic16_emitpcode that conditionally emits
280           the origin of the following pCode (useful for debugging SDCC)
281         * src/pic16/pcode.c: changed (and disabled) some debug outputs
282         * (createDefmap): fixed handling of LFSR for --optimize-df
283
284 2005-08-02 Borut Razem <borut.razem AT siol.net>
285
286         * device/lib/Makefile.in: pic16 libraries build enabled since
287           gputils-0.13.2 are now localy installed at sourceforge's compile farm
288
289 2005-08-02 Raphael Neider <rneider AT web.de>
290
291         * src/pic16/gen.c (genPackBits): removed deprecated warning
292         * (genGenPointerSet): fixed bitfield detection
293
294 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
295
296         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
297
298 2005-07-31 Raphael Neider <rneider AT web.de>
299
300         * device/lib/pic16/libdev/pic18f458.c,
301           device/include/pic16/pic18f458.h: added missing T0CONbits
302
303 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
304
305         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
306
307 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
308
309         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
310
311 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
312
313         * device/include/mcs51/at89c51ed2.h: added.
314
315 2005-07-23 Raphael Neider <rneider AT web.de>
316
317         * src/pic/gen.h: added emitpcode macro for debugging
318         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
319           and replace by macro adding debug information on demand
320         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
321         * (gencjne): tried to fix; replaced with correct (slower) code
322         * (gen{Unp,P}ackBits): fixed single bit access
323         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
324         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
325           previous instruction
326         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
327           register has to be handled with care (forbidding movement
328           of assignments/uses, removing assignments completely, ...)
329         * (pCodeOptime2pCodes): make use of regIsSpecial
330         * added lots of debugging output (commented out)
331         * src/pic/rallloc.c (deassignLRs): prevent operand registers
332           from being reused as result UNLESS it is known to work
333
334 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
335
336         * support/Util/dbuf.h: include <stddef.h> for size_t
337         * .version: changed to version 2.5.2
338
339 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
340
341         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
342
343 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
344
345         * src/hc08/gen.c (genMinus): fixed bug #1241835,
346           (genModOneByte): removed needless psha/pula
347
348 2005-07-22 Raphael Neider <rneider AT web.de>
349
350         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
351           have PIC14 handled like PIC16, fixes broken pic14 linker calls
352         * src/pic/gen.c (resolveIfx): do not "invent" labels
353         * (genSkipc): changed to positive logic
354         * (genSkipCond): removed as no longer needed
355         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
356           backport from PIC16
357         * (genLeftShift): check operands are in different registers
358         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
359           INCF does not update CARRY...
360         * src/pic/main.c: fixed _linkCmd
361         * src/pic/pcode.c (unlinkpCode): added inactive code
362         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
363           alive (do not assign result and operand overlapping registers)
364
365 2005-07-22 Raphael Neider <rneider AT web.de>
366
367         * src/pic/device.c (dump_sfr): replaced register declaration with
368           call to emitSymbolToFile() to avoid duplicate symbols
369         * (assignRelocatableRegisters): do not declare external symbols
370         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
371           right (take size of type, not etype)
372         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
373         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
374         * (packRegsForAccUse): disabled assignment of WREG as
375           the result reg to prevent occurence of just fixed #1235003,
376           fixes #1242954
377         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
378           symbols (avoids duplicate symbols in .asm file)
379         * (pic14emitRegularMap): use emitSymbolToFile()
380         * src/pic/gen.c (aopOp): fixed spillLocation handling
381         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
382         * (genDataPointerSet): removed unneccessary variables/output
383
384 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
385
386         * as/mcs51/lkarea.c: enlarged codemap for banked memory
387         * device/lib/mcs51/crtbank.asm: added # to 0x0F
388
389 2005-07-21 Raphael Neider <rneider AT web.de>
390
391         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
392           architecture cannot handle them efficiently, fixes bug #1235003
393         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
394           check for empty sets before using them (fixes bug #1232190)
395
396 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
397
398         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
399           (lnksect2): generate warnings for memory overlap
400         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
401           constseg to set the name of these segments so you can instruct the linker
402           to place them in banks
403         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
404         * src/SDCCglobl.h: added MODEL_HUGE to enum,
405           added code_seg and const_seg to options
406         * src/SDCCglue.c (emitMaps): use options.const_seg,
407           (createInterruptVect): put interrupt vectors in segment HOME,
408           (glue): put HOME before static segment and put the main glue in HOME,
409           (glue): use options.code_seg
410         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
411         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
412           these segments so you can instruct the linker to place them in banks
413           (linkEdit): use code_loc for HOME segment which should be the first
414           segment in code memory now
415         * src/SDCCmem.c: fixed more stuff like bug 1238386
416         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
417           (changePointer): don't change function pointers to code pointers for
418           banked functions,
419           (compareType): added exceptional check for banked function pointers
420         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
421         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
422           after static in code memory
423         * src/mcs51/gen.c: added aopLiteralLong prototype,
424           (aopForSym): use getSize for functions,
425           (genCall): generate banked calls over one trampoline __sdcc_banked_call
426           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
427           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
428           the segment,
429           (genPcall): use call for literal function pointers and generate banked
430           calls over the one trampoline so there's only one place for the user to
431           modify according to his/hers hardware,
432           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
433           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
434         * src/mcs51/main.c: added keyword banked,
435           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
436         * support/Util/SDCCerr.c,
437         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
438           needed for passing the bank and address to the trampoline
439         * device/lib/mcs51/crtbank.asm: added for bankswitching
440         * device/lib/mcs51/Makefile: added crtbank
441
442 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
443
444         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
445           for fields at offset 0 of a struct or union as reported
446           on 2005-07-07 in the developer mailing list.
447
448 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
449
450         * src/SDCCmem.c: fixed bug 1238386
451
452 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
453
454         * src/mcs51/peeph.def: added labelrefcounting for peepholes
455           (patch #1144962), added peephole 300, enabled 259.x
456         * doc/sdccman.lyx: removed screenshot and provided link instead
457
458 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
459
460         * doc/sdccman.lyx: added section about debugging with ddd
461         * doc/figures/ddd_example.eps: screenshot of debugging session
462
463 2005-07-04 Raphael Neider <rneider AT web.de>
464
465         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
466           like CODE pointers, fixes #1115683
467         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
468           call, fixes bugs #1232211, #1228110,
469           fixed wrong casts to pCodeFlow from pCodeInstructions
470
471 2005-07-04 Raphael Neider <rneider AT web.de>
472
473         * src/pic/gen.c (popGet): changed assert to allow for
474           bit operands
475         * (popGetAddr): changed signature to provide
476           an additional index, patched all call sites
477         * (genCmpEq): handle literal-like operands correctly
478         * (genAddrOf): added sanity checks on __code/__data pointers
479         * (genAssign): added handling of symbols from __code section
480         * (gencjne): do not generate code for comparisons whose result
481           is neither stored nor used, fixes bug #1171114
482         * (AccLsh, AccRsh): operate on operand instead of WREG
483         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
484           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
485           by known count
486         * rewrote complete shift-by-literal logic, commented unused
487           functions out
488         * (genConstPointerGet): get multiple bytes (if result size > 1),
489           fixed handling of non-immediate addresses
490         * (genPointerGet): handle CODE pointers like CONST pointers
491         * (genpic14Code): insert C-SRC lines as Cource-pCodes
492         * ({aop,op}_isLitLike): NEW, single place to decide whether an
493           operand is to be treated as a literal or not
494         * (mov2w,genPcall,genCmpEq),
495           src/pic/genarith.c: use aop_isLitLike() to decide between
496           literal/register contents
497         * (addSign): added missing offset
498         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
499           only emit comment in debug-mode,
500           use {aop,op}_isLitLike throughout the file
501         * src/pic/glue.c: fix initializers for pointers (work in progress)
502         * src/pic/pcode.c (get_op): honor index on _const symbols
503         * ({reset,dump}pCodeStatistics): NEW, estimate code size
504         * (dumppBlock): added pCode size estimation
505         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
506           check for IS_SYMOP before OP_SYMBOL'ing
507         * fixed indentation, compacted switch-statements
508         * (allocReg): find free register and allocate it instead of
509           allocating new registers all the time
510         * (deassignLRs): prevent POINTER_GET's from being assigned the same
511           registers as its operands (necessary only for multibyte GETs)
512
513 2005-07-01 Raphael Neider <rneider AT web.de>
514
515         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
516           debugging .asm-output macros FENTRY + FEXIT
517         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
518           way... I wonder...
519         * (emitpComment): NEW, printf to pCode
520         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
521           offset handling
522         * (popGetAddr): NEW, variant of popGet to access an immediates
523           high(er) bytes instead of the n'th byte of memory they reference,
524           replaced popGet with popGetAddr where neccessary
525         * (genDataPointerGet): reactivated and fixed implementation
526         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
527           accesses
528         * (genDataPointerSet): fixed multibyte assignments
529         * (genpic14Code): fixed --i-code-in-asm handling
530         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
531         * (genPlus): fixed index-out-of-bounds error
532         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
533         * src/pic/ralloc.c: added debugging output macro FENTRY2
534         * (spillThis): fixed indentation, enbraced for-body for clarity
535         * (rematStr): commented out as now unused
536         * (regTypeNum): commented out special spill case (overwrites
537           arbitrary values)
538         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
539
540 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
541
542         * doc/sdccman.lyx: documented sfr16/sfr32,
543           added example for using storage class with function pointers
544         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
545
546 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
547
548         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
549         * device/lib/_itoa.c,
550         * device/lib/_ltoa.c: optimized codesize
551         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
552           but don't know how to suppress the double warning.
553         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
554         * support/Util/SDCCerr.c,
555         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
556
557 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
558
559         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
560           fixed old K&R prototypes
561         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
562         * device/lib/_gptrget.c,
563         * device/lib/_gptrgetc.c,
564         * device/lib/_gptrput.c: changed versions for new memory indicator values,
565           also new versions for small generic pointers and banked generic pointers
566         * src/port.h: added const_name
567         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
568         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
569         * src/SDCCcse.c (findPrevIc): check all associative operators
570         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
571         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
572         * src/SDCCmem.c: updated comments,
573           set far-space to 0 for pdata, results in optimized code
574         * src/SDCCmem.h: added macro CONST_NAME
575         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
576           moving the info into the highest bits, see also gptrget/gptrput
577         * src/src.dsp: added sdcc.ico to project files
578         * src/avr/gen.c (genCast): fixed bug 0x%d
579         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
580         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
581           relation between ptr_type and DCL_TYPE,
582           (genCast): fixed bug 0x%d
583         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
584           (CODE)" for const_name
585         * src/hc08/gen.c (genCast): fixed bug 0x%d
586         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
587           (hc08_port): added "CONST (CODE)" for const_name
588         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
589           (aopForRemat, adjustArithmeticResult): disconnected direct relation
590           between ptr_type and DCL_TYPE,
591           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
592           operand* and took AOP() inside function so sfr-ness can be checked,
593           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
594           new prototype,
595           (genFunction, genEndFunction): optimized stack setup,
596           (genMinus): optimized for literals with ending zeroes (in bytes),
597           (genCast): fixed bug 0x%d
598         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
599           (mcs51_port): added "CONST (CODE)" for const_name
600         * src/mcs51/peeph.def: made rule 226 more generic
601         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
602         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
603         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
604         * src/z80/main.c (z80_port): added NULL for const_name,
605           (gbz80_port): added NULL for const_name
606         * support/regression/tests/bug663539.c,
607         * support/regression/tests/sfr16.c: new tests
608
609 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
610
611         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
612
613 2005-06-24 Raphael Neider <rneider AT web.de>
614
615         * device/lib/pic16/libdev/pic18f[68][567]20.c:
616           corrected typos...
617         * device/include/pic16/signal.h: added USBIF
618           and SIG_USB
619
620 2005-06-24 Raphael Neider <rneider AT web.de>
621
622         * device/lib/pic16/libdev/pic18f2455.c,
623           device/include/pic16/pic18f2455.h: NEW
624         * device/include/pic16/pic18fregs.h,
625           device/lib/pic16/pics.all,
626           src/pic16/device.c: added 18f2455
627         * device/lib/pic16/libdev/pic18f[68][567]20.c,
628           device/include/pic16/{pic18f[68][567].h,usart.h}:
629           replaced MULTIPLE_USARTS define with more relaible
630           compatibility sfrs (for USART access)
631
632 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
633
634         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
635           and the output asm file line is printed on two lines.
636
637 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
638
639         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
640           BGT, BLE, BHI, and BLS instructions
641         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
642           genCmpEq): removed
643         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
644           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
645           fixes bug #1216342
646         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
647
648 2005-06-15 Raphael Neider <rneider AT web.de>
649
650         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
651         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
652         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
653           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
654           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
655
656 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
657
658         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
659           Marcel Telka in bug #1215704
660
661 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
662
663         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
664           located in shared memory bank.
665
666 2005-05-31 Raphael Neider <rneider AT web.de>
667
668         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
669           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
670           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
671
672 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
673
674         * device/lib/_strncpy.c: fixed the fix
675
676 2005-05-26 Raphael Neider <rneider AT web.de>
677
678         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
679           initializers with \0, bug #1208187
680         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
681           intializers with \0, bug #1208187
682
683 2005-05-26 Raphael Neider <rneider AT web.de>
684
685         * src/pic16/glue.c (pic16_printIvalChar): fixed string
686           initializers with \0, bug #1208187
687         * src/pic16/main.c (_process_pragma): added sanity checks
688           for stack position and size, emit warnings when appropriate
689
690 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
691
692         * device/lib/_strncpy.c: fixed not filling with \0
693
694 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
695
696         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
697           createFunction),
698         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
699           compound_statement),
700         * src/SDCCsymt.h,
701         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
702
703 2005-05-24 Raphael Neider <rneider AT web.de>
704
705         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
706
707 2005-05-24 Raphael Neider <rneider AT web.de>
708
709         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
710           TRISE definitions, closes bug #1162453
711
712 2005-05-22 Raphael Neider <rneider AT web.de>
713
714         * src/pic16/main.c (_process_pragma): check for missing
715           arguments to pragmas code and udata
716         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
717           consistency fixes to match other headers (thanks to Jim Paris)
718         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
719
720 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
721
722         * src/SDCCicode.c (isOperandEqual): fixed missing ;
723
724 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
725
726         * support/regression/tests/bug1198642.c: new test
727         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
728         * src/SDCCcse.c (findPrevIc): added comment, please have a look
729         * support/scripts/resource.h,
730         * support/scripts/resource.rc,
731         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
732         * support/scripts/sdcc.ico: added 32x32 icon
733
734 2005-05-18 Raphael Neider <rneider AT web.de>
735
736         * device/lib/pic16/libdev/pic18f*.c,
737         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
738           keywords to "__sfr" and "__at (X)"
739         * device/include/pic16/pic18fregs.h: added pic18f4520
740         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
741           #1203088 (MPLAB compatibility)
742
743 2005-05-17 Raphael Neider <rneider AT web.de>
744
745         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
746         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
747         * device/lib/pic16/pics.all: added new devices
748         * src/pic16/device.c: added support for pic18f4520
749
750 2005-05-16 Raphael Neider <rneider AT web.de>
751         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
752         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
753         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
754           convenience function for bit access
755
756 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
757
758         * device/lib/printf_large.c: fixed bug 1193299
759         * support/regression/tests/bug1057979.c: added test %3.3s
760
761 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
762
763         * device/include/mcs51/8051.h,
764         * device/include/mcs51/8052.h: made parseable with lint
765         * device/include/mcs51/lint.h: added include file for (sp)lint
766         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
767         * doc/cdbfileformat.lyx,
768         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
769
770 2005-05-14 Raphael Neider <rneider AT web.de>
771
772         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
773         * device/lib/pic16/libc/stdlib/itoa.c (new)
774         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
775         * device/lib/pic16/libio/Makefile: exclude subdir according to
776           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
777         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
778         * src/pic16/gen.c (genFunction): prevent annoying warning
779         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
780           nameclashes on BeOS
781         * support/cpp2/cppmain.c (cpp_output_string): new
782         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
783           fixes bug 1116802
784
785 2005-05-13 Borut Razem <borut.razem AT siol.net>
786
787         * src/SDCCmain.c (linkEdit): fixed bug 1195202
788
789 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
790
791         * .version: changed to version 2.5.1; back to bleeding edge development
792
793 2005-05-11 Borut Razem <borut.razem AT siol.net>
794
795         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
796           generate PDF version 1.3 documents
797
798 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
799
800         * .version: changed to version 2.5.0
801
802 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
803
804         * doc/sdccman.lyx: updated weblinks, index and smaller updates
805
806 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
807
808         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
809         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
810         well as many smaller updates.
811         * .version: changed to version 2.5.0-pre1
812
813 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
814
815         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
816
817 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
818
819         * support/regression/tests/bug1185672.c: added
820         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
821           bug 1185672
822         * src/mcs51/gen.c (genCall): added comments, made it look safer
823         * src/mcs51/gen.c (genEndFunction): simplified
824
825 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
826
827         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
828
829 2005-04-14 Borut Razem <borut.razem AT siol.net>
830
831         * fixed bug 1045046 - SIGSEGV with really simple code?:
832           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
833           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
834
835 2005-04-14 Borut Razem <borut.razem AT siol.net>
836
837         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
838           src/pic16/device.h: temporarily disabled experimental #inline pragma
839           for 2.5.0 release
840
841 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
842
843         * device/include/z80/stdio.h,
844         * device/include/z80/string.h: removed these highly incomplete files so
845           SDCC can use the default ones in device/include/
846
847 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
848
849         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
850         gcc warning.
851         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
852         fix sdcpp warnings.
853
854 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
855
856         * device/include/malloc.h: removed redundant __reentrant prototypes
857         * device/lib/_mullong.c: added working xstack variant in asm (C version
858           doesn't pass regression tests)
859         * device/lib/bpx.c: used __data and made bpx char for mcs51
860         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
861           (createFunction): fixed bug with xstackPtr
862         * src/SDCCcse.c: corrected comments
863         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
864           (killDeadCode, eBBlockFromiCode): removed unused code
865         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
866           corrected comments
867         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
868           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
869           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
870           (genModOneByte): fixed warning in MSVC
871         * src/mcs51/main.c (): added comments
872         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
873
874 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
875
876         * src/SDCCmain.c (linkEdit): oops, changed one line too many
877
878 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
879
880         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
881
882 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
883
884         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
885         characters arrays of larger size than the declared one.
886
887 2005-04-10 Borut Razem <borut.razem AT siol.net>
888
889         * src/pic/gen.c (genInline),
890           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
891           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
892           (findNextInstruction), (findPrevInstruction),
893           (findInstructionUsingLabel),
894           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
895         * src/pic/pcode.c (findLabel): added missing '\n'
896         * src/src.dsp: added SDCCdwarf2.c to the project
897
898 2005-04-09 Borut Razem <borut.razem AT siol.net>
899
900         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
901
902 2005-04-08 Raphael Neider <rneider AT web.de>
903
904         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
905           into the chain after a given one) and mergeDefmapSymbols (combine
906           defmap entries for each symbol per pcode)
907         * (createDefmap): have defmap entries merged in the end
908         * (defmapReplaceSymRef): split defmap entries covering two accesses to
909           a symbol before replacing one access type's symbol, merge symbols in
910           the end (replacement symbol might already have an entry)
911         * (assignValnums): keep reference to written WREG intact
912
913 2005-04-08 Raphael Neider <rneider AT web.de>
914
915         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
916           Alpha)
917
918 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
919
920         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
921         bytes
922
923 2005-04-07 Raphael Neider <rneider AT web.de>
924
925         * device/include/pic16/usart.h: added compatibility defines for
926           devices with more than one USART
927         * device/include/pic16/pic18f[68][567]20.h: activated above defines
928
929 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
930
931         * device/lib/Makefile.in: updated for port specific include
932
933 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
934
935         * support/regression/ports/mcs51/spec.mk: added mcs51 include
936
937 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
938
939         * device/include/8051.h,
940         * device/include/8052.h,
941         * device/include/at89S8252.h,
942         * device/include/at89c55.h,
943         * device/include/at89x051.h,
944         * device/include/at89x51.h,
945         * device/include/at89x52.h,
946         * device/include/mcs51reg.h,
947         * device/include/reg51.h,
948         * device/include/reg764.h,
949         * device/include/regc515c.h,
950         * device/include/sab80515.h: (re)moved these 12 files
951         * device/include/mcs51/8051.h,
952         * device/include/mcs51/8052.h,
953         * device/include/mcs51/at89S8252.h,
954         * device/include/mcs51/at89c55.h,
955         * device/include/mcs51/at89x051.h,
956         * device/include/mcs51/at89x51.h,
957         * device/include/mcs51/at89x52.h,
958         * device/include/mcs51/mcs51reg.h,
959         * device/include/mcs51/reg51.h,
960         * device/include/mcs51/reg764.h,
961         * device/include/mcs51/regc515c.h,
962         * device/include/mcs51/sab80515.h: and added them here
963
964 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
965
966         * device/include/stdarg.h: changed SDCC specific keywords to double
967           underlined form.
968         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
969           mcs51 and ds390.
970         * device/include/hc08/mc68hc908gp32.h,
971         * device/include/hc08/mc68hc908jb8.h,
972         * device/include/hc08/mc68hc908jkjl.h,
973         * device/include/hc08/mc68hc908qy.h: fixed comments
974         * device/include/mcs51/README: updated
975         * device/include/mcs51/c8051f120.h: added PINRSF
976         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
977         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
978           amidst code. Also inline is not supported.
979
980 2005-04-06 Raphael Neider <rneider AT web.de>
981
982         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
983         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
984           callers stack/frame pointers
985
986 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
987
988         * device/include/pic16/usart.h: added, missing in previous commit,
989         * device/include/pic16/adc.h: fixed typo,
990         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
991         commit,
992         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
993         <p18fxxx.inc>
994         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
995         uninitialized because a bug appears with gplink
996         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
997         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
998         complains for unrecognised option
999
1000 2005-04-05 Raphael Neider <rneider AT web.de>
1001
1002         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1003           structs as well (using memcpy)
1004         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1005           on ISRs (GOTO has no label)
1006         * src/pic16/device.h: added OF_OPTIMIZE_DF
1007         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1008           new data flow analysis/optimization
1009         * src/pic16/pcode.c: added (prototypes for and implementation of)
1010           dataflow analysis functions, fixed pCodeInstructions' inCond and
1011           outCond values, made RCALL a branch instruction
1012         * (pic16_unlinkpCode): keep C line if possible
1013         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1014           C line moved if possible
1015         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1016         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1017           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1018         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1019           new flow)
1020         * (pic16_getJumptabpCode): NEW, needed in...
1021         * (LinkFlow): fixed handling of jumptables, calls and conditional
1022           branches
1023         * (pic16_InsertCommentAfter): NEW
1024         * (pic16_pCodeReplace): made verbose and flow preserving
1025         * (AnalyzeFlow): added call to data flow analysis
1026         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1027         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1028         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1029
1030 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1031
1032         * src/SDCCast.c (decorateType): fixed bug #1105626
1033
1034 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1035
1036         * device/include/asm/pic16/features.h,
1037         * pic18f*.h headers,
1038         * device/include/pic16/adc.h,
1039         * device/include/pic16/delay.h,
1040         * device/include/pic16/i2c.h,
1041         * device/include/pic16/malloc.h,
1042         * device/include/pic16/stdio.h,
1043         * device/include/pic16/stdlib.h,
1044         * device/include/pic16/string.h,
1045         * device/lib/pic16/libc/stdio/printf_tiny.c,
1046         * device/lib/pic16/libc/stdio/printf_small.c,
1047         * device/lib/pic16/libc/stdio/strmgpsim.c,
1048         * device/lib/pic16/libc/stdio/strmmssp.c,
1049         * device/lib/pic16/libc/stdio/strmusart.c,
1050         * device/lib/pic16/libc/stdio/vfprintf.c,
1051         * device/lib/pic16/libc/stdlib/ltoa.c,
1052         * device/lib/pic16/libc/stdlib/putchar.c,
1053         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1054         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1055         * device/lib/pic16/libc/stdlib/memchrram.c,
1056         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1057         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1058         * device/lib/pic16/libio/adc/adcbusy.c,
1059         * device/lib/pic16/libio/adc/adcread.c,
1060         * device/lib/pic16/libio/adc/adcsetch.c,
1061         * device/lib/pic16/libio/usart/ubaud.c,
1062         * device/lib/pic16/libio/usart/ubusy.c,
1063         * device/lib/pic16/libio/usart/udrdy.c,
1064         * device/lib/pic16/libio/usart/uopen.c,
1065         * device/lib/pic16/libio/usart/uputc.c,
1066         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1067         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1068         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1069         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1070         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1071         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1072         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1073         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1074         specific keywords to double underlined form,
1075         * device/lib/pic16/libc/Makefile.rules,
1076         * device/lib/pic16/libsdcc/Makefile.rules,
1077         * device/lib/pic16/libm/Makefile,
1078         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1079         to compile with C standard set in Makefile.common
1080         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1081         rand.c and crc.c in compilation process,
1082         * device/lib/pic16/libsdcc/int/divuint.c,
1083         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1084         `c' from signed to unsigned,
1085         * device/lib/pic16/startup/crt0.c,
1086         * device/lib/pic16/startup/crt0i.c,
1087         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1088         keywords to double underlined form, bug fixes in _do_cinit function
1089         which prevented the correct initialization of the .idata segment,
1090         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1091         core to enter a infinite loop
1092         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1093
1094 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1095
1096         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1097
1098 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1099
1100         * device/include/Makefile.in: add support for hc08 subdirectory
1101         * device/include/hc08/: new subdirectory
1102         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1103         Lucas Loizaga, thanks!
1104         * device/include/hc08/mc68hc908qy.h,
1105         * device/include/hc08/mc68hc908gp32.h,
1106         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1107         their own directory. Changed internal macro names to use the compiler
1108         reserved namespace. Changed SDCC specific keywords to double
1109         underlined form.
1110         * device/include/math.h,
1111         * device/include/malloc.h,
1112         * device/include/stdarg.h,
1113         * device/include/stdbool.h
1114         * device/include/string.h,
1115         * device/include/tinibios.h,
1116         * device/include/ds400rom.h,
1117         * device/include/8051.h,
1118         * device/include/8052.h,
1119         * device/include/80c51xa.h,
1120         * device/include/at89c55.h,
1121         * device/include/at89S8252.h,
1122         * device/include/at89x51.h,
1123         * device/include/at89x52.h,
1124         * device/include/ds80c390.h,
1125         * device/include/reg764.h,
1126         * device/include/regc515c.h,
1127         * device/include/sab80515.h,
1128         * device/include/mcs51/c8051f000.h,
1129         * device/include/mcs51/c8051f018.h,
1130         * device/include/mcs51/c8051f020.h,
1131         * device/include/mcs51/c8051f040.h,
1132         * device/include/mcs51/c8051f060.h,
1133         * device/include/mcs51/c8051f120.h,
1134         * device/include/mcs51/c8051f300.h,
1135         * device/include/mcs51/c8051f310.h,
1136         * device/include/mcs51/c8051f320.h,
1137         * device/include/mcs51/c8051f330.h,
1138         * device/include/mcs51/c8051f350.h,
1139         * device/include/z180.h: Changed SDCC specific keywords to double
1140         underlined form.
1141
1142 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1143
1144         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1145         18F4455,
1146         * (pic16_assignConfigWordValue): disable testing of configuration
1147         register value with config mask,
1148         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1149         function with port->fun_prefix,
1150         * (genFunction): when generating a naked interrupt function never
1151         create an absolute segment placed in interrupt vector address, place
1152         the actual interrupt function at IVA instead, when an interrupt
1153         function is generated with unspecified interrupt then do not create
1154         the absolute section,
1155         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1156         code for generating a call to generic pointer get/put function with
1157         a call to function pic16_callGenericPointer(),
1158         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1159         the call to the generic pointer get/put functions with prefixing the
1160         function name with port->fun_prefix,
1161         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1162         * src/pic16/main.c (_process_pragma): prefix function with
1163         port->fun_prefix,
1164         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1165         calling assembler, old 18Fxxxx macro is deprecated,
1166         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1167         PC_ASMDIR in while condition,
1168         * (findInstruction): add PC_ASMDIR in while condition,
1169         * (buildCallTree): prefix main with port->fun_prefix,
1170         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1171         identifier for variable with banked access in instructions BTFSS,
1172         BTFSC, BCF, BSF, BTG
1173         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1174         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1175         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1176         perform optimization when enviroment variable NO_REG_OPT is set,
1177         * (insideLRBlock): NEW, return 1 if register is inside an
1178         INF_LOCALREGS block,
1179         * (RemoveRegFromLRBlock): remove a register that is completely
1180         eliminated by register optimization, but it is still left in local
1181         register store/restore in/from stack block,
1182         * (Remove2pcodes): after removing register, check to see if it
1183         should be removed from local register store/restore in/from stack
1184         block,
1185         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1186         DUMMY_READ_VOLATILE,
1187
1188         * device/include/pic16/adc.h: minor prototype modifications and
1189         update,
1190         * device/include/pic16/malloc.h: added GPL notice various
1191         modifications,
1192         * device/include/pic16/stdint.h: NEW, standard header for ints
1193         * device/include/pic16/delay.h: NEW, header for delay functions,
1194         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1195         delay1mtcy,
1196         * device/include/pic16/signal.h: NEW, header providing helper macros
1197         for implementing signal handlers,
1198         * device/include/pic16/stdio.h: added prototypes for functions,
1199         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1200         prototypes for stdin and stdout, added macro PUTCHAR to
1201         automatically implement putchar function prototype,
1202         * device/include/pic16/usart.h: modified and updated USART library,
1203         * device/lib/pic16/libio/adc/,
1204         * device/lib/pic16/libio/i2c: some modifications to improve library
1205         performance,
1206         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1207         family of functions,
1208         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1209         family of functions and other sources,
1210         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1211         of the PIC18Fxx[28] devices,
1212         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1213         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1214         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1215         _do_cinit function, because the previous failed when local variables
1216         where not placed in the same memory bank,
1217         * device/lib/pic16/libsdcc/char/: various modifications to improve
1218         library performance,
1219         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1220         information on the new functions of the c library and more...
1221
1222 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1223
1224         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1225
1226 2005-03-26 Raphael Neider <rneider AT web.de>
1227
1228         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1229           if condition == CARRY)
1230         * (genCmp): adapted to new genSkipc semantics
1231         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1232           on rIfx (genCmp was broken)
1233
1234 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1235
1236         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1237         * src/z80/main.c (_keywords[]),
1238         * src/SDCCglobal.h (struct options),
1239         * src/SDCC.y,
1240         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1241         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1242         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1243         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1244         always available in leading double underscore form. The C99 support is
1245         mostly missing, but it's a start.
1246         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1247         reserved identifier "__data".
1248
1249 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1250
1251         * src/mcs51/peeph.def: fixed bug 1170013
1252
1253 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1254
1255         * device/include/mcs51reg.h: fixed bug 842007
1256
1257 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1258
1259         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1260         last time.
1261
1262 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1263
1264         * src/port.h (struct PORT),
1265         * src/avr/ralloc.c (avr_assignRegisters),
1266         * src/avr/main.c,
1267         * src/ds390/ralloc.c (ds390_assignRegisters),
1268         * src/ds390/main.c,
1269         * src/hc08/ralloc.c (hc08_assignRegisters),
1270         * src/hc08/main.c,
1271         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1272         * src/mcs51/main.c,
1273         * src/pic/ralloc.c (pic14_assignRegisters),
1274         * src/pic/main.c,
1275         * src/pic16/ralloc.c (pic16_assignRegisters),
1276         * src/pic16/main.c,
1277         * src/xa51/ralloc.c (xa51_assignRegisters),
1278         * src/xa51/main.c,
1279         * src/z80/ralloc.c (z80_assignRegisters),
1280         * src/z80/ralloc.h,
1281         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1282         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1283         * src/SDCCcse.h,
1284         * src/SDCCdflow.c (computeDataFlow),
1285         * src/SDCCdflow.h,
1286         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1287         * src/SDCCloop.h,
1288         * src/SDCCcflow.c (*),
1289         * src/SDCCcflow.h,
1290         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1291         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1292         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1293         immedDom() returning wrong block; probably fixes bug #1160833)
1294
1295 2005-03-20 Borut Razem <borut.razem AT siol.net>
1296
1297         * support/scripts/inc2h.pl: WIN32 port
1298
1299 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1300
1301         * device/lib/makefile.in: added abs.c and labs.c
1302
1303 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1304
1305         * device/include/stdint.h: added
1306         * device/lib/abs.c: added
1307         * device/lib/labs.c: added
1308         * device/include/stdlib.h: added abs() and labs() prototypes
1309         * device/lib/libsdcc.lib: added abs and labs
1310         * device/include/float.h,
1311         * device/lib/_fsmul.c,
1312         * device/lib/printf_fast.c,
1313         * device/lib/printf_tiny.c: updated comments
1314
1315 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1316
1317         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1318         bug #1164313
1319
1320 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1321
1322         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1323         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1324
1325 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1326
1327         * device/lib/printf_large.c: removed inline assembly for portability and
1328           readability. Use printf_fast if speed or size are more important.
1329         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1330         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1331
1332 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1333
1334         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1335         prevent compiler warning
1336
1337 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1338
1339         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1340         moved to level 0 and declared as static. Also they are explicit
1341         placed in access bank. This was necessery because some times they
1342         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1343         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1344         optimizations. Currently only compare to unsigned char is implemented,
1345         * src/pic16/gen.c: added fReturnIdx array,
1346         * (struct resolvedIfx) is moved to gen.h and made public,
1347         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1348         * (aopForSym): added an optimization to directly store in stack of
1349         the operand of a SEND iCode,
1350         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1351         but as registers instead (AOP_REG) using the fReturnIdx array,
1352         * (pic16_freeAsmop): remove the freed register from the
1353         _G.sregsAlloc field,
1354         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1355         a compare of 'WREG',
1356         * (pic16_popGetTempRegCond): changed function prototype, now
1357         function takes also a bitVector argument v which holds the current
1358         set of registers that are allocated for stack access by aopForSym,
1359         registers allocated in aopForSym for accessing stack symbols are not
1360         any more part of the functions usedRegs field,
1361         * (genCall): some times aopOp is called for a stack variable to be
1362         send, aopForSym might perform the push, if this is true make sure
1363         that genCall doesn't push the variable twice by testing _G.resDirect,
1364         * (genFunction): changed testing for unspecified interrupt number
1365         from 256 to INTNO_UNSPEC,
1366         * modified selection scheme of frame pointer generation. Previously
1367         if function did use local registers a frame pointer was generated,
1368         now a frame pointer is generated only if function has arguments
1369         (that need PLUSW2 register access), or has stack arguments, or the
1370         compiler is not instructed to omit the frame pointer,
1371         * (genEndFunction): before restoring local registers that were saved
1372         in the function preamble, also restore the registers that *might*
1373         have been allocated for stack access,
1374         * (genRet): removed some old comments,
1375         * (genCmp, the active (RN's) version): added a call to the
1376         pic16_genCmp_special function to perform the compare with a more
1377         robust and optimized way,
1378         * (genInline): a feature has been added in inline code generation,
1379         which allows a wildcard variable substitution when writing inline
1380         assembly. Code is incomplete and experimental therefore undocumented,
1381         * (genCast): changed order of aopOp for result and right to allow
1382         aopForSym to directly load the result if possible,
1383         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1384         perform an optimized compare on some selected special occasions,
1385         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1386         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1387         generate an IVT any more,
1388         * src/pic16/main.c (pic16_optionsTable): added command line option
1389         --optimize-cmp,
1390         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1391         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1392         macros,
1393         * src/pic16/NOTES: Raphael Neider added in list of active developers
1394         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1395         jumptable_end to prevent bug #,
1396         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1397         inCond and outCond fields,
1398         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1399         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1400         turn off register spilling,
1401         * (packRegsForOneUse): synced with other ports' versions although it
1402         is not used currently,
1403         * (pic16_packRegisters): added an optimization while reading
1404         structure bitfields, some registers may be saved (malloc code is
1405         decreased by 80 bytes)
1406
1407 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1408
1409         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1410         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1411         this can be optimized more?
1412
1413 2005-03-10 Raphael Neider <rneider AT web.de>
1414
1415         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1416           genNearPointerGet): (hopefully) fixed access to bitfields via
1417           pointers (p->bitN = x; and x = p->bitN; failed)
1418
1419 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1420
1421         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1422
1423 2005-03-09 Raphael Neider <rneider AT web.de>
1424
1425         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1426
1427 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1428
1429         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1430         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1431           (regTypeNum): set REG_BIT type if necessary
1432         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1433         * support/regression/tests/critical.c: check bug 1144613
1434
1435 2005-03-02 Raphael Neider <rneider AT web.de>
1436
1437         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1438
1439 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1440
1441         * src/avr/ralloc.c (serialRegAssign),
1442         * src/ds390/ralloc.c (serialRegAssign),
1443         * src/hc08/ralloc.c (serialRegAssign),
1444         * src/mcs51/ralloc.c (serialRegAssign),
1445         * src/pic/ralloc.c (serialRegAssign),
1446         * src/pic16/ralloc.c (serialRegAssign),
1447         * src/xa51/ralloc.c (serialRegAssign),
1448         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1449
1450 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1451
1452         * src/SDCCast.c (decorateType): fixed bug 1124787
1453
1454 2005-02-20 Hubert Sack <sack AT digiplan.de>
1455         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1456
1457         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1458         patch #1121755
1459
1460 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1461
1462         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1463         to keep the correct label reference count when adding/removing references
1464         to labels. A peephole file using this is appended to patch #1144962.
1465
1466 2005-02-14 Raphael Neider <rneider AT web.de>
1467
1468         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1469         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1470         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1471           retrievals of result operand's value on assignment
1472
1473 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1474
1475         * device/include/pic16/string.h: modified prototype for memccpy()
1476         to memccpy(void *, void *, char, size_t)
1477         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1478         check whether to omit frame pointer or not,
1479         * (genInline): convert all occurences of "\n" to LF in inline
1480         assembler blocks, this helps formatting the inline text,
1481         * (pic16_loadFSR0): modified prototype,
1482         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1483         removed some 8051 legacy code,
1484         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1485         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1486         before allocating temporary registers in functions,
1487
1488 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1489
1490         * support/regression/tests/bitvars.c: corrected the "fix"
1491
1492 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1493
1494         * support/regression/tests/bitvars.c,
1495         * support/regression/tests/bitwise.c,
1496         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1497
1498 2005-02-10 Raphael Neider <rneider AT web.de>
1499
1500         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1501           different size for Alpha
1502         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1503
1504 2005-02-09 Raphael Neider <rneider AT web.de>
1505
1506         * src/SDCC.lex(doPragma) : save and restore warning options as well
1507           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1508         * have #pragma less_pedantic set the errorlevel to WARNING
1509           (fixes #1117001)
1510         * (cloneOptimize) : fixed wrong malloc's size
1511         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1512           facilitate correct handling of #pragma (save|restore)
1513
1514 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1515
1516         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1517
1518 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1519
1520         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1521
1522 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1523
1524         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1525
1526 2005-02-02 Raphael Neider <rneider AT web.de>
1527
1528         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1529         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1530         * (pic16_storeForReturn): fixed to allow returning function pointers
1531         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1532         * device/include/pic16/{stddef.h,stdbool.h}: added
1533
1534 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1535
1536         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1537
1538 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1539
1540         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1541         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1542          appeared to be required
1543
1544 2005-01-31 Borut Razem <borut.razem AT siol.net>
1545
1546         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1547           include/mcs51 and include/z80 directories to the package
1548
1549 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1550
1551         * src/hc08/gen.c (genFunction): fixed bug #1112752
1552
1553 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1554
1555         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1556
1557 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1558
1559         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1560
1561 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1562
1563         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1564
1565 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1566
1567         * device/include/c8051fxxx.h: removed these 6 files
1568         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1569
1570 2005-01-26 Raphael Neider <rneider AT web.de>
1571
1572         * src/pic16/gen.c (genAssign): fixed assignment from longs
1573           in codespace (were cut to three bytes)
1574         * (genDummyRead): implemented (except for CODESPACE...),
1575           fixed bug #1108575
1576         * src/pic16/glue.c (emitStatistics): beautified
1577         * device/lib/pic16/libm/Makefile: added include path
1578
1579 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1580
1581         * src/z80/gen.c (aopPut): fixed bug #1103902
1582
1583 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1584
1585         * device/lib/expf.c: fixed bug #1095792
1586
1587 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1588
1589         * device/lib/pic16/libm: added Math library sources
1590
1591 2005-01-24 Raphael Neider <rneider AT web.de>
1592
1593         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1594           to enable upcast to pCodeOpReg2 (there is no type tag to
1595           differenciate the two and pic16_popGet2p cast into PCOR2)
1596         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1597           (sizeof(sectNames) changed to sizeof(sectName))
1598           Both patches fix segfaults under MinGW.
1599
1600 2005-01-23 Raphael Neider <rneider AT web.de>
1601
1602         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1603           Safe_[mc]?alloc()'ed variables
1604         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1605           of (byte sized) temporaries (assign them to WREG for now)
1606         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1607           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1608           this might fix SIGSEGVs on MinGW...
1609         * src/SDCCopt.c (killDeadCode): restored original behaviour
1610           (volatile operands might get thrown away though)
1611
1612 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1613
1614         * src/pic16/gen.c: fixed bug #1106975,
1615         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1616         pointer update, INTCON is saved, global interrupts are disabled and
1617         restored after updateing TOS.
1618         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1619         * added function attribute 'shadowregs' to take advantage of shadow
1620         registers,
1621         * added function attribute 'wparam' as an alternative to the wparam
1622         pragma,
1623         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1624         user declares a non-ISR function as 'shadowregs',
1625         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1626
1627 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1628
1629         * .version: bumped version number to 2.4.8
1630         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1631         pic16 port,
1632         * device/lib/pic16/libio/i2c/: I2C module support library,
1633         * device/include/pic16/i2c.h: I2C support library header,
1634         * device/lib/pic16/libc/stdio/: standard IO support sources,
1635         * (printf_small.c): printf_small() source, supports float print,
1636         * (printf_tiny.c): printf_tiny() source, does not support floats,
1637         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1638         enable global optimizations for entire library source, other
1639         Makefiles in the source tree are also modified to reflect this,
1640         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1641         function,
1642         * doc/sdccman.lyx: updated to reflect new changes,
1643         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1644         sym->onStack if-case,
1645         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1646         sbit, idata, _idata, xdata, _xdata,
1647         * added pragma library, to link an external library, (see doc),
1648         * removed command line options, --pomit-config-words, --pomit-ivt,
1649         --pleave-reset-vector,
1650         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1651         when calling assembler to reflect memory model used, also define
1652         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1653         reflect stack model used,
1654         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1655         on stack return NULL,
1656
1657 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1658
1659         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1660           of the operands is volatile. Fixes #1020220
1661
1662 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1663
1664         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1665         * (OptimizeRegUsage): make sure that there is really no other flow where
1666           the first pCode is used
1667
1668 2005-01-22 Raphael Neider <rneider AT web.de>
1669
1670         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1671           to fix #1106967 (pCode->seq are not set up correctly)
1672
1673 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1674
1675         * src/SDCCglue.c (glue): make sure code area is declared before the
1676         static initialization area.
1677
1678 2005-01-21 Raphael Neider <rneider AT web.de>
1679
1680         * device/lib/Makefile.in: fixed test for pic16 install dir
1681         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1682           optimizations
1683         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1684           added --optimize-goto compiler switch and pragma wparam documentation
1685         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1686         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1687           and PRODH closing bug #1071770 (peephole optimizer)
1688
1689 2005-01-19 Raphael Neider <rneider AT web.de>
1690
1691         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1692           cmdLine buffers (used when calling sdcpp...) are large enough
1693           (MAX_PATH=256 truncates arguments leading to system halts when
1694           used in MinGW...)
1695         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1696         * (genUminus): rewritten to for efficiency
1697         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1698           used uninitialized in some cases)
1699         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1700           copy the third byte from the int -- now assumes 0x80 (data memory)
1701         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1702           operands (genAddLit expects the iCode's operands to swapped as
1703           well), fixed leftover bytes (crashed for short left operands)
1704         * (pic16_genMinusDec): performance improvements, removed false
1705           PIC14 emitSKPNCs
1706         * (pic16_genMinus): fixed to cope with differently sized operands
1707         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1708           for --obanksel > 1
1709         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1710         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1711           new banksel optimization
1712         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1713           analysis for temporary registers (segfaults...)
1714         * src/pic16/peeph.def: added rule
1715
1716 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1717
1718         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1719         which converts a float number to its ASCII representation
1720         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1721         functions to convert the fractional and integer part of a float to ASCII,
1722         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1723         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1724         ram
1725         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1726         _STATMEM macros,
1727         * device/include/pic16/adc.h: added GPL info,
1728         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1729         a pCodeOp as tested operand,
1730         * (genNearPointerGet): optimized bit testing, does not use
1731         intermediate register for bit value, test directly instead with
1732         BTFSS, BTFSC, works only for single bits,
1733         * (genpic16Code): dump the name of the iCode in the asm,
1734         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1735         renamed to pic16_decodeOp,
1736         * (serialRegAssign): do not allocate a temporary register for iCode
1737         sequences that test a single bit for 1/0
1738
1739 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1740
1741         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1742         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1743         access stack and frame pointers. They are initially assigned to
1744         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1745         accessing SFRs. Updated all occurences of modification of stack or
1746         frame pointer in gen.c and pcode.c,
1747         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1748         assigning of a literal value to pointers,
1749         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1750         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1751         selected
1752
1753 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1754
1755         * doc/sdccman.lyx: update documentation about stack pragma, added
1756         some info for stack memory models
1757
1758 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1759
1760         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1761
1762 2005-01-08 Raphael Neider <rneider AT web.de>
1763
1764         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1765           udata sections to fix bug #1097823
1766
1767 2005-01-05 Raphael Neider <rneider AT web.de>
1768
1769         * src/pic16/gen.c (genGenericShift): added handling of differently
1770           sized left operand and result
1771
1772 2005-01-04 Raphael Neider <rneider AT web.de>
1773
1774         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1775         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1776           to hold the condition bit)
1777         * added new version of genCmp (old code available via #define)
1778         * added new version of genShiftLeft/genShiftRight in a generic
1779           way, now supports shifting by negative values
1780         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1781           shiftCount (expected by genGenericShift)
1782         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1783         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1784           dump
1785         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1786           is an invalid literal too...)
1787
1788 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1789
1790         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1791         from Raphael Neider,
1792         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1793         for 8-bit literals. This fixes some literal operands which are sign
1794         extended to 16-bits ints when instruction needs only 8-bits.
1795
1796 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1797
1798         * device/lib/logf.c: added mcs51 assembly version
1799         * device/lib/expf.c: added mcs51 assembly version
1800         * device/lib/_logexpf.c: new shared asm code for expf and logf
1801         * device/include/math.h: add defines for assembly math library
1802         * device/lib/Makefile.in: build new _logexpf.c
1803         * device/lib/libfloat.lib: use new _logexpf.c
1804
1805 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1806
1807         * src/pic/device.c
1808         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1809           device types which have less than 0x7f registers.
1810
1811 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1812
1813         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1814
1815 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1816
1817         * device/lib/printf_fast.c: only build on supported arch.
1818         * device/lib/printf_tiny.c: only build on supported arch.
1819         * device/lib/printf_fast_f.c: only build if asm float lib
1820         * device/lib/_fsget1arg.c: only build if asm float lib
1821         * device/lib/_fsget2args.c: only build if asm float lib
1822         * device/lib/_fsnormalize.c: only build if asm float lib
1823         * device/lib/_fsreturnval.c: only build if asm float lib
1824         * device/lib/_fsrshift.c: only build if asm float lib
1825         * device/lib/_fsswapargs.c: only build if asm float lib
1826         * device/include/stdio.h: don't provide print_fast,
1827           print_fast_f, print_tiny prototypes if --xstack used
1828
1829 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1830
1831         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1832         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1833           to the SOURCES
1834
1835 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1836
1837         * device/lib/printf_fast_f.c: same as printf_fast, but
1838           with floating point enabled
1839         * device/lib/printf_fast.c: minor tweaks
1840         * device/include/stdio.h: add printf_fast_f
1841
1842 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1843
1844         * src/SDCCmain.c: make --float-reent default for mcs51
1845         * device/lib/_fsadd.c: added mcs51 assembly version
1846         * device/lib/_fssub.c: added mcs51 assembly version
1847         * device/lib/_fsmul.c: added mcs51 assembly version
1848         * device/lib/_fsdiv.c: added mcs51 assembly version
1849         * device/lib/_fseq.c: added mcs51 assembly version
1850         * device/lib/_fsneq.c: added mcs51 assembly version
1851         * device/lib/_fsgt.c: added mcs51 assembly version
1852         * device/lib/_fslt.c: added mcs51 assembly version
1853         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1854         * device/lib/Makefile.in: add _fscmp to build
1855         * device/lib/libfloat.lib: add _fscmp to build
1856
1857 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1858
1859         * device/lib/_fs2slong.c: added mcs51 assembly version
1860         * device/lib/_fs2sint.c: added mcs51 assembly version
1861         * device/lib/_fs2schar.c: added mcs51 assembly version
1862         * device/lib/_fs2ulong.c: added mcs51 assembly version
1863         * device/lib/_fs2uint.c: added mcs51 assembly version
1864         * device/lib/_fs2uchar.c: added mcs51 assembly version
1865         * device/lib/_slong2fs.c: added mcs51 assembly version
1866         * device/lib/_sint2fs.c: added mcs51 assembly version
1867         * device/lib/_schar2fs.c: added mcs51 assembly version
1868         * device/lib/_ulong2fs.c: added mcs51 assembly version
1869         * device/lib/_uint2fs.c: added mcs51 assembly version
1870         * device/lib/_uchar2fs.c: added mcs51 assembly version
1871         * device/include/float.h: added #define to select asm vs c
1872
1873 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1874
1875         * device/lib/printf_fast.c: improvements to float output
1876         * device/include/float.h: add defines for assembly float library
1877         * device/lib/_fsget1arg.c: receive 1 float arg
1878         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1879         * device/lib/_fsnormalize.c: normalize a float
1880         * device/lib/_fsreturnval.c: return float, various helper routines
1881         * device/lib/_fsrshift.c: right shift a float's mantissa
1882         * device/lib/_fsswapargs.c: swap 2 floats
1883         * device/lib/Makefile.in: build these 6 new files for mcs51
1884         * device/lib/libfloat.lib: add these 6 files to the library
1885
1886 2004-12-26 Borut Razem <borut.razem AT siol.net>
1887
1888         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1889           built by gcc 3.4.2
1890
1891 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1892
1893         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1894           and fully reentrant and register bank neutral.
1895         * device/lib/printf_fast.c: added float (not enabled by default),
1896           added compact/slower integer (also not enabled by default),
1897           improved size/speed of fast integer code, other minor changes
1898         * device/include/stdio.h, device/lib/Makefile.in,
1899           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1900
1901 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1902
1903         * src/pic16/pcode.c: declaring variables other than at the start of a
1904           block is not supported in C by VC6.
1905
1906 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1907
1908         * applied a previous patch from Raphael Neider that wasn't included
1909         in the previous commits, which fixes infinite loops within jumptable
1910         improvements,
1911         * made some fixes that previous patches introduced
1912
1913 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1914
1915         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1916         that fixes an issue with AOP_PCODE asmop's offset,
1917         * (pic16_popCopyReg): update instance field too,
1918         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1919         function of pic port,
1920         * (genCmp, genAnd, genAssign),
1921         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1922
1923 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1924
1925         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1926         variables initial values to idata section,
1927         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1928         variables in some functions. This utilizes parmBytes field of iCode
1929         structure to hold the offset of the variable in stack. (might be
1930         able to use the stack field too?)
1931         * applied patch from Raphael Neider # ### , # ###
1932         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1933         variable initial values in idata section,
1934         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1935         for static variables with initial value
1936         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1937         applied fix in while loop from Raphael Neider.
1938
1939 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1940
1941         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1942         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1943         * src/ds390/ralloc.c (serialRegAssign): spill bits
1944         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1945         * support/Util/SDCCerr.c,
1946         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1947         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1948         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1949
1950 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1951
1952         * device/include/sdcc-lib.h: inserted LGPL, added includes
1953           asm/ds390/features.h and asm/mcs51/features.h
1954         * device/include/asm/default/features.h,
1955         * device/include/asm/gbz80/features.h,
1956         * device/include/asm/z80/features.h: added empty _AUTOMEM
1957           and _STATMEM
1958         * device/include/asm/ds390/features.h,
1959         * device/include/asm/mcs51/features.h: added files with defines for
1960           _AUTOMEM and _STATMEM indicating automatic and static storage class
1961         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1962         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1963         * src/SDCCicode.c (geniCodeCast),
1964         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1965         * src/SDCCloop.c (loopInduction): removed unused variable lr
1966         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1967           to convertToFcall to include char modulo (RFE 1065037), added check
1968           if left operand is unsigned and use abs of literal value
1969         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1970           as it doesn't work after conversion from peephole.def to peephole.rul
1971         * src/mcs51/gen.c (toBoolean): added check for size,
1972           (genModOneByte): optimized code for signed char modulo a literal
1973           power of 2 (thanks to Hubert Sack),
1974           (genRRC): removed unnecessary "clr c",
1975           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1976         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1977           jump optimization,
1978           swapped rules 256.c and 256.d,
1979           extended 256.d by using new multiple checks (thanks Erik),
1980           added rules 256.e and 256.f,
1981           updated rule 261.a and 261.b to new generated code
1982         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1983
1984 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1985
1986         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1987           induction related bugs, including first part of bug #1074377
1988
1989 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1990
1991         * applied patch from bug-report #1076292,
1992         * applied patches for genAnd and Goto-optimizations for Raphael
1993         Neider,
1994         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1995         dump a less iCode information,
1996         * src/pic16/device.h (pic16_options_t): added field debgen,
1997         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1998         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1999         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2000         puclic,
2001         * (various functions): added macros FENTRY and FENTRY2 to functions,
2002         to emit function prologue,
2003         * (various functions): fixed indentation,
2004         * (genNearPointerGet): fixed loading of FSR0,
2005         * (genPackBits): applied patch from Raphael Neider to fix updating
2006         of FSR0 and touching only the modified bits,
2007         * src/pic16/genarith.c (various functions): added macros FENTRY to
2008         emit function prologue in comments,
2009         * src/pic16/pcode.h: added functions debugf2, debugf3,
2010         * src/pic16/ralloc.c: partial fix for packForPush caused
2011         segmentation fault,
2012
2013 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2014
2015         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2016           <stsp AT users.sourceforge.net> with reversed byte order
2017         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2018
2019 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2020
2021         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2022           bug #1074377
2023         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2024         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2025
2026 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2027
2028         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2029
2030 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2031
2032         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2033           conditions,
2034           (setFromConditionArgs): friendly operand parser for peephole rules,
2035           (operandBaseName, operandsNotRelated): new peephole condition
2036           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2037           architecture specific register naming into account, handles n-way
2038           comparisons, and supports quoted literals
2039         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2040
2041 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2042
2043         * src/mcs51/peeph.def: fixed bug #1076940
2044
2045 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2046
2047         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2048
2049 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2050
2051         Adding support for replacing ljmps with sjmps in jumptables
2052         generated for switch statements. For now you need to set the
2053         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2054         Now 4 algorithms for mcs51 jumptable generation are used:
2055         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2056         addresses loaded pc-relative for up to 112 cases and stack-pushing
2057         target addresses loaded with offset from dptr for up to 256 cases.
2058
2059         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2060         * src/mcs51/main.c: adapted constants for switch table generation
2061         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2062
2063 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2064
2065         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2066         * support/regression/tests/bug1057979.c: added test for bug 1073386
2067
2068 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2069
2070         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2071         compilers
2072
2073 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2074
2075         * src/pic16/device.h,
2076         * src/pic16/genarith.c,
2077         * src/pic16/glue.c,
2078         * src/pic16/main.c,
2079         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2080
2081 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2082
2083         Large cummulative patch for pic16 port.
2084         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2085         to call when a stack overflow occurs,
2086         * (malloc.h): added CVS Id tag,
2087         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2088         variable,
2089         * added libc directory. The current version of LibC contains string
2090         functions, ctype functions and macros and some functions of the
2091         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2092         be extensively tested in the future. Standard disclaimer here.
2093         Library is not automatically build yet. But one can build it by
2094         invoking 'make' inside the libc directory.
2095         * added ADC library under libio. Preliminary version yet.
2096
2097         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2098         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2099         aopForRemat() now and not by pic16_aopOp(),
2100         * (pic16_popGetTempReg): removed warning messgae when allocating
2101         temporary registers, its a buggy feature and will be removed,
2102         * (pic16_popGet): set register instance field in AOP_CRY,
2103         * (pic16_outBitC): fixed for results in size greater than 1,
2104         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2105         * (pic16_storeForReturn): optimized return of 0,
2106         * (genCmp): experimental code for new genCmp which uses PIC18's
2107         special compare&skip instructions. Initial tests fail some times
2108         with variables grater than 1 byte in size, so new code is disabled,
2109         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2110         a single bit,
2111         * (genCast): began a fix to optimize the casting of a bit to another
2112         bit, now assigning a bitfield to another bitfield will fail, sorry,
2113         * src/pic16/main.c: disabled the use of lr-support feature,
2114         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2115         * added some function prototypes, added function _debugf prototype,
2116         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2117         bits with offset (case PO_GPR_BIT),
2118         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2119         command line,
2120         * (isBankInstruction): modified to return 0 for no banking instruction,
2121         and 1 for banking instruction,
2122         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2123         caused stop processing pCodes after a inline assembly block,
2124         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2125         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2126         registers when it shouldn't,
2127         * src/pic16/ralloc.c (allocReg): add preliminary support for
2128         supporting a limited set of temporary registers,
2129
2130 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2131
2132         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2133           genDataPointerSet): ensure assignments always copy in MSB to LSB
2134           order,
2135           (loadRegFromAop): recognize CLRH optimization,
2136           (genFunction): optimize RECEIVE iCodes in reentrant functions
2137
2138 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2139
2140         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2141           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2142           selected.
2143         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2144         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2145           contiguous with data
2146
2147 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2148
2149         * device/lib/_gptrget.c (_gptrget),
2150         * device/lib/_gptrgetc.c (_gptrgetc),
2151         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2152           instead of sjmp to ret
2153         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2154           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2155
2156 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2157
2158         * .version: bumped version to 2.4.7
2159         * device/lib/_gptrget.c (_gptrget): is now _naked
2160         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2161         * device/lib/_gptrput.c (_gptrput): is now _naked
2162         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2163           (createFunction): fixed xstack
2164         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2165         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2166           or bit either,
2167           (geniCodeCritical): store original interrupt state in an iTemp bit
2168           var unless stack-auto
2169         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2170         * src/SDCCmain.c (setIncludePath): added include/target to search path
2171         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2172         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2173           prototype,
2174           (processFuncArgs): put bit vars in bit area
2175         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2176           unsaveRBank): fixed xstack,
2177           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2178           (genFunction, genEndFunction): fixed xstack,
2179           (genAssign): optimization don't walk backwards through mem
2180         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2181         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2182         * support/regression/Makefile: also make library (for stack-auto) when
2183           making "all" and added "test-mcs51-xstack-auto"
2184         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2185         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2186         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2187         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2188         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2189           make-library by MAKE_LIBRARY
2190         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2191           regression tests for xstack
2192         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2193         * support/regression/tests/critical.c: test for critical on mcs51
2194
2195 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2196
2197         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2198           built version of sdcc instead of installed version
2199
2200 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2201
2202         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2203         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2204           vprintf.c now
2205         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2206         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2207           WARNING: remove device/lib/build/z80/printf.o by hand when
2208           updating from previous build!
2209         * device/lib/z80/printf.c: updated comment
2210         * support/regression/tests/bug1057979.c: test all ports now
2211         * support/regression/tests/bug1065458.c: file added
2212
2213 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2214
2215         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2216           *_start and *_end symbols for static functions
2217
2218 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2219
2220         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2221           and search crt0.o in all library paths,
2222           (setIncludePath): proper handling of --nostdinc,
2223           (setLibPath): proper handling of --nostdlib
2224         * support/regression/Makefile,
2225         * support/regression/ports/ds390/spec.mk,
2226         * support/regression/ports/gbz80/spec.mk,
2227         * support/regression/ports/hc08/spec.mk,
2228         * support/regression/ports/mcs51/spec.mk,
2229         * support/regression/ports/mcs51-large/spec.mk,
2230         * support/regression/ports/mcs51-stack-auto/spec.mk,
2231         * support/regression/ports/z80/spec.mk: use include and lib files from
2232           built version of sdcc instead of installed version
2233         * doc/sdccman.lyx: fixed typo in --nostdinc
2234
2235 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2236
2237         * src/pic/pcode.c,
2238         * src/pic/device.c,
2239         * src/pic/ralloc.c,
2240         * src/pic/gen.c : added support to generate code for struct bit fields.
2241
2242 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2243
2244         * as/xa51/xa_version.h,
2245         * device/include/errno.h,
2246         * device/include/regc515c.h,
2247         * device/lib/_itoa.c,
2248         * device/lib/_ltoa.c,
2249         * device/lib/ser_ir_cts_rts.c,
2250         * sim/ucsim/xa.src/glob.cc,
2251         * sim/ucsim/xa.src/inst_gen.cc,
2252         * sim/ucsim/xa.src/xa_bit.cc,
2253         * sim/ucsim/xa.src/xa_sfr.cc,
2254         * sim/ucsim/z80.src/inst_dd.cc,
2255         * sim/ucsim/z80.src/inst_fdcb.cc,
2256         * support/scripts/keil2sdcc.pl,
2257         * src/pic16/pic16.dsp,
2258         * src/pic16/pic16a.dsp: corrected cvs line endings
2259         * device/lib/printf_large.c: fixed bug 1057979
2260         * src/pic16/gen.c: fixed non-C standard code
2261         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2262         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2263         * support/regression/ports/mcs51/support.c: reload T1 asap
2264         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2265           pdata use and clear idata startup behaviour
2266         * support/regression/tests/bug1057979.c: added
2267
2268 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2269
2270         * device/examples/ds390/ow390/ad26.h,
2271         * device/examples/ds390/ow390/cnt1d.h,
2272         * device/examples/ds390/ow390/crcutil.c,
2273         * device/examples/ds390/ow390/ownet.h,
2274         * device/examples/ds390/ow390/owsesu.c,
2275         * device/examples/ds390/ow390/swt12.h,
2276         * device/examples/ds390/ow390/swtoper.c,
2277         * device/examples/ds390/ow390/temp10.h,
2278         * device/examples/ds390/ow390/thermodl.c,
2279         * device/examples/ds390/tinitalk/tinitalk.dsp,
2280         * device/examples/ds390/tinitalk/tinitalk.dsw,
2281         * device/examples/mcs51/clock/hw.h,
2282         * device/examples/mcs51/simple2/go.bat,
2283         * device/examples/serialcomm/windows/serial.h,
2284         * device/examples/xa51/dummy.c,
2285         * device/examples/xa51/hello.c,
2286         * device/include/80c51xa.h,
2287         * device/include/at89x051.h: corrected cvs line endings
2288
2289 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2290
2291         * src/pic16/main.c (options): added command line --gstack, to trace
2292         stack over/under flows,
2293         * added pragma 'wparam' to allow passing first byte of function
2294         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2295         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2296         call to __gstack_test function and sets up the symbol as extern,
2297         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2298         * popaop): added call to pic16_testStackOverflow,
2299         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2300         wparamList list,
2301         * (genCall, genPcall): now all parameters are passed via stack
2302         except in functions that are pass to wparam pragma in which WREG is
2303         used too,
2304         * (genPcall): REENTRANT flag is checked to see if variable prototype
2305         contains reentrant keyword, don't call a non-reentrant function, via
2306         a reentrant function pointer or vice versa, functions are never
2307         passed via WREG,
2308         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2309         D.Winkler,
2310         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2311         SIGSEGV when accessing a NULL register stucture,
2312         * (pic16_printGPointerType): modified to handle UPPER modifier for
2313         function initializers, changed prototype of function to simpler one,
2314         * (pic16_printIvalFuncPtr): check to see if function is already
2315         added in externs list,
2316         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2317         optimized a move from W to SFR with a move to the same register
2318         later after a CALL,
2319         * device/lib/pic16/debug: NEW directory, contains debug features
2320         which are enabled when linking with libdebug.lib, currently command
2321         line option --gstack enables stack pointer tracing for over/under
2322         flow, corresponding sources are in debug/gstack
2323
2324 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2325
2326         * doc/sdccman.lyx: updated SDCC version,
2327         * (PIC16 port): update list of command line options,
2328         * src/pic16/device.h (structure pic16_options_t): added field gstack
2329         to enable stack overflow tracing on push/pops,
2330         * src/pic16/device.c (statistics structure): added statistics
2331         structure,
2332         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2333         pic16_dump_int_registers): increase statistics counters for each
2334         * variable which is encountered
2335         * (pic16_dump_usection): emit each .udata variable to its own udata
2336         section,
2337         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2338         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2339         parameters via stack, otherwise use old scheme,
2340         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2341         assembler output file,
2342         * src/pic16/main.c: added command line options --gstack to enable
2343         push/pop tracing for stack overflow,
2344         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2345         instructions): added size of each instruction,
2346         * (pic16_countInstruction): estimate size of instructions in
2347         the_pFile list, inline assembly blocks are not counted,
2348         * (pic16_FixRegisterBanking): trace previous register usage, when
2349         banksel optimizations is greater than 0, don't emit a redudant
2350         banksel directive,
2351
2352 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2353
2354         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2355         * src/pic16/ralloc.c : applied same fix for pic16.
2356         * src/pic/gen.c : tidied it up a little.
2357
2358 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2359
2360         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2361         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2362
2363 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2364
2365         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2366
2367 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2368
2369         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2370         non-reentrant function __modsint in the interrupt function (thus
2371         corrupting math operations during serial I/O)
2372         * device/lib/ser_ir.c: as above, changed buffersize
2373         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2374         256.c,d for zeroing
2375         * doc/Makefile: added option -t for rsync
2376
2377 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2378
2379         * src/SDCCast.h (struct ast),
2380         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2381
2382 2004-10-20 Borut Razem <borut.razem AT siol.net>
2383
2384         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2385         package
2386
2387 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2388
2389         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2390         makefile targets,
2391         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2392         support functions to replace long sequences of MOVFF's from access
2393         bank registers to stack and vice versa,
2394         * src/pic16/device.h: added new field opt_flags, where optimization
2395         flags can be set to enable certain features,
2396         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2397         * pBlock, (genFunction, genEndFunction): surroung loop for
2398         saving/loading used registers in stack with PC_INFO pCodes,
2399         INF_LREGS. Code in between can then be optimized by pCode optimizer
2400         to support function calls,
2401         * (genDataPointerSet): fixed bug which loaded float fields in
2402         structures with corrupt data,
2403         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2404         in a standard way debug info on stderr. Feature used for developing
2405         and debugging only,
2406         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2407         obsolete chunks of code,
2408         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2409         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2410         * pic16/src/pcode.c (pic16_newpCodeInfo,
2411         * (pic16_newpCodeOpLocalRegs),
2412         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2413         feature,
2414         * (pic16_pCodeConstString): printing of the initial value of a
2415         symbol as a comment is inhibited since parsing was already done by
2416         copyStr and output is corrupt,
2417         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2418
2419 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2420
2421         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2422
2423 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2424
2425         * as/mcs51/lkarea.c: removed old K&R style,
2426           (lnksect): changed check on boundary error,
2427           (lnksect2): changed check on boundary error,
2428           (lnksect2): extend XSTK to end of page if size = 1
2429         * as/mcs51/lkmain.c: removed old K&R style,
2430           (Areas51): create l_IRAM symbol
2431         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2432         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2433           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2434         * device/lib/_mullong.c: added version to be compiled with xstack
2435         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2436         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2437         * device/lib/mcs51/crtxstack.asm: fixed comment
2438         * src/SDCCglue.c: maxInterrupts defaults to 0,
2439           (emitMaps): added pdata,
2440           (createInterruptVect): (re)moved default,
2441           (glue): added pdata,
2442           (glue): moved __start__xstack to XSTK with default size 1
2443         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2444           and options.float_rent when options.stackAuto is set,
2445           (linkEdit): only write XDATA_NAME if provided on command line
2446         * src/SDCCmem.h,
2447         * src/SDCCmem.c: added pdata
2448         * src/port.h: added pdata_name to PORT
2449         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2450           (saveRegisters, unsaveRegisters): removed usage of B,
2451           (genMinus): fixed accumulator clash,
2452           (genJumpTab): added comment, this needs another look
2453         * src/mcs51/gen.c: added check for "B in use" paranoia,
2454           added pushB() and popB()
2455         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2456           chance
2457         * src/avr/main.c,
2458         * src/ds390/main.c,
2459         * src/hc08/main.c,
2460         * src/mcs51/main.c,
2461         * src/pic/main.c,
2462         * src/pic16/main.c,
2463         * src/xa51/main.c,
2464         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2465           added PSEG (PAG,XDATA) or NULL to port specifier
2466         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2467         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2468           (_mcs51_genInitStartup): removed __start__xstack equ,
2469           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2470         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2471         * src/z80/gen.c (_rleAppend): fixed warnings
2472         * support/regression/tests/zeropad.c: added pdata test
2473         * .version: bumped to 2.4.6
2474
2475 2004-10-17 Borut Razem <borut.razem AT siol.net>
2476
2477         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2478         as a part of nightly build
2479
2480 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2481
2482         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2483         WREG holds the first byte function parameters,
2484         * (aopForSym): take special case for symbols which are in FARSPACE
2485         but in CODESPACE too,
2486         * (assignResultValue): modified to take into account _G.useWreg,
2487         * (genCall): don't use wreg for parameter passing when function is
2488         declared as reentrant, too, added optimization INCF to stack
2489         pointer when stack parameter count is 1,
2490         * (genFunction, genEndFunction): refurnished and fixed to not using
2491         wreg for passing parameters when function has varargs or is
2492         reentrant, fixed bug with symbol name compare for generating
2493         functions in absolute address,
2494         * (pic16_storeForReturn): refurnished,
2495         * (genCmp): began writing a new version of the function, not ready
2496         yet, therefore it is disabled,
2497         * (genAssign): do not read code memory when assigning a function to
2498         a pointer function,
2499         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2500         array of characters, not pointer,
2501         * (pic16initialComments): in debug mode emit an .ident directive for
2502         the assembler,
2503         * (_process_pragma): emit a new warning type (internal to pic16)
2504         when setting stack to default length, emit a similar warning when
2505         placing a function at absolute address and address is not word aligned
2506         * (_pic16_parseOptions): added 'return TRUE' statement,
2507         * (_pic16_linkEdit): if compiling a source, then add the source's
2508         file object, first in the list of objects to link,
2509
2510 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2511
2512         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2513         * src/pic/main.c : removed VC warning.
2514         * src/pic/gen.c : changed comment.
2515
2516 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2517
2518         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2519         reference to a deprecated symbol _GPTRREG was causing failure to
2520         link. Thanks G. M. Gallant for the info.
2521
2522 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2523
2524         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2525         comments for Bugs item #954788.
2526
2527 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2528
2529         * src/pic16/device.c (pic16_dump_gsection,
2530         * pic16_groupRegistersInSection): handle symbols declared to be in
2531         access bank differently,
2532         * src/pic16/gen.c (struct _G): added field resDirect,
2533         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2534         send values read from stack directly to result and don't allocate
2535         temporary values,
2536         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2537         same registers,
2538         * (pic16_sameRegsOfs): NEW,
2539         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2540         free because they were not allocated from temporary pool,
2541         * pic16_popRegFromString): workaround to fix a problem with
2542         allocating variables twice or never,
2543         * (genGenPointerGet): using PRODL instead of FSR0H,
2544         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2545         instead of FSR0H,
2546         * (genAssign): take advantage of the _G.resDirect flag,
2547         * (genCast): around line 11844, use mov2f instead of directly
2548         MOVFF'ing between operands to account for literal values,
2549         * src/pic16/genutils.c: some new debug functions for gpsim have been
2550         added,
2551         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2552         float with integer part only,
2553         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2554         place variables in access bank
2555         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2556         updated sources to reflect recent changes in gen.c
2557
2558 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2559
2560         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2561         sources that searched for headers in installation path, now the
2562         device/include/pic16 is used,
2563         * src/pic16/glue.c (pic16glue),
2564         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2565         .line directives if not in debug mode, this suppresses assembler's
2566         warnings for ignored directives
2567
2568 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2569
2570         * src/port.h: made reset_regparms prototype void parameter explicit.
2571         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2572         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2573         * doc/sdccman.lyx: documented warning disabling and how to use
2574           printf_large to make it print floats.
2575         * device/include/stdbool.h: NEW
2576         * device/lib/_atof.c,
2577         * device/lib/_divuint.c,
2578         * device/lib/_divulong.c,
2579         * device/lib/expf.c,
2580         * device/lib/printf_large.c,
2581         * device/lib/sincosf.c,
2582         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2583         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2584           a completely reentrant lib.
2585
2586 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2587
2588         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2589         * device/include/pic16/stdio.h: fixed bug with colon
2590
2591 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2592
2593         * device/include/pic16/stdio.h,
2594         * device/include/pic16/stdlib.h,
2595         * device/include/pic16/math.h: NEW
2596         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2597         declared as _naked to reduce overhead
2598         * device/lib/Makefile.in (target port-specific-objects-pic16):
2599         changed * to *.* so to ignore the CVS directory,
2600         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2601         stacked variables back in stack,
2602         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2603         corruption
2604
2605 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2606
2607         * .version: bumped version number to 2.4.5
2608         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2609         * support/Util/SDCCerr.c (messages structure): added entry for
2610         W_POSSBUG2
2611
2612         Large cumulative patch for pic16 port and libraries.
2613         * device/include/pic16/sdcc-lib.h,
2614         * device/include/pic16/stdarg.h,
2615         * device/include/asm/pic16/features.h,
2616         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2617         * device/include/pic16/float.h: changes reentrant keyword with
2618         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2619         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2620         updated target build-libraries to include objects from gptr,
2621         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2622         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2623         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2624         all function headings,
2625         * src/SDCCmain.c: added global parameter userIncDirsSet,
2626         * (parseCmdLine): when option -I is encountered add directory to
2627         userIncDirsSet too,
2628         * src/version.awk: added space between control and long,
2629         * src/pic16/NOTES: added some notes for the port,
2630         * src/pic16/gen.c: added prototype for mov2fp function,
2631         * (fReturnpic16[]): properly named return value registers,
2632         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2633         * (aopForSym): added code to handle symbols with onStack flag set,
2634         symbols onStack are allocated PTRSIZE bytes,
2635         * (aopFreeAsmop): handles special case where asmops are stack objects,
2636         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2637         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2638         added argument lock to trace flaws in allocating temporary registers
2639         when developing port,
2640         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2641         * (pic16_popRegFromString): reenabled allocating a direct register
2642         from string,
2643         * (assignResultValue): various beautifications,
2644         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2645         referenced function argument,
2646         * (genIpush): reenabled to allow stacked arguments, handles only
2647         ic->parmPush iCodes,
2648         * (genCall, genPcall): major changes to allow for variable argument
2649         functions, fixed a bug with falsely restoring stack pointer after
2650         returning from call,
2651         * (genFunction): pending code for critical function,
2652         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2653         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2654         * (genNearPointerGet): fixed bug with indirect reading, was always
2655         reading from INDF0
2656         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2657         pointers,
2658         * (genAddrOf): rewrote code to take address of a stacked function parameter
2659         * (genCast): fixed casting to generic pointer type,
2660         * src/pic16/gen.h: added AOP_STA,
2661         * (struct asmop): added field stk,
2662         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2663         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2664         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2665         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2666         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2667         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2668         generic pointers,
2669         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2670         and library paths,
2671         * (pic16_port structure): generic pointer size is set to 3,
2672         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2673         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2674         compiler warning,
2675         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2676         operand is an iTemp,
2677
2678 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2679
2680         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2681         * debugger/mcs51/simi.c: addapt new syntax of s51
2682
2683 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2684
2685         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2686         * src/pic16/pcode.c: commented out some calls to free() in order to
2687         fix bug #989576,
2688
2689 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2690
2691         * src/SDCCicode.h,
2692         * src/SDCCicode.c (isiCodeInFunctionCall),
2693         * src/avr/ralloc.c (selectSpil),
2694         * src/pic/ralloc.c (selectSpil),
2695         * src/pic16/ralloc.c (selectSpil),
2696         * src/ds390/ralloc.c (selectSpil),
2697         * src/hc08/ralloc.c (selectSpil),
2698         * src/xa51/ralloc.c (selectSpil),
2699         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2700         stack in the middle of a function call sequence (fixes bug #1020268)
2701         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2702         costs associated with the minimum switch case.
2703
2704 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2705
2706         * src/SDCC.lex: fixed bug #1030549
2707
2708 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2709
2710         * src/SDCCcse.h (struct cseDef),
2711         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2712         over a function call if the CSE is derived from a symbol whose
2713         address has been taken (fixes bug #1029883)
2714         * support/regression/tests/bug-1029883: a new regression test for
2715         this bug
2716
2717 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2718
2719         * src/hc08/gen.c (emitinline): fixed bug #1029778
2720         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2721         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2722         and starts toward RFE #905167)
2723
2724 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2725
2726         * src/pic16/gen.c (mov2f): New function to move an operand to
2727         another without considering if it is a literal or a register,
2728         * (pic16_sameRegs): don't check if they are both AOP_REG,
2729         * (AccRsh): removed andmask=0 lines,
2730         * (genLeftShift): duplicated to be improved in future versions,
2731         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2732         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2733         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2734         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2735         * (insertBankSwitch): fixed inserting banksel directives algorithm
2736         for instructions that follow a skip instruction, this fixes a report
2737         for broken subtraction code generation,
2738         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2739         iCode is a left op, just in case result and right share the same
2740         registers
2741
2742 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2743
2744         * src/hc08/main.c,
2745         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2746         preservation of HX
2747         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2748         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2749         on 2004-09-12; it was buggy
2750
2751 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2752
2753         * src/SDCCsymt.h: removed RESULT_CHECK
2754         * src/SDCCast.c,
2755         * src/SDCCglue.c,
2756         * src/SDCCval.c,
2757         * src/pic/glue.c,
2758         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2759
2760 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2761
2762         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2763         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2764         configuration values no more rejected by compiler, they are assigned
2765         to configuration registers with a warning message instead,
2766         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2767         the for-loop so last conf register is emitted too,
2768         * (_pic16_initPaths): link library libsdcc.lib by default,
2769         * (_hasNativeMulFor): modified test for multiplication according to
2770         Raphael Neider's remarks. Integer multiplication is also done with
2771         support functions,
2772         * device/include/pic16/pic18fregs.h: corrected type error in while
2773         testing and including 18f6720 header file
2774
2775 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2776
2777         * src/pic16/device.h (pic16_options): removed field use_crt,
2778         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2779         until an optimization to handle single bits is added,
2780         * (pic16_loadFSR0): moved before genUnpackBits,
2781         * (genAnd): some white lines removed,
2782         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2783         leave_reset flags in pic16_options when using crt modules,
2784
2785 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2786
2787         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2788           for bugs 898889 & 979599. Also used some safer print instructions.
2789
2790 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2791
2792         * src/pic16/device.h (pic16_options_t): added field use_crt,
2793         crt_name, no_crt,
2794         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2795         catch a probable future bug,
2796         * src/pic16/gen.c: aopIdx function commented out,
2797         * (genAssign): commented out old code which used aopIdx,
2798         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2799         code, added if conditionals to take into account the --use-crt
2800         command line options,
2801         * src/pic16/main.c (pic16_optionsTable): added new command line
2802         options, --use-crt= and --no-crt,
2803         * (_pic16_linkEdit): now the proper crt object is added in the
2804         linker command line except than when --no-crt is specified,
2805         * src/pic16/pcode.c,
2806         * src/pic16/pcode.h: added some structures and functions for a new
2807         optimization scheme to compansate for instruction overhead between
2808         same iCodes, this scheme is currently under development and is not
2809         working in any way,
2810         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2811         to && operator,
2812         * device/lib/pic16/startup/crt0i.c,
2813         * device/lib/pic16/startup/crt0iz.c: added global char variable
2814         __uflags to force the generation of an idata section
2815
2816 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2817
2818         * doc/Makefile,
2819         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2820         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2821
2822 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2823
2824         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2825         Frieder) and clarified the default code optimization mode
2826
2827 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2828
2829         * src/SDCC.lex (doPragma, process_pragma),
2830         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2831         "opt_code_size", and "opt_code_balanced"
2832         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2833         regrouped options by category, added support for category headers
2834         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2835         and "--opt-code-size"
2836         * doc/sdccman.lyx: documented these new options and pragmas
2837         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2838         preference into account
2839
2840 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2841
2842         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2843           geniCodePreDec): Fixed bug 904237 by generating a warning
2844         * src/SDCCerr.h,
2845         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2846
2847 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2848
2849         * src/pic/device.c : When no max ram set validate full memory range.
2850         * src/pic/pcode.c,
2851         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2852
2853 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2854
2855         * device/lib/_gptrget.c,
2856         * device/lib/_gptrput.c: updated comment
2857         * device/lib/calloc.c,
2858         * device/lib/free.c,
2859         * device/lib/malloc.c,
2860         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2861         * src/SDCCcse.c (cseBBlock),
2862         * src/SDCCicode.c (printOperand, geniCodeArray),
2863         * src/SDCCicode.h (struct operand): fixed bug 868103
2864         * support/regression/tests/bug-868103.c: added
2865         * src/SDCCast.c (searchLitOp),
2866         * src/SDCCcse.h (struct cseDef),
2867         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2868         * src/SDCCicode.h (struct operand),
2869         * src/SDCCsymt.h (struct sym_link),
2870         * src/avr/gen.c (hasInc),
2871         * src/ds390/gen.c (hasInc),
2872         * src/hc08/gen.c (genPlusIncr, hasInc),
2873         * src/mcs51/gen.c (hasInc),
2874         * src/pic16/glue.c (pic16_printIvalChar),
2875         * src/pic16/ralloc.c (regWithIdx),
2876         * src/xa51/gen.c (hasInc) : removed warnings
2877         * src/SDCCast.c (createBlock): added comment ???
2878         * src/hc08/ralloc.c: updated comments
2879
2880 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2881
2882         * doc/sdccman.lyx: updated section on switch statements, added
2883         section about semaphore locking
2884         * doc/Makefile: added option -info for latex2html
2885         * device/lib/_gptrget.c,
2886         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2887
2888 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2889
2890         * src/pic/device.h,
2891         * src/pic/device.c,
2892         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2893          maxram is less than 0x100.
2894
2895 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2896
2897         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2898
2899 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2900
2901         * src/port.h,
2902         * src/mcs51/main.c,
2903         * src/ds390/main.c,
2904         * src/z80/main.c,
2905         * src/hc08/main.c,
2906         * src/pic/main.c,
2907         * src/pic16/main.c,
2908         * src/avr/main.c,
2909         * src/xa51/main.c
2910         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2911         a jump table is the best form for a switch statement, including
2912         automatic insertion of missing cases to make the case range
2913         continuous. Developed in collaboration with Frieder Ferlemann.
2914
2915 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2916
2917         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2918         accumulator result if it needs sign extension
2919
2920 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2921
2922         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2923
2924 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2925
2926         * device/lib/gbz80/printf.c,
2927         * device/lib/z80/printf.c: removed define for NULL
2928
2929 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2930
2931         * as/xa51/xa_link.c,
2932         * device/examples/ds390/ow390/ad26.c,
2933         * device/examples/ds390/ow390/cnt1d.c,
2934         * device/examples/ds390/ow390/counter.c,
2935         * device/examples/ds390/ow390/ds2480.h,
2936         * device/examples/ds390/ow390/ds2480ut.c,
2937         * device/examples/ds390/ow390/findtype.c,
2938         * device/examples/ds390/ow390/gethumd.c,
2939         * device/examples/ds390/ow390/owllu.c,
2940         * device/examples/ds390/ow390/ownetu.c,
2941         * device/examples/ds390/ow390/swt12.c,
2942         * device/examples/ds390/ow390/swtloop.c,
2943         * device/examples/ds390/ow390/temp.c,
2944         * device/examples/ds390/ow390/temp10.c,
2945         * device/examples/ds390/ow390/thermo21.c,
2946         * device/examples/ds390/ow390/tinilnk.c,
2947         * device/examples/ds390/ow390/tstfind.c,
2948         * device/examples/serialcomm/windows/serial.cpp,
2949         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2950         * device/include/reg51.h: fixed line endings for cvs
2951
2952 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2953
2954         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2955         packRegsForAccUse, packRegisters): new accumulator register
2956         packing algorithm
2957         * support/regression/ports/hc08/support.c (_putchar): suppress
2958         warning of unused variable
2959         * src/SDCCicode.c: added SWAP entry to codeTable
2960
2961 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2962
2963         * device/lib/sprintf.c: forgot to add this file before previous commit
2964
2965 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2966
2967         * src/pic16/gen.c (genPackBits): added operand right in function
2968         parameters, load result directly if p_type is POINTER (that is
2969         called by genNearPointerSet)
2970         * (genUnPackBits): added operand left in function parameters,
2971         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2972         FSR0 if accessing bitfields,
2973
2974 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2975
2976         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2977           _print_format; updated printf, sprintf, vsprintf
2978         * device/include/asm/default/features.h: corrected comment/define
2979         * device/lib/Makefile.in: added sprintf.c
2980         * device/lib/libsdcc.lib: added sprintf module
2981         * device/lib/printf_large.c,
2982         * device/lib/vprintf.c,
2983         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2984           into these 3 files
2985         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2986         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2987         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2988           hc08 test
2989         * support/regression/tests/zeropad.c: define idata as data for hc08
2990
2991 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2992
2993         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2994         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2995         labels are referenced at least once (even if a reference is not found)
2996         * src/hc08/gen.c (emitcode): set isComment flag for comments
2997         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2998         loads), rules 6a..6b (optimize jumps to return)
2999
3000 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3001
3002         * device/lib/acosf.c (acosf),
3003         * device/lib/asinf.c (asinf),
3004         * device/lib/atanf.c (atanf),
3005         * device/lib/ceilf.c (ceilf),
3006         * device/lib/cosf.c (cosf),
3007         * device/lib/coshf.c (coshf),
3008         * device/lib/cotf.c (cotf),
3009         * device/lib/fabsf.c (fabsf),
3010         * device/lib/floorf.c (floorf),
3011         * device/lib/log10f.c (log10f),
3012         * device/lib/logf.c (logf),
3013         * device/lib/sinf.c (sinf),
3014         * device/lib/sinhf.c (sinhf),
3015         * device/lib/sqrtf.c (sqrtf),
3016         * device/lib/tanf.c (tanf),
3017         * device/lib/tanhf.c (tanhf),
3018         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3019         replaced all instances of "reentrant" in the library functions
3020         defined in math.h with this macro.
3021         * support/regression/tests/float_trans.c: reenabled test for hc08
3022
3023 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3024
3025         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3026         erroneously deleted
3027
3028 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3029
3030         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3031         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3032         multi-byte volatile operands are used
3033         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3034         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3035         initialization to area GSINIT0 so that it would always precede
3036         any static initializers in GSINIT
3037         * support/regression/tests/zeropad.c: fixed idata define for hc08
3038         * support/regression/tests/bug-927659.c,
3039         * support/regression/tests/float_trans.c: disabled tests for hc08
3040         pending missing library routines
3041         * .version: increased version number to 2.4.4 - hc08 port now passes
3042         regression tests
3043
3044
3045 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3046
3047         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3048         * Makefile.common.in,
3049         * as/Makefile,
3050         * as/hc08/Makefile.in,
3051         * as/mcs51/Makefile.in,
3052         * as/z80/Makefile.in,
3053         * debugger/mcs51/Makefile.in,
3054         * device/include/Makefile.in,
3055         * device/lib/Makefile.in,
3056         * doc/Makefile,
3057         * link/Makefile,
3058         * link/z80/Makefile.in,
3059         * packihx/Makefile.in,
3060         * sim/ucsim/main_in.mk,
3061         * sim/ucsim/avr.src/Makefile.in,
3062         * sim/ucsim/doc/Makefile.in,
3063         * sim/ucsim/gui.src/serio.src/Makefile.in,
3064         * sim/ucsim/hc08.src/Makefile.in,
3065         * sim/ucsim/s51.src/Makefile.in,
3066         * sim/ucsim/xa.src/Makefile.in,
3067         * sim/ucsim/z80.src/Makefile.in,
3068         * src/Makefile.in,
3069         * support/cpp2/Makefile.in,
3070         * support/librarian/Makefile,
3071         * support/makebin/Makefile: added DESTDIR to the install path proposed
3072         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3073         * doc/sdccman.lyx: added DESTDIR documentation
3074
3075 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3076
3077         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3078         instruction for interrupt handlers, use fast returns when returning
3079         from high priority interrupts
3080
3081 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3082
3083         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3084         code generation
3085         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3086         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3087         bugs, ported much of Bernhard's code from mcs51
3088         * src/mcs51/gen.c (genSend),
3089         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3090         than one when calling a reentrant function
3091         * device/lib/_mullong.c: defined an alternate struct layout for big
3092         endian ports (hc08)
3093
3094 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3095
3096         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3097         test
3098
3099 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3100
3101         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3102         are sane and complete before asking the port its prefered parameter
3103         passing method (fixes bug #1017633)
3104         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3105         and _ret3
3106
3107 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3108
3109         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3110         problem in bitfields >= 8 bits.
3111
3112 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3113
3114         * src/SDCCsymt.c: undid changes that were not meant to be committed
3115
3116 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3117
3118         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3119
3120 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3121
3122         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3123           copied and wrong bit got inverted
3124
3125 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3126
3127         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3128         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3129         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3130         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3131         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3132         assignments to bitfields at known addresses
3133         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3134         reads from bitfields at known addresses
3135         * src/hc08/ralloc.c (packRegisters),
3136         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3137         genhc08Code): optimize pointer get values used as conditionals
3138         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3139         and branch
3140
3141 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3142
3143         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3144         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3145         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3146         as conditionals
3147
3148 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3149
3150         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3151
3152 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3153
3154         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3155         related problems
3156
3157 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3158
3159         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3160
3161 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3162
3163         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3164         mcs51 port
3165
3166 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3167
3168         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3169
3170 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3171
3172         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3173         cases use more compact code.
3174
3175 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3176
3177         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3178
3179 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3180
3181         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3182
3183 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3184
3185         * src/SDCCsymt.h,
3186         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3187         parameter of changePointer() from symbol* to sym_link*
3188         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3189         * src/SDCCsymt.c (compareType): void* type is castable to other
3190         pointers, but not necesarily an exact match.
3191         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3192         is no longer blindly treated as an exact match.
3193         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3194
3195 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3196
3197         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3198
3199 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3200
3201         * src/pic/gen.c,
3202         * src/pic/pcode.c,
3203         * src/pic/ralloc.h,
3204         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3205
3206 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3207
3208         * src/pic/device.c,
3209         * src/pic/device.h,
3210         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3211
3212 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3213
3214         * src/mcs51/gen.c (emitcode): fixed bug #992819
3215
3216 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3217
3218         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3219           there's no need to make it worse
3220
3221 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3222
3223         * src/mcs51/ralloc.c (deassignLR),
3224         * src/ds390/ralloc.c (deassignLR),
3225         * src/hc08/ralloc.c (deassignLR),
3226         * src/z80/ralloc.c (deassignLR),
3227         * src/pic/ralloc.c (deassignLR),
3228         * src/pic16/ralloc.c (deassignLR),
3229         * src/avr/ralloc.c (deassignLR),
3230         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3231         rlivePoint): fixed another part of bug #971834
3232
3233 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3234
3235         * src/z80/main.c: enabled "critical" keyword
3236         * src/z80/mappings.i,
3237         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3238         functions (fixes bug #979646)
3239         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3240
3241 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3242
3243         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3244           such as c:\mydir.
3245
3246 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3247
3248         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3249           doesn't disable too much optimizations
3250
3251 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3252
3253         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3254
3255 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3256
3257         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3258
3259 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3260
3261         * src/pic/gen.c tidied up tabs
3262         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3263         * src/pic/main.c tidied up tabs
3264         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3265         * src/pic/pcoderegs.c tidied up tabs
3266         * src/pic/ralloc.c tidied up tabs
3267
3268 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3269
3270         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3271         to S_FIXED for pic16 port and when symbol is not in level 0,
3272         allocate for S_REGISTER storage class and pic16 port, too,
3273         * src/pic16/device.h: prototype for checkSym,
3274         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3275         * (pic16_assignConfigWordValue): test the value and the mask to
3276         validate that the value is suitable for the configuration word,
3277         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3278         collect extern declared symbols, don't emit symbol twice, check
3279         first if symbol is in publics set first,
3280         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3281         * added command line '--fstack' which enables an experimental
3282         feature for stack access, too buggy to be used yet...
3283         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3284         * (pic16_allocDirReg): when register has storage class S_REGISTER
3285         allocate in pic16_dynAccessRegs,
3286         * device/include/pic16/pic18f????.h: modified configuration word
3287         naming convention, words started as CONFIG0H but should be CONFIG1H
3288
3289 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3290
3291         * device/include/mcs51reg.h: fixed bug 970993
3292
3293 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3294
3295         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3296         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3297         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3298         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3299         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3300         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3301           error/warning numbers,
3302           added function setWarningDisabled()
3303         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3304         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3305           _memcmp.c _memmove.c calloc.c realloc.c free.c
3306         * support/regression/tests/malloc.c: added tests for new functionality
3307         * support/regression/tests/zeropad.c: added tests for truncated initializers
3308           and initialized char arrays starting with '\x0'
3309         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3310
3311 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3312
3313         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3314
3315 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3316
3317         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3318         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3319         peephole 177.e. Thanks to anonymous
3320
3321 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3322
3323         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3324         function isn't used in the source but referenced as a
3325         variable initializer then declare it as extern in .asm file
3326
3327 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3328
3329         * .version: increased version number to 2.4.3
3330
3331         Adding version extension according to ChangeLog CVS revision
3332         * src/Makefile.in (target all): added dependency 'version.h'
3333         * (rule version.h): added rule to create version.h from ChangeLog,
3334         * (rule dep): added dependency version.h,
3335         * src/version.awk: AWK script to create version.h
3336         * src/SDCCdwarf2.c (dwWriteModule),
3337         * src/SDCCglue.c (initialComments),
3338         * src/SDCCmain.c (printVersionInfo): modified to write after
3339         version string the version extension number,
3340         * src/SDCCutil.c: included "version.h"
3341         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3342         number,
3343         * src/SDCCutil.h: added prototype for getBuildNumber
3344
3345         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3346         includeDirsSet, too,
3347         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3348         const char [] is found in function prototype...
3349
3350         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3351         moving to WREG with source is already in WREG,
3352         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3353         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3354         * (aopForSym): stack'ed symbols are partially supported, added
3355         if-clause to support symbols in FARSPACE,
3356         * (sameRegs): added test for AOP_ACC to see if registers are same,
3357         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3358         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3359         * (pic16_popRegFromString): will not allocate a new register if it
3360         doesn't find one by name, bug may have introduced...
3361         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3362         * (genIpush): revived to use pic16 port's stack,
3363         * (genAddrOf): added incomplete case for stack'ed operand,
3364         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3365         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3366         can handle multibyte operands,
3367         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3368         * (pic16initialComments): added message for MPLAB compatibility
3369         mode enabled,
3370         * src/pic16/main.h: prototype for pic16_mplab_comp,
3371         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3372         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3373         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3374         because of increased complexity of procedure,
3375         * (_process_pragma): stack pragma changed to format 'stack pos len',
3376         emit symbol '_stack_end' to conform with gplink,
3377         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3378         to search for register,
3379         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3380         PO_GPR_REGISTER,
3381         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3382         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3383         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3384         case for PO_GPR_REGISTER,
3385         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3386         dies, the new era is ahead !...
3387         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3388         pic16_dynInternalRegs,
3389         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3390         * (pic16_allocDirReg): minor optimizations and bug fixes,
3391         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3392
3393         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3394         load stack and frame pointer with address of 'stack_end' symbol
3395
3396 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3397
3398         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3399         without source code but only variable initializers
3400
3401 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3402
3403         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3404         external are not declared as extern to reduce overhead while linking
3405
3406 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3407
3408         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3409
3410 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3411
3412         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3413           Yee Keat for the patch
3414         * src/SDCCast.c (decorateType): fixed bug #979599
3415         * src/ds390/gen.h: removed local fReturnSizeDS390
3416         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3417         * src/ds390/gen.c (genAnd, genOr, genXor),
3418         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3419
3420 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3421
3422         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3423         add relFilesSet to $3, manipulate $2 to handle linking of object
3424         files without source files in command line,
3425         * device/include/pic16 (all headers): added ID location macros,
3426         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3427         entries for ID location bytes,
3428         * (pic16_assignIdByteValue): NEW,
3429         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3430         added field dumpcalltree to pic16_options_t,
3431         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3432         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3433         emitting rFalseIfx label after check_carry label,
3434         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3435         pic16_emitDIRegs), NEW
3436         * (pic16glue): dump .calltree file when option --calltree found,
3437         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3438         * (_pic16_genAssemblerPreamble): emit ID locations after
3439         configuration registers,
3440         * (pic16_linkCmd): modifications of the link command,
3441         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3442         * (pic16_pCodeInitRegisters): don't init stack registers,
3443         * (pic16_findPrevInstruction): fixed bug,
3444         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3445         bug with immediate registers,
3446         * (buildCallTree): traces stack push and pop,
3447         * (pct2): dump also stack usage for each function,
3448         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3449         * (pic16_allocDirReg): various modifications,
3450         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3451         fixed to 1,
3452
3453 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3454
3455         * src/pic16/pcode.c: removed buggy double colon
3456
3457 2004-07-01 Borut Razem <borut.razem AT siol.net>
3458
3459         * support/scripts/sdcc.nsi: added include/pic16 to setup
3460
3461 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3462
3463         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3464         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3465         target 'clean',
3466         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3467         specific command line arguments. Also added sample lkr script
3468         for placing a variable at a specific memory bank.
3469         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3470         at a specific memory bank,
3471         * (pic16_dump_isection): fixed bug which caused string literals to
3472         be omitted when dumping idata section,
3473         * (pic16_groupRegistersInSection): added code to handle registers
3474         in specific memory banks,
3475         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3476         public, all references are renamed too,
3477         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3478         AOP_DPTR2,
3479         * (pic16_storeForReturn): added case to handle when dest is WREG,
3480         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3481         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3482         pic16_rel_udata, check to see if that register is marked as being
3483         a member of a specific memory bank,
3484         * (pic16_printIvalCharPtr): added code to add string literals either
3485         to code or the idata sections,
3486         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3487         also accept the 'udata' pragma,
3488         * src/pic16/main.h: new structure types sectName and sectSym
3489         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3490         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3491         * (pic16_findPrevInstruction): fixed, it returned nothing,
3492         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3493         instruction combinations,
3494         * (pic16_FixRegisterBanking): heavily reorganised,
3495         * (pic16_AnalyzeBanking): if generating banksel directives is
3496         disabled, then don't call FixRegisterBanking at all,
3497         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3498         completely removed,
3499         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3500
3501 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3502
3503         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3504         Phuah Yee Keat <yk.phuah AT nestac.com>
3505
3506 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3507
3508         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3509         correctly the IVT even if it is relocated to some other location
3510
3511 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3512
3513         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3514         * device/include/pic16/pic18f2220.h: NEW,
3515         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3516         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3517         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3518         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3519         nodefaultlibs, ivt_loc is the location of the interrupt vector
3520         table, and nodefaultlibs signs that default libraries should not be
3521         linked in link stage,
3522         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3523         according to --ivt-loc argument,
3524         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3525         when pragma stack is found,
3526
3527 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3528
3529         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3530         256 (range check), 257 (do while), 258.a-f (bit banging
3531         f.e. on 3-wire SPI bus)
3532
3533 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3534
3535         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3536         variables used exclusively within a loop
3537
3538 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3539
3540         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3541
3542 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3543
3544         * src/SDCClrange.c (computeClash): fixed bug #971834
3545
3546 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3547
3548         * src/mcs51/gen.c (genCmp): fixed bug #975903
3549         * src/hc08/gen.c (operandsEqu),
3550         * src/ds390/gen.c (operandsEqu),
3551         * src/z80/gen.c (operandsEqu),
3552         * src/pic/gen.c (operandsEqu),
3553         * src/pic16/gen.c (operandsEqu),
3554         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3555         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3556
3557 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3558
3559         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3560
3561 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3562
3563         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3564         default case in switch statement,
3565         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3566         to eliminate problem with initialisation of pointers, but problem
3567         still exists,
3568         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3569         * (emitStaticSegment): removed various lines emitting debug info,
3570         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3571         added processor registers for utilizing EEPROM,
3572         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3573         configurable and set 8
3574
3575 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3576
3577         * .version: increased version number to 2.4.2,
3578
3579         Cumulative patch for pic16 port
3580         * src/pic16/device.c: changed scheme to dump initial values for
3581         variables in idata segment, all print_idata* functions were removed,
3582         now the pic16_printIval* will be called,
3583         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3584         * _pic16_printPointerType, pic16_printPointerType,
3585         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3586         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3587         NEW, similar to the respective functions in SDCCglue.c,
3588         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3589         way, emitting hex bytes,
3590         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3591
3592 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3593
3594         * src/avr/ralloc.c (serialRegAssign),
3595         * src/xa51/ralloc.c (serialRegAssign),
3596         * src/pic/ralloc.c (serialRegAssign),
3597         * src/pic16/ralloc.c (serialRegAssign),
3598         * src/hc08/ralloc.c (serialRegAssign),
3599         * src/z80/ralloc.c (serialRegAssign),
3600         * src/ds390/ralloc.c (serialRegAssign),
3601         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3602
3603 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3604
3605         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3606         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3607
3608 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3609
3610         Cumulative patch for pic16 port:
3611         * src/pic16/device.h (typedef PIC16_device) modified fields for
3612         defining microcontrollers,
3613         * src/pic16/device.c: added new info for all devices in Pics16 array,
3614         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3615         to be optimised out by the pCode optimiser,
3616         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3617         specially, bug reported by G.M. Gallant,
3618         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3619         as force'd so that cannot be optimised out by pCode optimiser,
3620         * src/pic16/pcode.c,
3621         * src/pic16/pcodepeeph.c,
3622         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3623         they are disabled by default, but can be enabled explicit with
3624         command argument --denable-peeps, for testing,
3625         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3626         --pomit-ivt in COMPILE_FLAGS
3627
3628 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3629
3630         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3631           compilation on MSVC
3632
3633 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3634
3635         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3636
3637 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3638
3639         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3640         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3641
3642 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3643
3644         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3645         would only assign 0x300001 register.
3646
3647 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3648
3649         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3650         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3651
3652 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3653
3654         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3655         for ds80c400
3656         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3657         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3658         added peephole 254 (left shift), 255 (jump table)
3659
3660 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3661
3662         * device/lib/Makefile.in: removed comment line with model-pic16,
3663         * (target port-specific-objects-pic16): the libraries and objects
3664         are copied to the build directory form the device/lib/pic16/bin
3665         directory
3666
3667         Cumulative patch concerning pic16 port:
3668         * library directory has been re-organized,
3669         * added support for PIC18F1220,
3670         * added headers and library sources for chips 18f1220,18f6520,
3671         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3672
3673         * configuration registers setting has changed, now each supported
3674         device has a complete description of the registers it uses,
3675         * all initialisations are moved to idata sections, these section
3676         can be absolute or relocatable,
3677         * fixed initialisation of codespace variables,
3678         * fixed warning about PCLATU and gpsim,
3679         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3680         * (genAssign): use table reads when assigning from variables in codespace,
3681         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3682         char/int variables placed in codespace,
3683         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3684         registers set in .asm file, no need for --pomit-config-words anymore,
3685         * (pic16glue): some 8051 legacy segments are commented out
3686         (to be removed completely),
3687         * added support for alternative assembler and linker with --asm=
3688         and --link= command line arguments,
3689         * peepholes are disabled automatically in the port, no need to
3690         specify on command line,
3691         * port supports natively char/int/long multiplication, but converts
3692         all divisions to support functions,
3693         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3694         to the file set in variable $2,
3695         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3696         strings in ASCII format and not in hex,
3697         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3698         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3699         allocate proper register if iCodes aren't temporary,
3700
3701 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3702
3703         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3704
3705 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3706
3707         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3708         is commented out
3709
3710 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3711
3712         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3713         computed address is reused
3714         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3715         multi-byte bitfields
3716
3717 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3718
3719         * src/z80/gen.c: (genArrayInit): must check for pointers too
3720
3721 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3722
3723         * support/regression/tests/zeropad.c: never meant to commit the
3724           nestedstruct test: removed, added check for GCC version
3725
3726 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3727
3728         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3729         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3730         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3731           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3732           bugs 928906 and 954082 half-empty initializers
3733         * src/SDCCsymt.h,
3734         * src/SDCCsymt.c (getAllocSize): added for above fix
3735         * src/z80/gen.c (genArrayInit): fixed bug 741044
3736         * support/regression/tests/zeropad.c: added tests
3737
3738 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3739
3740         * src/pic16/device.c (pic16_dump_section): corrected bug which
3741         caused some symbols of the libraries to be misplaced
3742
3743 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3744
3745         * src/pic16/glue.c,
3746         * src/pic16/ralloc.h,
3747         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3748         to fix conflict with pic port
3749
3750 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3751
3752         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3753         externs configuration variables,
3754         * src/pic16/ralloc.h,
3755         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3756         prototype in header, commented out some debug messages
3757
3758 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3759
3760         * src/pic16/glue.c,
3761         * src/pic16/main.c,
3762         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3763         for gpasm COFF object generation. Thanks to D. Hawkins for
3764         his patch info
3765
3766 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3767
3768         * src/ds390/main.c,
3769         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3770         Brock for spotting this)
3771         * src/ds390/gen.c (genEndFunction),
3772         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3773         interrupt handler and critical. Disable push/pop optimizations when
3774         peephole optimizations disabled.
3775
3776 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3777
3778         Updated pic16 library sources and headers.
3779         * device/lib/pic16/pic18f*/ ,
3780         * device/include/pic16/*.h: modified to handle structured SFR
3781         definitions
3782
3783 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3784
3785         * src/port.h (PORT structure): added hook initPaths, now each
3786         port can declare its own default search paths,
3787         which can been seen with the --print-search-dirs option,
3788         see pic16 port for example,
3789         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3790         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3791         * (doPrintSearchDirs): NEW, replaces in a central manner the
3792         printing of search dirs which was split in set*Paths functions,
3793         * (main): added call to port->initPaths and doPrintSearchDirs,
3794         * src/avr/main.c,
3795         * src/ds390/main.c,
3796         * src/hc08/main.c,
3797         * src/izt/i186.c,
3798         * src/izt/tlcs900h.c,
3799         * src/mcs51/main.c,
3800         * src/pic/main.c,
3801         * src/pic16/main.c: modified port structures to reflect addition of
3802         initPaths hook,
3803
3804         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3805         * (pic16_dump_section): for registers in same address reserve memory once,
3806         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3807         to no_banksel,
3808         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3809         result is greater in size than right or left,
3810         * (pic16_genUMult8X8_8): there are some cases where the result can
3811         be 16 bits size, so handle these,
3812         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3813         * (pic16_outBitC): modified to emit pcodes,
3814         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3815         or not,
3816         * (genDivOneByte): implemented algorithm to divide 8-bits,
3817         * (genCmp): uncommented goto, but issues still exist,
3818         * (genAnd): fixed a bug with variables >8bits,
3819         * (genPackBits): optimization added that uses BCF/BSF to change a
3820         single bit,
3821         * (genAssign): fixed bug when assigning floating point literals,
3822         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3823         __sdcc_gsinit_startup label,
3824         * src/pic16/main.c (_pic16_init): removed search directory
3825         initialisations,
3826         * (_pic16_initPaths): NEW, used to initialise search directories,
3827         * (_hasNativeMulFor): support functions for all except char/int
3828         multiplication, and char division,
3829         * (PIC16_port struct): modified entry for native mul support,
3830         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3831         no_banksel option,
3832         * (buildCallTree): call to register_usage is ifdef'ed out,
3833
3834 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3835
3836         * device/include/string.h: applied Stas Sergeev's patch to make this
3837         header file compatible with the preprocessor -Wundef option
3838         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3839         failure (fixes bug #941458)
3840
3841 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3842
3843         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3844         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3845         that the variable, not the function, should be static
3846         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3847         to be consistent with non-literal case
3848
3849 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3850
3851         * src/SDCCast.c (isConformingBody): fixed bug #949967
3852         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3853         convilong): fixed bug #952086
3854
3855 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3856
3857         * src/SDCCmem.c (allocVariables): fixed bug #955321
3858
3859 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3860
3861         * src/hc08/main.c (_hc08_genAssemblerEnd),
3862         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3863         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3864         completely eliminated the use of a temporary file
3865         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3866         when more than one file linked
3867         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3868
3869 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3870
3871         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3872         which fixes bug #543481
3873         * support/regression/tests/bug-751703.c: fixed comments left from a
3874         cut and paste error
3875         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3876         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3877         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3878         scopes
3879         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3880         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3881         are now changed to underscores in moduleName
3882
3883 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3884
3885         * as/mcs51/lkmem.c: better fix for bug #954173
3886
3887 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3888         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3889
3890         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3891         * device/include/c8051f000.h,
3892         * device/include/c8051f120.h,
3893         * device/include/c8051f300.h,
3894         * device/include/c8051f310.h,
3895         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3896         PWM16) and detab'ed
3897
3898 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3899
3900         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3901         and mailing lists, doc'ed --no-peep-comments, removed reference
3902         to knoppix (newest version has no LyX/LaTeX), other minor changes
3903         * src/SDCCglue.c (glue): save 2 bytes stack space with
3904         option --main-return. The ljmp could probably be avoided too
3905
3906 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3907
3908         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3909
3910 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3911
3912         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3913         * src/SDCCopt.c (isLocalWithoutDef),
3914         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3915         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3916         (credit to Maarten Brock for patch #949363, on which this is based)
3917         * support/regression/tests/bug-751703.c: some test cases of extern used
3918         within inner scopes.
3919
3920 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3921
3922         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3923         SPEC_STRUCT
3924         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3925         struct definitions
3926         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3927         dwWriteLabel): fix to create valid debugger symbols even when
3928         the module name has non-alphanumeric symbols in it
3929         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3930         when a variable's allocation has been optimized away
3931
3932
3933 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3934
3935         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3936         * src/hc08/main.c,
3937         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3938         * src/mcs51/main.c,
3939         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3940         * src/ds390/main.c,
3941         * src/z80/gen.c (z80_emitDebuggerSymbol),
3942         * src/z80/main.c,
3943         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3944         * src/pic/main.c,
3945         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3946         * src/pic16/main.c,
3947         * src/avr/gen.c (avr_emitDebuggerSymbol),
3948         * src/avr/main.c,
3949         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3950         * src/xa51/main.c,
3951         * src/SDCCdebug.c (emitDebuggerSymbol),
3952         * src/SDCCdebug.h,
3953         * src/port.h: added a debugger struct to the port struct. Added a
3954         callback for defining debugger symbols
3955
3956         * src/SDCCast.c (createLabel),
3957         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3958         with isitmp = 1
3959         * src/SDCCicode.h,
3960         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3961         iCode back to the ast for the function
3962
3963         * src/hc08/ralloc.c (hc08_assignRegisters),
3964         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3965         unneeded fields from the regs struct.
3966         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3967         pushReg() & pullReg() functions instead of emitcode()
3968
3969         * src/hc08/gen.c (genLabel, genhc08Code),
3970         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3971
3972         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3973         debugger hooks
3974
3975         * src/hc08/gen.c (genEndFunction, genhc08Code),
3976         * src/hc08/gen.h,
3977         * src/mcs51/gen.c (genEndFunction, gen51Code),
3978         * src/mcs51/gen.h,
3979         * src/ds390/gen.c (genEndFunction, gen390Code),
3980         * src/ds390/gen.h,
3981         * src/z80/gen.c (genEndFunction, genZ80Code),
3982         * src/z80/gen.h,
3983         * src/z80/z80.h,
3984         * src/pic/gen.c (genEndFunction, genpic14Code),
3985         * src/pic/gen.h,
3986         * src/pic16/gen.c (genEndFunction, genpic16Code),
3987         * src/pic16/gen.h,
3988         * src/avr/gen.c (genEndFunction, genAVRCode),
3989         * src/avr/gen.h,
3990         * src/xa51/gen.c (genEndFunction, genXA51Code),
3991         * src/xa51/gen.h,
3992         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3993         specific code to cdbFile.c and out of the backend code generators
3994
3995         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3996         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3997         starting address is now 0
3998
3999         * as/hc08/asm.h,
4000         * as/hc08/m08pst.c,
4001         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4002         assembler directive for DWARF support
4003         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4004
4005         * src/src.dsp,
4006         * src/Makefile.in,
4007         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4008
4009 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4010
4011         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4012         and inappropriate peephole optimization in jump tables
4013
4014 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4015
4016         * as/hc08/m08pst.c,
4017         * src/SDCCglue.c: sdccopt works for the hc08 port now
4018
4019 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4020
4021         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4022
4023 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4024
4025         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4026
4027 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4028
4029         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4030         rules
4031         * src/SDCCmain.c,
4032         * src/SDCCglobl.h,
4033         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4034         comments from the peephole optimizer replacement rules
4035         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4036         symbols
4037         * src/SDCCcse.c (updateSpillLocation),
4038         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4039         equivalents
4040         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4041         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4042         objects far pointers
4043
4044 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4045
4046         * src/SDCCsymt.h: a missing part of my last change
4047         * src/pic/ralloc.c (regTypeNum),
4048         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4049
4050 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4051
4052         * src/SDCCicode.h,
4053         * src/SDCCicode.c (aggrToPtrDclType),
4054         * src/SDCCptropt.h,
4055         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4056         ptrPseudoSymConvert),
4057         * src/pic/ralloc.c (regTypeNum),
4058         * src/pic16/ralloc.c (regTypeNum),
4059         * src/hc08/ralloc.c (regTypeNum),
4060         * src/ds390/ralloc.c (regTypeNum),
4061         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4062         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4063
4064 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4065
4066         * link/z80/lkmain.c (afile),
4067         * as/hc08/lkmain.c (afile),
4068         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4069         prevent a pointer problem when a filename has no directory and
4070         no extension specified.
4071
4072 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4073
4074         * link/z80/lkmain.c (afile): allow periods in directory names
4075         * link/z80/lkmain.c (afile),
4076         * as/mcs51/lkmain.c (afile),
4077         * as/hc08/lkmain.c (afile): allow linker script file to have an
4078         extension other than ".lnk"
4079         * link/z80/lklex.c (getfid),
4080         * link/z80/lkmain.c (parse),
4081         * as/mcs51/lklex.c (getfid),
4082         * as/mcs51/lkmain.c (parse),
4083         * as/hc08/lklex.c (getfid),
4084         * as/hc08/lkmain.c (parse): Support comments in the linker script
4085         file on lines by themselves and after filenames
4086
4087 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4088
4089         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4090
4091 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4092
4093         * src/z80/peeph-z80.def: removed some peephole rules that don't
4094         work with multibyte arithmetic (fixed bug #937126)
4095         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4096         to registers and not global variables
4097         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4098         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4099         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4100         checking for assignments not internally generated (fixed bug #931895)
4101         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4102         structure member (fixed bug #930072)
4103
4104 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4105
4106         * src/SDCCmain.c (linkEdit),
4107         * src/hc08/main.c (_hc08_parseOptions),
4108         * as/hc08/Makefile.in,
4109         * as/hc08/aslink.h,
4110         * as/hc08/asm.h,
4111         * as/hc08/m08pst.c,
4112         * as/hc08/lkrloc.c (relr, rele),
4113         * as/hc08/lkarea.c (lnkarea)
4114         * as/hc08/lkmain.c (afile, parse),
4115         * as/hc08/lkelf.c: support for ELF output
4116         * as/hc08/lks19.c (s19),
4117         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4118
4119 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4120
4121         * as/mcs51/lkihx.c: Fixed bug #899105.
4122
4123 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4124
4125         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4126         .dsp files from Unix to DOS.
4127
4128 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4129
4130         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4131         function pointers; we have been compliant for several months now.
4132         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4133         change that was accidently commented out
4134         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4135         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4136         bug #922319
4137
4138 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4139
4140         * src/hc08/gen.c: output of all of the internal debugging information
4141         is now controlled by the D() macro; it is disabled by default
4142
4143 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4144
4145         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4146         harder to keep the same registers during a CAST iCode
4147         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4148         long via int can be done in a single cast, if the signedness is
4149         correct.
4150         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4151         putchar() in tinibios.c in ds390's library
4152
4153 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4154
4155         * src/SDCCast.c (decorateType): fixed bug #898889,
4156         cast result of a literal complement too
4157         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4158         fixed check for bitfields
4159
4160 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4161
4162         * src/SDCCicode.c (geniCodeLogic): made it static,
4163         (geniCodeLogicAndOr): added in order to fix bug #905492,
4164         (ast2iCode): fixed bug #905492
4165         * support/regression/tests/bug-905492.c: added
4166         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4167         (processParms): fixed bug #927659: don't copy parms, this will clear
4168         decorated flag
4169         * support/regression/tests/bug-927659.c: added
4170
4171 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4172
4173         * src/SDCCast.c (addCast): don't cast float to char
4174         * device/lib/libsdcc.lib: added _memmove
4175
4176 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4177
4178         * device/lib/large/Makefile: fixed parallel execution by
4179         replacing `make` by `$(MAKE)`
4180
4181 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4182
4183         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4184         offsets (fixes bug #923936)
4185
4186 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4187
4188         * device/lib/small/Makefile: fixed parallel execution by
4189         replacing `make` by `$(MAKE)`
4190
4191 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4192
4193         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4194
4195 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4196
4197         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4198         * src/regression/Makefile: Regression test was not running.
4199
4200 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4201
4202         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4203         complement if possible
4204         * src/SDCCval.c (valComplement),
4205         * src/SDCCicode.c (operandOperation): fixed complement of literal
4206         * support/regression/tests/onebyte.c (testComplement): added
4207
4208 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4209
4210         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4211         return an optimized tree; actually replace actParm with the new tree
4212         * src/SDCCast.h: added some parantheses to remove side effects
4213         * support/regression/tests/bug-920866.c
4214
4215 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4216         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4217         Bit operands were not being handled properly in the pic14 port.
4218         (now src/regression/add.c passes again).
4219
4220 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4221
4222         * src/SDCC.y (labeled_statement): case and default no longer require
4223         a following statement (RFE #893037)
4224
4225 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4226
4227         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4228         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4229         disabled (fixes bug #916294)
4230         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4231         "mov a,acc"; patch provided by Lenny Story
4232         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4233
4234 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4235
4236         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4237         functions
4238         * src/ds390/gen.c (genFunction, genEndFunction),
4239         * src/ds390/ralloc.c (ds390_assignRegisters),
4240         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4241         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4242         pushed if there are parameters passed on the stack. Also, a cleaner
4243         way to decide if r0/r1 should be pushed/popped. (Together they fix
4244         bug #918693)
4245
4246 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4247
4248         * doc/sdccman.lyx,
4249         * device/lib/mcs51/crtpagesfr.asm,
4250         * device/lib/mcs51/crtxinit.asm,
4251         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4252         to avoid confusion with Si Lab's SFRPAGE register.
4253
4254 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4255
4256         * src/SDCCglue.c (emitMaps): allow public sfr variables
4257         * src/SDCCglue.c (initialComments): include compiler build date
4258         with compiler version and put the timestamp of the generated
4259         assembly file on a serperate line to be less confusing.
4260         * src/port.h: added genInitStartup hook
4261         * src/avr/main.c,
4262         * src/ds390/main.c,
4263         * src/hc08/main.c,
4264         * src/pic/main.c,
4265         * src/pic16/main.c,
4266         * src/xa51/main.c,
4267         * src/z80/main.c: genInitStartup initialize as NULL (default to
4268         historical behaviour)
4269         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4270         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4271         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4272         library instead of hard coding it into the compiler.
4273         * support/regression/ports/mcs51-stack-auto/spec.mk,
4274         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4275         * device/lib/mcs51/Makefile,
4276         * device/lib/small/Makefile,
4277         * device/lib/large/Makefile,
4278         * device/lib/mcs51/crtpagesfr.asm,
4279         * device/lib/mcs51/crtstart.asm,
4280         * device/lib/mcs51/crtxclear.asm,
4281         * device/lib/mcs51/crtxinit.asm,
4282         * device/lib/mcs51/crtclear.asm,
4283         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4284         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4285         and into user configurable files.
4286         * device/lib/clean.mk: clean mcs51 directory too
4287         * support/regression/tests/longlit.c: added static to T1 declaration
4288         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4289         accesses in the initialization code
4290
4291 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4292
4293         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4294         OSCTRIMVAL as noted in bug #916008
4295
4296 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4297
4298         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4299         in loops with multiple exits (reported as incorrect registers
4300         used by Martin Helmling in Sdcc-user list)
4301
4302 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4303
4304         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4305         made ds390 register extensions look less like error messages
4306
4307 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4308
4309         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4310         reported by Adam Wozniak in Sdcc-user list
4311
4312 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4313
4314         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4315         arithmetic optimizations, added debug output
4316
4317 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4318
4319         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4320         * sdcc.spec: updated and split sdcc into 3 rpms
4321         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4322         needed for literals of LEFT_OP and '+'
4323         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4324         introduced RESULT_TYPE_NOPROM
4325         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4326         left shift
4327         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4328         limited promotion to int only for '*'
4329         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4330
4331 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4332
4333         * src/pic16/gen.c (genSkip),
4334         (genc16bit2lit), (gencjneshort): commented out
4335         (is_LitOp): new helper function, checks operand type
4336         (genCmpEq): rewritten
4337
4338 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4339
4340         * support/regression/tests/bug-908454.c: added
4341
4342 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4343
4344         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4345         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4346         (geniCodeCast): cosmetic, don't preserve bit storage class
4347         (geniCodeLeftShift): added promotion
4348         (geniCodeLogic): fixed regression
4349         * src/SDCCsymt.c (computeTypeOr): accept bits too
4350         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4351
4352 2004-03-07  Borut Razem <borut.razem AT siol.net>
4353
4354         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4355
4356 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4357
4358         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4359         version of pic16_genPackRegisters which does not check if ic is a
4360         CAST operator,
4361         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4362         function cause string1.c regression test fails
4363
4364 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4365
4366         * sim/ucsim/configure.in,
4367         * sim/ucsim/configure,
4368         * sim/ucsim/doc/Makefile.in: use docdir
4369         * src/SDCC.y: fixed sbit atrributes
4370         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4371         * src/SDCCast.c (decorateType): |^& need special promotion handling
4372         * src/SDCCast.h,
4373         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4374         * src/SDCCsymt.h (computeType),
4375         * src/SDCCicode.c: computeType() needs op
4376         * src/SDCCsymt.c (checkTypeSanity),
4377         * doc/sddman.lyx: "plain" bitfields are unsigned
4378         * src/SDCCsymt.c (computeTypeOr): added
4379         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4380         |^& ops
4381         * src/SDCCval.c (val*): computeType() needs op
4382         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4383         * support/regression/tests/onebyte.c: added tests for |^&
4384
4385 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4386
4387         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4388         for writing icode into asm output.
4389
4390 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4391
4392         * src/pic16/device.c: added some debug lines enabled
4393         with macro DEBUG_CHECK,
4394         * src/pic16/genarith.c: more debug in genPlus,
4395         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4396         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4397         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4398         * (aopForSym): onStack symbols are re-placed in data memspace,
4399         and onStack flag is cleared,
4400         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4401         copy temporary pcodeop,
4402         * (genPcall): added warning for not updating PCLATU,
4403         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4404         always true for pic16 port,
4405         * (genMultOneWord): NEW, supports integer multiplication,
4406         * (genMult): modified to call genMultOneWord,
4407         * (ifxForOp): added warning when return NULL,
4408         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4409         flag is set before call to operandFromSymbol for implicit
4410         added structures,
4411         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4412         options.intlong_rent are set by default,
4413         * (_hasNativeMulFor): modified to allow port generation of integer
4414         multiplication,
4415         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4416         set regtype to REG_SFR for all registers, restricting seting the
4417         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4418
4419 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4420
4421         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4422         more than 500 times in the regression tests
4423
4424 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4425
4426         * support/Util/SDCCerr.h,
4427         * support/Util/SDCCerr.c,
4428         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4429         enumerator_list),
4430         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4431         for symbol conflicts.
4432         * support/valdiags/tests/enum.c,
4433         * support/valdiags/tests/tentdecl.c,
4434         * support/valdiags/tests/struct.c: expect possible error messages
4435         referring to original symbol definitions.
4436         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4437         * src/SDCCsymt.h,
4438         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4439
4440 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4441
4442         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4443
4444 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4445
4446         * src/pic16/ralloc.c (newReg): fixed bug #908929
4447
4448 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4449
4450         * src/ds390/gen.c: added missing #include "main.h"
4451
4452 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4453
4454         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4455         checking if symbol is already in set,
4456         * src/pic16/device.h: prototype for checkAddSym,
4457         * src/pic16/gen.c: (_G): added entry interruptvector,
4458         * (assignResultValue): removed some commented out lines,
4459         * (genFunction): check for ISR via sym->type, absolute section for
4460         interrupt code is created via a new pBlock, the goto instruction is
4461         placed now correctly at the interrupt vector position, changed all
4462         references from ivec to _G.interruptvector,
4463         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4464         is the interrupt is a high priority one, same for return from ISR,
4465         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4466         externs to calls of checkAddSym,
4467         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4468         pic16_pcode_verbose flag is set,
4469         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4470         * src/pic16/pcoderegs.c: message about how many registers are saved
4471         will only be emitted if pic16_pcode_verbose flag is set,
4472
4473 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4474
4475         * src/ds390/ralloc.h,
4476         * src/ds390/ralloc.c (ds390_regWithIdx),
4477         * src/ds390/gen.c (emitcode),
4478         * src/ds390/main.h,
4479         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4480         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4481         ds390operandCompare, getRegsRead, getRegsWritten,
4482         initializeAsmLineNode): customized instruction size calculation for
4483         ds390, started basis for some register optimizations
4484         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4485         corresponding assembly output
4486         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4487         missing push/pop of r0/r1. Optimized push/pops
4488
4489 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4490
4491         * src/mcs51/main.c (instructionSize): fixed ACALL size
4492         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4493
4494 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4495
4496         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4497         the sorting of rlist with NULL elements
4498         * (print_idataType, print_idata): NEW to create idata sections
4499         * src/pic16/device.h: idataSymSet new variable
4500         * src/pic16/gen.c (genFunction): fixed some bugs in string
4501         comparing, improved the absolute section creation for ISRs,
4502         added FSR0L/FSR0H in registers that are saved in an ISR,
4503         * (genInline): fixed the processing of inline snippets,
4504         now they undergo no process by the peephole optimizer
4505         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4506         are placed in idataSymSet,
4507         * (pic16emitStaticSeg): extern symbols are added in externs,
4508         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4509         switching when aboslute variables are placed in access bank memory
4510         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4511         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4512         commented out with #if,
4513         * (pic16_packRegisters): reintroduce the check for CAST because some
4514         symbols are not correctly handled,
4515         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4516         pCodeInstruction instead of pCode,
4517         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4518         pCodeAsmDir definition,
4519         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4520         directive, then the argument directive is emitted without the leading
4521         tab, hack for inline labels which must be in the first column,
4522         * (compareLabel,pic16_findNextInstruction),
4523         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4524         * (insertBankSwitch): modified for the new pCodeAsmDir,
4525
4526 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4527         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4528
4529         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4530         instance,
4531         * (pushSide): commented out with #if,
4532         * (assignResultValue): fixed some typos in saving
4533         registers,
4534         * (genPcall): FIXED and sync'ed with genCall,
4535         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4536         * (genNearPointerGet): fixed to handle some more cases,
4537         implementation scheme via table reads,
4538         * (genConstPointerGet): modified to access code memory correct,
4539         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4540         and improved to handle some cases
4541         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4542         instead of "RETLW" for init data
4543         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4544         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4545         variables are placed in access bank memory (<0x80 and >=0xf80),
4546         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4547         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4548         TBLWT_POSTDEC,TBLWT_PREINC
4549         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4550         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4551         directives
4552         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4553         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4554         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4555         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4556
4557 2004-02-29  Borut Razem <borut.razem AT siol.net>
4558
4559         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4560         support/Util/findme.h, support/Util/system.h: enhance binary relative
4561         search for lib and include by using findProgramPath()
4562
4563 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4564
4565         * src/SDCCpeeph.h,
4566         * src/SDCCpeeph.c (pcDistance),
4567         * src/port.h,
4568         * src/mcs51/ralloc.h,
4569         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4570         * src/mcs51/main.h,
4571         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4572         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4573         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4574         size calculation port specific, started basis for some register
4575         optimizations
4576         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4577         missing push/pop of r0/r1. Optimized push/pops
4578         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4579         * device/lib/_modsint.c (_modsint),
4580         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4581         and stack version so regression tests pass
4582
4583 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4584
4585         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4586         * src/SDCCast.c (decorateType): catch another small optimization
4587         with '?' operator
4588         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4589         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4590         modified to finally use computeType() all over SDCC,
4591         see Feature Request #877103
4592         * src/SDCCval.h: cosmetic
4593         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4594         valCompare(); regression tested in muldiv.c
4595         * support/regression/tests/muldiv.c (testMod): mod sign follows
4596         dividend only
4597
4598 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4599
4600         * src/SDCCast.c (decorateType): fixed bug #902362
4601         * doc/INSTALL.txt: fixed install instructions for win32
4602
4603 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4604
4605         * device/include/Makefile.in (install): fixed by replacing spaces
4606         by tabs
4607         * doc/README.txt,
4608         * doc/INSTALL.txt: updated for release
4609         * doc/sdccman.lyx: added warning for --xstack being buggy
4610
4611 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4612
4613         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4614         to eliminate build warnings.
4615         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4616
4617 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4618            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4619
4620         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4621         removed -penable-stack, added comment for stack pragma, added
4622         warning for not initializing the stack/frame registers, removed
4623         comment at interrupts section
4624
4625         Stack is made permanent, there is no ability to disable stack usage.
4626         * src/pic16/device.h,
4627         * src/pic16/device.c: removed all references to USE_STACK macro,
4628         * src/pic16/device.c (pic16_dump_section): when no elements in
4629         rlist, free rlist before return,
4630         * (pic16_dump_int_registers): NEW, internal registers are a new set
4631         of general purpose registers reused by each function,
4632         * (checkAddReg): returns 1 if registers is added to set,
4633         * (pic16_groupRegistersInSection): when a registers is of type
4634         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4635         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4636         SRCASECMP macro is moved here from device.c
4637         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4638         PO_PCLATU, PO_PRODL, PO_PRODH,
4639         * (pic16_pCodeOpType, genMinus,
4640         changed compares to "a" register, with AOP_ACC,
4641         * (pic16_genPlus): fixed some bugs and indented properly,
4642         * (pic16_addSign): changed size to size+offset in the MOVWF
4643         instruction,
4644         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4645         multiply 8-bit operand by literal, result is 8-bit,
4646         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4647         multiply 2 8-bit operand, result is 8-bit,
4648         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4649         genUMult8X*_16,
4650         * src/pic16/gen.c: changed accUse to contain WREG only,
4651         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4652         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4653         true, do not use immediate addressing any more unless sym is a
4654         pointer in codespace,
4655         * (aopForRemat): do not use immediate addressing when symbol not in
4656         codespace and when symbol's address is requested,
4657         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4658         accUse size (= 1),
4659         * (aopGet): added case for AOP_ACC and don't return "accumulator
4660         bug" but WREG instead,
4661         * (popGetTempReg): pushes contents of temporary register in stack,
4662         * (popReleaseTempReg): pops contents of temporary register from
4663         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4664         * (pic16_popGet): separated case AOP_ACC to return register WREG
4665         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4666         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4667         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4668         the use of immediate pointers to certain cases only.
4669
4670         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4671         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4672         * (assignResultValue, genCall, genRet): modified to use the new
4673         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4674         genPcall is still broken,
4675         * (genFunction): added code to create 'A' type pBlocks when
4676         interrupt functions are generated, code not extensively tested yet,
4677         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4678         * (genEndFunction): modified so ISRs pop stored registers from stack,
4679         * (genMultOneByte): cleanup,
4680         * (AccRsh): added flag andmask, to and result with appropriate mask,
4681         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4682         * (genDataPointerGet): fixed and reenabled its use,
4683         * (genNearDataPointerGet): bugs fixed,
4684         * (genDataPointerSet): bugs fixed,
4685         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4686         pic16_DumpSymbol, pic16_DumpOp,
4687         * src/pic16/genutils.h: function prototypes for the above functions,
4688         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4689         pointers,
4690         * (pic16emitRegularMap): many many many improvements, but needs a
4691         major cleanup,
4692         * src/pic16/main.c: enable_stack in pic16_options is removed,
4693         * (_pic16_parseOptions): removed command line options -penable-stack,
4694         * (_process_pragma): emit stack symbol only when stack pragma is
4695         processed,
4696         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4697         redirected to FSR0L/FSR0H pair,
4698         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4699         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4700         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4701         for immediates,
4702         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4703         * (dumpPicOptype): NEW,
4704         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4705         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4706         with movff instruction,
4707         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4708         added pic16_int_regs, some packRegsFor* functions are commented out,
4709         because produce errors,
4710         * src/pic16/NOTES: minor modifications
4711
4712 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4713
4714         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4715         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4716         --pack-iram.
4717         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4718         * as/mcs51/lkaomf51.c: fixed bug #895763
4719
4720 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4721
4722         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4723
4724 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4725
4726         * doc/sdccman.lyx: added details about the HC08 storage classes and
4727         interrupts, fixed the register usage info for z80 & gbz80
4728
4729 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4730
4731         * doc/sdccman.lyx: added more pic16 port documentation
4732         * device/include/pic16/: added header pic18fregs.h
4733
4734 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4735
4736         * doc/sdccman.lyx: added Vangelis' contribution
4737
4738 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4739
4740         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4741         extend to the next CALL or PCALL, not just to the next CALL.
4742
4743 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4744
4745         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4746
4747 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4748
4749         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4750         bug #895752 and a better fix for bug #716790
4751
4752 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4753
4754         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4755
4756 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4757
4758         * doc/sdccman.lyx: minor changes, minor changed
4759
4760 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4761
4762         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4763         which can't handle SDCC_NEWONEBYTEOPS,
4764         (geniCodeMultiply): removed conversion from mult to shift for pic14
4765         and pic16
4766
4767 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4768
4769         * src/hc08/gen.h,
4770         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4771         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4772         thus fixing bug #895406
4773
4774 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4775
4776         * device/lib/_modsint.c,
4777         * device/lib/_modslong.c: sign follows divisor only
4778         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4779         signs or signedness can be ignored
4780         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4781         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4782         added optimization for IFX,
4783         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4784         arguments;
4785         reenabled optimization for IFX, which was removed on 2004-01-11
4786         * src/SDCCast.h: added return type IFX
4787         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4788         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4789         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4790         SDCC_OLDONEBYTEOPS selects the old behaviour
4791         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4792         changed again and commented promotion rule
4793         * src/SDCCval.c (valDiv): promotion no longer necessary
4794         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4795         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4796         rewritten
4797         * support/regression/tests/onebyte.c: added
4798
4799 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4800
4801         * gen.c (genInline): reverted to old code for assemnling inline
4802         code because of bug reported James Chadd
4803
4804 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4805
4806         * ralloc.h: missing declarations from previous patch,
4807         seems that patch for ralloc.h was never applied, fixed
4808
4809 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4810            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4811
4812         * pcode.c,
4813         * pcode.h,
4814         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4815         indirect addressing. Marked FSR0 as deprecated
4816         * gen.c (pointerCode): commented out, not needed now
4817         (pic16_popGet2p): new MOVFF helper function
4818         (genGenPointerGet),
4819         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4820         (shiftRLong): removed duplicate debugging info
4821
4822 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4823
4824         * src/ds390/gen.c (genNearPointerGet),
4825         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4826         optimization with bits, but not bitfields.
4827         * src/ds390/ralloc.c (packRegisters),
4828         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4829
4830 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4831
4832         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4833
4834 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4835
4836         * src/SDCCsymt.h,
4837         * src/SDCCicode.c (operandFromSymbol),
4838         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4839         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4840         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4841         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4842         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4843         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4844         bug #892038
4845         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4846         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4847         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4848         * src/SDCCsymt.c (newSymbol),
4849         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4850         enumerator_list),
4851         * src/SDCCval.h,
4852         * src/SDCCval.c (newiList): fixed bug #885705
4853
4854 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4855
4856         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4857         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4858
4859 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4860
4861         * device/include/c8051f120.h,
4862         * device/include/c8051f300.h,
4863         * device/include/c8051f310.h: added/updated header files for Silicon
4864         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4865         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4866         in new section Submitting patches
4867
4868 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4869
4870         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4871         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4872         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4873         genGenPointerSet),
4874         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4875         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4876         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4877         genGenPointerSet),
4878         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4879         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4880         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4881         genGenPointerSet),
4882         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4883         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4884         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4885         genGenPointerSet): fixed bug #892400
4886         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4887         to eliminate build warnings.
4888         * src/SDCCast.c (processParms),
4889         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4890         fixed bug 751859
4891         * support/valdiag/valdiag.py: added GCC to the list of defines active
4892         when compiling with gcc
4893
4894 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4895
4896         * support/Util/SDCCerr.h,
4897         * support/Util/SDCCerr.c,
4898         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4899         with an incomplete type (fixed bug #883734)
4900         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4901
4902 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4903
4904         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4905
4906 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4907
4908         * src/SDCCast.c (decorateType),
4909         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4910         function pointer implementation
4911         * support/regression/tests/funptrs.c: added tests to verify both forms
4912         of function pointers work correctly. Added tests to verify parameters
4913         are passed in the correct order.
4914
4915 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4916
4917         * device.c (regCompare): registers are sorted by ascending
4918         address and increasing size,
4919         * main.c (_pic16_finaliseOptions): removed the declaration
4920         of compiler macro MCU. Now a macro of the format pic18fxxxx
4921         will be defined from the command line
4922
4923 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4924             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4925
4926         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4927         PCOP_RLCF was overwritten!
4928         * gen.c (genSkip): commented out calls to pic16_emitcode,
4929         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4930         * (genlshTwo),
4931         * (genRRC): added debugging info,
4932         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4933         overwritten while shifting,
4934         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4935         overwritten while shifting,
4936         * (AccLsh),
4937         * (AccRsh),
4938         * (shiftLLeftOrResult),
4939         * (shiftRLeftOrResult),
4940         * (shiftRLong),
4941         * (shiftLLong): Implemented with pic16_emitpcode
4942         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4943         * (genLeftShift): Fixed bug, operand for shift by variable always
4944         was "and"ed with 0x0f,
4945         * (genLeftShiftLiteral),
4946         * (genrshTwo),
4947         * (genRightShiftLiteral): added debugging info,
4948         * (genrshFour): added comment,
4949         * (genRightShift): determined signedness from operand "left"
4950         instead of "result"
4951
4952 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4953
4954         * src/SDCCicode.c (geniCodeParms),
4955         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4956         function pointers, fixed function pointer bugs #861242 and #861896
4957
4958 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4959
4960         * device/include/c8051f000.h,
4961         * device/include/c8051f120.h,
4962         * device/include/c8051f300.h: added header files for Silicon
4963         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4964
4965 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4966
4967         * src/SDCCast.c (processParams): added new type flow and restructured
4968         (gatherAutoInit): added new type flow
4969         (addCast): cosmetic changes
4970         (getLeftResultType): added new type flow for array indices, patch
4971         provided by Stas, see FR #877103
4972         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4973         array index patch by Stas
4974         * src/SDCCast.h: added prototype getResultTypeFromType()
4975         * src/SDCCval.h,
4976         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4977         * src/pic/glue.c (pic14emitStaticSeg),
4978         * src/pic16/glue.c (pic16emitStaticSeg),
4979         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4980         for initialization of symbols
4981         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4982         * support/Util/SDCCerr.h:
4983         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4984         * .version: bumped version number to 2.3.8
4985         * device/include/Makefile.in (install),
4986         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4987         avoid warnings
4988
4989 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4990
4991         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4992         Slade Rich fixed an optimization bug
4993         * src/pic/pcodepeep.c,
4994         * src/pic/pcoderegs.c
4995         * doc/Makefile (install): added test for directory
4996
4997 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4998
4999         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5000         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5001         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5002         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5003         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5004         * as/mcs51/asexpr.c (term),
5005         * as/hc08/asexpr.c (term): fixed bug #887146
5006
5007 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5008
5009         * src/z80/gen.c (genMult): handle single byte result product
5010         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5011         DUMMY_READ_VOLATILE (fixed bug #886367)
5012
5013 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5014
5015         * support/regression/tests/libmullong.c: fixed logic, on little endian
5016         hosts we ended without a mullong_wrapper()
5017
5018 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5019
5020         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5021         virus/worm forged address usage.
5022
5023 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5024
5025         Fixed promotion, it should be done on AST level:
5026         * src/SDCCast.c (addCast): added promotion to int
5027         (decorateType): updated call to upCast()
5028         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5029         usualUnaryConversions()
5030
5031 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5032
5033         * support/regression/tests/literalop.c (mulWrapper): Added a
5034         wrapper to remove integer overflow warnings.
5035
5036         * support/regression/tests/float_trans.c: Made work on host.
5037
5038         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5039         location of sz80.
5040
5041         * support/regression/generate-cases.py (main): Changed from inline
5042         to a main method.
5043
5044         * doc/Makefile (install): Changed to depth first to get rid of
5045         missing directory install warning.
5046
5047         * as/Makefile (install-doc): Made work on Mac.
5048
5049 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5050
5051         * src/SDCCast.c: added an additional type flow in decorateType() of
5052         opposite direction, see feature request #860006; it's enabled at runtime
5053         by setting the environment variable SDCC_NEWTYPEFLOW
5054         * src/SDCCast.h: changed prototype of decorateType()
5055         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5056         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5057         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5058         see feature request #877103
5059         * src/SDCCval.c: updated call of decorateType()
5060         (valBitwise): fixed bug #882876
5061         (valMinus): added promotion
5062         (valLogicAndOr): result is unsigned
5063         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5064         * src/SDCCsymt.c (computeType),
5065         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5066         must not cause an unsigned operation
5067         * src/pic/glue (pic14emitRegularMap),
5068         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5069
5070 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5071
5072         * src/pic/pcode.c (PCodeID): commented out left over debug code
5073
5074 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5075
5076         * support/valdiag/tests/overflow.c: added shift tests
5077         * src/pic/device.c,
5078         * src/pic/gen.c,
5079         * src/pic/gen.h,
5080         * src/pic/glue.c,
5081         * src/pic/main.c,
5082         * src/pic/pcode.c,
5083         * src/pic/pcode.h,
5084         * src/pic/pcodepeep.c,
5085         * src/pic/pcoderegs.c,
5086         * src/pic/ralloc.c,
5087         * src/pic/ralloc.h: applied patch from Slade Rich;
5088         added support for multiple code pages and multiple RAM banks on the
5089         PIC 14 port. The ASM files now no longer simply assume all the
5090         code / RAM are in the same page / bank. This means the linker can
5091         safely allocate code/RAM of separate ASM files to different pages/banks.
5092         * doc/sdccman.lyx: added Slade's tips
5093         * src/mcs51/peeph.def: fixed bug #880768
5094
5095 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5096
5097         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5098         * src/SDCCast.c (decorateType): fixed bug #880197
5099
5100 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5101
5102         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5103         getopt.h.
5104
5105         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5106         strtof is not part of C89 and isn't included with Mac OS X.
5107
5108 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5109
5110         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5111         shiftL2Left2Result): fixed bug #879326
5112         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5113         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5114         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5115         address fetch for clr instruction
5116         * device/lib/hc08/_mulint.c: created optimized assembly version
5117         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5118
5119 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5120
5121         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5122         proposed in FR #877103
5123
5124 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5125
5126         * src/SDCCval.c (cheapestVal): added missing checks
5127         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5128         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5129
5130 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5131
5132         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5133         equal operands
5134
5135 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5136
5137         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5138         loaded with the linker search paths (-L arguments) and the libraries
5139         to be linked with the current source (-l arguments). Changes
5140         currently will affect only the pic16 port.
5141         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5142         include path the port specific paths and port specific libraries,
5143         * gplink command now contains the $3 argument,
5144         * src/pic16/device.h,
5145         * src/pic16/device.c,: structure PIC_device is made public and
5146         renamed to PIC16_device, the same for variable Pics which is renamed
5147         to Pics16. Updated all references to them.
5148         * src/pic16/glue.c (pic16glue): corrected bug with code
5149         initialization which bypassed the variable initializations block.
5150
5151         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5152         COMPILE_FLAGS and added the --nostdinc option
5153
5154 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5155
5156         * device/include/mc68hc908jb8.h: Register defs for another member
5157         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5158
5159 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5160
5161         Documenting changes from previous commits.
5162         * configure.in (version 1.56),
5163         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5164         when generating output files to configure the pic16 library,
5165         but now I've commented it out, since gputils aren't installed in the
5166         SF compile farm, so library won't compile
5167
5168         * device/lib/Makefile.in (version 1.56): initially I've added in
5169         target 'all' the prerequestive 'model-pic16' so it compiled the
5170         pic16 library, but now I've commented it out for the same reasons
5171         above,
5172         * added targets 'model-pic16' and 'objects-pic16' to compile the
5173         library
5174         * added target 'port-specific-objects-pic16' to handle the
5175         generated libraries and copy them into the build/ directory
5176         * added target 'clean-intermediate-pic16' to clean intermediate
5177         files into pic16 directory
5178         * in target 'installdirs' added line to create directory pic16 in
5179         the installation path
5180
5181         * device/include/Makefile.in (version 1.11): in target 'install'
5182         added lines to copy all header files to installation path,
5183         * in target 'installdirs' added line create directory for pic16
5184         headers in the installation path
5185
5186 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5187
5188         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5189          a function call
5190
5191 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5192
5193         * configure,
5194         * device/lib/configure.in,
5195         * device/lib/configure: fixed for autoconf 2.57
5196
5197 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5198
5199         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5200         option so that it actually works. Made it specific to the z80, since
5201         the gbz80 doesn't have these kinds of I/O ports.
5202
5203 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5204
5205         * device/include/z180.h,
5206         * device/lib/_memcpy.c,
5207         * device/lib/_memmove.c,
5208         * device/lib/_mulint.c,
5209         * device/lib/ser_ir.c,
5210         * device/lib/ser_ir_cts_rts.c,
5211         * device/lib/_strcmp.c,
5212         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5213         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5214         portmode; added deprecation warning for bank= and protmode= forms.
5215         Also, guard against buffer overflow.
5216         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5217
5218 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5219
5220         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5221         changed interrupt vector table generation to only emit declared vectors.
5222         * device/include/Makefile.in: added missing backslash
5223         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5224
5225 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5226
5227         Mainly changes to support compilation of the device libraries
5228         * src/pic16/device.c: stack is allocated via symbol and not
5229         via literal number. The symbol is placed in the corresponding
5230         position of the data ram
5231         * (pic16_dump_section): relocatable and absolute uninitialized
5232         data are now emitted in sorted order to reduce section naming,
5233         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5234         weren't marked as being in the access bank,
5235
5236 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5237
5238         Added portion of GNU PIC Library under the directory
5239         device/include/pic16 and device/lib/pic16. These files
5240         contain the declarations of SFRs for the PIC18Fxx2 devices.
5241         The directory is initialized via configure from toplevel.
5242
5243 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5244
5245         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5246         the spilllocations to be compared correctly
5247
5248 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5249
5250         * src/SDCCast.c (decorateType): fixed bug introduced today
5251
5252 2004-01-12  Borut Razem <borut.razem AT siol.net>
5253
5254         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5255         doc/sdccman.lyx: upper case pragmas are deprecated
5256
5257 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5258
5259         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5260         in simpler and even better code
5261
5262 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5263
5264         * src/SDCCicode.c (operandOperation): fixed bug #874819
5265         * src/SDCCast.c (decorateType): fixed
5266         char foo (unsigned long ul) { return ul > 0; }
5267
5268 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5269
5270         * doc/sdccman.lyx: Moved and added some sections, small changes
5271         all over. Telling LaTeX to be less strict with word spacing
5272         to better keep the right margin. Changed some notes about
5273         maintainance of the ports in section 3.2.1 - is it OK like this?
5274
5275 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5276
5277         SDCC source changes:
5278         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5279         convilong): modified to inform the pic16 port that builtin functions
5280         are external
5281
5282         PIC16 PORT specific changes:
5283         * src/pic16/device.c pic16_dump_equates() added,
5284         processor registers declared internally by the port are emitted in
5285         the translation as equates,
5286         * src/pic16/gen.c: inline code is passed unprocessed to the
5287         translation,
5288         * (pic16_popGetLit2): fnuction modified to take second operand as
5289         pCodeOp pointer and not as literal,
5290         * (popRegFromIdx): prefixed with pic16_,
5291         * (pic16_popCombine2): modified to receive already allocated pCode
5292         operands,
5293         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5294         * (genFunction): initializes local stack frame and pushes on stack
5295         all the registers used by this function,
5296         * (genEndFunction): restores all registers from stack and restores
5297         stack frame,
5298         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5299         improvements,
5300         * (pic16glue): changed the program startup sequence,
5301         * added new dbName code 'A' for functions placed in absolute section
5302         * src/pic16/main.c: added function attribute _naked,
5303         * added pragma 'code' to place a fnuction at an absolute address,
5304         * added command line arguments --debug-ralloc and --pcode-verbose,
5305         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5306         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5307         * (pic16_newpCodeOpLit2): modified to take the second operand as
5308         pCodeOp pointer,
5309         * (pic16_printpBlock): modified to emit each function in a separate
5310         section,
5311         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5312         UPPER for immediate operands,
5313         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5314         instruction,
5315         * src/pic16/peeph.def: all peepholes with movff are commented out,
5316         because there is a problem in the pcode peep optimizer,
5317         * src/pic16/ralloc.c: the register allocator can now reuse local
5318         function symbols for another function. This saves register usage.
5319         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5320
5321         Added file src/pic16/NOTES with information about program writing on
5322         the current port version.
5323
5324 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5325
5326         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5327         and peephole 252 (array access)
5328
5329 2004-01-09  Borut Razem <borut.razem AT siol.net>
5330
5331         * src/SDCCmain.c : fixed #872250: -l command line defined library
5332           files are scanned before standard library files
5333
5334 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5335
5336         * src/SDCCast.c (decorateType): fixed bug #874046
5337
5338 2004-01-09  Borut Razem <borut.razem AT siol.net>
5339
5340         * support/scripts/sdcc.nsi: remove previous installation
5341
5342 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5343
5344         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5345         bytes for last interrupt vector (mcs51)
5346         * sdcc.spec: fixed typo
5347
5348 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5351         gen51Code): more efficient parameter receive for --model-large
5352         ("bug" #845294)
5353
5354 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5355
5356         * src/ds390/main.c,
5357         * src/z80/main.c: added missed needLinkerScript flags (more than
5358         one port structure defined in these file)
5359         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5360         bug #795325
5361
5362 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5363
5364         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5365         * src/port.h: added flag needLinkerScript in port->linker
5366         structure to inform whether to create a .lnk file or not,
5367         * src/avr/main.c,
5368         * src/ds390/main.c,
5369         * src/hc08/main.c,
5370         * src/mcs51/main.c,
5371         * src/pic/main.c,
5372         * src/pic16/main.c,
5373         * src/xa51/main.c,
5374         * src/z80/main.c: changed appropriately to configure
5375         needLinkerScript flag
5376         * src/pic/gen.c,
5377         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5378         * src/pic/glue.c: added variable udata_section_name to
5379         override default uninitialized data segment definition for
5380         devices only with SHAREBANK memory (reported from Erik Epetrich)
5381         * (pic14emitOverlay): modified to emit a commented overlay segment
5382         directive when no overlay data exist
5383         * (picglue): modified to emit uninitialized data segment
5384         according to udata_section_name
5385         * src/pic/main.c (_pic14_parseOptions): added command line
5386         options --udata-section-name=[name] to override default
5387         udata definition name
5388         * modified _linkCmd and _asmCmd to include compiler passed
5389         arguments via -W option
5390         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5391         object file from '.rel' to '.o' in port->linker structure,
5392         changed size of fptr from 2 to 3 in port structure
5393
5394 2004-01-07  Borut Razem <borut.razem AT siol.net>
5395
5396         * support/scripts/sdcc.nsi: update PATH
5397         * support/scripts/sdcc.ico: craeted
5398
5399 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5400
5401         * device/include/Makefile.in: fix install
5402         * doc/Makefile: fix install
5403
5404 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5405
5406         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5407         in bug #860505
5408         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5409         how the function variable allocation summary is displayed; also
5410         include information about variables allocated to the overlay
5411         segment
5412
5413 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5414
5415         * as/mcs51/lkmain.c: Help about -Y option
5416         * as/mcs51/lkarea.c: Fixed gcc warnings
5417
5418 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5419
5420         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5421         fixed warning
5422         * support/valdiag/tests/overflow.c: added
5423         * src/SDCCast.c (decorateType),
5424         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5425         LEFT_OP (left shift)
5426
5427 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5428
5429         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5430         (default behaviour).
5431
5432 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5433
5434         A python script to validate compiler diagnostic messages. It can be
5435         used to verify that sdcc complains about bad c source code and
5436         gives a good location of the error.
5437         * support/valdiag/Makefile,
5438         * support/valdiag/valdiag.py,
5439         * support/valdiag/tests/*
5440
5441 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5442
5443         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5444         * src/SDCCsymt.c (newEnumType),
5445         * src/SDCCsymt.h
5446         * support/Util/SDCCerr.c,
5447         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5448         enum related bugs.
5449         * support/regression/tests/enum.c: added test for enum values that
5450         require at least 2 bytes of storage.
5451
5452 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5453
5454         * src/common.h: added ifndef/define/endif macros
5455         around the header file.
5456         Bug reported from Jesus Calvino-Fraga
5457
5458 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5459
5460         * sdcc.spec: updated
5461         * device/include/Makefile.in: don't install CVS directories
5462         * device/lib/Makefile.in: added removal of CVS directories after install
5463         * doc/Makefile: fixed install, added local_icons
5464         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5465         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5466         * src/ds390/gen.c (genRightShift): fixed bug #870788
5467         * src/SDCCast.c (decorateType): fixed bug #870781
5468
5469 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5470
5471         PIC16 port related changes:
5472         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5473         added variable stackPos,
5474
5475         * gen.c: genCall, assignResultValue: added support for
5476         pushing/retrieving function parameters to/from stack,
5477         genFunction,genEndFunction: setup stack frame for the
5478         generated function,
5479         genAddrOf: will be changed according to bug 863624
5480
5481         * added files genutils.c and genutils.h which contain gen*
5482         debugged and optimised functions extracted from gen.c
5483
5484         * glue.c: added variable 'externs' which holds extern symbols,
5485         pic16emitRegularMap: is modified to properly handle relocatable
5486          symbols under the new scheme,
5487         pic16createInterruptVect: is modified
5488         pic16printPublics: is modified to emit 'global' assembler directives,
5489         added pic16_printExterns to print extern symbols,
5490         pic16glue: initializes stack/frame pointer in the beginning of
5491         the assembly output. Temporary hack, will be corrected later,
5492         because gplink yet does not support stack and SDCC does not
5493         yet support a type of crt0.o object to create the final binary.
5494
5495         * Removed many lines that contain 8051 legacy code.
5496         * The code is finally placed under a 'code' directive.
5497         * Added port specific options.
5498
5499         * _process_pragma: simplified since now we do not need *special*
5500         include file to define SFR registers. But a separate header
5501         will be needed. This will be developed later.
5502         * _pic16_parseOptions: added, parses port specific options:
5503         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5504         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5505         --preplace-udata-with=
5506
5507         * _pic16_setDefaultOptions: modified to initialize section names,
5508         but hack is temporarly out of order since it needs improvement.
5509         * _pic16_genAssemblerPreamble: configuration words are emitted by
5510         their address instead of their name. This part is incomplete and
5511         supports only the 18Fxx2 devices. Other devices will emit an error
5512         during assembly since they do not contain the same set of config
5513         registers
5514         * _pic16_genIVT: is modified,
5515
5516         * pcode.c: added definitions for some hardware registers that are needed
5517         for stack support
5518         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5519         All PCI entries are updated. Now LFSR is supported.
5520         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5521         * added pic16_newpCodeOpLit2 to support instructions with
5522         two literal arguments
5523         * pic16_pCode2str: corrected code that emits assembler instructions
5524         with two literal operands and those that have an access bit modifier
5525         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5526         this fixes a bug which caused some labels to be lost, when an
5527         assembler directive was added, i.e. banksel,
5528         * pic16_FixRegisterBanking: improved logic that causes the insertion
5529         of bank switching,
5530         * InlineFunction: functions that are called once, are not any more
5531         inlined. This can be a port option in the future,
5532
5533         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5534
5535         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5536         hold the corresponding uninitialized symbols,
5537         * pic16_allocProcessorRegister: registers have explicit marked the
5538         accessBank field,
5539         * pic16_allocInternalRegister: registers are explicit marked as
5540         not used,
5541         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5542         processing list, so bit registers were lost,
5543         *
5544
5545         * ralloc.h: added field 'accessBank' and original symbol operand
5546         in register definition,
5547         * removed the field isMapped from register definition,
5548
5549         ** Several functions have been removed from various sources:
5550         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5551         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5552         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5553         pic16_assignRelocatableRegisters
5554
5555         ** others have been introduced:
5556         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5557         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5558
5559 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5560
5561         * support/scripts/inc2h.pl: changed definition of BIT_AT
5562         to emit 'sbit at' instead of 'bit at'. This was a request.
5563
5564         PIC16 port related preliminary changes:
5565         * gen.c: prefixed function popRegFromString with
5566         pic16_ and all references to it corrected
5567         * pcode.c: all pic16_pc_* hardware registers prefixed
5568         with underscore (_),
5569         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5570         * ralloc.c: newReg(): when register is REG_SFR then
5571         set address to rIdx,
5572         pic16_allocProcessorRegister(): marks register wasUsed=0
5573         pic16_writeUsedRegs(): added a call to assign processor
5574         registers via pic16_assignFixedRegisters
5575
5576 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5577
5578         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5579         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5580         variables in unused register banks.  Also the SSEG is placed
5581         wherever there is enough space for it, and IDATA can be anywhere
5582         in internal RAM.  For now compile using -Wl-Y[stack_size].
5583         The mem file is different for this option as well, since it
5584         makes no sense of talking about DSEG lenght.
5585
5586 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5587
5588         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5589         in certain cases, e.g. when ROM assignment, patch provided
5590         from Albert den Haan.
5591
5592 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5593
5594         Many signedness and type propagation fixes:
5595         * src/SDCCicode.c: made geniCodeCast() static
5596         replaced SPEC_ by IS_ (cosmetic)
5597         (operandOperation): fixed div and mod operation
5598         (usualBinaryConversions): added support for promotion of char
5599         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5600         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5601         (geniCodeAdd): an array index will stay unsigned, even if promoted
5602         from char to int
5603         (geniCodeArray): ditto
5604         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5605         * src/SDCCsymt.c (computeType): added more support for char;
5606         promotion of char is selectable by promoteCharToInt, fixed signedness
5607         for all cases
5608         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5609         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5610         * src/SDCCval (val*): replaced signedness calculation by
5611         computeType()
5612         rearranged if-branches (cosmetic)
5613         (valShift): added warning W_SHIFT_CHANGED
5614         (valCompare): fixed problem with different types
5615         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5616         * support/regression/tests/literalop.c: added many cases
5617         * support/regression/tests/ast_constant_folding.c: changed finally to
5618         'unsigned int'
5619         * .version: new year, new version: 2.3.7
5620         * src/SDCCmain.c (main): applied patch #866468
5621         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5622         provided by Scott Bronson
5623         * doc/sdccman.lyx: updated documentation for sdcdb
5624         updated and added chapter tips
5625
5626 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/SDCCsymt.h: missing from yesterday's commits
5629
5630 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5631
5632         * src/SDCC.y (struct_or_union_specifier),
5633         * support/Util/SDCCerr.c,
5634         * support/Util/SDCCerr.h: verify that struct & union tags are used
5635         as declared.
5636
5637 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5638
5639         * src/SDCCglobl.h: missing from yesterday's commits
5640
5641 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5642
5643         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5644         sft_attributes, struct_declaration, parameter_declaration,
5645         type_name, start_block, declaration_list),
5646         * src/SDCC.lex (check_type): support redefinition of typedef names
5647
5648 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5649
5650         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5651         aligned xdata arrays. Erik helped me with the if clause.
5652
5653 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5654
5655         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5656         warning
5657
5658 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5659
5660         * src/SDCCast.h,
5661         * src/SDCCast.c (newAst_),
5662         * src/SDCCicode.h,
5663         * src/SDCCicode.c (ast2iCode, newiCode),
5664         * src/SDCCglobl.h,
5665         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5666         expr, statement, expression_statement, selection_statement,
5667         iteration_statement, expr_opt, jump_statement): foundation for tracking
5668         sequence points
5669         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5670         point code too)
5671
5672 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5673
5674         * support/Util/SDCCerr.c,
5675         * src/SDCCast.h,
5676         * src/SDCCast.c (createCase, createDefault, decorateType),
5677         * src/SDCClabel.c (labelUnreach),
5678         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5679         to error messages.
5680         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5681         (with thanks to Stas Sergeev)
5682         * device/include/time.h,
5683         * device/lib/time.c (CheckTime): suppress unreachable code warning
5684
5685 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5686
5687         * src/SDCCast.c (createIvalCharPtr),
5688         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5689         bug #753752)
5690         * support/regression/tests/nullstring.c: tests for these two bugs
5691
5692 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5693
5694         * support/Util/SDCCerr.h,
5695         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5696         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5697         about storage class and 'at' used inside struct or union
5698         * src/SDCCBBlock.c (iCodeFromeBBlock),
5699         * src/SDCCcse.c (ifxOptimize),
5700         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5701         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5702         printIval, emitStaticSeg, emitOverlay),
5703         * src/SDCClabel.c (deleteIfx),
5704         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5705         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5706         gatherAutoInit, processParms),
5707         * support/Util/SDCCerr.h,
5708         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5709         reporting for post-parse errors.
5710
5711 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5712
5713         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5714         implicit casts via union; they don't work on big endian systems
5715         (possible fix for bug #861138)
5716
5717 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5718
5719         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5720         * src/mcs51/main.c: fixed the fix for bug #737001
5721
5722 2003-12-15  Borut Razem <borut.razem AT siol.net>
5723
5724         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5725
5726 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5727
5728         * support/makebin/makebin.c: put output in binary mode
5729
5730 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5731
5732         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5733         xdata and data memory on startup. Set the environment variable
5734         SDCC_NOGENRAMCLEAR to disable this.
5735         * src/mcs51/peephole.def,
5736         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5737         (allows non-interrupt and interrupt code to safely compete for a resource
5738         without the non-interrupt code having to disable interrupts)
5739
5740 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5741
5742         * src/SDCCicode.c (geniCodeAdd),
5743         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5744         with valFromType if type might be a pointer and host is big endian).
5745         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5746         types, not just integer types.
5747         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5748         multiply defined with mismatching "at" address.
5749
5750 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5751
5752         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5753         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5754         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5755         with embedded nulls (fixed bug #753752)
5756
5757 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5758
5759         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5760         Apparently this did not see much testing (endless loop)
5761
5762 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5763
5764         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5765
5766 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5767
5768         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5769         gracefully handle NULL memmap pointers
5770
5771 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5772
5773         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5774         instead of deleting the iCode when an operand is volatile
5775         * src/z80/gen.c (genDummyRead),
5776         * src/mcs51/gen.c (genDummyRead),
5777         * src/ds390/gen.c (genDummyRead),
5778         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5779         not just IC_RIGHT
5780         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5781         * src/SDCC.y: fixed bug #850420
5782
5783 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5784
5785         Applied z80 i/o port patch from Peter Townson and fixed some operators
5786         to better handle operands in A register.
5787         * device/include/z180.h
5788         * src/SDCC.y
5789         * src/SDCCglue.c
5790         * src/z80/gen.c
5791         * src/z80/gen.h
5792         * src/z80/main.c
5793         * src/z80/peeph-z80.def
5794         * src/z80/peeph.def
5795         * src/z80/z80.h
5796
5797 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5798
5799         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5800
5801 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5802
5803         * device/lib/hc08/_mullong.c: Removed extra #endif
5804
5805 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5806
5807         * sim/ucsim/hc08.src/inst.cc,
5808         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5809         carries from x to h
5810         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5811         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5812         * device/include/stdarg.h: fixed varargs for hc08
5813         * device/lib/Makefile.in,
5814         * device/lib/hc08/Makefile,
5815         * device/lib/hc08/_mulint.c,
5816         * device/lib/hc08/_mullong.c: fixed some endian problems
5817
5818 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5819
5820         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5821         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5822         * device/lib/_gptrget.c,
5823         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5824
5825 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5826
5827         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5828         * src/SDCCast.c (astErrors): fixed bug #846007
5829         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5830
5831 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5832
5833         * src/SDCCast.c (decorateType): disabled a transformation I added in
5834         revision 1.188 (access to fields of a structure at an absolute address);
5835         it breaks with bitfields, extern declarations, and gcse analysis.
5836         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5837         could be assigned through a pointer, so don't complain.
5838         * src/SDCCast.c (astErrors),
5839         * src/SDCCast.h,
5840         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5841
5842 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5843
5844         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5845         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5846         output of __config directives, since gpasm now supports them
5847         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5848         pre-processor macro, i.e. -DMCU=p18f452
5849         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5850         and modified to handle 'cast' icode similarly to '=' icode
5851         * src/pic16/device.h (typedef struct PIC_device): added field
5852         'extMIface' to indicate that chip has external memory interface
5853         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5854         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5855         18F8720
5856
5857 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5858
5859         * src/SDCC.y (pointer): fixed bug #846006
5860         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5861         * src/SDCCast.c (decorateType): fixed bug #846009
5862         * src/ds390/peeph.def,
5863         * src/ds390/gen.c (genAnd, genOr),
5864         * src/mcs51/peeph.def,
5865         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5866
5867 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5868
5869         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5870         * src/SDCCdflow.c
5871         * src/SDCCcse.c
5872         * src/SDCCcse.h
5873         * src/SDCCBBlock.h
5874         * src/SDCCBBlock.c
5875
5876 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5877
5878         fixed bug #845089
5879         * src/SDCCbitv.h,
5880         * src/SDCCbitv.c: added function to free a bitvector
5881         * src/SDCClrange.h,
5882         * src/SDCClrange.c: added function to recompute the liveranges
5883         * src/avr/ralloc.c,
5884         * src/ds390/ralloc.c,
5885         * src/hc08/ralloc.c,
5886         * src/mcs51/ralloc.c,
5887         * src/pic/ralloc.c,
5888         * src/pic16/ralloc.c,
5889         * src/xa51/ralloc.c,
5890         * src/z80/ralloc.c: recompute the liveranges after register packing
5891
5892 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5893
5894         * src/SDCCloop.c (newInduction): fixed bug #845630
5895
5896 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5897
5898         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5899         inadvertantly left behind from my 2003-11-12 change
5900
5901 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5902
5903         Updated headers I neglected to commit yesterday.
5904         * src/SDCClrange.h,
5905         * src/SDCCicode.h
5906
5907 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5908
5909         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5910         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5911         * src/SDCCopt.c (eBBlockFromiCode),
5912         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5913         the creation of the key hash table from the sequencing so it can be used
5914         earlier (for some GCSE bug fixes still pending)
5915
5916 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5917
5918         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5919         * support/regression/tests/addsub.c: testing genPlus shortcut
5920
5921 2003-11-15  Borut Razem <borut.razem AT siol.net>
5922
5923         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5924
5925 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5926
5927         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5928         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5929         ordering is immaterial.
5930         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5931
5932 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5933
5934         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5935         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5936         (SIGSEV) of bug #840381
5937         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5938         unlink new file before rename if new and old filenames are the same)
5939
5940 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5941
5942         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5943         uninitialized variables) for the mcs51. Set environment variable
5944         SDCC_GENRAMCLEAR to test.
5945         xdata initialization slightly shorter
5946
5947 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5948
5949         * src/SDCCsymt.h,
5950         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5951         #838241 & 780691 (basicly the same bug)
5952         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5953         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5954
5955 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5956
5957         * src/SDCCmain.c (linkEdit): "fix" #834252
5958
5959 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5960
5961         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5962         * src/SDCCast.h,
5963         * src/SDCC.y: fixed bug #819403
5964
5965 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5966
5967         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5968         the reentrant attribute.
5969         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5970         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5971         simulation
5972         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5973         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5974         erroneously reduced to a literal.
5975         * src/hc08/ralloc.c (packRegisters, rematStr),
5976         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5977         some cases
5978
5979 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5980
5981         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5982         * doc/sdccman.lyx: changed from 'article' to 'book'
5983         * doc/Makefile: readded test_suite_spec and cdbfileformat
5984
5985 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5986
5987         * device/include/stdlib.h: include malloc.h to comply with ANSI
5988         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5989
5990 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5991
5992         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5993         * doc/clean.mk: also remove *.out files
5994         * doc/sdccman.lyx: some additions, larger top/bottom margins
5995
5996 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5997
5998         * src/SDCC.y: fixed bug #837365
5999         * support/regression/tests/bitopcse.c
6000         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6001         a symbol (might be valop instead)
6002         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6003         * device/lib/clean.mk: added hc08 to the cleaning list
6004
6005 2003-11-04  Borut Razem <borut.razem AT siol.net>
6006
6007         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6008           made 2003-11-04
6009         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6010           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6011           malloc is declared in standard stdlib.h
6012
6013 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6014
6015         * device/lib/hc08/Makefile: need to clean .rel not .o files
6016         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6017
6018 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6019
6020         * src/port.h,
6021         * src/hc08/main.c,
6022         * src/mcs51/main.c,
6023         * src/ds390/main.c,
6024         * src/z80/main.c,
6025         * src/avr/main.c,
6026         * src/pic/main.c,
6027         * src/pic16/main.c,
6028         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6029         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6030         tests (which uses the port's oclsExpense function)
6031         * src/SDCC.y,
6032         * src/SDCCast.c,
6033         * src/SDCCicode.c,
6034         * src/hc08/gen.c,
6035         * src/ds390/gen.c,
6036         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6037
6038 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6039
6040         * src/SDCCcse.c (ifxOptimize),
6041         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6042         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6043         deleting the IFX iCode.
6044         * src/hc08/ralloc.c: reduced unneeded slocs
6045         * src/hc08/gen.c: fixed bug in asmopToBoolean
6046
6047 2003-11-04  Borut Razem <borut.razem AT siol.net>
6048
6049         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6050           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6051           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6052           transferred to configure
6053
6054 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6055
6056         Use headers defined in the C[++] standards:
6057         * sim/ucsim/gui.src/serio.src/fileio.cc
6058         * sim/ucsim/gui.src/serio.src/frontend.cc
6059         * sim/ucsim/gui.src/serio.src/main.cc
6060         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6061         * support/Util/NewAlloc.c
6062         * as/hc08/lklibr.c
6063         * as/mcs51/lklibr.c
6064         * as/z80/aslist.c
6065         * as/z80/assym.c
6066
6067 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6068
6069         * Added MSVC projects for hc08 assembler and linker:
6070         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6071         /as/hc08/link_hc08.dsp
6072
6073 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6074
6075         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6076
6077 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6078
6079         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6080
6081 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6082
6083         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6084
6085 2003-10-31  Borut Razem <borut.razem AT siol.net>
6086
6087         * support/cpp2/cpplib.h,
6088           support/cpp2/cpplib.c,
6089           support/cpp2/cpplex.c,
6090           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6091           to switch _asm block preprocessing on / off. Default is
6092           #pragma preproc_asm +
6093
6094 2003-10-31  Borut Razem <borut.razem AT siol.net>
6095
6096         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6097           when outputting comment blocks (when executed with -C option) and
6098           _asm (SDCPP specific) blocks
6099
6100 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6101
6102         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6103
6104 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6105
6106         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6107
6108 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6109
6110         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6111         * src/SDCCast.c (decorateType): fixed bug #832664
6112
6113 2003-10-31  Borut Razem <borut.razem AT siol.net>
6114
6115         * support\cpp2\cpplex.c: fixed for SDCPP:
6116           comments(when executed with -C option) and _asm blocks
6117           were included even if they where in skipped #if block.
6118           Applied solution from GCC cpp 3.3.2
6119
6120 2003-10-31  Borut Razem <borut.razem AT siol.net>
6121
6122         * src/SDCC.lex: sdcc now understands both formats:
6123           '# <line_number> <file_name>' and
6124           '#line <line_number> <file_name>'
6125         * support/cpp2/cppmain.c: sdcpp now generates the standard
6126           '# <line_number> <file_name>' instead of former
6127           '#line <line_number> <file_name>'
6128
6129 2003-10-30  Borut Razem <borut.razem AT siol.net>
6130
6131         * support/cpp2/cpphash.h,
6132         * support/cpp2/cpplib.h
6133         * support/cpp2/cpplex.c,
6134         * support/cpp2/cppmain.c,
6135         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6136
6137 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6138
6139         Fixed a number of problems revealed by bug #827883.
6140         * src/SDCCloop.c (loopInvariants): Spill location of the
6141         result operand should be recomputed if extracted from
6142         a loop. Also, don't extract assignments of an iTemp
6143         from a literal.
6144         * src/SDCCast.c (isConformingBody): loop reversal should
6145         not occur if the control variable is involved with a
6146         relational operator.
6147
6148 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6149
6150         * .version: bumped to 2.3.6 to reflect the big improvements
6151         made by Erik and Klaus. Thanks!
6152
6153 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6154
6155         Replaced the livrange code.
6156         * src/SDCClrange.c: added new LR code
6157         * src/SDCCloop.c,
6158         * src/SDCCBBlock.h: removed remainig parts from old LR code
6159         * src/ds390/ralloc.c,
6160         * src/ds390/gen.c: minor fixes to make it work with new code
6161
6162 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6163
6164         * as/hc08/asm.h,
6165         * as/hc08/lkrloc.c,
6166         * src/hc08/gen.c,
6167         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6168         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6169         (tweaked fix for bug #818696)
6170
6171 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6172
6173         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6174
6175 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6176
6177         * src/SDCCmain.c,
6178         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6179         * src/mcs51/gen.c (gencjneshort),
6180         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6181         more efficient (per Scott Bronson's suggestion)
6182
6183 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6184
6185         Extended the semantics of the critical keyword to include
6186         individual statements. See RFE #827755 and #799831
6187         * src/SDCC.y
6188         * src/SDCCicode.c
6189         * src/SDCCopt.c
6190         * src/SDCCast.c
6191         * support/Util/SDCCerr.c
6192         * support/Util/SDCCerr.h
6193         * src/mcs51/gen.c
6194         * src/ds390/gen.c
6195         * src/hc08/gen.c
6196
6197 2003-10-19  Borut Razem <borut.razem AT siol.net>
6198
6199         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6200
6201 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6202
6203         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6204         Fixed bug #818696
6205         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6206         and predecrement operand is displayed
6207
6208 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6209
6210         * src/SDCCval.c (valMinus): fixed bug #826041
6211
6212 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6213
6214         Some hc08 related updates that I missed earlier
6215         * sim/ucsim/stypes.h
6216         * support/regression/ports/hc08/spec.mk
6217
6218 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6219
6220         New target "hc08" for the Motorola 68hc08 family of micros
6221
6222         * configure
6223         * configure.in
6224         * Makefile
6225         * src/hc08/*
6226         * src/SDCCmain.c
6227         * src/port.h
6228         * sim/ucsim/hc08.src/*
6229         * sim/ucsim/configure.in
6230         * src/ucsim/configure
6231         * sim/ucsim/packages_in.mk
6232         * as/hc08/*
6233         * as/Makefile
6234         * device/include/mc68hc908qy.h
6235         * device/lib/hc08/*
6236         * device/lib/Makefile.in
6237         * support/regression/ports/hc08/*
6238         * support/regression/Makefile
6239
6240 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6241
6242         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6243         regression test
6244         * src/ds390/gen.c (genCast): fixed bug #821957
6245
6246 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6247
6248         * device/lib/logf.c: "fixed" overlay bug
6249         * support/regression/ports/host/spec.mk: added m library
6250         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6251         * support/regression/tests/float_trans: added (for Eric)
6252
6253 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6254
6255         * src/mcs51/gen.c (genCpl): fixed bug
6256         http://sf.net/mailarchive/message.php?msg_id=6263915
6257
6258 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6259
6260         * src/SDCCast.c (decorateType): added extended constant folding
6261         * src/SDCCsymt.c (computeType): cleanup
6262         * src/SDCCval.c (valShift): minor optimization
6263         * support/regression/tests/ast_constant_folding.c: added
6264
6265 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6266
6267         * src/SDCCmain.c: removed some unintended changes
6268
6269 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6270
6271         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6272         * src/z80/gen.c: fixed part of bug #817589
6273         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6274
6275 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6276
6277         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6278         * src/SDCCcflow.c
6279         * src/SDCCcse.c
6280         * src/SDCCdflow.c
6281         * src/SDCClabel.c
6282         * src/SDCClrange.c
6283         * src/SDCCmem.c
6284         * src/SDCCopt.c
6285         * src/SDCCpeeph.c
6286         * src/SDCCset.c
6287         * src/avr/ralloc.c
6288         * src/ds390/ralloc.c
6289         * src/izt/ralloc.c
6290         * src/mcs51/ralloc.c
6291         * src/pic/ralloc.c
6292         * src/pic16/ralloc.c
6293         * src/xa51/ralloc.c
6294         * src/z80/ralloc.c
6295         * src/z80/gen.c: removed unused label "release:"
6296
6297 2003-10-06  Borut Razem <borut.razem AT siol.net>
6298
6299         * src/SDCC.lex: removed definition of unused variables
6300           save_optimize and save_options
6301
6302 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6303
6304         * clean.mk: removed '=' in "-maxdepth=1"
6305         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6306         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6307
6308 2003-10-06  Borut Razem <borut.razem AT siol.net>
6309
6310         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6311           my_unput() replaced by unput()
6312
6313 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6314
6315         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6316         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6317         type-punned pointer will break strict-aliasing rules"
6318         Old LR behaviour is again default; Klaus' LR can be choosen by
6319         defining the environment variable LRKLAUS
6320         * src/SDCCBBlock.h
6321         * src/SDCCloop.c
6322         * src/SDCClrange.c
6323         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6324         * clean.mk: fixed removal of files in bin/CVS/
6325         * device/lib/clean.mk: fixed removal of directories small and large
6326         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6327         * src/SDCCicode.c,
6328         * src/SDCCval.c: removed superflous test for pedantic
6329
6330 2003-10-05  Borut Razem <borut.razem AT siol.net>
6331
6332         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6333           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6334           message "unmatched #pragma SAVE and #pragma RESTORE"
6335
6336 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6337
6338         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6339           assembly, critical functions, atomic, nojtbound)
6340
6341 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6342
6343         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6344         * src/SDCCBBlock.h
6345         * src/SDCCloop.c
6346         * src/SDCCloop.h
6347         * src/SDCClrange.c
6348
6349 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6350
6351         * src/z80/gen.h,
6352         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6353         * src/mcs51/gen.h
6354         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6355         * src/ds390/gen.h
6356         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6357         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6358         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6359
6360 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6361
6362         * src/z80/gen.c (genRet): fixed bug #524753
6363         * src/z80/gen.c (genCast): fixed internal error on cast from
6364         pointer to long
6365         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6366         fix for bug #477835 to the z80
6367         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6368         for tracking iCodes in the peephole optimizer for z80
6369
6370 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6371
6372         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6373         the other part of bug #814548
6374         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6375
6376 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6377
6378         * src/SDCCcse.c: fixed part of bug #814548
6379
6380 2003-09-28  Borut Razem <borut.razem AT siol.net>
6381
6382         * src/asm.c: rewrite of printILine() to use temporary file instead
6383           a pipe
6384         * src/xa51/main.c: commented out declaration of int rewinds
6385
6386 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6387
6388         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6389
6390 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6391
6392         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6393         * src/asm.c (printILine): Fixed bug #811015
6394
6395 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6396
6397         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6398         freeing.
6399
6400 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6401
6402         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6403         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6404         to correctly handle general case of AOP_PAIRPTR
6405         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6406
6407 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6408
6409         * src/mcs51/ralloc.c (fillGaps),
6410         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6411         register positioning bug)
6412
6413 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6414
6415         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6416
6417 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6418
6419         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6420         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6421         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6422         (ralloc doesn't intentionally do this now, but perhaps later)
6423         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6424         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6425         register positioning bugs (Fixed bug #762602 and #795325)
6426         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6427         (Fixed bug #808779)
6428         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6429         lines that --i-code-in-asm generates
6430
6431 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6432
6433         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6434         trying to fclose a FILE* that was already closed.
6435
6436 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6437
6438         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6439         of const struct should be treated as if const themselves)
6440
6441 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6442
6443         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6444
6445 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6446
6447         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6448         Unix (/n) and DOS (/r/n) line terminations.
6449
6450 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6451
6452         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6453         bug #613775
6454
6455 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6456
6457         * src/mcs51/gen.c (genFunction, genEndFunction),
6458         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6459         and restore of EA so that stack offsets to parameters are
6460         correct when using both critical and reentrant/stack-auto.
6461         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6462         size (can be triggered in error if sloc is shared between
6463         different sized objects)
6464         * device/include/float.h: fixed macros to explicitly use
6465         unsigned long where needed
6466
6467 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6468
6469         Feature req. 799831: added code to allow nesting of critical functions
6470         * src/mcs51/gen.c (genFunction, genEndFunction)
6471         * src/ds390/gen.c (genFunction, genEndFunction)
6472
6473 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6474
6475         * src/SDCCsymt.c (sclsFromPtr),
6476         * src/SDCCsymt.h,
6477         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6478         support for standard C idiom of memory mapped variables; for
6479         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6480         to xdata int at 0x1234 tempvar = 1.
6481         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6482         provided by Akiya ISHIDA
6483
6484 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6485
6486         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6487         * src/SDCCval.c (constVal): added reduction from int to char
6488         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6489         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6490         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6491         to ignore the sign
6492         * support/regression/tests/shifts.c: fixed
6493
6494 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6495
6496         * src/z80/gen.c (genXor): Fixed bug #805445
6497
6498 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6499
6500         Fixed bug #621531 (const & volatile confusion in the type chain).
6501         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6502         refer to the const or volatile state of the pointer itself.
6503
6504         * src/SDCCast.c
6505         * src/SDCCglue.c
6506         * src/SDCCicode.c
6507         * src/SDCCsymt.c
6508         * src/SDCCval.c
6509         * src/SDCC.y
6510         * src/SDCCsymt.h
6511         * src/pic/gen.c
6512         * src/pic/ralloc.c
6513         * src/pic16/gen.c
6514         * src/pic16/ralloc.c
6515         * support/regression/tests/const.c
6516
6517 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6518
6519         When checking for duplicated modules, use absolute paths
6520         instead of relative paths.  Files changed:
6521
6522         * as/mcs51/lklib.c
6523         * link/z80/lklib.c
6524
6525 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6526
6527         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6528
6529 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6530
6531         * device/include/string.h: added size_t typedef, changed
6532         prototypes to use size_t, eliminated separate reentrant and
6533         non-reentrant declarations, added _memmove declaration
6534         * device/lib/_memcpy.c: changed to use size_t instead of int,
6535         changed /4 to >>2 to avoid division library call
6536         * device/lib/_memcmp.c,
6537         * device/lib/_memset.c,
6538         * device/lib/_strncat.c,
6539         * device/lib/_strncpy.c,
6540         * device/lib/_strncmp.c: changed to use size_t instead of int
6541         * device/lib/_memmove.c: new file (fixed bug #772294)
6542         * device/lib/Makefile.in: added _memmove.c
6543         * device/lib/z80/asm_strings.s: fixed bug #772290
6544         * support/regression/tests/bitfields.c: attempt to fix host assertion
6545         failure on amd64-unknown-linux2.2
6546
6547 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6548
6549         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6550         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6551         * as/z80/asmain.c (main): fixed bug #801766
6552
6553 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6554
6555         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6556         compilers
6557
6558 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6559
6560         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6561         reported in bug #800609
6562
6563 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6564
6565         * Top header beautifications in src/pic16 directory:
6566           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6567           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6568           pcoderegs.h, ralloc.c, ralloc.h
6569         * main.c: added top header and GPL license notice
6570         * pcode.c: fixed the if-conditional warning
6571
6572 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6573
6574         * device/lib/_mullong.c: replaced int by short for gcc
6575
6576 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6577
6578         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6579         and JUMPTABLE iCodes properly now (worked by accident before)
6580         * src/mcs51/gen.c (leftRightUseAcc),
6581         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6582         iCode properly now. Use getSize instead of nRegs since a & b
6583         aren't part of the nRegs tally.
6584
6585 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6586
6587         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6588         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6589           before instructions that use the _STATUS register
6590
6591 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6592
6593         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6594         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6595         fetching of the pointer
6596         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6597         copied from genNearPointerSet()
6598         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6599         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6600         If they pop r0/r1 they must be called in the opposite order than aopOp().
6601         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6602         (resp. --stack-auto), prepared for --xstack
6603
6604 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6605
6606         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6607
6608 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6609
6610         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6611         these ports have their own __sdcc_external_start()
6612
6613 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6614
6615         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6616         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6617         type for bits was changed. It resulted in bit variables becoming
6618         global, which is not permitted in PIC 14 assembly output.
6619
6620 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6621
6622         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6623
6624 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6625
6626         Z80 and MCS51 linkers complaint if a public symbol is defined
6627         in more than one library module:
6628
6629         * as/mcs51/lklib.c
6630         * link/z80/lklib.c
6631         * as/mcs51/Makefile.in
6632
6633 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6634
6635         A few small changes that speed up the peephole optimizer.
6636
6637         * src/SDCCpeeph.c
6638
6639 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6640
6641         Try to make the peephole optimizer smarter by maintaining
6642         an association between the assembly source code and the
6643         iCodes that originated them. Put this information to use
6644         with a new peephole rule condition "notVolatile" so that
6645         the rules can be aggressive yet still safe.
6646
6647         * src/SDCCpeeph.c
6648         * src/SDCCpeeph.h
6649         * src/mcs51/gen.c
6650         * src/mcs51/peeph.def
6651
6652 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6653
6654         Fixed bug #741761
6655
6656         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6657         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6658         if the left or right operand symbols have the accuse flag set.
6659
6660 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6661
6662         Changed the type of the result of the ! (NOT) operator to char;
6663         previously it returned the same type as the source. This allows
6664         us to eliminate all the genFloatNot functions (all of its target
6665         implementations were very buggy) since !float can use the same
6666         code as !long now.
6667
6668         * src/SDCCicode.c (ast2iCode): ! returns char
6669         * src/mcs51/gen.c (genNot, genNotFloat),
6670         * src/ds390/gen.c (genNot, genNotFloat),
6671         * src/z80/gen.c (genNot, genNotFloat),
6672         * src/pic/gen.c (genNot, genNotFloat),
6673         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6674
6675 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6676
6677         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6678         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6679            during interrupts. Ensure WSAVE is located at a shared bank address.
6680         2. Fixed page selection in some places
6681         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6682            the registers name strings.
6683         4. Fixed "signed / unsigned compare" compiler warnings.
6684         5. The PIC port manages its own allocation of the general purpose
6685            registers, but makes no attempt to reuse them. As a result when
6686            compiling it soon runs out of general purpose registers. Some
6687            additional code was added to the files pcode.c and device.c to walk
6688            through the function call tree and rename the registers so that they
6689            get reused.
6690
6691         * src/pic/device.c
6692         * src/pic/gen.c
6693         * src/pic/glue.c
6694         * src/pic/pcode.c
6695         * src/pic/pcode.h
6696         * src/pic/ralloc.c
6697         * src/pic/ralloc.h
6698         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6699         genPlus() & genMinus() when the result is the same as left or right
6700
6701 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6702
6703         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6704
6705 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6706
6707         Made bitfield a distinct type from bit so that bitfields
6708         convert as per ANSI C and bits retain their traditional
6709         boolean style behaviour. Implemented bitfield support in
6710         the z80 port.
6711
6712         * src/SDCCsymt.h,
6713         * src/SDCCsymt.c,
6714         * src/SDCCast.c,
6715         * src/cdbFile.c,
6716         * src/mcs51/gen.c,
6717         * src/ds390/gen.c: bit v bitfield split
6718         * src/z80/gen.c: New support for bitfields
6719         * support/regression/tests/bitfields.c: reenabled z80,
6720         added more tests
6721
6722 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6723
6724         Rules 246.x, 247.x relate to bitfields, the others speed up
6725         access to xdata mapped I/O devices.
6726
6727         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6728
6729 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6730
6731         Cleaned up genPackBits and genUnpackBits and added two helper
6732         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6733         for literal assignments in genPackBits (thanks to Frieder for
6734         reminding me).
6735
6736         * src/mcs51/gen.c
6737         * src/ds390/gen.c
6738
6739 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6740
6741         Fixed bug #748310 (pointer to function type mishandled when the
6742         function name is omitted). Also fixed a SIGSEGV when a function
6743         attribute (reentrant, etc) is used on a non-function or on a
6744         function but misplaced before the parameter list.
6745
6746         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6747         bug #748310
6748         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6749         * support/Util/SDCCerr.h,
6750         * support/Util/SDCCerr.c: Added func attr misuse error msg
6751
6752 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6753
6754         Fixed bug #787649 by anonymous
6755         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6756         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6757
6758 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6759
6760         Fixed numerous bitfield problems.
6761
6762         * src/SDCC.y: More bitfield related error checking
6763         * src/SDCCsymt.h,
6764         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6765         * support/Util/SDCCerr.h,
6766         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6767         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6768         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6769         * support/regression/tests/bitfields.c: tests added
6770
6771 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6772
6773         Made the constant following the "interrupt" keyword optional. If
6774         omitted, the function will not automatically be given an entry
6775         in the interrupt vector table (similar to #pragma NOIV, but
6776         less syntacticly kludgy). The interrupt number is also now
6777         range checked. Also fixed a bug in the high order bit example
6778         in the manual.
6779
6780         * src/SDCC.y
6781         * src/SDCCmem.c
6782         * src/SDCCglue.c
6783         * src/SDCCsymt.h
6784         * support/Util/SDCCerr.c
6785         * support/Util/SDCCerr.h
6786         * doc/sdccman.lyx
6787
6788 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6789
6790         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6791         * src/SDCCicode.c (operandOperation): rewritten some ops
6792         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6793         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6794         other type
6795         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6796         be re-activated by defining REDUCE_LITERALS)
6797         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6798         unsigned, but are signed by default
6799         * src/SDCCval.c (constVal): rearranged
6800         * src/SDCCval.c (valMod): preliminary fix
6801         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6802         * support/regression/literalop.c: added, work in progress
6803
6804 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6805
6806         Generate warnings for useless declarations like "char data;"
6807         that don't do what new users expect.
6808
6809         * src/SDCC.y
6810         * support/Util/SDCCerr.h
6811         * support/Util/SDCCerr.c
6812
6813 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6814
6815         * src/SDCCval.c (valMult): fix overflow detection of negative int
6816
6817 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6818
6819         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6820
6821         Changes to support big endian targets:
6822
6823         * src/ports.h
6824         * src/SDCCglue.c
6825         * src/avr/main.c
6826         * src/ds390/main.c
6827         * src/izt/i186.c
6828         * src/mcs51/main.c
6829         * src/pic/main.c
6830         * src/pic16/main.c
6831         * src/xa51/main.c
6832         * src/z80/main.c
6833
6834 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6835
6836         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6837         * device/lib/time.c: fixed warning "integer overflow in expression"
6838
6839 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6840
6841         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6842         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6843         constants are unsigned; added recognition of "u" flag for unsigned
6844         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6845         * src/SDCCval.c (valDiv, valMod): fixed signdness
6846         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6847         signedness of modulo, left and right shift
6848         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6849         * support/Util/SDCCerr.h: added warning W_INT_OVL
6850         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6851         * src/SDCCast.c (ast_print): improved output of constants
6852
6853 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6854
6855         Fixed some warnings when building with MSVC:
6856
6857         * as\mcs51\asdata.c
6858         * as\z80\asdata.c
6859         * as\mcs51\asm.h
6860         * as\z80\asm.h
6861         * link\z80\aslink.h
6862         * link\z80\lkdata.c
6863         * link\z80\lkeval.c
6864         * link\z80\lkgb.c
6865         * link\z80\lkihx.c
6866         * link\z80\lks19.c
6867         * link\z80\lksym.c
6868         * support\cpp2\cpplib.c
6869         * src\ds390\gen.c
6870         * src\mcs51\gen.c
6871
6872 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6873
6874         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6875
6876 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6877
6878         * support\librarian\clean.mk: Do not remove Makefile.
6879         * support\librarian\Makefile: added.
6880
6881 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6882
6883         Added librarian to MSVC build:
6884         * all.dsp
6885         * sdcc.dsw
6886         * support\librarian\librarian.dsp
6887
6888         'configure' not needed for librarian, removed:
6889         * support\librarian\configure
6890         * support\librarian\configure.in
6891         * support\librarian\config_in.h
6892         * support\librarian\Makefile.in
6893
6894         Hopefully these ones built the librarian and the rest of sdcc properly:
6895         * Makefile
6896         * Makefile.common.in
6897
6898         Messed up 'configure', so revert to previous version:
6899         * configure
6900         * configure.in
6901
6902 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6903
6904         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6905         there, while the mantissa of a double is "only" 53 bits wide.
6906
6907 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6908
6909         Adding sdcclib to the build.  MSVC project coming soon.
6910         Files added/changed:
6911
6912         * support\librarian\clean.mk
6913         * support\librarian\configure
6914         * support\librarian\configure.in
6915         * support\librarian\config_in.h
6916         * support\librarian\Makefile.bcc
6917         * support\librarian\Makefile.in
6918         * support\librarian\sdcclib.c
6919         * Makefile.bcc
6920         * Makefile
6921         * Makefile.common.in
6922         * configure
6923         * configure.in
6924
6925 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6926
6927         Linker now complaints if linked modules have conflicting options, for
6928         example, one compiled using --model-large and another one compiled with
6929         --model-small.  The following files were modified:
6930
6931         * as\mcs51\asdata.c
6932         * as\mcs51\aslink.h
6933         * as\mcs51\asm.h
6934         * as\mcs51\asmain.c
6935         * as\mcs51\asout.c
6936         * as\mcs51\i51pst.c
6937         * as\mcs51\lkdata.c
6938         * as\mcs51\lklibr.c
6939         * as\mcs51\lkmain.c
6940         * as\z80\asdata.c
6941         * as\z80\asm.h
6942         * as\z80\asmain.c
6943         * as\z80\asout.c
6944         * as\z80\z80pst.c
6945         * link\z80\aslink.h
6946         * link\z80\lkdata.c
6947         * link\z80\lklibr.c
6948         * link\z80\lkmain.c
6949         * src\SDCCglue.c
6950
6951 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6952
6953         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6954         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6955
6956 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6957
6958         * src/z80/mappings.i: fix _mul[us][int,long] entries
6959
6960 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6961
6962         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6963
6964 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6965
6966         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6967         * support/regression/tests/bitopcse.c: added
6968         fixed warning:
6969         * src/avr/gen.c:
6970         * src/pic/gen.c:
6971         * src/pic16/gen.c:
6972         * src/z80/gen.c:
6973         * src/xa51/gen.c:
6974
6975 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6976
6977         added support for new library format to z80, gbz80 linkers:
6978         *link/z80/aslink.h
6979         *link/z80/lklex.c
6980         *link/z80/lklib.c
6981         *link/z80/lklist.c
6982
6983 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6984
6985         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6986         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6987
6988 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6989
6990         added DUMMY_READ_VOLATILE:
6991         * src/SDCC.y:
6992         * src/avr/gen.c:
6993         * src/xa51/gen.c:
6994         * src/z80/gen.c:
6995         * src/pic/gen.c:
6996         * src/pic16/gen.c:
6997         * src/mcs51/gen.c:
6998         * src/ds390/gen.c:
6999         * src/SDCCcse.c (algebraicOpts): many improvements
7000         * src/SDCCcse.h: removed algebraicOpts()
7001         * src/SDCCicode.c (picDummyRead): added
7002
7003 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7004
7005         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7006         "Insufficient space in data memory".
7007
7008 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7009
7010         * src/mcs51/gen.c: fixed bug #771358
7011         * src/z80/gen.c: fixed bug #759087
7012
7013 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7014
7015         * src/pic16/glue.c: minor cleanup by Vangelis
7016
7017 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7018
7019         * device/include/regc515c.h: fixed #758477
7020         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7021         * device/lib/_gptrput.c: saved a few bytes
7022         * my tab spacing is 8, yours too?)
7023         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7024         * device/lib/serial.c: process RX bytes earlier than TX bytes
7025         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7026
7027 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7028
7029         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7030
7031 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7032
7033     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7034
7035 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7036
7037         * device/lib/Makefile.in: bad fix, reverted to 1.43
7038
7039 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7040
7041         * device/lib/Makefile.in: added missing z80 object files
7042
7043 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7044
7045         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7046         pic16 progress by Vangelis:
7047         * src/SDCCglobl.h:
7048         * src/SDCCmain.c:
7049         * src/pic/Makefile:
7050         * src/pic:
7051         * pic/Makefile:
7052         * pic16/device.c:
7053         * pic16/device.h:
7054         * pic16/gen.c:
7055         * pic16/gen.h:
7056         * pic16/genarith.c:
7057         * pic16/glue.c:
7058         * pic16/main.c:
7059         * pic16/pcode.c:
7060         * pic16/pcode.h:
7061         * pic16/pcodepeep.c:
7062         * pic16/peeph.def:
7063
7064 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7065
7066     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7067
7068 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7069
7070     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7071     added gbz80 build to MSVC project.
7072     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7073     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7074     from 8051 stuff and setup so it links using a .lnk file.
7075
7076 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7077
7078     * support/librarian/sdcclib.c: sdcc librarian.
7079     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7080     with sdcclib.
7081
7082 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7083
7084     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7085
7086 2003-07-02  Borut Razem <borut.razem AT siol.net>
7087
7088         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7089         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7090         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7091         src/xa51/main.c, src/z80/main.c:
7092         virtualization of glue() function: each port has it's own glue function,
7093         which is accessed by do_glue function pointer in PORT.general structure
7094
7095 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7096
7097         * DS800C400 fun, improved ROM interface and tinibios.
7098
7099 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7100
7101         * More support for DS80C400. Now includes beginning of interface to ROM.
7102
7103 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7104
7105         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7106
7107 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7108
7109         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7110
7111 2003-06-19  Borut Razem <borut.razem AT siol.net>
7112
7113         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7114
7115 2003-06-19  Borut Razem <borut.razem AT siol.net>
7116
7117         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7118         fixed Z80 port - crt0.o: cannot open.
7119
7120 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7121
7122         * support/Util/MySystem.c (merge_command): revert bad fix
7123
7124 2003-06-18  Borut Razem <borut.razem AT siol.net>
7125
7126         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7127
7128 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7129
7130         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7131         option --use-stdout sends errors to stdout instead of stderr.
7132
7133 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7134
7135         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7136
7137 2003-06-15  Borut Razem <borut.razem AT siol.net>
7138
7139         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7140         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7141         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7142         fixed width array of pointers replaced with sets;
7143         multiple include and lib paths ared transferred to preprocessor and linker
7144         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7145         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7146         fixed width array of pointers
7147         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7148         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7149         fixupPath(), getPathDifference()
7150         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7151         fixed width array of pointers
7152
7153 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7154
7155         * src/pic16/ralloc.c: fix warnings
7156         * src/pic16/pcode.c: fix warning
7157
7158 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7159
7160          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7161         know all the details, but essentially this set of changes enable
7162         the pic16 port to generate movff instructions and generate assembler
7163         directives,
7164         * src/SDCCmain.c:
7165         * src/pic16/gen.c:
7166         * src/pic16/glue.c:
7167         * src/pic16/pcode.c:
7168         * src/pic16/device.c:
7169         * src/pic16/main.c:
7170         * src/pic16/pcode.h:
7171         * src/pic16/pcoderegs.c:
7172         * src/pic16/ralloc.c:
7173         * src/pic16/ralloc.h:
7174
7175 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7176
7177         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7178         added option --vc, so sdcc errors and warnings are compatible with
7179         Microsoft Visual Studio.
7180
7181 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7182
7183         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7184           device/lib/libfloat.lib: added atof function.
7185
7186 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7187
7188         * doc/sdccman.lyx: updated to Lyx 1.3
7189         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7190         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7191         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7192
7193 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7194
7195         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7196
7197 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7198
7199         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7200           additions to the "related tools/documentation" section
7201
7202 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7203
7204         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7205
7206 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7207
7208         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7209         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7210
7211 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7212
7213         * doc/sdccman.lyx: fix double dash and other minor things
7214         * doc/Makefile: fix double dash
7215
7216 2003-05-28  Karl Bongers(patches from Martin Helmling)
7217         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7218           condition and ignore commands.
7219
7220 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7221
7222         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7223           is in parts still quite out of date, I did changes as far as I felt makes sense
7224           for a non-native english speaker.
7225           Please feel free to add to the manual or to correct my changes.
7226         * doc/Makefile: undid touching the date of intermediate tex files.
7227
7228 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7229
7230         * doc/sdccman.lyx: Manual has an index now
7231
7232 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7233
7234         Finalize muluint/mulsint and mululong/mulslong merging:
7235         * device/lib/_mulint.c
7236         * device/lib/_mullong.c
7237         * device/lib/gbz80/mul.s
7238         * device/lib/gbz80/stubs.s
7239         * device/lib/z80/mul.s
7240         * device/lib/z80/stubs.s
7241         * src/SDCCsymt.c (initCSupport)
7242
7243 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7244
7245         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7246         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7247           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7248           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7249           instead of /Zm500.
7250
7251 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7252
7253         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7254           the regression tests I'm not brave enough to enable 245.b, 245.c
7255         * doc/sdccman.lyx: added latex preamble for hyperref package.
7256           Using pdflatex this will give you a hyperlinked pdf file with
7257           bookmarks. (prepend '%' before /usepackage if this breaks something)
7258
7259 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7260
7261          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7262
7263 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7264
7265         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7266
7267 2003-05-21    <johan AT balder>
7268
7269         * src/SDCCglue.c (printIval): fixed bug #739934
7270
7271 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7272
7273         Applied patch from bug 737905 (renamed yylineo to mylineno):
7274         * src/altlex.c
7275         * src/SDCCast.c
7276         * src/SDCglobl.h
7277         * src/SDCC.lex
7278         * src/SDCCsymt.c
7279         * src/SDCCval.c
7280         * src/pic16/pcode.c: Cleaned warnings
7281         * src/pic16/pcodeflow.c: Cleaned warnings
7282         * src/pic16/pcoderegs.c: Cleaned warnings
7283
7284 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7285
7286         * src/pic16/pcode.c: Cleaned warnings
7287         * src/pic16/pcodepeep.c: Cleaned warnings
7288         * src/pic16/ralloc.c: Cleaned warnings
7289
7290 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7291
7292         * doc/sdccman.lyx: fixed bug 739745
7293         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7294
7295 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7296
7297         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7298         it can be defined with CFLAGS when running configure
7299         * src/SDCCmain.c: fixed compiling + linking with object files
7300
7301 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7302
7303         * configure.in: configure for pic16 port,
7304             added --disable-pic16-port
7305         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7306         * src/SDCCmain.c: linkOptions is changed to set *,
7307             added if/endif conditional macros to remove options help
7308             messages from optionsTable when a port is not configured, added
7309             support for the PIc16 port in the ports table, when executing
7310             the compiler with no port specified on command line, a default
7311             port is selected with the new macro DEFAULT_PORT which is
7312             defined in port.h, in setDefaultOptions() linkOptions is removed
7313             from initialization assignment, since now it is a set,
7314             parseCmdLine uses setParseWithComma for linkOptions, in
7315             linkEdit() linkOptions are accessed with new function indexSet()
7316             which returns the i'th item of a set variable. See SDCCset.c, in
7317             linkEdit() when calling buildCmdLine(), added linkOptions as
7318             last argument. Now users can pass arguments to gplink via the
7319             -Wl option, main() uses pic16glue() to glue up pic16 programs
7320         * src/SDCCpeeph.c: various changes to support pic16
7321         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7322             return the i'th item of the set
7323         * src/SDCCset.h: added function prototype for indexSet()
7324         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7325         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7326         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7327             added macro DEFAULT_PORT
7328         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7329         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7330             generated
7331         * src/pic16/glue.c: commented out some error producing lines
7332         * src/pic16/main.c: __config directives are commented out to stop
7333             gpasm complaining and test the linkage with gplink, _linkCmd and
7334             _asmCmd changed to be more gplink and gpasm friendly
7335         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7336             produced an error when parsed, peep rule 12 is added to utilize
7337             movff, but it is commented out since the pCode does not support
7338             yet a command with 2 address arguments
7339
7340 2003-05-18    <johan AT balder>
7341
7342         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7343         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7344 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7345
7346         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7347   Added feature to script commands from file.
7348
7349 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7350
7351         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7352         * src/SDCCutil.c: include ctype.h for win32
7353
7354 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7355
7356         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7357
7358 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7359
7360         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7361   Fixed so you can set breakpoints prior to run, run does not stop
7362   on entry now.  Add tbreak.  Other enhancements and fixes for use
7363   with ddd.
7364
7365 2003-05-12  Borut Razem <borut.razem AT siol.net>
7366
7367         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7368
7369 2003-05-11  Borut Razem <borut.razem AT siol.net>
7370
7371         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7372         the path of bin directory, so that PATH is the only env. variable, which has to be set
7373         in case of standard installation.
7374         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7375         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7376         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7377
7378 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7379
7380         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7381         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7382         temp files are in the port dir; clean the gen/test directory when
7383         generating new test.c
7384         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7385         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7386         * support/regression/tests/zeropad.c: added
7387
7388 2003-05-09    <johan AT balder>
7389
7390         * src/SDCCglue.c: fixed bug #597940
7391
7392 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7393
7394         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7395   cache sfr, optimize next,step, fix off by one sourceline,
7396   support ddd list function.
7397         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7398
7399 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7400
7401         * support/regression/HTMLgen.py: added compare_s2f()
7402         * support/regression/Makefile: redo 1.27
7403         * support/regression/generate-cases.py: redo 1.5
7404
7405 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7406
7407         * support/regression/tests/float.c: workaround 33 bit hex constant
7408         * support/regression/tests/simplefloat.c: fix division for host
7409
7410 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7411
7412         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7413         that tame's the PIC's over-aggressive optimizer.
7414
7415 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7416
7417          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7418          support for MSVC.
7419
7420 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7421
7422         Initial support for DS80C400. "Hello world" runs on TINIm400
7423         (with polled I/O).
7424
7425 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7426
7427          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7428          * Some notes on ddd usage added in debugger/README
7429          Martin Helmling adding more features and fixes for ddd GUI debugger.
7430          Code added for nexti, stepi, up, down, and other adjustments.
7431
7432 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7433
7434         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7435         * src/pic/peeph.def Added two rules to optimize carry manipulation
7436         * src/pic/* removed debug printfs
7437
7438 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7439
7440         * debugger/mcs51/cmd.c: added header newalloc.h
7441
7442 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7443
7444         * as/Makefile: new EXEEXT
7445         * as/z80/Makefile: remove trailing slash of BUILDIR
7446         * as/z80/clean.mk: new EXEEXT
7447         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7448         * support/cpp2/Makefile.in: new EXEEXT
7449         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7450
7451 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7452
7453         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7454         EXEEXT was introduced to fix all related problems with targets
7455         "clean", "install" and "uninstall"; a couple of further flaws
7456         especially with "clean" have been fixed too
7457         * as/mcs51/Makefile.in
7458         * as/mcs51/clean.mk
7459         * as/z80/Makefile
7460         * Makefile
7461         * clean.mk
7462         * debugger/mcs51/Makefile.in
7463         * debugger/mcs51/clean.mk
7464         * link/z80/Makefile
7465         * link/z80/Makefile.in
7466         * link/z80/clean.mk
7467         * link/Makefile
7468         * packihx/Makefile.in
7469         * packihx/clean.mk
7470         * sim/ucsim/Makefile
7471         * sim/ucsim/clean.mk
7472         * sim/ucsim/avr.src/Makefile.in
7473         * sim/ucsim/avr.src/clean.mk
7474         * sim/ucsim/s51.src/Makefile.in
7475         * sim/ucsim/s51.src/clean.mk
7476         * sim/ucsim/xa.src/Makefile.in
7477         * sim/ucsim/xa.src/clean.mk
7478         * sim/ucsim/z80.src/Makefile.in
7479         * sim/ucsim/z80.src/clean.mk
7480         * sim/ucsim/main_in.mk
7481         * sim/ucsim/packages_in.mk
7482         * sim/ucsim/gui.src/Makefile.in
7483         * sim/ucsim/gui.src/serio.src/Makefile.in
7484         * sim/ucsim/gui.src/serio.src/clean.mk
7485         * src/Makefile.in
7486         * src/clean.mk
7487         * support/cpp2/Makefile.in
7488         * support/cpp2/clean.mk
7489         * support/makebin/Makefile
7490         * support/makebin/clean.mk
7491         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7492         * doc/sdccman.lyx: --program-suffix no longer needed
7493
7494 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7495
7496          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7497          Martin Helmling added support for ddd GUI debugger.
7498          Code added to display assembly, set variables, and other commands
7499          to interface to ddd.
7500
7501 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7502
7503         * as/Makefile: fix target clean
7504         * as/clean.mk: fix target clean
7505         * as/z80/clean.mk: fix target clean
7506
7507 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7508
7509         * Makefile.common.in: added  AT EXEEXT AT
7510         * configure.in: removed all mingw32 stuff
7511         * configure: rebuilt from configure.in
7512         * doc/sdccman.lyx: updated section "installation"
7513         * support/scripts/sdcc_mingw32: adapted to configure
7514         * support/scripts/sdcc_cygwin_mingw32: added
7515
7516 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7517
7518         * src/pic Added object file support for the PIC port
7519         * src/pic Applied patch from Craig Franklin (this started the object file support)
7520         * src/regression Updated the PIC regression tests for object files
7521
7522 2003-04-20  Borut Razem <borut.razem AT siol.net>
7523
7524         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7525           lklex.c: In function `getfid':
7526           lklex.c:203: warning: array subscript has type `char'
7527         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7528           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7529         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7530           stack handling macros
7531
7532 2003-04-19  Borut Razem <borut.razem AT siol.net>
7533
7534         * "handling space characters in file path" task:
7535         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7536         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7537         * support/Util/MySystem.h: make it self-sufficient
7538         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7539           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7540           handling space characters in file path
7541         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7542           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7543         * support/Util/MySystem.c: handling space characters in executable's path
7544
7545 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7546
7547         * as/z80/Makefile: fix permanent rebuild of z80
7548         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7549         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7550
7551 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7552
7553         * src/SDCCopt.c: add special case optimization to replace modulo by
7554           a power of two with a bitwise AND.
7555
7556 2003-04-18    <johan AT balder>
7557
7558         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7559
7560 2003-04-17    <johan AT balder>
7561
7562         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7563         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7564
7565 2003-04-13  Borut Razem <borut.razem AT siol.net>
7566
7567         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7568         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7569           fixed mingw problem in adl_NORMALIZE_PATH
7570
7571 2003-04-12  Borut Razem <borut.razem AT siol.net>
7572
7573         * fixed "#pragma SAVE/RESTORE can not be nested":
7574         * src/SDCC.lex: reworked pragma handling functions
7575         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7576         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7577
7578 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7579
7580         * src/SDCCutil.c (pathEquivalent): defined but not used
7581         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7582         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7583         * configure: rebuilt from configure.in
7584         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7585         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7586         * device/include/Makefile.in: replace sdcc_datadir
7587         * device/lib/Makefile.in: replace sdcc_datadir
7588         * Makefile.common.in: add LDFLAGS from configure
7589         * packihx/Makefile.in: use LDFLAGS
7590         * src/Makefile.in: use LDFLAGS
7591         * support/cpp2/Makefile.in: add LDFLAGS from configure
7592         * support/makebin/Makefile: use LDFLAGS
7593         * .version: bumped version number to 2.3.5
7594
7595 2003-04-12  Borut Razem <borut.razem AT siol.net>
7596
7597         * completed "different paths" task:
7598         * src/SDCCmacro.c: fixed bug in handling quotes
7599         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7600         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7601
7602 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7603
7604         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7605
7606 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7607
7608         * ds390/gen.c ds390/peeph.def: fix bug 706781
7609
7610 2003-04-11  Borut Razem <borut.razem AT siol.net>
7611
7612         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7613
7614 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7615
7616         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7617         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7618          set - this bit used to not be set...).
7619         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7620           bad code in PIC Port
7621         * src/regression/and2.c added to test bug 609268
7622         * src/regression/Makefile added and2.c to regression test
7623
7624
7625 2003-04-08    <johan AT CP255758-A>
7626
7627         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7628         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7629         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7630
7631 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7632
7633         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7634         fix bug #487815
7635         * support/cpp2/Makefile.in: fix bug #487815
7636         * configure: rebuilt from configure.in
7637         * Makefile.common.in: docdir changed, new path suffixes
7638         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7639         * sdcc_vc_in.h: reflect changes from sdccconf.h
7640         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7641         * src/SDCCutil.h: remove BINDIR hack
7642         * doc/sdccman.lyx: update new path hierarchy
7643
7644 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7645
7646         * src/SDCCpeeph.c: added okToRemoveSLOC test
7647
7648 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7649
7650         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7651
7652 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7653
7654         * src/SDCCpeeph.c: added labelIsReturnOnly test
7655         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7656
7657 2003-04-05    <johan AT balder>
7658
7659         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7660         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7661         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7662         * src/SDCCast.c: fixed a warning
7663         * src/SDCCast.h: fixed a warning
7664         * src/SDCCicode.c (operandFromAst): fixed a warning
7665
7666 2003-04-04    <johan AT balder>
7667
7668         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7669         * src/SDCCast.c (decorateType): fixed bug #715076
7670         * src/SDCC.y: fixed bug #702907
7671
7672 2003-04-03    <johan AT balder>
7673
7674         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7675         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7676         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7677         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7678         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7679
7680 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7681
7682         * _decdptr.c: fix return values
7683         * _gptrget.c: fix return values
7684         * _gptrgetc.c: fix return values
7685         * _gptrput.c: fix return values
7686         * _mulint.c: fix return values
7687         * as/z80/Makefile: fix 'make -j' problem
7688
7689 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7690
7691         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7692         * configure.in: big cleanup, updated to autoconf 2.5x
7693         * configure: rebuilt from configure.in
7694         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7695         * sdcc_vc_in.h: reflect changes from sdccconf.h
7696         * doc/Makefile: fixed a flaw in "make install"
7697
7698 2003-04-02    <johan AT balder>
7699
7700         * src/ds390/gen.c (genCmp): no comments
7701         * src/mcs51/gen.c (genCmp): no comments
7702         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7703         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7704
7705 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7706
7707         * support/regression/generate-cases.py: place generated file in given sub directory
7708         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7709         * support/regression/Makefile: improvements for 'make -j';
7710         side effect: it's simpler and faster now
7711
7712 2003-03-31  Borut Razem <borut.razem AT siol.net>
7713
7714         * src/z80/main.c: link-{port} and as-{port} defined without path
7715         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7716
7717 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7718
7719         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7720
7721 2003-03-30  Borut Razem <borut.razem AT siol.net>
7722
7723         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7724           changed type of list parameter to set
7725         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7726         * src/port.h: changed type of do_assemble() parameter to set
7727         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7728           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7729           definition of "cppoutfilename" macro with NULL value in preProcess()
7730         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7731         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7732         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7733           replaced with set *binPathSet
7734         * shash_add() deallocates the item, if allready exsists, before adding the new one
7735         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7736
7737 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7738
7739         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7740           a nested for loop bug in the PIC port
7741         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7742           for loops
7743
7744 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7745
7746         * support/Util/dbuf.h: remove C++ stuff to make it portable
7747
7748 2003-03-28  Borut Razem <borut.razem AT siol.net>
7749
7750         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7751           literal strings in stringLiteral()
7752         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7753         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7754           to the project
7755
7756 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7757
7758         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7759
7760 2003-03-26    <johan AT balder>
7761
7762         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7763         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7764         * src/SDCCast.c (decorateType): fixed " -v < 3"
7765
7766 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7767
7768         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7769         Added Lenny Story's debug infrastructure changes:
7770         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7771         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7772         * src/cdbFile.c: added
7773         * src/SDCCdebug.c: added
7774         * src/SDCCdebug.h: added
7775         * src/SDCCast.c (createFunction)
7776         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7777         * src/SDCCmain.c (parseCmdLine, main)
7778         * src/SDCCmem.c (redoStackOffsets)
7779         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7780         * src/SDCCsymt.h
7781         * src/common.h
7782         * src/avr/gen.c (genAVRCode)
7783         * src/ds390/gen.c (gen390Code)
7784         * src/mcs51/gen.c (gen51Code)
7785         * src/pic/gen.c (genpic14Code)
7786         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7787         * src/xa51/gen.c (genXA51Code)
7788         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7789
7790 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7791
7792         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7793         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7794
7795 2003-03-22    <johan AT balder>
7796
7797         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7798
7799 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7800
7801         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7802         * doc/cdbfileformat.lyx: added, written by Lenny Story
7803         * doc/Makefile: added cdbfileformat.lyx
7804         * doc/clean.mk: added cdbfileformat.lyx
7805
7806 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7807
7808         * src/mcs51/peeph.def: fix bug #705773
7809
7810 2003-03-20    <johan AT balder>
7811
7812         An sfr/sbit can have an "at #" AND an initializer
7813         * src/SDCCsymt.c (checkSClass):
7814         * src/SDCCmem.c (allocGlobal):
7815         * src/SDCCmem.c (allocLocal):
7816         * src/SDCCast.c (createBlock):
7817
7818 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7819
7820         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7821
7822 2003-03-16    <johan AT balder>
7823
7824         Undid the hackup of const and volatile, the problem is much bigger
7825         * src/SDCC.y:1.65
7826         * src/SDCCast.c:1.171
7827         * src/SDCCglue.c:1.138
7828         * src/SDCCicode.c:1.146
7829         * src/SDCCsymt.c:1.150
7830         * src/SDCCval.c:1.65
7831
7832 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7835         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7836
7837 2003-03-13    <johan AT balder>
7838
7839         Hackup const and volatile modifiers in type chains a bit:
7840         * src/SDCC.y:1.63
7841         * src/SDCCast.c:1.169
7842         * src/SDCCglue.c:1.136
7843         * src/SDCCicode.c:1.143
7844         * src/SDCCsymt.c1.146
7845         * src/SDCCsymt.h1.59
7846         * src/SDCCval.c:1.63
7847
7848 2003-03-12    <johan AT balder>
7849
7850         * src/SDCCBBlock.h: more LRH debugging junk
7851         * src/SDCCcflow.h: more LRH debugging junk
7852         * src/SDCCloop.c: more LRH debugging junk
7853         * src/SDCC.y (struct_declaration): fixed bug #697590
7854         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7855         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7856         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7857
7858 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7859         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7860         test function names must now match exactly).
7861         * src/SDCCcse.c: added special case in findCheaperOp to allow
7862         extending a short integer. Makes less awful code for bug 700121 test case.
7863
7864 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7865
7866         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7867         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7868
7869 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7870
7871         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7872         actually called (operandsNotEqual() was called for all
7873         operandsNotEqualX tests).
7874
7875 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7876
7877         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7878         with shorter literals. Fixes bug 700121.
7879
7880 2003-03-11    <johan AT balder>
7881
7882         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7883
7884 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7885
7886         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7887         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7888
7889 2003-03-10  Borut Razem <borut.razem AT siol.net>
7890
7891         * src/SDCCmain.c: pipe preprocessor's output
7892         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7893         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7894         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7895         which closes all pipes in pipeSet set
7896         * src/SDCCset.c: free deleted item in function deleteSetItem()
7897         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7898         moved from z80 to src subproject
7899         * .version: increased version number to 2.3.4
7900
7901 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7902
7903         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7904         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7905         * support/regression/ports/xa51/spec.mk: fix typo
7906
7907 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7908
7909         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7910
7911 2003-03-09  Borut Razem <borut.razem AT siol.net>
7912
7913         * src/SDCCmain.c: pipe preprocessor's output
7914         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7915         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7916         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7917         which closes all pipes in pipeSet set
7918         * src/SDCCset.c: free deleted item in function deleteSetItem()
7919         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7920         moved from z80 to src subproject
7921
7922 2003-03-09  Borut Razem <borut.razem AT siol.net>
7923
7924         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7925         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7926         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7927         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7928         * src/SDCCglobl.h: unification of WIN32 native definitions
7929
7930 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7931
7932         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7933
7934 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7935
7936         * src/configure.in:   check for endianess (even while cross-compiling)
7937         * src/configure:      check for endianess (even while cross-compiling)
7938         * src/configure_in.h: check for endianess (even while cross-compiling)
7939         * src/avr/gen.c:        remove old endianess stuff
7940         * src/mcs51/gen.c:      remove old endianess stuff
7941         * src/ds390/gen.c:      remove old endianess stuff
7942         * src/pic/gen.c:        remove old endianess stuff
7943         * src/pic/genarith.c:   remove old endianess stuff
7944         * src/pic/glue.c:       fix endianess check
7945         * src/pic16/gen.c:      remove old endianess stuff
7946         * src/pic16/genarith.c: remove old endianess stuff
7947         * src/pic16/glue.c:     fix endianess check
7948         * src/xa51/gen.c:       remove old endianess stuff
7949         * src/z80/gen.c:        fix endianess check
7950         * src/SDCCglue.c:       fix endianess check
7951         * src/ds390/peeph.def: fix bug 700036
7952
7953 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7954
7955         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7956         * src/configure: find appropriate data-types on host for SDCC's int and long
7957         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7958         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7959         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7960
7961 2003-03-07    <johan AT balder>
7962
7963         Just a big NOOP:
7964                 some minor cleanups before the big shot
7965                 OP_DEFS and OP_USES now use Kevin's protection
7966                 new option --nolabelopt
7967
7968         * src/SDCCBBlock.c:
7969         * src/SDCCast.c,:
7970         * src/SDCCcflow.c:
7971         * src/SDCCcse.c:
7972         * src/SDCCicode.c:
7973         * src/SDCCicode.h:
7974         * src/SDCClabel.c:
7975         * src/SDCCloop.c:
7976         * src/SDCCmain.c:
7977         * src/ds390/ralloc.c:
7978         * src/mcs51/ralloc.c:
7979         * src/pic/ralloc.c:
7980         * src/xa51/ralloc.c:
7981         * src/z80/ralloc.c:
7982
7983 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7984
7985         * src/pic/pcode.c (get_op): fix 64 bit warnings
7986         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7987         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7988         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7989         * support/regression/tests/malloc.c: fix 64 bit warnings
7990
7991 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7992
7993         * src/mcs51/gen.c (genMinus): fixed bug 696436
7994
7995 2003-03-02  Borut Razem <borut.razem AT siol.net>
7996
7997         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7998
7999 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8000
8001         * configure.in: test for mkstemp
8002         * sdccconf_in.h: add HAVE_MKSTEMP
8003
8004 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8005
8006         * device/include/ctype.h: removed warning while using --stack-auto
8007         * device/include/malloc.h: removed warning while using --stack-auto
8008         * device/include/string.h: removed warning while using --stack-auto
8009
8010 2003-02-23  Borut Razem <borut.razem AT siol.net>
8011
8012         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8013         because NDEBUG is defined (see man assert)
8014         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8015
8016 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8017
8018         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8019         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8020
8021 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8022
8023         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8024         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8025
8026 2003-02-18    <johan AT balder>
8027
8028         * as/mcs51/asmain.c (asmbl): module can start with a digit
8029         * as/z80/asmain.c (asmbl): module can start with a digit
8030
8031 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8032
8033         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8034         * src/asm.c: fix pipe() for Mingw32
8035
8036 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8037
8038         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8039         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8040         make -V work again; --c1mode reads now from stdin
8041         * doc/sdccman.lyx: added --c1mode
8042         * support/Util/SDCCerr.c: new messages for c1 mode
8043         * support/Util/SDCCerr.h: new messages for c1 mode
8044         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8045
8046 2003-02-15    <johan AT balder>
8047
8048         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8049
8050 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8051
8052         * doc/sdccman.lyx: Environment variables, -o and other minor things
8053
8054 2003-02-14    <johan AT balder>
8055
8056         * src/xa51/main.c: before anyone really tries to use it :)
8057
8058         * Install doc's in share/sdcc/doc
8059         * removed some obsolete files
8060         * Do a proper make distclean and uninstall
8061         M Makefile.common.in
8062         R sdccbuild.sh
8063         M as/Makefile
8064         M device/include/Makefile.in
8065         M device/lib/Makefile.in
8066         M doc/sdccman.lyx
8067         M link/Makefile
8068         M sim/ucsim/doc/Makefile.in
8069         M src/clean.mk
8070         R src/avr/peeph.rul
8071         R src/xa51/peeph.rul
8072         M support/cpp2/Makefile.in
8073         M support/makebin/Makefile
8074
8075
8076 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8077
8078         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8079
8080 2003-02-10  Borut Razem <borut.razem AT siol.net>
8081
8082         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8083         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8084         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8085         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8086         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8087         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8088         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8089         src/z80/Makefile.bcc: Borland Makefile cleanup
8090         * as/z80/Makefile.bcc: Added Borland Makefile
8091         * support/cpp2/borland.h: Removed
8092
8093 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8094
8095         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8096         * src/SDCC.lex: new pragma NOIV
8097         * src/SDCCglobl.h: new pragma NOIV
8098         * src/SDCCmem.c: new pragma NOIV
8099
8100 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8101
8102         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8103
8104 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8105
8106         * src/SDCCmain.c: signal handling is switched off by --debug
8107         * doc/Makefile: small fix for install; use clean.mk again
8108         * doc/clean.mk: clean *.pdf and *.html too
8109
8110 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8111
8112         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8113         * device/lib/printfl.c: fix a ds390 bug by making it portable
8114         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8115         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8116         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8117         * debugger/mcs51/cmd.c: converted multi-line string literals
8118         * sim/ucsim/globals.cc: converted multi-line string literals
8119         * src/SDCCmain.c: introduced signal handler to remove temp files
8120         * doc/Makefile: small tweaks, implement clean
8121         * doc: removed generated files
8122
8123 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8124
8125         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8126         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8127         Address Record is not correctly generated for DS390."
8128
8129 2003-02-02  Borut Razem <borut.razem AT siol.net>
8130
8131         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8132         * as/mcs51/asm.h: fixed compilation with Borland C
8133         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8134         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8135         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8136         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8137         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8138         src/z80/Makefile.bcc: delete $(LIB) only if exist
8139         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8140
8141 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8142
8143         * device/include/malloc.h: introduced NULL
8144         * device/include/string.h: introduced NULL
8145         * device/include/stdlib.h: introduced NULL
8146         * device/lib/_memcpy.c: removed NULL
8147         * device/lib/_strcat.c: removed NULL
8148         * device/lib/_strchr.c: removed NULL
8149         * device/lib/_strcmp.c: removed NULL
8150         * device/lib/_strcpy.c: removed NULL
8151         * device/lib/_strcspn.c: removed NULL
8152         * device/lib/_strlen.c: removed NULL
8153         * device/lib/_strncat.c: removed NULL
8154         * device/lib/_strncmp.c: removed NULL
8155         * device/lib/_strncpy.c: removed NULL
8156         * device/lib/_strpbrk.c: removed NULL
8157         * device/lib/_strrchr.c: removed NULL
8158         * device/lib/_strspn.c: removed NULL
8159         * device/lib/_strstr.c: removed NULL
8160         * device/lib/_strtok.c: removed NULL
8161         * device/lib/malloc.c: removed NULL, include own header
8162
8163 2003-02-02    <johan AT balder>
8164
8165         * 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
8166         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8167         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8168         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8169         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8170         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8171
8172 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8173
8174         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8175         area 'DATA'"
8176
8177 2003-02-01    <johan AT balder>
8178
8179         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8180
8181 2003-01-31    <johan AT CP255758-A>
8182
8183         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8184
8185 2003-01-30    <johan AT balder>
8186
8187         * src/SDCCBBlock.c: automatic bug detection
8188         * src/SDCCicode.c: automatic bug detection
8189
8190 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8191
8192         * src/SDCCglobl.h:   now --xram-size 0 works
8193         * src/SDCCmain.c:    now --xram-size 0 works
8194
8195 2003-01-29    <johan AT balder>
8196
8197         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8198
8199 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8200
8201         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8202         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8203         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8204         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8205         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8206         * src/SDCCmain.c:    Added options --xram-size and --code-size
8207
8208 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8209
8210         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8211         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8212
8213 2003-01-27    <johan AT balder>
8214
8215         * src/SDCC.y: fixed bug #613764
8216
8217 2003-01-26    <johan AT balder>
8218
8219         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8220         * src/SDCCsymt.h: fixed bug #673374
8221         * src/SDCCglue.c: fixed bug #661910
8222         * src/SDCCast.c: fixed bug #458099 and 673374
8223
8224 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8225
8226         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8227         * as/mcs51/strcmpi.h: added
8228         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8229         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8230         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8231         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8232         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8233         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8234         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8235         * as/mcs51/Makefile.aslink: new module strcmpi
8236         * as/mcs51/Makefile.asx8051: new module strcmpi
8237         * as/mcs51/Makefil.bcc: new module strcmpi
8238         * as/mcs51/Makefile.in: new module strcmpi
8239         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8240
8241 2003-01-26    <johan AT balder>
8242
8243         * src/SDCCglue.c: reverted back to 1.124
8244         * src/SDCCast.c: reverted back to 1.156
8245         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8246
8247 2003-01-25    <johan AT balder>
8248
8249         * src/SDCCglue.c: A better fix for bug #661910
8250         * src/SDCCast.c: A better fix for bug #661910
8251         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8252
8253 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8254
8255         * src/Makefile.in: remove spawn.o
8256         * src/SDCCmain.c: remove spawn.h
8257         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8258         * src/spawn.c: removed
8259         * src/spawn.h: removed
8260         * support/regression/ports/ds390/spec.mk: link with -r
8261
8262 2003-01-24    <johan AT CP255758-A>
8263
8264         * src/ds390/gen.c (aopOp): fixed bug #667458
8265         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8266         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8267         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8268
8269 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8270
8271         * src/mcs51/peeph.def: better assembler identation by Frieder
8272         * src/mcs51/gen.c: better assembler identation by Frieder
8273
8274 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8275
8276         * as/z80/string.h: removed for gcc 3.2
8277         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8278         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8279
8280 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8281
8282         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8283         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8284         * support/regression/Makefile: separate temp files for ports
8285         * support/regression/generate-cases.py: separate temp files for ports
8286         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8287         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8288
8289 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8290
8291         * moved tinitalk to device/examples/ds390
8292
8293 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8294
8295         * as/mcs51/lkmem.c: rflag is for DS390
8296         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8297         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8298                          (linkEdit): move mem- and map-files the same way as ihx-files
8299         * src/z80/main.c (_setDefaultOptions): removed --generic
8300         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8301         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8302         * src/pic/glue.c (picglue): --c1mode works again
8303         * src/pic16/glue.c (pic16glue): --c1mode works again
8304         * src/asm.c (printCLine): fix #660034
8305
8306 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8307
8308         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8309         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8310         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8311         * as/mcs51/lkmem (summary): better fix for sp problem
8312         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8313         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8314         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8315                                               remove --stack-after-data
8316
8317 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8318
8319         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8320         * src/SDCCutil.c (join): ugly bug: missing '\0'
8321         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8322
8323 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8324
8325         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8326         * src/port.h: typo
8327         * src/pic/main.c (_asmCmd): gpasm supports -o
8328         * src/z80/main.c: more general macros
8329         * device/lib/Makefile.in: remove intermediate files
8330
8331 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8332
8333         * .version: Bumped version number to 2.3.3
8334         * src/SDCCBBlock.c: new option -o
8335         * src/SDCCglobl.h: new option -o
8336         * src/SDCCglue.c: new option -o
8337         * src/SDCCmain.c: new option -o
8338         * src/asm.c: new option -o
8339         * src/ds390/main.c: new option -o
8340         * src/pic/glue.c: new option -o
8341         * src/pic/pcode.c: new option -o
8342         * src/pic/ralloc.c: new option -o
8343         * src/pic16/glue.c: new option -o
8344         * src/pic16/pcode.c: new option -o
8345         * src/pic16/ralloc.c: new option -o
8346         * src/z80/main.c: new option -o
8347         * device/lib/Makefile.in: use -o
8348         * support/regression/ports/ds390/spec.mk: use -o
8349         * support/regression/ports/gbz80/spec.mk: use -o
8350         * support/regression/ports/mcs51/spec.mk: use -o
8351         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8352         * support/regression/ports/z80/spec.mk: use -o
8353         * support/regression/ports/ucz80/spec.mk: use -o
8354         * support/regression/ports/xa51/spec.mk: use -o
8355         * support/regression/fwk/lib/timeout.c: fix usage string
8356
8357 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8358         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8359
8360 2003-01-07    <johan AT balder>
8361
8362         * src/SDCCast.c (decorateType): fixed bug #600035
8363
8364 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8365         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8366         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8367         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8368         * src/pic/pcode.c: outcommented unused variable to remove warnings
8369         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8370
8371 2003-01-06    <karl AT turbobit.com>
8372         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8373    regression tests.
8374
8375 2003-01-06    <johan AT balder>
8376
8377         * src/SDCCicode.c: fixed array add
8378
8379 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8380         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8381         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8382
8383 2003-01-04    <johan AT balder>
8384
8385         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8386
8387 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8388         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8389
8390 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8391         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8392         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8393
8394 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8395         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8396
8397 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8398         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8399
8400 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8401         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8402
8403 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8404
8405     * in \sdcc\as\mcs51\ changed these files in order to create an
8406     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8407     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8408     following files to include the previous two files: aslink.dsp,
8409     Makefile.aslink, Makefile.bcc, and Makefile.in.
8410
8411     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8412     .adb instead of .cdb
8413
8414 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8415
8416         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8417         value from option --iram-size.
8418
8419 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8420
8421         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8422         dram[] array.
8423
8424 2002-09-18    <wiml AT hhhh.org>
8425
8426         * SDCClrange.h: exposed setFromRange() and setToRange()
8427         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8428           packRegsForAccUse() (bug 542397)
8429         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8430           multiple times and emitting the fetch operations more than once
8431           added aopGetUsesAcc() function to allow binary operators to
8432           fetch their operands in the correct order; made genMinus() emit
8433           compact code for X = LITERAL - Y
8434
8435 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8436         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8437         sprintf() in line 1267.
8438
8439 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8440         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8441         like ports.
8442
8443 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8444         Changes to aslink (All the changes are marked with 'JCF'):
8445
8446         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8447         summary().
8448
8449         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8450         area BSEG.  Also moves, if possible, the DATA area down into the internal
8451         ram so more space is available.
8452
8453         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8454         sflag.
8455
8456         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8457         not bytes.  Function summary() which creates a memory usage summary
8458         file with extension .mem.  Reports of overlaping stack and small stack
8459         size.  If the space for the stack is less than 16 bytes aslink trows a
8460         warning.
8461
8462         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8463         the 8051.  Option 'y' for memory summary output file.
8464
8465         Changes to sdcc (All the changes are marked with 'JCF'):
8466
8467         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8468
8469         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8470         overlaying area for it (uses RegBankUsed[4]).
8471
8472         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8473         bank zero as used by default.  By default aslink locates the stack
8474         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8475         the creation of the .mem file.  Delegates the allocation of data area
8476         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8477         the begining of the stack area to aslink.
8478
8479         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8480         glue() in SDCCglue.c creates an area for it.
8481
8482 2002-09-03  Borut Razem <borut.razem AT siol.net>
8483         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8484         sdcc/src/pic/glue.c:
8485         introduced atexit() handler for teporay files removal in case of
8486         errors, assertions, ...
8487
8488 2002-08-29  Borut Razem <borut.razem AT siol.net>
8489         * sdcc/support/cpp2/auto-host_vc_in.h:
8490         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8491         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8492         Maybe there is a similar problem with BORLANDC? It should be checked!
8493
8494         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8495         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8496         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8497         was not executed, and the compiler (cl) launched a warning:
8498         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8499
8500 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8501         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8502
8503 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8504         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8505
8506         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8507           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8508           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8509           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8510           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8511           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8512           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8513         - added Release configuration in VS projects
8514         - review of compiler an linker options
8515         - VC .exe files are generated in bin_vc directory, not to interfere
8516           with binaries generated from other projects (cygwin, mingw, bcc ...)
8517
8518         * sdcc/src/yacc.dsp: added
8519
8520         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8521         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8522         and insert the version number definitions from .version
8523
8524         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8525
8526         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8527         added - genarate auto-host.h using auto-host_vc_in.h as template
8528
8529         * sdcc/sdcc_vc.h,
8530         removed from CVS, generated automatically
8531
8532 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8533         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8534
8535 2002-08-11  Borut Razem <borut.razem AT siol.net>
8536         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8537
8538 2002-08-10  Borut Razem <borut.razem AT siol.net>
8539         * src/SDCCmain.c (main):
8540         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8541         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8542         The consequence was that some temporary files were not removed.
8543
8544         * src/SDCCglue.c:
8545         unification of code in functions tempfilename() and tempfile():
8546         function tempnam() is defined in Visual Studio 6.0 and .NET
8547
8548         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8549
8550         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8551           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8552         - removed compiler command line option /WX: Treats all warnings as errors
8553         - update a list of source files, included into the project
8554
8555         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8556           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8557         changed project type to Generic Project so that can be correcly converted to VS.NET project
8558
8559         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8560
8561         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8562
8563         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8564
8565         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8566         added return 0 statements after assert() to make compiler happy
8567
8568         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8569         added newline in the def file to keep MSC compiler satisfied
8570
8571         * sdcc/src/z80/gen.c:
8572         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8573           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8574         - solved MSC error in function aopDump()
8575
8576         * sdcc_vc.h: define PREFIX as "\\sdcc"
8577
8578 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8579         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8580
8581 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8582         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8583         - Rewrote the register banking algorithm.
8584         - Added pCode live-range analysis to registers (for now, only non-used and
8585         singly-used registers optimized away)
8586
8587         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8588
8589         * 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.
8590
8591 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8592         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8593
8594 2002-04-22  Michael Hope  <michaelh AT vroom>
8595
8596         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8597
8598         * configure.in (DD_COPT): Added include support required for gbdk.
8599
8600         * .version: Bumped version number just to increase it.
8601
8602         * src/SDCCmain.c: Added -nostdinc to the default options.
8603
8604 2002-04-15  Michael Hope  <michaelh AT vroom>
8605
8606         * device/lib/z80/printf.c (sprintf): Added.
8607
8608         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8609
8610         * src/z80/peeph.def: Added transpose redundent load rule.
8611
8612         * src/z80/main.c: Added force callee saves for jaune.
8613
8614         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8615
8616         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8617
8618 2002-03-28  Johan Knol  <johan AT balder>
8619
8620         * src/SDCCval.c: fixed bug #532436
8621
8622 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8623         * /src/port.h:
8624         Added "char *Processor" field to the port structure.
8625
8626         * /src/SDCCmain.c:
8627         Added -p option. Allows port dependent processor to be specified.
8628
8629         * all ports:
8630         Initialized the new field char *Processor field to NULL in all ports
8631
8632         * /src/pic/*:
8633         Compiler generated registers for interrupt context saving
8634         were not getting allocated.
8635
8636 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8637
8638         * /src/SDCCast.c:
8639         Fixed left shift. Will promote the left side of a left shift
8640         if a) left shifting more than size of operand or b) when assigned
8641         to something size > size of left side
8642
8643 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8644         * src/pic/*
8645         tons of changes. Register allocation has been
8646         rewritten. Added customization for the various PICs. Flow
8647         analysis is restructured. ...
8648
8649         * src/pic/device.h:
8650         Added
8651
8652         * src/pic/device.c:
8653         Added. device.c is a PIC port hack to accomodate variations
8654         in PIC devices.
8655
8656 2002-03-13  Michael Hope  <michaelh AT vroom>
8657
8658         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8659
8660 2002-03-04  johanknol  <johanknol AT manik>
8661
8662         * /src/SDCCval.c: fixed
8663
8664         const unsigned char arr[][2] = { { 0, 1 } };
8665         t18.c:1: error: Initializer element is not constant
8666
8667 2002-03-04  bela  <bela AT manik>
8668
8669         * /device/include/mcs51reg.h:
8670         ds89c420 register definition update
8671
8672 2002-03-03    <johan AT FRIJA>
8673
8674         * support/Util/SDCCerr.c: did something, but don't no why anymore
8675
8676         * support/regression/tests/bug-524691.c: made it a little less shy
8677
8678         * src/SDCCast.c (decorateType): fixed bug #524697
8679
8680         * src/SDCCast.c: made some lineno improvements
8681
8682         * src/SDCCval.c (getNelements): changed warning to error
8683
8684         * src/SDCCglue.c (printIvalArray): changed warning to error
8685
8686         * src/SDCCicode.c: fixed a warning for mingw
8687
8688         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8689
8690         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8691
8692 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8693
8694         * src/ds390/peeph.def:
8695         Added some more peephole rules
8696
8697         * src/ds390/gen.c: Various fixes & enhancements
8698
8699         * src/SDCClrange.c, src/SDCClrange.h:
8700         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8701
8702         * src/ds390/ralloc.c:
8703         various fixes & enhancements (ds390) specific
8704
8705         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8706         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8707         from rallocs.
8708
8709         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8710
8711 2002-03-02    <johan AT FRIJA>
8712
8713         * src/SDCCast.c (decorateType): fixed bug #524708
8714
8715         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8716
8717         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8718
8719 2002-03-01  Michael Hope  <michaelh AT vroom>
8720
8721         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8722
8723         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8724
8725 2002-03-01    <johan AT FRIJA>
8726
8727         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8728
8729         * src/SDCCast.c (decorateType): fixed bug #524209
8730
8731         * src/SDCCval.c (valNot): fixed bug #524195
8732
8733 2002-02-26    <johan AT balder>
8734
8735         * src/xa51/gen.c: fixed a warning
8736
8737         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8738
8739         * src/SDCCast.c (decorateType): fixed bug #522534
8740
8741 2002-02-23    <johan AT balder>
8742
8743         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8744
8745 2002-02-22    <johan AT balder>
8746
8747         * src/SDCCast.c: fixed bug #514865
8748
8749         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8750
8751 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8752
8753         * sdcc/src/SDCCloop.c:
8754         Previous fix was not good. basic blocks that have "break" or "return" are
8755         not really partof a loop , but live ranges used in these blocks should
8756         be live thru the entire loop, so set partOfLoop but don't add them to
8757         loop region
8758
8759 2002-02-21    <johan AT FRIJA>
8760
8761         * src/SDCCcse.c: fixed bug #514308
8762
8763 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8764
8765         * src/SDCCloop.c:
8766         Fixed BUG #519583. If a conditional block ended in a return/break
8767         statement inside a loop, it was not being considered part of the loop.
8768
8769         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8770
8771 2002-02-10  Karl Bongers <karl AT turbobit.com>
8772
8773         * debugger/*:
8774         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8775         with lots of comments and notes.
8776
8777         * device/examples/test2.c:
8778         Fix bug, "red" variable not being initialized(compiler complained).
8779
8780         * device/examples/Makefile, examples/test3.c:
8781         Add Makefile in device/examples folder, compiles test3.c
8782         for use as a multiple module SDCDB test case.
8783
8784         * sim/ucsim/cmd.src/cmdset.cc:
8785         Took out debug printfs in ucsim "next" command.
8786
8787         * sim/ucsim/xa.src:
8788         Karl and Johan start ucsim XA support.  Most dissassembly working,
8789         about 75% emulation done(plenty of work remaining).
8790
8791         * sim/ucsim/z80.src:
8792         Add Z80 support to ucsim, add test-ucz80 regression test,
8793         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8794         Notice z80 compiler fails on examples/test3.c/crc code.
8795
8796 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8797
8798         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8799         Added support for --parms-in-bank1
8800
8801         * src/ds390/peeph.def:
8802         added a few more peephole optimzations
8803
8804         * src/ds390/main.c:
8805         1) added __builtin_inp & __builtin_outp used to read in data of given length
8806            from a memory mapped port
8807         2) added __builtin_memcmp
8808         3) added __builtin_swapw swap bytes of a short
8809
8810         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8811         1) handle multiple send & receives from register bank1
8812         2) ralloc can now allocate DPTR1 to some liveRanges
8813
8814         * src/SDCCsymt.c, src/SDCCsymt.h:
8815         changes to handle multiple sends & receives
8816
8817         * src/SDCCptropt.h:
8818         added some pointer arithmetic optimization
8819
8820         * src/SDCCptropt.c:
8821         added some pointer arithmetic optimizations but not stable yet so not
8822         called from anywhere (will get this working shortly)
8823
8824         * src/SDCCopt.c: fixed for multiple sends & receives
8825
8826         * src/SDCCmain.c:
8827         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8828         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8829            set preprocessor defines (depending on options)
8830
8831         * src/SDCCicode.c, src/SDCCicode.h:
8832         changes made to handle multiple sends & receives
8833
8834         * src/SDCCglobl.h:
8835         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8836
8837         * src/SDCCcse.c, src/SDCCcse.h:
8838         added function findbackward def (to be used in upcoming optimization)
8839
8840         * src/SDCCcflow.c, src/SDCCcflow.h:
8841         added function returnAtEnd - to determine if a basic block terminates with
8842         a RETURN iCode
8843
8844         * src/SDCCast.c, src/SDCCast.h:
8845         added option parms-in-bank1
8846
8847         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8848         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8849         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8850         adjusted for --parms-in-bank1 option
8851
8852         * device/include/string.h:
8853         donot redefine "reentrant" keyword
8854
8855         * device/include/ds80c390.h: Added some more SFRs
8856
8857 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8858
8859         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8860
8861 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8862
8863         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8864
8865 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8866
8867         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8868
8869 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8870
8871         * Added --xram-movc option
8872
8873 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8874
8875         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8876
8877 2002-01-11  Johan Knol
8878
8879         * Added math lib of Jesus Calvino-Fraga
8880
8881 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8882
8883         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8884         * support/regression/Makefile: new target test-mcs51-stack-auto
8885         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8886
8887 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8888
8889         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8890
8891 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8892
8893         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8894
8895 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8896
8897         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8898
8899         * src/SDCCglue.h: add definition for printIvalChar()
8900
8901 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8902
8903         * src/SDCCast.c: fix #498138 by Johan
8904
8905         * src/SDCCglue.c: fix #498138 by Johan
8906
8907 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8908
8909         * support/regression/Makefile: fix clean
8910
8911         * support/regression/ports/ds390/support.c: fix transmission of last character
8912
8913 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8914
8915         * /sdcc/src/ds390/gen.c:
8916         a) improved computing address of stack variable
8917         b) took out some #if 0 code
8918         c) improved parmBytes adjustment
8919         d) improved genPlusIncr & genMinusIncr
8920         e) genCmp could generate bad code (when left assigned to DPTR)
8921         f) Fixed bug in hasInc
8922
8923         * /sdcc/src/ds390/ralloc.c:
8924         a) packRegsForSupport could mess up live information (Fixed)
8925         b) packRegsDPTRuse could be incorrect for left & right shift
8926
8927         * /sdcc/src/mcs51/ralloc.c:
8928         packRegsForSupport could mess up the live information (Fixed)
8929
8930         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8931
8932         * /sdcc/src/SDCCast.c:
8933         can reverse a loop even if function call is present as long
8934         as the loop control variable is local & is not passed as parameter
8935
8936 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8937
8938         * /sdcc/ChangeLog: *** empty log message ***
8939
8940         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8941         More builtin function additions for TININative
8942
8943         * /sdcc/src/ds390/ralloc.c:
8944         Had broken the regression testsuite
8945
8946         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8947
8948         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8949         Added funcattr hasStackParms will be set for reentrant functions when there
8950         are paramteres on the stack, this helps in minimizing frame pointer generation
8951         typeFromStr can handle function pointers now
8952
8953         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8954         *** empty log message ***
8955
8956 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8957
8958         * /src/ds390/gen.c, /src/ds390/main.c:
8959         More builtin function additions for TININative
8960
8961         * /src/ds390/ralloc.c:
8962         Had broken the regression testsuite
8963
8964         * /src/SDCCast.c: Fixed a bug in dumptree
8965
8966         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8967         Added funcattr hasStackParms will be set for reentrant functions when there
8968         are paramteres on the stack, this helps in minimizing frame pointer generation
8969         typeFromStr can handle function pointers now
8970
8971         * /doc/builtins.txt, /doc/TININative.txt:
8972         *** empty log message ***
8973
8974
8975 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8976
8977         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8978         ALPHA version for -mTININative
8979
8980         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8981         updated to reflect changes in the port structure
8982
8983         * /src/port.h:
8984         added function do_assemble (similar to do_link) if non-null this function
8985         will be called to do assembly (-mTININative) requires a multi command
8986         assembly
8987         added function genAssemblerEnd will be called to generate assembler Epilogue
8988
8989         * /src/SDCCsymt.c:
8990         added _JavaNative to debug info printing
8991
8992         * /src/SDCCmain.c: added option --tini-libid
8993         added port->do_assemble function (-mTININative) has a multi command assemble
8994
8995         * /src/SDCCglue.c: Disabled "constExpr" check
8996         added port->genAssemblerEnd function
8997
8998         * /src/SDCCglobl.h: Added option --tini-libid value
8999
9000         * /src/SDCCast.h:
9001         tookout optimizeCompare from the header (has no external references)
9002
9003         * /src/SDCCast.c: made one more function "static"
9004
9005 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9006
9007         * src/z80/mappings.i: Added z80asm support.
9008
9009         * src/z80/main.c: Added z80asm support on --asm=z80asm
9010
9011         * src/z80/gen.c: Fixed asm portability issues.
9012
9013         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9014
9015         * src/SDCCglue.c (printExterns): Added global/extern split.
9016
9017 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9018
9019         * support/regression/Makefile: added test for mcs51 model large
9020
9021         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9022
9023         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9024
9025 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9026
9027         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9028
9029 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9030
9031         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9032
9033         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9034
9035 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9036
9037         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9038
9039         * support/regression/tests/simplefloat.c: Port to mcs51.
9040
9041 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9042         * support/regression/tests/bug-485362.c: Added.
9043
9044         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9045
9046         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9047
9048         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9049
9050         * src/z80/gen.c (aopDump): Added a dump function.
9051
9052 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9053         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9054
9055         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9056
9057         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9058
9059         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9060
9061         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9062
9063         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9064
9065         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9066
9067         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9068
9069         * support/regression/ports/ds390/support.c: Use tinibios.
9070
9071         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9072
9073 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9074
9075         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9076         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9077
9078         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9079
9080         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9081
9082 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9083
9084         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9085
9086         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9087         (packRegsForIYUse): Created and optimised.
9088
9089 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9090
9091         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9092 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9093
9094         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9095
9096         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9097
9098         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9099
9100 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9101
9102         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9103
9104         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9105
9106 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9107
9108         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9109
9110         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9111
9112         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9113
9114 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9115
9116         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9117         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9118         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9119
9120         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9121
9122         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9123         (genNotFloat): Added.
9124         (genUminusFloat): Added.
9125
9126         * device/lib/z80/Makefile: Added floating pt stubs.
9127
9128         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9129
9130         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9131
9132         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9133
9134 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9135
9136         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9137
9138         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9139
9140         * sdcc/support/regression/Makefile: Add port ds390.
9141
9142         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9143
9144         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9145
9146         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9147
9148         * sdcc/support/regression/ports/ds390/support.c: Added.
9149
9150         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9151
9152         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9153
9154         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9155
9156 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9157
9158         * device/include/malloc.h: Added z80 and gbz80 support.
9159
9160         * device/lib/gbz80/heap.s: Added.
9161
9162         * device/lib/z80/heap.s: Added.
9163
9164         * device/lib/malloc.c: Added z80 and gbz80 support.
9165
9166         * support/regression/tests/malloc.c (testMalloc): Added.
9167
9168         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9169
9170         * support/regression/tests/bug-478094.c: Added.
9171
9172         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9173
9174 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9175
9176         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9177
9178         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9179
9180         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9181
9182         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9183
9184         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9185
9186 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9187
9188         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9189
9190 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9191
9192         * support/regression/tests/bug-477927.c: Added.
9193
9194         * src/z80/peeph.def: Added minor rules.
9195
9196         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9197
9198         * src/z80/peeph.def: Added jump optimisation modification.
9199
9200 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9201
9202         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9203
9204 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9205
9206         * support/regression/tests/funptrs.c: Added.
9207
9208 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9209
9210         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9211
9212 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9213
9214         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9215
9216         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9217
9218         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9219         (movLeft2ResultLong): Created.
9220
9221         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9222         (joinPushes): Added.  Joins two char pushes into a word push.
9223
9224 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9225
9226         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9227
9228         * support/makebin/Makefile (install): Added creation of dest dir.
9229
9230 2001-10-24 Karl Bongers <karl AT turbobit.com>
9231
9232         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9233
9234 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9235
9236         * src/z80/ralloc.c: Turned off faulty pack for one use.
9237
9238         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9239
9240         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9241
9242 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9243
9244         * support/regression/Makefile: Improved clean
9245
9246         * support/regression/ports/gbz80/spec.mk: Added clean
9247
9248         * support/regression/ports/host/spec.mk: Added clean
9249
9250         * support/regression/ports/z80/spec.mk: Added clean
9251
9252         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9253
9254         * support/regression/ports/mcs51/timeout.c: little improvements
9255
9256 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9257
9258         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9259
9260         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9261
9262         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9263
9264 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9265
9266         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9267
9268         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9269
9270 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9271         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9272
9273         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9274
9275         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9276
9277         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9278
9279         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9280
9281         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9282
9283         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9284
9285         * support/regression/tests/longor.c: Added.
9286
9287 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9288
9289         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9290
9291         * as/mcs51/aslink.h: define PATH_MAX
9292
9293         * as/mcs51/asm.h: define PATH_MAX
9294
9295         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9296
9297         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9298
9299         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9300
9301         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9302
9303         * src/SDCCglobl.h: define PATH_MAX
9304
9305         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9306
9307         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9308
9309 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9310
9311         * src/z80/gen.c (gencjneshort): Fixed
9312
9313         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9314
9315 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9316
9317         * support/regression/tests/bug-469671.c: Added.
9318
9319         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9320
9321 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9322
9323         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9324
9325         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9326
9327 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9328
9329         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9330
9331         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9332
9333         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9334
9335         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9336
9337         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9338
9339         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9340
9341         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9342
9343 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9344
9345         * 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.
9346
9347         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9348
9349         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9350
9351 2001-10-07    <johan AT FRIJA>
9352
9353         * device/lib/gets.c (gets): fixed the return value.
9354
9355 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9356         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9357
9358         * 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.
9359
9360         * 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.
9361
9362         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9363
9364         * src/pic/gen.c: Removed Safe_strdup.
9365
9366         * configure.in: Added option to enable libgc support.
9367
9368         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9369         (bitVectUnion): Optimised.
9370         (bitVectIntersect): Optimised.
9371         (bitVectBitsInCommon): Optimised.
9372         (bitVectCplAnd): Optimised.
9373
9374         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9375
9376 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9377
9378         * src/SDCCmain.c: distinguish between assembler debug and plain options
9379
9380         * src/avr/main.c:   remove standard assembler options
9381
9382         * src/ds390/main.c: remove standard assembler options
9383
9384         * src/mcs51/main.c: remove standard assembler options
9385
9386         * src/port.h: removed "PENDING" comment
9387
9388 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9389
9390         * src/device/lib/_mulint.c  : new, with assember functions
9391
9392         * src/device/lib/_mullong.c : new, with assember functions
9393
9394         * src/device/lib/_divuint.c : with assember functions
9395
9396         * src/device/lib/_divsint.c : with assember functions
9397
9398         * src/device/lib/_divulong.c: with assember functions
9399
9400         * src/device/lib/_divslong.c: with assember functions
9401
9402         * src/device/lib/_moduint.c : with assember functions
9403
9404         * src/device/lib/_modsint.c : with assember functions
9405
9406         * src/device/lib/_modulong.c: with assember functions
9407
9408         * src/device/lib/_modslong.c: with assember functions
9409
9410         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9411
9412         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9413
9414         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9415                                       replaced _mululong.c and _mulslong.c by _mullong.c
9416
9417 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9418
9419         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9420
9421 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9422
9423         * src/SDCCglue.c: test, if win32api is available for MINGW
9424
9425 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9426
9427         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9428         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9429         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9430         * support/regression/ports/host/spec.mk: removed GENERIC
9431         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9432         * support/regression/ports/z80/spec.mk: removed GENERIC
9433
9434 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9435
9436         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9437
9438         * support/regression/tests/bug-467035.c: Created.
9439
9440 2001-10-01    <johan AT FRIJA>
9441
9442         * src/SDCC.y: fixed bug #466586 part 1
9443
9444 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9445
9446         * SDCCicode.c: z80 has no generic pointers
9447         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9448
9449 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9450
9451         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9452
9453 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9454
9455         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9456
9457         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9458
9459 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9460
9461         * configure.in: Fixed up so that ucsim is only configured once.
9462
9463         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9464
9465         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9466         (getPathDifference): As above.
9467
9468         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9469
9470         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9471
9472 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9473         * .version: Updated to 2.3.1
9474
9475         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9476         Added copyright header.
9477
9478         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9479         (assemble): Added support for macro based assembler commands.
9480         (linkEdit): Added support for macro based linker commands.
9481         (preProcess): Changed the pre-processor to use macros.
9482         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9483         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9484
9485         * device/lib/z80/crt0.s: Added module name for debugging.
9486
9487 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9488
9489         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9490
9491         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9492
9493         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9494
9495         * src/Makefile.in: Added SDCCmacro and SDCCutil
9496
9497 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9498
9499         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9500
9501 2001-09-16    <johan AT FRIJA>
9502
9503         * 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.
9504
9505 2001-09-15    <johan AT FRIJA>
9506
9507         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9508         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9509
9510 2001-09-11    <johan AT FRIJA>
9511
9512         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9513
9514 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9515
9516         * support/regression/tests/bug-460444.c: Added test case.
9517
9518         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9519         (genCast): Added justification for all of the asserts.
9520
9521 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9522
9523         * support/regression/support.c: _xdata replaced by xdata
9524
9525         * support/regression/spec.mk: removed _generic
9526
9527 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9528
9529         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9530
9531         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9532         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9533
9534         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9535
9536         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9537
9538         * support/regression/tests/bug-460010.c: Added test case.
9539
9540         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9541
9542 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9545
9546         * support/regression/testfwk.c: removed workaround for bug #436344
9547
9548         * support/regression/tests/bp.c: use less memory with mcs51
9549
9550         * support/regression/tests/bug-441448.c: use less memory
9551
9552         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9553
9554         * support/regression/collate-results.py: typo
9555
9556 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9557
9558         * support/regression/tests/fetchoverlap.c: Added new test case.
9559
9560         * support/regression/tests/bp.c: Added new test case.
9561
9562         * support/regression/tests/bug-448984.c: Added new test case.
9563
9564         * support/regression/tests/pow2shifts.c: Added new test case.
9565
9566         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9567         (genlshTwo): Fixed right shift for count > 8.
9568
9569         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9570
9571 2001-09-08    <johan AT FRIJA>
9572
9573         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9574
9575 2001-09-07    <johan AT FRIJA>
9576
9577         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9578
9579         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9580
9581 2001-09-06    <johan AT FRIJA>
9582
9583         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9584         * bernhard noted me at this: "() equals to (void)" (1.38)
9585
9586 2001-09-05    <johan AT FRIJA>
9587
9588         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9589
9590 2001-09-04    <johan AT FRIJA>
9591
9592         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9593
9594
9595 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9596
9597         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9598
9599 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9600
9601         * link/z80/aslink.h: Fixed path for PATH_MAX
9602
9603 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9604
9605         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9606
9607         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9608
9609         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9610
9611         * 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.
9612
9613 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9614
9615         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9616         (genCmp): Fixed up genCmp for the GB with longs.
9617
9618         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9619
9620         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9621
9622         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9623
9624         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9625
9626 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9627
9628         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9629
9630 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9631
9632         * 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.
9633
9634         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9635
9636 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9637
9638         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9639
9640         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9641
9642 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9643
9644   * sim/ucsim/configure:    little improvement of Cygwin-detection
9645   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9646   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9647   * support/regression/tests/bug-221100.c: small changes for mcs51
9648   * support/regression/tests/bug-221168.c: small changes for mcs51
9649   * support/regression/tests/bug-227710.c: small changes for mcs51
9650   * support/regression/tests/staticinit.c: small changes for mcs51
9651   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9652   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9653   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9654
9655 $Revision$