* as/mcs51/asdata.c: changed ctype['['] to BINOP
[fw/sdcc] / ChangeLog
1 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * as/mcs51/asdata.c: changed ctype['['] to BINOP
4         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
5           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
6           (oprio): set priority for '['
7         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
8            and adb_24_bit
9         * as/mcs51/asm.h: added defines R_BIT and S_BIT
10         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
11         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
12         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
13           added overlayable BIT_BANK area
14         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
15           (summary2): explain 'T' in legenda
16         * as/mcs51/lkrloc.c: replaced old K&R style,
17           (relr): added R_BIT processing,
18           (errmsg): added "Bit-addressable relocation error",
19           (adb_bit): added for converting from byte- to bit-addressable space,
20           (adb_24_bit): added for converting from byte- to bit-addressable space
21         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
22            used in reentrant functions now even as return value
23         * device/lib/_gptrput.c (_gptrput): removed obsolete code
24         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
25           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
26         * src/SDCCglobl.h: added indicator BitBankUsed
27         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
28            the bit registers b0-b7
29         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
30           (geniCodeCast): fixed bug 1263853,
31           (geniCodeLogicAndOr): put result in bool or char,
32           (geniCodeReceive): added parameter func for accessing the return type,
33           (geniCodeFunctionBody): pass func to geniCodeReceive
34         * src/SDCCmain.c: added indicator BitBankUsed
35         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
36         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
37           (checkSClass): don't put automatic bool/bit on stack,
38           (checkFunction): removed check on function cannot return bit
39         * src/SDCCsymt.h: added newBoolLink prototype
40         * src/mcs51/gen.c (rb1regs): added bit registers,
41           (movc): created for assigning to carry,
42           (pushReg, popReg): created for pushing registers,
43           (sameRegs): check both AOP_REG and AOP_CRY types,
44           (aopOp): handle bit registers,
45           (aopPut): optimization no self-assign,
46           (saveRegisters): push reg->base (bits) only once for bit registers,
47            and use pushReg,
48           (unsaveRegisters): pop reg->base only once and use popReg,
49           (assignResultValue): added parameter func and return in carry for bits,
50           (genIpush): optimization no reload in A if not changed,
51           (genSend): bit parameters in reentrant functions are passed in bit
52            registers by first assigning to bits in B, then save registers and
53            copy B to bits,
54           (genCall): handle returning in Carry properly, save it in F0 if needed,
55           (genPcall): updated assignResultValue call, this is not safe yet for bit
56            returning function !!!
57           (genFunction): don't generate equ's for bit registers and use pushReg,
58           (genEndFunction): take care of bit returning functions and use popReg,
59           (genRet): return bit in Carry,
60           (genIfx): optimize bit registers and other directly addressable bits,
61           (genReceive): updated assignResultValue call
62         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
63           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
64            registers when using stack-auto
65         * src/mcs51/ralloc.c (_G): added allBitregs,
66           (regs8051): added the bit registers,
67           (createStackSpil): use macro IS_BIT,
68           (getRegBit): added to allocate a bit register, else spill,
69           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
70           (updateRegUsage): factored out to ease stepping while debugging,
71           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
72            also allocate bit registers,
73           (fillGaps): handle bit registers,
74           (findAllBitregs): added to create bit vector with all bit registers,
75           (mcs51_allBitregs): returns this bit vector,
76           (mcs51_assignRegisters): when using stack-auto use bit registers for
77            passing parameters and creating local variables
78         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
79
80 2005-08-22 Borut Razem <borut.razem AT siol.net>
81
82         * device/lib/Makefile.in: replaced find option -or with -o
83           to make it run on solaris
84
85 2005-08-22 Raphael Neider <rneider AT web.de>
86
87         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
88           fixes #1265442 (crash on Solaris)
89
90 2005-08-20 Borut Razem <borut.razem AT siol.net>
91
92         * configure, configure.in: added tests for libsocket and libnsl libraries,
93           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
94           from support/regression/Makefile.in
95         * support/regression/Makefile.in: added
96         * device/lib/pic16/Makefile.common.in: force make to use bash shell
97         * sim/ucsim/libtool: regenerated on sparc-solaris
98         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
99           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
100           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
101           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
102           sparc-solaris, which doesn't use GNU ld linker
103         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
104         * as/Makefile: find on sparc-solaris does not support -maxdepth option
105
106 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
107
108         * src/mcs51/peeph.def: updated comments
109
110 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
111
112         * device/lib/_gptrget.c,
113         * device/lib/_gptrput.c: slightly shorter
114         * doc/sdccman.lyx: incremented version
115         * src/mcs51/peeph.def: moved peephole comments to the line of first
116           change to better keep line correlation, reanimated 186.e
117         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
118
119 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
120
121         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
122           David Saxton with quotes around file name.
123
124 2005-08-15 Borut Razem <borut.razem AT siol.net>
125
126         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
127           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
128           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
129           make tests run on x86_64 platform
130
131 2005-08-13 Raphael Neider <rneider AT web.de>
132
133         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
134           as it might be executed DURING a build (parallel make is wonderful)
135
136 2005-08-13 Raphael Neider <rneider AT web.de>
137
138         * device/lib/Makefile.in (port-specific-objects-pic16):
139           revert to cp $(PORT)/bin/*.* $(PORTDIR)
140         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
141           dependency
142         * device/lib/pic16/Makefile.rules: build subdirs before creating
143           the library, removed builddir rule, create $(builddir) early in
144           recurse rule, use empty recurse rule for leaf directories
145         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
146           mkdir errors (race condition), removed duplicate suffix "hex"
147           from clean rules
148         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
149         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
150           prevents mkdir -p from aborting on Alpha
151
152 2005-08-12 Raphael Neider <rneider AT web.de>
153
154         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
155           db-statements in order to allow for arrays of pointers in code
156           sections to be placed without interspersed 0-padding, fixes
157           bug #1256215
158         * (emitStatistics): fixed division by zero for pic18f1220
159         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
160           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
161         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
162         * (pic16_pCodeConstString): keep track of already emitted string
163           literals to prevent "duplicate definitions of symbol _str_NR"
164         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
165           debug message
166         * device/lib/Makefile.in: ignore failing PIC16 library builds
167         * device/lib/pic16/Makefile: do not build if gputils are missing
168         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
169
170 2005-08-10 Raphael Neider <rneider AT web.de>
171
172         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
173           my last commit)
174
175 2005-08-10 Raphael Neider <rneider AT web.de>
176
177         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
178           Rokas' patch to add the new fixed point type "__fixed16x16"
179         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
180           functions for __fixed16x16 arithmetics
181         * device/lib/pic16: reimplemented the build system to support
182           a separate build directory, better handling of libio (create
183           the library in a separate subdir for each architecture) and
184           easier configuration (centralized in Makefile.common)
185
186 2005-08-07 Raphael Neider <rneider AT web.de>
187
188         * src/pic16/gen.c (genrshTwo): fixed sign extension
189         * src/pic16/device.c: added pic18f2320, 4220 and 4320
190         * device/include/pic16/pic18f2220.h: changed some bit definitions,
191           added T0CONbits
192         * device/include/pic16/pic18f4220.h: NEW, header for
193           pic18f4220 and pic18f4320
194         * device/include/pic16/pic18fregs.h: added new devices,
195           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
196         * device/include/pic16/signal.h: resolved name clashes
197           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
198           to also allow testing for interrupt enable bits, added
199           comments on how to use the macros
200         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
201         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
202           register definitions for the devices
203         * device/lib/pic16/pics.all: added new devices
204         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
205           allocated memory
206         * device/lib/pic16/libc/stdlib/memfree: do not count
207           the block header as free memory
208         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
209           simplified and added missing end-of-blocklist-marker
210           (reported by Peter Onion, fixes #1252814)
211         * (_mergeHeapBlock): fixed loop condition
212         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
213           len==0, restructured code
214         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
215           up a bit, reduced bitfield accesses, prevent endless loops
216           in case of heap corruption
217         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
218           "unreferenced arguments/must return a value" warnings
219         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
220           replaced BAUDREG with SPBRG
221         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
222           device/lib/pic16/debug/gstack/gstack.c: replaced
223           _naked, _asm, _endasm with __naked, __asm, __endasm
224
225 2005-08-05 Raphael Neider <rneider AT web.de>
226
227         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
228           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
229
230 2005-08-05 Borut Razem <borut.razem AT siol.net>
231
232         * device/lib/Makefile.in: added missing ';'
233         * configure: removed ^M characters
234
235 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
236
237         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
238           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
239           License
240
241 2005-08-04 Borut Razem <borut.razem AT siol.net>
242
243         * configure.in: pic16 libraries build 2nd try - enable running
244           configure in device/lib/pic16
245         * configure: regenerated from configure.in
246         * device/lib/Makefile.in: create $(PORT)/bin directory
247
248 2005-08-03 Raphael Neider <rneider AT web.de>
249
250         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
251           to get/set values via pointers
252         * (genUnpackBits,genPackBits): changed detection of
253           ptr->bitfield vs. sym.bitfield, fixed access via generic
254           pointers, removed dead (wrong) code for multibyte bitfields
255         * (genNearPointerGet, genGenPointerGet): removed useless code,
256           fixed bitfield detection, fixes #1250594
257         * (genNearPointerSet): removed useless code
258         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
259           and introduced macro pic16_emitpcode that conditionally emits
260           the origin of the following pCode (useful for debugging SDCC)
261         * src/pic16/pcode.c: changed (and disabled) some debug outputs
262         * (createDefmap): fixed handling of LFSR for --optimize-df
263
264 2005-08-02 Borut Razem <borut.razem AT siol.net>
265
266         * device/lib/Makefile.in: pic16 libraries build enabled since
267           gputils-0.13.2 are now localy installed at sourceforge's compile farm
268
269 2005-08-02 Raphael Neider <rneider AT web.de>
270
271         * src/pic16/gen.c (genPackBits): removed deprecated warning
272         * (genGenPointerSet): fixed bitfield detection
273
274 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
275
276         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
277
278 2005-07-31 Raphael Neider <rneider AT web.de>
279
280         * device/lib/pic16/libdev/pic18f458.c,
281           device/include/pic16/pic18f458.h: added missing T0CONbits
282
283 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
284
285         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
286
287 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
288
289         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
290
291 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
292
293         * device/include/mcs51/at89c51ed2.h: added.
294
295 2005-07-23 Raphael Neider <rneider AT web.de>
296
297         * src/pic/gen.h: added emitpcode macro for debugging
298         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
299           and replace by macro adding debug information on demand
300         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
301         * (gencjne): tried to fix; replaced with correct (slower) code
302         * (gen{Unp,P}ackBits): fixed single bit access
303         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
304         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
305           previous instruction
306         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
307           register has to be handled with care (forbidding movement
308           of assignments/uses, removing assignments completely, ...)
309         * (pCodeOptime2pCodes): make use of regIsSpecial
310         * added lots of debugging output (commented out)
311         * src/pic/rallloc.c (deassignLRs): prevent operand registers
312           from being reused as result UNLESS it is known to work
313
314 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
315
316         * support/Util/dbuf.h: include <stddef.h> for size_t
317         * .version: changed to version 2.5.2
318
319 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
320
321         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
322
323 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
324
325         * src/hc08/gen.c (genMinus): fixed bug #1241835,
326           (genModOneByte): removed needless psha/pula
327
328 2005-07-22 Raphael Neider <rneider AT web.de>
329
330         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
331           have PIC14 handled like PIC16, fixes broken pic14 linker calls
332         * src/pic/gen.c (resolveIfx): do not "invent" labels
333         * (genSkipc): changed to positive logic
334         * (genSkipCond): removed as no longer needed
335         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
336           backport from PIC16
337         * (genLeftShift): check operands are in different registers
338         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
339           INCF does not update CARRY...
340         * src/pic/main.c: fixed _linkCmd
341         * src/pic/pcode.c (unlinkpCode): added inactive code
342         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
343           alive (do not assign result and operand overlapping registers)
344
345 2005-07-22 Raphael Neider <rneider AT web.de>
346
347         * src/pic/device.c (dump_sfr): replaced register declaration with
348           call to emitSymbolToFile() to avoid duplicate symbols
349         * (assignRelocatableRegisters): do not declare external symbols
350         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
351           right (take size of type, not etype)
352         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
353         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
354         * (packRegsForAccUse): disabled assignment of WREG as
355           the result reg to prevent occurence of just fixed #1235003,
356           fixes #1242954
357         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
358           symbols (avoids duplicate symbols in .asm file)
359         * (pic14emitRegularMap): use emitSymbolToFile()
360         * src/pic/gen.c (aopOp): fixed spillLocation handling
361         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
362         * (genDataPointerSet): removed unneccessary variables/output
363
364 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
365
366         * as/mcs51/lkarea.c: enlarged codemap for banked memory
367         * device/lib/mcs51/crtbank.asm: added # to 0x0F
368
369 2005-07-21 Raphael Neider <rneider AT web.de>
370
371         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
372           architecture cannot handle them efficiently, fixes bug #1235003
373         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
374           check for empty sets before using them (fixes bug #1232190)
375
376 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
377
378         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
379           (lnksect2): generate warnings for memory overlap
380         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
381           constseg to set the name of these segments so you can instruct the linker
382           to place them in banks
383         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
384         * src/SDCCglobl.h: added MODEL_HUGE to enum,
385           added code_seg and const_seg to options
386         * src/SDCCglue.c (emitMaps): use options.const_seg,
387           (createInterruptVect): put interrupt vectors in segment HOME,
388           (glue): put HOME before static segment and put the main glue in HOME,
389           (glue): use options.code_seg
390         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
391         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
392           these segments so you can instruct the linker to place them in banks
393           (linkEdit): use code_loc for HOME segment which should be the first
394           segment in code memory now
395         * src/SDCCmem.c: fixed more stuff like bug 1238386
396         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
397           (changePointer): don't change function pointers to code pointers for
398           banked functions,
399           (compareType): added exceptional check for banked function pointers
400         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
401         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
402           after static in code memory
403         * src/mcs51/gen.c: added aopLiteralLong prototype,
404           (aopForSym): use getSize for functions,
405           (genCall): generate banked calls over one trampoline __sdcc_banked_call
406           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
407           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
408           the segment,
409           (genPcall): use call for literal function pointers and generate banked
410           calls over the one trampoline so there's only one place for the user to
411           modify according to his/hers hardware,
412           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
413           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
414         * src/mcs51/main.c: added keyword banked,
415           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
416         * support/Util/SDCCerr.c,
417         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
418           needed for passing the bank and address to the trampoline
419         * device/lib/mcs51/crtbank.asm: added for bankswitching
420         * device/lib/mcs51/Makefile: added crtbank
421
422 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
423
424         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
425           for fields at offset 0 of a struct or union as reported
426           on 2005-07-07 in the developer mailing list.
427
428 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
429
430         * src/SDCCmem.c: fixed bug 1238386
431
432 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
433
434         * src/mcs51/peeph.def: added labelrefcounting for peepholes
435           (patch #1144962), added peephole 300, enabled 259.x
436         * doc/sdccman.lyx: removed screenshot and provided link instead
437
438 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
439
440         * doc/sdccman.lyx: added section about debugging with ddd
441         * doc/figures/ddd_example.eps: screenshot of debugging session
442
443 2005-07-04 Raphael Neider <rneider AT web.de>
444
445         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
446           like CODE pointers, fixes #1115683
447         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
448           call, fixes bugs #1232211, #1228110,
449           fixed wrong casts to pCodeFlow from pCodeInstructions
450
451 2005-07-04 Raphael Neider <rneider AT web.de>
452
453         * src/pic/gen.c (popGet): changed assert to allow for
454           bit operands
455         * (popGetAddr): changed signature to provide
456           an additional index, patched all call sites
457         * (genCmpEq): handle literal-like operands correctly
458         * (genAddrOf): added sanity checks on __code/__data pointers
459         * (genAssign): added handling of symbols from __code section
460         * (gencjne): do not generate code for comparisons whose result
461           is neither stored nor used, fixes bug #1171114
462         * (AccLsh, AccRsh): operate on operand instead of WREG
463         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
464           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
465           by known count
466         * rewrote complete shift-by-literal logic, commented unused
467           functions out
468         * (genConstPointerGet): get multiple bytes (if result size > 1),
469           fixed handling of non-immediate addresses
470         * (genPointerGet): handle CODE pointers like CONST pointers
471         * (genpic14Code): insert C-SRC lines as Cource-pCodes
472         * ({aop,op}_isLitLike): NEW, single place to decide whether an
473           operand is to be treated as a literal or not
474         * (mov2w,genPcall,genCmpEq),
475           src/pic/genarith.c: use aop_isLitLike() to decide between
476           literal/register contents
477         * (addSign): added missing offset
478         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
479           only emit comment in debug-mode,
480           use {aop,op}_isLitLike throughout the file
481         * src/pic/glue.c: fix initializers for pointers (work in progress)
482         * src/pic/pcode.c (get_op): honor index on _const symbols
483         * ({reset,dump}pCodeStatistics): NEW, estimate code size
484         * (dumppBlock): added pCode size estimation
485         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
486           check for IS_SYMOP before OP_SYMBOL'ing
487         * fixed indentation, compacted switch-statements
488         * (allocReg): find free register and allocate it instead of
489           allocating new registers all the time
490         * (deassignLRs): prevent POINTER_GET's from being assigned the same
491           registers as its operands (necessary only for multibyte GETs)
492
493 2005-07-01 Raphael Neider <rneider AT web.de>
494
495         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
496           debugging .asm-output macros FENTRY + FEXIT
497         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
498           way... I wonder...
499         * (emitpComment): NEW, printf to pCode
500         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
501           offset handling
502         * (popGetAddr): NEW, variant of popGet to access an immediates
503           high(er) bytes instead of the n'th byte of memory they reference,
504           replaced popGet with popGetAddr where neccessary
505         * (genDataPointerGet): reactivated and fixed implementation
506         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
507           accesses
508         * (genDataPointerSet): fixed multibyte assignments
509         * (genpic14Code): fixed --i-code-in-asm handling
510         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
511         * (genPlus): fixed index-out-of-bounds error
512         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
513         * src/pic/ralloc.c: added debugging output macro FENTRY2
514         * (spillThis): fixed indentation, enbraced for-body for clarity
515         * (rematStr): commented out as now unused
516         * (regTypeNum): commented out special spill case (overwrites
517           arbitrary values)
518         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
519
520 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
521
522         * doc/sdccman.lyx: documented sfr16/sfr32,
523           added example for using storage class with function pointers
524         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
525
526 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
527
528         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
529         * device/lib/_itoa.c,
530         * device/lib/_ltoa.c: optimized codesize
531         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
532           but don't know how to suppress the double warning.
533         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
534         * support/Util/SDCCerr.c,
535         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
536
537 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
538
539         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
540           fixed old K&R prototypes
541         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
542         * device/lib/_gptrget.c,
543         * device/lib/_gptrgetc.c,
544         * device/lib/_gptrput.c: changed versions for new memory indicator values,
545           also new versions for small generic pointers and banked generic pointers
546         * src/port.h: added const_name
547         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
548         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
549         * src/SDCCcse.c (findPrevIc): check all associative operators
550         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
551         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
552         * src/SDCCmem.c: updated comments,
553           set far-space to 0 for pdata, results in optimized code
554         * src/SDCCmem.h: added macro CONST_NAME
555         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
556           moving the info into the highest bits, see also gptrget/gptrput
557         * src/src.dsp: added sdcc.ico to project files
558         * src/avr/gen.c (genCast): fixed bug 0x%d
559         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
560         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
561           relation between ptr_type and DCL_TYPE,
562           (genCast): fixed bug 0x%d
563         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
564           (CODE)" for const_name
565         * src/hc08/gen.c (genCast): fixed bug 0x%d
566         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
567           (hc08_port): added "CONST (CODE)" for const_name
568         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
569           (aopForRemat, adjustArithmeticResult): disconnected direct relation
570           between ptr_type and DCL_TYPE,
571           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
572           operand* and took AOP() inside function so sfr-ness can be checked,
573           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
574           new prototype,
575           (genFunction, genEndFunction): optimized stack setup,
576           (genMinus): optimized for literals with ending zeroes (in bytes),
577           (genCast): fixed bug 0x%d
578         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
579           (mcs51_port): added "CONST (CODE)" for const_name
580         * src/mcs51/peeph.def: made rule 226 more generic
581         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
582         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
583         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
584         * src/z80/main.c (z80_port): added NULL for const_name,
585           (gbz80_port): added NULL for const_name
586         * support/regression/tests/bug663539.c,
587         * support/regression/tests/sfr16.c: new tests
588
589 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
590
591         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
592
593 2005-06-24 Raphael Neider <rneider AT web.de>
594
595         * device/lib/pic16/libdev/pic18f[68][567]20.c:
596           corrected typos...
597         * device/include/pic16/signal.h: added USBIF
598           and SIG_USB
599
600 2005-06-24 Raphael Neider <rneider AT web.de>
601
602         * device/lib/pic16/libdev/pic18f2455.c,
603           device/include/pic16/pic18f2455.h: NEW
604         * device/include/pic16/pic18fregs.h,
605           device/lib/pic16/pics.all,
606           src/pic16/device.c: added 18f2455
607         * device/lib/pic16/libdev/pic18f[68][567]20.c,
608           device/include/pic16/{pic18f[68][567].h,usart.h}:
609           replaced MULTIPLE_USARTS define with more relaible
610           compatibility sfrs (for USART access)
611
612 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
613
614         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
615           and the output asm file line is printed on two lines.
616
617 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
618
619         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
620           BGT, BLE, BHI, and BLS instructions
621         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
622           genCmpEq): removed
623         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
624           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
625           fixes bug #1216342
626         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
627
628 2005-06-15 Raphael Neider <rneider AT web.de>
629
630         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
631         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
632         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
633           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
634           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
635
636 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
637
638         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
639           Marcel Telka in bug #1215704
640
641 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
642
643         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
644           located in shared memory bank.
645
646 2005-05-31 Raphael Neider <rneider AT web.de>
647
648         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
649           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
650           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
651
652 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
653
654         * device/lib/_strncpy.c: fixed the fix
655
656 2005-05-26 Raphael Neider <rneider AT web.de>
657
658         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
659           initializers with \0, bug #1208187
660         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
661           intializers with \0, bug #1208187
662
663 2005-05-26 Raphael Neider <rneider AT web.de>
664
665         * src/pic16/glue.c (pic16_printIvalChar): fixed string
666           initializers with \0, bug #1208187
667         * src/pic16/main.c (_process_pragma): added sanity checks
668           for stack position and size, emit warnings when appropriate
669
670 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
671
672         * device/lib/_strncpy.c: fixed not filling with \0
673
674 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
675
676         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
677           createFunction),
678         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
679           compound_statement),
680         * src/SDCCsymt.h,
681         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
682
683 2005-05-24 Raphael Neider <rneider AT web.de>
684
685         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
686
687 2005-05-24 Raphael Neider <rneider AT web.de>
688
689         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
690           TRISE definitions, closes bug #1162453
691
692 2005-05-22 Raphael Neider <rneider AT web.de>
693
694         * src/pic16/main.c (_process_pragma): check for missing
695           arguments to pragmas code and udata
696         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
697           consistency fixes to match other headers (thanks to Jim Paris)
698         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
699
700 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
701
702         * src/SDCCicode.c (isOperandEqual): fixed missing ;
703
704 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
705
706         * support/regression/tests/bug1198642.c: new test
707         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
708         * src/SDCCcse.c (findPrevIc): added comment, please have a look
709         * support/scripts/resource.h,
710         * support/scripts/resource.rc,
711         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
712         * support/scripts/sdcc.ico: added 32x32 icon
713
714 2005-05-18 Raphael Neider <rneider AT web.de>
715
716         * device/lib/pic16/libdev/pic18f*.c,
717         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
718           keywords to "__sfr" and "__at (X)"
719         * device/include/pic16/pic18fregs.h: added pic18f4520
720         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
721           #1203088 (MPLAB compatibility)
722
723 2005-05-17 Raphael Neider <rneider AT web.de>
724
725         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
726         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
727         * device/lib/pic16/pics.all: added new devices
728         * src/pic16/device.c: added support for pic18f4520
729
730 2005-05-16 Raphael Neider <rneider AT web.de>
731         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
732         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
733         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
734           convenience function for bit access
735
736 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
737
738         * device/lib/printf_large.c: fixed bug 1193299
739         * support/regression/tests/bug1057979.c: added test %3.3s
740
741 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
742
743         * device/include/mcs51/8051.h,
744         * device/include/mcs51/8052.h: made parseable with lint
745         * device/include/mcs51/lint.h: added include file for (sp)lint
746         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
747         * doc/cdbfileformat.lyx,
748         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
749
750 2005-05-14 Raphael Neider <rneider AT web.de>
751
752         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
753         * device/lib/pic16/libc/stdlib/itoa.c (new)
754         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
755         * device/lib/pic16/libio/Makefile: exclude subdir according to
756           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
757         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
758         * src/pic16/gen.c (genFunction): prevent annoying warning
759         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
760           nameclashes on BeOS
761         * support/cpp2/cppmain.c (cpp_output_string): new
762         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
763           fixes bug 1116802
764
765 2005-05-13 Borut Razem <borut.razem AT siol.net>
766
767         * src/SDCCmain.c (linkEdit): fixed bug 1195202
768
769 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
770
771         * .version: changed to version 2.5.1; back to bleeding edge development
772
773 2005-05-11 Borut Razem <borut.razem AT siol.net>
774
775         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
776           generate PDF version 1.3 documents
777
778 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
779
780         * .version: changed to version 2.5.0
781
782 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
783
784         * doc/sdccman.lyx: updated weblinks, index and smaller updates
785
786 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
787
788         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
789         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
790         well as many smaller updates.
791         * .version: changed to version 2.5.0-pre1
792
793 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
794
795         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
796
797 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
798
799         * support/regression/tests/bug1185672.c: added
800         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
801           bug 1185672
802         * src/mcs51/gen.c (genCall): added comments, made it look safer
803         * src/mcs51/gen.c (genEndFunction): simplified
804
805 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
806
807         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
808
809 2005-04-14 Borut Razem <borut.razem AT siol.net>
810
811         * fixed bug 1045046 - SIGSEGV with really simple code?:
812           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
813           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
814
815 2005-04-14 Borut Razem <borut.razem AT siol.net>
816
817         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
818           src/pic16/device.h: temporarily disabled experimental #inline pragma
819           for 2.5.0 release
820
821 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
822
823         * device/include/z80/stdio.h,
824         * device/include/z80/string.h: removed these highly incomplete files so
825           SDCC can use the default ones in device/include/
826
827 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
828
829         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
830         gcc warning.
831         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
832         fix sdcpp warnings.
833
834 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
835
836         * device/include/malloc.h: removed redundant __reentrant prototypes
837         * device/lib/_mullong.c: added working xstack variant in asm (C version
838           doesn't pass regression tests)
839         * device/lib/bpx.c: used __data and made bpx char for mcs51
840         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
841           (createFunction): fixed bug with xstackPtr
842         * src/SDCCcse.c: corrected comments
843         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
844           (killDeadCode, eBBlockFromiCode): removed unused code
845         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
846           corrected comments
847         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
848           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
849           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
850           (genModOneByte): fixed warning in MSVC
851         * src/mcs51/main.c (): added comments
852         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
853
854 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
855
856         * src/SDCCmain.c (linkEdit): oops, changed one line too many
857
858 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
859
860         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
861
862 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
863
864         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
865         characters arrays of larger size than the declared one.
866
867 2005-04-10 Borut Razem <borut.razem AT siol.net>
868
869         * src/pic/gen.c (genInline),
870           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
871           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
872           (findNextInstruction), (findPrevInstruction),
873           (findInstructionUsingLabel),
874           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
875         * src/pic/pcode.c (findLabel): added missing '\n'
876         * src/src.dsp: added SDCCdwarf2.c to the project
877
878 2005-04-09 Borut Razem <borut.razem AT siol.net>
879
880         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
881
882 2005-04-08 Raphael Neider <rneider AT web.de>
883
884         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
885           into the chain after a given one) and mergeDefmapSymbols (combine
886           defmap entries for each symbol per pcode)
887         * (createDefmap): have defmap entries merged in the end
888         * (defmapReplaceSymRef): split defmap entries covering two accesses to
889           a symbol before replacing one access type's symbol, merge symbols in
890           the end (replacement symbol might already have an entry)
891         * (assignValnums): keep reference to written WREG intact
892
893 2005-04-08 Raphael Neider <rneider AT web.de>
894
895         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
896           Alpha)
897
898 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
899
900         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
901         bytes
902
903 2005-04-07 Raphael Neider <rneider AT web.de>
904
905         * device/include/pic16/usart.h: added compatibility defines for
906           devices with more than one USART
907         * device/include/pic16/pic18f[68][567]20.h: activated above defines
908
909 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
910
911         * device/lib/Makefile.in: updated for port specific include
912
913 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
914
915         * support/regression/ports/mcs51/spec.mk: added mcs51 include
916
917 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
918
919         * device/include/8051.h,
920         * device/include/8052.h,
921         * device/include/at89S8252.h,
922         * device/include/at89c55.h,
923         * device/include/at89x051.h,
924         * device/include/at89x51.h,
925         * device/include/at89x52.h,
926         * device/include/mcs51reg.h,
927         * device/include/reg51.h,
928         * device/include/reg764.h,
929         * device/include/regc515c.h,
930         * device/include/sab80515.h: (re)moved these 12 files
931         * device/include/mcs51/8051.h,
932         * device/include/mcs51/8052.h,
933         * device/include/mcs51/at89S8252.h,
934         * device/include/mcs51/at89c55.h,
935         * device/include/mcs51/at89x051.h,
936         * device/include/mcs51/at89x51.h,
937         * device/include/mcs51/at89x52.h,
938         * device/include/mcs51/mcs51reg.h,
939         * device/include/mcs51/reg51.h,
940         * device/include/mcs51/reg764.h,
941         * device/include/mcs51/regc515c.h,
942         * device/include/mcs51/sab80515.h: and added them here
943
944 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
945
946         * device/include/stdarg.h: changed SDCC specific keywords to double
947           underlined form.
948         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
949           mcs51 and ds390.
950         * device/include/hc08/mc68hc908gp32.h,
951         * device/include/hc08/mc68hc908jb8.h,
952         * device/include/hc08/mc68hc908jkjl.h,
953         * device/include/hc08/mc68hc908qy.h: fixed comments
954         * device/include/mcs51/README: updated
955         * device/include/mcs51/c8051f120.h: added PINRSF
956         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
957         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
958           amidst code. Also inline is not supported.
959
960 2005-04-06 Raphael Neider <rneider AT web.de>
961
962         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
963         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
964           callers stack/frame pointers
965
966 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
967
968         * device/include/pic16/usart.h: added, missing in previous commit,
969         * device/include/pic16/adc.h: fixed typo,
970         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
971         commit,
972         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
973         <p18fxxx.inc>
974         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
975         uninitialized because a bug appears with gplink
976         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
977         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
978         complains for unrecognised option
979
980 2005-04-05 Raphael Neider <rneider AT web.de>
981
982         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
983           structs as well (using memcpy)
984         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
985           on ISRs (GOTO has no label)
986         * src/pic16/device.h: added OF_OPTIMIZE_DF
987         * src/pic16/main.c: added compiler switch --optimize-df to enable the
988           new data flow analysis/optimization
989         * src/pic16/pcode.c: added (prototypes for and implementation of)
990           dataflow analysis functions, fixed pCodeInstructions' inCond and
991           outCond values, made RCALL a branch instruction
992         * (pic16_unlinkpCode): keep C line if possible
993         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
994           C line moved if possible
995         * (pic16_getRegFrompCodeOp): NEW, improved version of...
996         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
997           to use new pic16_getRegFrompCodeOp (works for more SFRs)
998         * (pic16_BuildFlow): fixed skip instructions with label (did not start
999           new flow)
1000         * (pic16_getJumptabpCode): NEW, needed in...
1001         * (LinkFlow): fixed handling of jumptables, calls and conditional
1002           branches
1003         * (pic16_InsertCommentAfter): NEW
1004         * (pic16_pCodeReplace): made verbose and flow preserving
1005         * (AnalyzeFlow): added call to data flow analysis
1006         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1007         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1008         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1009
1010 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1011
1012         * src/SDCCast.c (decorateType): fixed bug #1105626
1013
1014 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1015
1016         * device/include/asm/pic16/features.h,
1017         * pic18f*.h headers,
1018         * device/include/pic16/adc.h,
1019         * device/include/pic16/delay.h,
1020         * device/include/pic16/i2c.h,
1021         * device/include/pic16/malloc.h,
1022         * device/include/pic16/stdio.h,
1023         * device/include/pic16/stdlib.h,
1024         * device/include/pic16/string.h,
1025         * device/lib/pic16/libc/stdio/printf_tiny.c,
1026         * device/lib/pic16/libc/stdio/printf_small.c,
1027         * device/lib/pic16/libc/stdio/strmgpsim.c,
1028         * device/lib/pic16/libc/stdio/strmmssp.c,
1029         * device/lib/pic16/libc/stdio/strmusart.c,
1030         * device/lib/pic16/libc/stdio/vfprintf.c,
1031         * device/lib/pic16/libc/stdlib/ltoa.c,
1032         * device/lib/pic16/libc/stdlib/putchar.c,
1033         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1034         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1035         * device/lib/pic16/libc/stdlib/memchrram.c,
1036         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1037         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1038         * device/lib/pic16/libio/adc/adcbusy.c,
1039         * device/lib/pic16/libio/adc/adcread.c,
1040         * device/lib/pic16/libio/adc/adcsetch.c,
1041         * device/lib/pic16/libio/usart/ubaud.c,
1042         * device/lib/pic16/libio/usart/ubusy.c,
1043         * device/lib/pic16/libio/usart/udrdy.c,
1044         * device/lib/pic16/libio/usart/uopen.c,
1045         * device/lib/pic16/libio/usart/uputc.c,
1046         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1047         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1048         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1049         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1050         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1051         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1052         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1053         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1054         specific keywords to double underlined form,
1055         * device/lib/pic16/libc/Makefile.rules,
1056         * device/lib/pic16/libsdcc/Makefile.rules,
1057         * device/lib/pic16/libm/Makefile,
1058         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1059         to compile with C standard set in Makefile.common
1060         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1061         rand.c and crc.c in compilation process,
1062         * device/lib/pic16/libsdcc/int/divuint.c,
1063         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1064         `c' from signed to unsigned,
1065         * device/lib/pic16/startup/crt0.c,
1066         * device/lib/pic16/startup/crt0i.c,
1067         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1068         keywords to double underlined form, bug fixes in _do_cinit function
1069         which prevented the correct initialization of the .idata segment,
1070         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1071         core to enter a infinite loop
1072         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1073
1074 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1075
1076         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1077
1078 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1079
1080         * device/include/Makefile.in: add support for hc08 subdirectory
1081         * device/include/hc08/: new subdirectory
1082         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1083         Lucas Loizaga, thanks!
1084         * device/include/hc08/mc68hc908qy.h,
1085         * device/include/hc08/mc68hc908gp32.h,
1086         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1087         their own directory. Changed internal macro names to use the compiler
1088         reserved namespace. Changed SDCC specific keywords to double
1089         underlined form.
1090         * device/include/math.h,
1091         * device/include/malloc.h,
1092         * device/include/stdarg.h,
1093         * device/include/stdbool.h
1094         * device/include/string.h,
1095         * device/include/tinibios.h,
1096         * device/include/ds400rom.h,
1097         * device/include/8051.h,
1098         * device/include/8052.h,
1099         * device/include/80c51xa.h,
1100         * device/include/at89c55.h,
1101         * device/include/at89S8252.h,
1102         * device/include/at89x51.h,
1103         * device/include/at89x52.h,
1104         * device/include/ds80c390.h,
1105         * device/include/reg764.h,
1106         * device/include/regc515c.h,
1107         * device/include/sab80515.h,
1108         * device/include/mcs51/c8051f000.h,
1109         * device/include/mcs51/c8051f018.h,
1110         * device/include/mcs51/c8051f020.h,
1111         * device/include/mcs51/c8051f040.h,
1112         * device/include/mcs51/c8051f060.h,
1113         * device/include/mcs51/c8051f120.h,
1114         * device/include/mcs51/c8051f300.h,
1115         * device/include/mcs51/c8051f310.h,
1116         * device/include/mcs51/c8051f320.h,
1117         * device/include/mcs51/c8051f330.h,
1118         * device/include/mcs51/c8051f350.h,
1119         * device/include/z180.h: Changed SDCC specific keywords to double
1120         underlined form.
1121
1122 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1123
1124         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1125         18F4455,
1126         * (pic16_assignConfigWordValue): disable testing of configuration
1127         register value with config mask,
1128         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1129         function with port->fun_prefix,
1130         * (genFunction): when generating a naked interrupt function never
1131         create an absolute segment placed in interrupt vector address, place
1132         the actual interrupt function at IVA instead, when an interrupt
1133         function is generated with unspecified interrupt then do not create
1134         the absolute section,
1135         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1136         code for generating a call to generic pointer get/put function with
1137         a call to function pic16_callGenericPointer(),
1138         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1139         the call to the generic pointer get/put functions with prefixing the
1140         function name with port->fun_prefix,
1141         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1142         * src/pic16/main.c (_process_pragma): prefix function with
1143         port->fun_prefix,
1144         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1145         calling assembler, old 18Fxxxx macro is deprecated,
1146         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1147         PC_ASMDIR in while condition,
1148         * (findInstruction): add PC_ASMDIR in while condition,
1149         * (buildCallTree): prefix main with port->fun_prefix,
1150         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1151         identifier for variable with banked access in instructions BTFSS,
1152         BTFSC, BCF, BSF, BTG
1153         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1154         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1155         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1156         perform optimization when enviroment variable NO_REG_OPT is set,
1157         * (insideLRBlock): NEW, return 1 if register is inside an
1158         INF_LOCALREGS block,
1159         * (RemoveRegFromLRBlock): remove a register that is completely
1160         eliminated by register optimization, but it is still left in local
1161         register store/restore in/from stack block,
1162         * (Remove2pcodes): after removing register, check to see if it
1163         should be removed from local register store/restore in/from stack
1164         block,
1165         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1166         DUMMY_READ_VOLATILE,
1167
1168         * device/include/pic16/adc.h: minor prototype modifications and
1169         update,
1170         * device/include/pic16/malloc.h: added GPL notice various
1171         modifications,
1172         * device/include/pic16/stdint.h: NEW, standard header for ints
1173         * device/include/pic16/delay.h: NEW, header for delay functions,
1174         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1175         delay1mtcy,
1176         * device/include/pic16/signal.h: NEW, header providing helper macros
1177         for implementing signal handlers,
1178         * device/include/pic16/stdio.h: added prototypes for functions,
1179         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1180         prototypes for stdin and stdout, added macro PUTCHAR to
1181         automatically implement putchar function prototype,
1182         * device/include/pic16/usart.h: modified and updated USART library,
1183         * device/lib/pic16/libio/adc/,
1184         * device/lib/pic16/libio/i2c: some modifications to improve library
1185         performance,
1186         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1187         family of functions,
1188         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1189         family of functions and other sources,
1190         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1191         of the PIC18Fxx[28] devices,
1192         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1193         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1194         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1195         _do_cinit function, because the previous failed when local variables
1196         where not placed in the same memory bank,
1197         * device/lib/pic16/libsdcc/char/: various modifications to improve
1198         library performance,
1199         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1200         information on the new functions of the c library and more...
1201
1202 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1203
1204         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1205
1206 2005-03-26 Raphael Neider <rneider AT web.de>
1207
1208         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1209           if condition == CARRY)
1210         * (genCmp): adapted to new genSkipc semantics
1211         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1212           on rIfx (genCmp was broken)
1213
1214 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1215
1216         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1217         * src/z80/main.c (_keywords[]),
1218         * src/SDCCglobal.h (struct options),
1219         * src/SDCC.y,
1220         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1221         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1222         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1223         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1224         always available in leading double underscore form. The C99 support is
1225         mostly missing, but it's a start.
1226         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1227         reserved identifier "__data".
1228
1229 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1230
1231         * src/mcs51/peeph.def: fixed bug 1170013
1232
1233 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1234
1235         * device/include/mcs51reg.h: fixed bug 842007
1236
1237 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1238
1239         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1240         last time.
1241
1242 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1243
1244         * src/port.h (struct PORT),
1245         * src/avr/ralloc.c (avr_assignRegisters),
1246         * src/avr/main.c,
1247         * src/ds390/ralloc.c (ds390_assignRegisters),
1248         * src/ds390/main.c,
1249         * src/hc08/ralloc.c (hc08_assignRegisters),
1250         * src/hc08/main.c,
1251         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1252         * src/mcs51/main.c,
1253         * src/pic/ralloc.c (pic14_assignRegisters),
1254         * src/pic/main.c,
1255         * src/pic16/ralloc.c (pic16_assignRegisters),
1256         * src/pic16/main.c,
1257         * src/xa51/ralloc.c (xa51_assignRegisters),
1258         * src/xa51/main.c,
1259         * src/z80/ralloc.c (z80_assignRegisters),
1260         * src/z80/ralloc.h,
1261         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1262         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1263         * src/SDCCcse.h,
1264         * src/SDCCdflow.c (computeDataFlow),
1265         * src/SDCCdflow.h,
1266         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1267         * src/SDCCloop.h,
1268         * src/SDCCcflow.c (*),
1269         * src/SDCCcflow.h,
1270         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1271         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1272         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1273         immedDom() returning wrong block; probably fixes bug #1160833)
1274
1275 2005-03-20 Borut Razem <borut.razem AT siol.net>
1276
1277         * support/scripts/inc2h.pl: WIN32 port
1278
1279 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1280
1281         * device/lib/makefile.in: added abs.c and labs.c
1282
1283 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1284
1285         * device/include/stdint.h: added
1286         * device/lib/abs.c: added
1287         * device/lib/labs.c: added
1288         * device/include/stdlib.h: added abs() and labs() prototypes
1289         * device/lib/libsdcc.lib: added abs and labs
1290         * device/include/float.h,
1291         * device/lib/_fsmul.c,
1292         * device/lib/printf_fast.c,
1293         * device/lib/printf_tiny.c: updated comments
1294
1295 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1296
1297         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1298         bug #1164313
1299
1300 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1301
1302         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1303         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1304
1305 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1306
1307         * device/lib/printf_large.c: removed inline assembly for portability and
1308           readability. Use printf_fast if speed or size are more important.
1309         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1310         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1311
1312 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1313
1314         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1315         prevent compiler warning
1316
1317 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1318
1319         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1320         moved to level 0 and declared as static. Also they are explicit
1321         placed in access bank. This was necessery because some times they
1322         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1323         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1324         optimizations. Currently only compare to unsigned char is implemented,
1325         * src/pic16/gen.c: added fReturnIdx array,
1326         * (struct resolvedIfx) is moved to gen.h and made public,
1327         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1328         * (aopForSym): added an optimization to directly store in stack of
1329         the operand of a SEND iCode,
1330         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1331         but as registers instead (AOP_REG) using the fReturnIdx array,
1332         * (pic16_freeAsmop): remove the freed register from the
1333         _G.sregsAlloc field,
1334         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1335         a compare of 'WREG',
1336         * (pic16_popGetTempRegCond): changed function prototype, now
1337         function takes also a bitVector argument v which holds the current
1338         set of registers that are allocated for stack access by aopForSym,
1339         registers allocated in aopForSym for accessing stack symbols are not
1340         any more part of the functions usedRegs field,
1341         * (genCall): some times aopOp is called for a stack variable to be
1342         send, aopForSym might perform the push, if this is true make sure
1343         that genCall doesn't push the variable twice by testing _G.resDirect,
1344         * (genFunction): changed testing for unspecified interrupt number
1345         from 256 to INTNO_UNSPEC,
1346         * modified selection scheme of frame pointer generation. Previously
1347         if function did use local registers a frame pointer was generated,
1348         now a frame pointer is generated only if function has arguments
1349         (that need PLUSW2 register access), or has stack arguments, or the
1350         compiler is not instructed to omit the frame pointer,
1351         * (genEndFunction): before restoring local registers that were saved
1352         in the function preamble, also restore the registers that *might*
1353         have been allocated for stack access,
1354         * (genRet): removed some old comments,
1355         * (genCmp, the active (RN's) version): added a call to the
1356         pic16_genCmp_special function to perform the compare with a more
1357         robust and optimized way,
1358         * (genInline): a feature has been added in inline code generation,
1359         which allows a wildcard variable substitution when writing inline
1360         assembly. Code is incomplete and experimental therefore undocumented,
1361         * (genCast): changed order of aopOp for result and right to allow
1362         aopForSym to directly load the result if possible,
1363         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1364         perform an optimized compare on some selected special occasions,
1365         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1366         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1367         generate an IVT any more,
1368         * src/pic16/main.c (pic16_optionsTable): added command line option
1369         --optimize-cmp,
1370         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1371         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1372         macros,
1373         * src/pic16/NOTES: Raphael Neider added in list of active developers
1374         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1375         jumptable_end to prevent bug #,
1376         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1377         inCond and outCond fields,
1378         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1379         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1380         turn off register spilling,
1381         * (packRegsForOneUse): synced with other ports' versions although it
1382         is not used currently,
1383         * (pic16_packRegisters): added an optimization while reading
1384         structure bitfields, some registers may be saved (malloc code is
1385         decreased by 80 bytes)
1386
1387 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1388
1389         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1390         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1391         this can be optimized more?
1392
1393 2005-03-10 Raphael Neider <rneider AT web.de>
1394
1395         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1396           genNearPointerGet): (hopefully) fixed access to bitfields via
1397           pointers (p->bitN = x; and x = p->bitN; failed)
1398
1399 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1400
1401         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1402
1403 2005-03-09 Raphael Neider <rneider AT web.de>
1404
1405         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1406
1407 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1408
1409         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1410         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1411           (regTypeNum): set REG_BIT type if necessary
1412         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1413         * support/regression/tests/critical.c: check bug 1144613
1414
1415 2005-03-02 Raphael Neider <rneider AT web.de>
1416
1417         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1418
1419 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1420
1421         * src/avr/ralloc.c (serialRegAssign),
1422         * src/ds390/ralloc.c (serialRegAssign),
1423         * src/hc08/ralloc.c (serialRegAssign),
1424         * src/mcs51/ralloc.c (serialRegAssign),
1425         * src/pic/ralloc.c (serialRegAssign),
1426         * src/pic16/ralloc.c (serialRegAssign),
1427         * src/xa51/ralloc.c (serialRegAssign),
1428         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1429
1430 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1431
1432         * src/SDCCast.c (decorateType): fixed bug 1124787
1433
1434 2005-02-20 Hubert Sack <sack AT digiplan.de>
1435         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1436
1437         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1438         patch #1121755
1439
1440 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1441
1442         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1443         to keep the correct label reference count when adding/removing references
1444         to labels. A peephole file using this is appended to patch #1144962.
1445
1446 2005-02-14 Raphael Neider <rneider AT web.de>
1447
1448         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1449         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1450         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1451           retrievals of result operand's value on assignment
1452
1453 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1454
1455         * device/include/pic16/string.h: modified prototype for memccpy()
1456         to memccpy(void *, void *, char, size_t)
1457         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1458         check whether to omit frame pointer or not,
1459         * (genInline): convert all occurences of "\n" to LF in inline
1460         assembler blocks, this helps formatting the inline text,
1461         * (pic16_loadFSR0): modified prototype,
1462         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1463         removed some 8051 legacy code,
1464         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1465         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1466         before allocating temporary registers in functions,
1467
1468 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1469
1470         * support/regression/tests/bitvars.c: corrected the "fix"
1471
1472 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1473
1474         * support/regression/tests/bitvars.c,
1475         * support/regression/tests/bitwise.c,
1476         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1477
1478 2005-02-10 Raphael Neider <rneider AT web.de>
1479
1480         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1481           different size for Alpha
1482         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1483
1484 2005-02-09 Raphael Neider <rneider AT web.de>
1485
1486         * src/SDCC.lex(doPragma) : save and restore warning options as well
1487           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1488         * have #pragma less_pedantic set the errorlevel to WARNING
1489           (fixes #1117001)
1490         * (cloneOptimize) : fixed wrong malloc's size
1491         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1492           facilitate correct handling of #pragma (save|restore)
1493
1494 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1495
1496         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1497
1498 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1499
1500         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1501
1502 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1503
1504         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1505
1506 2005-02-02 Raphael Neider <rneider AT web.de>
1507
1508         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1509         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1510         * (pic16_storeForReturn): fixed to allow returning function pointers
1511         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1512         * device/include/pic16/{stddef.h,stdbool.h}: added
1513
1514 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1515
1516         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1517
1518 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1519
1520         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1521         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1522          appeared to be required
1523
1524 2005-01-31 Borut Razem <borut.razem AT siol.net>
1525
1526         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1527           include/mcs51 and include/z80 directories to the package
1528
1529 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1530
1531         * src/hc08/gen.c (genFunction): fixed bug #1112752
1532
1533 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1534
1535         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1536
1537 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1538
1539         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1540
1541 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1542
1543         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1544
1545 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1546
1547         * device/include/c8051fxxx.h: removed these 6 files
1548         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1549
1550 2005-01-26 Raphael Neider <rneider AT web.de>
1551
1552         * src/pic16/gen.c (genAssign): fixed assignment from longs
1553           in codespace (were cut to three bytes)
1554         * (genDummyRead): implemented (except for CODESPACE...),
1555           fixed bug #1108575
1556         * src/pic16/glue.c (emitStatistics): beautified
1557         * device/lib/pic16/libm/Makefile: added include path
1558
1559 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1560
1561         * src/z80/gen.c (aopPut): fixed bug #1103902
1562
1563 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1564
1565         * device/lib/expf.c: fixed bug #1095792
1566
1567 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1568
1569         * device/lib/pic16/libm: added Math library sources
1570
1571 2005-01-24 Raphael Neider <rneider AT web.de>
1572
1573         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1574           to enable upcast to pCodeOpReg2 (there is no type tag to
1575           differenciate the two and pic16_popGet2p cast into PCOR2)
1576         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1577           (sizeof(sectNames) changed to sizeof(sectName))
1578           Both patches fix segfaults under MinGW.
1579
1580 2005-01-23 Raphael Neider <rneider AT web.de>
1581
1582         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1583           Safe_[mc]?alloc()'ed variables
1584         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1585           of (byte sized) temporaries (assign them to WREG for now)
1586         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1587           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1588           this might fix SIGSEGVs on MinGW...
1589         * src/SDCCopt.c (killDeadCode): restored original behaviour
1590           (volatile operands might get thrown away though)
1591
1592 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1593
1594         * src/pic16/gen.c: fixed bug #1106975,
1595         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1596         pointer update, INTCON is saved, global interrupts are disabled and
1597         restored after updateing TOS.
1598         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1599         * added function attribute 'shadowregs' to take advantage of shadow
1600         registers,
1601         * added function attribute 'wparam' as an alternative to the wparam
1602         pragma,
1603         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1604         user declares a non-ISR function as 'shadowregs',
1605         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1606
1607 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1608
1609         * .version: bumped version number to 2.4.8
1610         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1611         pic16 port,
1612         * device/lib/pic16/libio/i2c/: I2C module support library,
1613         * device/include/pic16/i2c.h: I2C support library header,
1614         * device/lib/pic16/libc/stdio/: standard IO support sources,
1615         * (printf_small.c): printf_small() source, supports float print,
1616         * (printf_tiny.c): printf_tiny() source, does not support floats,
1617         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1618         enable global optimizations for entire library source, other
1619         Makefiles in the source tree are also modified to reflect this,
1620         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1621         function,
1622         * doc/sdccman.lyx: updated to reflect new changes,
1623         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1624         sym->onStack if-case,
1625         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1626         sbit, idata, _idata, xdata, _xdata,
1627         * added pragma library, to link an external library, (see doc),
1628         * removed command line options, --pomit-config-words, --pomit-ivt,
1629         --pleave-reset-vector,
1630         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1631         when calling assembler to reflect memory model used, also define
1632         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1633         reflect stack model used,
1634         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1635         on stack return NULL,
1636
1637 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1638
1639         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1640           of the operands is volatile. Fixes #1020220
1641
1642 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1643
1644         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1645         * (OptimizeRegUsage): make sure that there is really no other flow where
1646           the first pCode is used
1647
1648 2005-01-22 Raphael Neider <rneider AT web.de>
1649
1650         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1651           to fix #1106967 (pCode->seq are not set up correctly)
1652
1653 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1654
1655         * src/SDCCglue.c (glue): make sure code area is declared before the
1656         static initialization area.
1657
1658 2005-01-21 Raphael Neider <rneider AT web.de>
1659
1660         * device/lib/Makefile.in: fixed test for pic16 install dir
1661         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1662           optimizations
1663         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1664           added --optimize-goto compiler switch and pragma wparam documentation
1665         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1666         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1667           and PRODH closing bug #1071770 (peephole optimizer)
1668
1669 2005-01-19 Raphael Neider <rneider AT web.de>
1670
1671         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1672           cmdLine buffers (used when calling sdcpp...) are large enough
1673           (MAX_PATH=256 truncates arguments leading to system halts when
1674           used in MinGW...)
1675         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1676         * (genUminus): rewritten to for efficiency
1677         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1678           used uninitialized in some cases)
1679         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1680           copy the third byte from the int -- now assumes 0x80 (data memory)
1681         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1682           operands (genAddLit expects the iCode's operands to swapped as
1683           well), fixed leftover bytes (crashed for short left operands)
1684         * (pic16_genMinusDec): performance improvements, removed false
1685           PIC14 emitSKPNCs
1686         * (pic16_genMinus): fixed to cope with differently sized operands
1687         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1688           for --obanksel > 1
1689         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1690         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1691           new banksel optimization
1692         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1693           analysis for temporary registers (segfaults...)
1694         * src/pic16/peeph.def: added rule
1695
1696 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1697
1698         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1699         which converts a float number to its ASCII representation
1700         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1701         functions to convert the fractional and integer part of a float to ASCII,
1702         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1703         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1704         ram
1705         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1706         _STATMEM macros,
1707         * device/include/pic16/adc.h: added GPL info,
1708         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1709         a pCodeOp as tested operand,
1710         * (genNearPointerGet): optimized bit testing, does not use
1711         intermediate register for bit value, test directly instead with
1712         BTFSS, BTFSC, works only for single bits,
1713         * (genpic16Code): dump the name of the iCode in the asm,
1714         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1715         renamed to pic16_decodeOp,
1716         * (serialRegAssign): do not allocate a temporary register for iCode
1717         sequences that test a single bit for 1/0
1718
1719 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1720
1721         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1722         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1723         access stack and frame pointers. They are initially assigned to
1724         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1725         accessing SFRs. Updated all occurences of modification of stack or
1726         frame pointer in gen.c and pcode.c,
1727         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1728         assigning of a literal value to pointers,
1729         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1730         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1731         selected
1732
1733 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1734
1735         * doc/sdccman.lyx: update documentation about stack pragma, added
1736         some info for stack memory models
1737
1738 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1739
1740         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1741
1742 2005-01-08 Raphael Neider <rneider AT web.de>
1743
1744         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1745           udata sections to fix bug #1097823
1746
1747 2005-01-05 Raphael Neider <rneider AT web.de>
1748
1749         * src/pic16/gen.c (genGenericShift): added handling of differently
1750           sized left operand and result
1751
1752 2005-01-04 Raphael Neider <rneider AT web.de>
1753
1754         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1755         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1756           to hold the condition bit)
1757         * added new version of genCmp (old code available via #define)
1758         * added new version of genShiftLeft/genShiftRight in a generic
1759           way, now supports shifting by negative values
1760         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1761           shiftCount (expected by genGenericShift)
1762         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1763         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1764           dump
1765         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1766           is an invalid literal too...)
1767
1768 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1769
1770         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1771         from Raphael Neider,
1772         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1773         for 8-bit literals. This fixes some literal operands which are sign
1774         extended to 16-bits ints when instruction needs only 8-bits.
1775
1776 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1777
1778         * device/lib/logf.c: added mcs51 assembly version
1779         * device/lib/expf.c: added mcs51 assembly version
1780         * device/lib/_logexpf.c: new shared asm code for expf and logf
1781         * device/include/math.h: add defines for assembly math library
1782         * device/lib/Makefile.in: build new _logexpf.c
1783         * device/lib/libfloat.lib: use new _logexpf.c
1784
1785 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1786
1787         * src/pic/device.c
1788         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1789           device types which have less than 0x7f registers.
1790
1791 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1792
1793         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1794
1795 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1796
1797         * device/lib/printf_fast.c: only build on supported arch.
1798         * device/lib/printf_tiny.c: only build on supported arch.
1799         * device/lib/printf_fast_f.c: only build if asm float lib
1800         * device/lib/_fsget1arg.c: only build if asm float lib
1801         * device/lib/_fsget2args.c: only build if asm float lib
1802         * device/lib/_fsnormalize.c: only build if asm float lib
1803         * device/lib/_fsreturnval.c: only build if asm float lib
1804         * device/lib/_fsrshift.c: only build if asm float lib
1805         * device/lib/_fsswapargs.c: only build if asm float lib
1806         * device/include/stdio.h: don't provide print_fast,
1807           print_fast_f, print_tiny prototypes if --xstack used
1808
1809 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1810
1811         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1812         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1813           to the SOURCES
1814
1815 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1816
1817         * device/lib/printf_fast_f.c: same as printf_fast, but
1818           with floating point enabled
1819         * device/lib/printf_fast.c: minor tweaks
1820         * device/include/stdio.h: add printf_fast_f
1821
1822 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1823
1824         * src/SDCCmain.c: make --float-reent default for mcs51
1825         * device/lib/_fsadd.c: added mcs51 assembly version
1826         * device/lib/_fssub.c: added mcs51 assembly version
1827         * device/lib/_fsmul.c: added mcs51 assembly version
1828         * device/lib/_fsdiv.c: added mcs51 assembly version
1829         * device/lib/_fseq.c: added mcs51 assembly version
1830         * device/lib/_fsneq.c: added mcs51 assembly version
1831         * device/lib/_fsgt.c: added mcs51 assembly version
1832         * device/lib/_fslt.c: added mcs51 assembly version
1833         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1834         * device/lib/Makefile.in: add _fscmp to build
1835         * device/lib/libfloat.lib: add _fscmp to build
1836
1837 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1838
1839         * device/lib/_fs2slong.c: added mcs51 assembly version
1840         * device/lib/_fs2sint.c: added mcs51 assembly version
1841         * device/lib/_fs2schar.c: added mcs51 assembly version
1842         * device/lib/_fs2ulong.c: added mcs51 assembly version
1843         * device/lib/_fs2uint.c: added mcs51 assembly version
1844         * device/lib/_fs2uchar.c: added mcs51 assembly version
1845         * device/lib/_slong2fs.c: added mcs51 assembly version
1846         * device/lib/_sint2fs.c: added mcs51 assembly version
1847         * device/lib/_schar2fs.c: added mcs51 assembly version
1848         * device/lib/_ulong2fs.c: added mcs51 assembly version
1849         * device/lib/_uint2fs.c: added mcs51 assembly version
1850         * device/lib/_uchar2fs.c: added mcs51 assembly version
1851         * device/include/float.h: added #define to select asm vs c
1852
1853 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1854
1855         * device/lib/printf_fast.c: improvements to float output
1856         * device/include/float.h: add defines for assembly float library
1857         * device/lib/_fsget1arg.c: receive 1 float arg
1858         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1859         * device/lib/_fsnormalize.c: normalize a float
1860         * device/lib/_fsreturnval.c: return float, various helper routines
1861         * device/lib/_fsrshift.c: right shift a float's mantissa
1862         * device/lib/_fsswapargs.c: swap 2 floats
1863         * device/lib/Makefile.in: build these 6 new files for mcs51
1864         * device/lib/libfloat.lib: add these 6 files to the library
1865
1866 2004-12-26 Borut Razem <borut.razem AT siol.net>
1867
1868         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1869           built by gcc 3.4.2
1870
1871 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1872
1873         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1874           and fully reentrant and register bank neutral.
1875         * device/lib/printf_fast.c: added float (not enabled by default),
1876           added compact/slower integer (also not enabled by default),
1877           improved size/speed of fast integer code, other minor changes
1878         * device/include/stdio.h, device/lib/Makefile.in,
1879           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1880
1881 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1882
1883         * src/pic16/pcode.c: declaring variables other than at the start of a
1884           block is not supported in C by VC6.
1885
1886 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1887
1888         * applied a previous patch from Raphael Neider that wasn't included
1889         in the previous commits, which fixes infinite loops within jumptable
1890         improvements,
1891         * made some fixes that previous patches introduced
1892
1893 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1894
1895         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1896         that fixes an issue with AOP_PCODE asmop's offset,
1897         * (pic16_popCopyReg): update instance field too,
1898         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1899         function of pic port,
1900         * (genCmp, genAnd, genAssign),
1901         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1902
1903 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1904
1905         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1906         variables initial values to idata section,
1907         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1908         variables in some functions. This utilizes parmBytes field of iCode
1909         structure to hold the offset of the variable in stack. (might be
1910         able to use the stack field too?)
1911         * applied patch from Raphael Neider # ### , # ###
1912         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1913         variable initial values in idata section,
1914         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1915         for static variables with initial value
1916         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1917         applied fix in while loop from Raphael Neider.
1918
1919 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1920
1921         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1922         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1923         * src/ds390/ralloc.c (serialRegAssign): spill bits
1924         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1925         * support/Util/SDCCerr.c,
1926         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1927         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1928         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1929
1930 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1931
1932         * device/include/sdcc-lib.h: inserted LGPL, added includes
1933           asm/ds390/features.h and asm/mcs51/features.h
1934         * device/include/asm/default/features.h,
1935         * device/include/asm/gbz80/features.h,
1936         * device/include/asm/z80/features.h: added empty _AUTOMEM
1937           and _STATMEM
1938         * device/include/asm/ds390/features.h,
1939         * device/include/asm/mcs51/features.h: added files with defines for
1940           _AUTOMEM and _STATMEM indicating automatic and static storage class
1941         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1942         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1943         * src/SDCCicode.c (geniCodeCast),
1944         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1945         * src/SDCCloop.c (loopInduction): removed unused variable lr
1946         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1947           to convertToFcall to include char modulo (RFE 1065037), added check
1948           if left operand is unsigned and use abs of literal value
1949         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1950           as it doesn't work after conversion from peephole.def to peephole.rul
1951         * src/mcs51/gen.c (toBoolean): added check for size,
1952           (genModOneByte): optimized code for signed char modulo a literal
1953           power of 2 (thanks to Hubert Sack),
1954           (genRRC): removed unnecessary "clr c",
1955           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1956         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1957           jump optimization,
1958           swapped rules 256.c and 256.d,
1959           extended 256.d by using new multiple checks (thanks Erik),
1960           added rules 256.e and 256.f,
1961           updated rule 261.a and 261.b to new generated code
1962         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1963
1964 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1965
1966         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1967           induction related bugs, including first part of bug #1074377
1968
1969 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1970
1971         * applied patch from bug-report #1076292,
1972         * applied patches for genAnd and Goto-optimizations for Raphael
1973         Neider,
1974         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1975         dump a less iCode information,
1976         * src/pic16/device.h (pic16_options_t): added field debgen,
1977         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1978         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1979         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1980         puclic,
1981         * (various functions): added macros FENTRY and FENTRY2 to functions,
1982         to emit function prologue,
1983         * (various functions): fixed indentation,
1984         * (genNearPointerGet): fixed loading of FSR0,
1985         * (genPackBits): applied patch from Raphael Neider to fix updating
1986         of FSR0 and touching only the modified bits,
1987         * src/pic16/genarith.c (various functions): added macros FENTRY to
1988         emit function prologue in comments,
1989         * src/pic16/pcode.h: added functions debugf2, debugf3,
1990         * src/pic16/ralloc.c: partial fix for packForPush caused
1991         segmentation fault,
1992
1993 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1994
1995         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1996           <stsp AT users.sourceforge.net> with reversed byte order
1997         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1998
1999 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2000
2001         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2002           bug #1074377
2003         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2004         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2005
2006 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2007
2008         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2009
2010 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2011
2012         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2013           conditions,
2014           (setFromConditionArgs): friendly operand parser for peephole rules,
2015           (operandBaseName, operandsNotRelated): new peephole condition
2016           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2017           architecture specific register naming into account, handles n-way
2018           comparisons, and supports quoted literals
2019         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2020
2021 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2022
2023         * src/mcs51/peeph.def: fixed bug #1076940
2024
2025 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2026
2027         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2028
2029 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2030
2031         Adding support for replacing ljmps with sjmps in jumptables
2032         generated for switch statements. For now you need to set the
2033         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2034         Now 4 algorithms for mcs51 jumptable generation are used:
2035         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2036         addresses loaded pc-relative for up to 112 cases and stack-pushing
2037         target addresses loaded with offset from dptr for up to 256 cases.
2038
2039         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2040         * src/mcs51/main.c: adapted constants for switch table generation
2041         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2042
2043 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2044
2045         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2046         * support/regression/tests/bug1057979.c: added test for bug 1073386
2047
2048 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2049
2050         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2051         compilers
2052
2053 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2054
2055         * src/pic16/device.h,
2056         * src/pic16/genarith.c,
2057         * src/pic16/glue.c,
2058         * src/pic16/main.c,
2059         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2060
2061 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2062
2063         Large cummulative patch for pic16 port.
2064         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2065         to call when a stack overflow occurs,
2066         * (malloc.h): added CVS Id tag,
2067         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2068         variable,
2069         * added libc directory. The current version of LibC contains string
2070         functions, ctype functions and macros and some functions of the
2071         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2072         be extensively tested in the future. Standard disclaimer here.
2073         Library is not automatically build yet. But one can build it by
2074         invoking 'make' inside the libc directory.
2075         * added ADC library under libio. Preliminary version yet.
2076
2077         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2078         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2079         aopForRemat() now and not by pic16_aopOp(),
2080         * (pic16_popGetTempReg): removed warning messgae when allocating
2081         temporary registers, its a buggy feature and will be removed,
2082         * (pic16_popGet): set register instance field in AOP_CRY,
2083         * (pic16_outBitC): fixed for results in size greater than 1,
2084         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2085         * (pic16_storeForReturn): optimized return of 0,
2086         * (genCmp): experimental code for new genCmp which uses PIC18's
2087         special compare&skip instructions. Initial tests fail some times
2088         with variables grater than 1 byte in size, so new code is disabled,
2089         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2090         a single bit,
2091         * (genCast): began a fix to optimize the casting of a bit to another
2092         bit, now assigning a bitfield to another bitfield will fail, sorry,
2093         * src/pic16/main.c: disabled the use of lr-support feature,
2094         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2095         * added some function prototypes, added function _debugf prototype,
2096         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2097         bits with offset (case PO_GPR_BIT),
2098         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2099         command line,
2100         * (isBankInstruction): modified to return 0 for no banking instruction,
2101         and 1 for banking instruction,
2102         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2103         caused stop processing pCodes after a inline assembly block,
2104         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2105         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2106         registers when it shouldn't,
2107         * src/pic16/ralloc.c (allocReg): add preliminary support for
2108         supporting a limited set of temporary registers,
2109
2110 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2111
2112         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2113           genDataPointerSet): ensure assignments always copy in MSB to LSB
2114           order,
2115           (loadRegFromAop): recognize CLRH optimization,
2116           (genFunction): optimize RECEIVE iCodes in reentrant functions
2117
2118 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2119
2120         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2121           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2122           selected.
2123         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2124         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2125           contiguous with data
2126
2127 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2128
2129         * device/lib/_gptrget.c (_gptrget),
2130         * device/lib/_gptrgetc.c (_gptrgetc),
2131         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2132           instead of sjmp to ret
2133         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2134           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2135
2136 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2137
2138         * .version: bumped version to 2.4.7
2139         * device/lib/_gptrget.c (_gptrget): is now _naked
2140         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2141         * device/lib/_gptrput.c (_gptrput): is now _naked
2142         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2143           (createFunction): fixed xstack
2144         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2145         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2146           or bit either,
2147           (geniCodeCritical): store original interrupt state in an iTemp bit
2148           var unless stack-auto
2149         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2150         * src/SDCCmain.c (setIncludePath): added include/target to search path
2151         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2152         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2153           prototype,
2154           (processFuncArgs): put bit vars in bit area
2155         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2156           unsaveRBank): fixed xstack,
2157           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2158           (genFunction, genEndFunction): fixed xstack,
2159           (genAssign): optimization don't walk backwards through mem
2160         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2161         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2162         * support/regression/Makefile: also make library (for stack-auto) when
2163           making "all" and added "test-mcs51-xstack-auto"
2164         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2165         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2166         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2167         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2168         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2169           make-library by MAKE_LIBRARY
2170         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2171           regression tests for xstack
2172         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2173         * support/regression/tests/critical.c: test for critical on mcs51
2174
2175 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2176
2177         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2178           built version of sdcc instead of installed version
2179
2180 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2181
2182         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2183         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2184           vprintf.c now
2185         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2186         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2187           WARNING: remove device/lib/build/z80/printf.o by hand when
2188           updating from previous build!
2189         * device/lib/z80/printf.c: updated comment
2190         * support/regression/tests/bug1057979.c: test all ports now
2191         * support/regression/tests/bug1065458.c: file added
2192
2193 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2194
2195         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2196           *_start and *_end symbols for static functions
2197
2198 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2199
2200         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2201           and search crt0.o in all library paths,
2202           (setIncludePath): proper handling of --nostdinc,
2203           (setLibPath): proper handling of --nostdlib
2204         * support/regression/Makefile,
2205         * support/regression/ports/ds390/spec.mk,
2206         * support/regression/ports/gbz80/spec.mk,
2207         * support/regression/ports/hc08/spec.mk,
2208         * support/regression/ports/mcs51/spec.mk,
2209         * support/regression/ports/mcs51-large/spec.mk,
2210         * support/regression/ports/mcs51-stack-auto/spec.mk,
2211         * support/regression/ports/z80/spec.mk: use include and lib files from
2212           built version of sdcc instead of installed version
2213         * doc/sdccman.lyx: fixed typo in --nostdinc
2214
2215 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2216
2217         * src/pic/pcode.c,
2218         * src/pic/device.c,
2219         * src/pic/ralloc.c,
2220         * src/pic/gen.c : added support to generate code for struct bit fields.
2221
2222 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2223
2224         * as/xa51/xa_version.h,
2225         * device/include/errno.h,
2226         * device/include/regc515c.h,
2227         * device/lib/_itoa.c,
2228         * device/lib/_ltoa.c,
2229         * device/lib/ser_ir_cts_rts.c,
2230         * sim/ucsim/xa.src/glob.cc,
2231         * sim/ucsim/xa.src/inst_gen.cc,
2232         * sim/ucsim/xa.src/xa_bit.cc,
2233         * sim/ucsim/xa.src/xa_sfr.cc,
2234         * sim/ucsim/z80.src/inst_dd.cc,
2235         * sim/ucsim/z80.src/inst_fdcb.cc,
2236         * support/scripts/keil2sdcc.pl,
2237         * src/pic16/pic16.dsp,
2238         * src/pic16/pic16a.dsp: corrected cvs line endings
2239         * device/lib/printf_large.c: fixed bug 1057979
2240         * src/pic16/gen.c: fixed non-C standard code
2241         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2242         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2243         * support/regression/ports/mcs51/support.c: reload T1 asap
2244         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2245           pdata use and clear idata startup behaviour
2246         * support/regression/tests/bug1057979.c: added
2247
2248 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2249
2250         * device/examples/ds390/ow390/ad26.h,
2251         * device/examples/ds390/ow390/cnt1d.h,
2252         * device/examples/ds390/ow390/crcutil.c,
2253         * device/examples/ds390/ow390/ownet.h,
2254         * device/examples/ds390/ow390/owsesu.c,
2255         * device/examples/ds390/ow390/swt12.h,
2256         * device/examples/ds390/ow390/swtoper.c,
2257         * device/examples/ds390/ow390/temp10.h,
2258         * device/examples/ds390/ow390/thermodl.c,
2259         * device/examples/ds390/tinitalk/tinitalk.dsp,
2260         * device/examples/ds390/tinitalk/tinitalk.dsw,
2261         * device/examples/mcs51/clock/hw.h,
2262         * device/examples/mcs51/simple2/go.bat,
2263         * device/examples/serialcomm/windows/serial.h,
2264         * device/examples/xa51/dummy.c,
2265         * device/examples/xa51/hello.c,
2266         * device/include/80c51xa.h,
2267         * device/include/at89x051.h: corrected cvs line endings
2268
2269 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2270
2271         * src/pic16/main.c (options): added command line --gstack, to trace
2272         stack over/under flows,
2273         * added pragma 'wparam' to allow passing first byte of function
2274         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2275         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2276         call to __gstack_test function and sets up the symbol as extern,
2277         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2278         * popaop): added call to pic16_testStackOverflow,
2279         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2280         wparamList list,
2281         * (genCall, genPcall): now all parameters are passed via stack
2282         except in functions that are pass to wparam pragma in which WREG is
2283         used too,
2284         * (genPcall): REENTRANT flag is checked to see if variable prototype
2285         contains reentrant keyword, don't call a non-reentrant function, via
2286         a reentrant function pointer or vice versa, functions are never
2287         passed via WREG,
2288         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2289         D.Winkler,
2290         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2291         SIGSEGV when accessing a NULL register stucture,
2292         * (pic16_printGPointerType): modified to handle UPPER modifier for
2293         function initializers, changed prototype of function to simpler one,
2294         * (pic16_printIvalFuncPtr): check to see if function is already
2295         added in externs list,
2296         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2297         optimized a move from W to SFR with a move to the same register
2298         later after a CALL,
2299         * device/lib/pic16/debug: NEW directory, contains debug features
2300         which are enabled when linking with libdebug.lib, currently command
2301         line option --gstack enables stack pointer tracing for over/under
2302         flow, corresponding sources are in debug/gstack
2303
2304 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2305
2306         * doc/sdccman.lyx: updated SDCC version,
2307         * (PIC16 port): update list of command line options,
2308         * src/pic16/device.h (structure pic16_options_t): added field gstack
2309         to enable stack overflow tracing on push/pops,
2310         * src/pic16/device.c (statistics structure): added statistics
2311         structure,
2312         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2313         pic16_dump_int_registers): increase statistics counters for each
2314         * variable which is encountered
2315         * (pic16_dump_usection): emit each .udata variable to its own udata
2316         section,
2317         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2318         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2319         parameters via stack, otherwise use old scheme,
2320         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2321         assembler output file,
2322         * src/pic16/main.c: added command line options --gstack to enable
2323         push/pop tracing for stack overflow,
2324         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2325         instructions): added size of each instruction,
2326         * (pic16_countInstruction): estimate size of instructions in
2327         the_pFile list, inline assembly blocks are not counted,
2328         * (pic16_FixRegisterBanking): trace previous register usage, when
2329         banksel optimizations is greater than 0, don't emit a redudant
2330         banksel directive,
2331
2332 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2333
2334         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2335         * src/pic16/ralloc.c : applied same fix for pic16.
2336         * src/pic/gen.c : tidied it up a little.
2337
2338 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2339
2340         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2341         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2342
2343 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2344
2345         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2346
2347 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2348
2349         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2350         non-reentrant function __modsint in the interrupt function (thus
2351         corrupting math operations during serial I/O)
2352         * device/lib/ser_ir.c: as above, changed buffersize
2353         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2354         256.c,d for zeroing
2355         * doc/Makefile: added option -t for rsync
2356
2357 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2358
2359         * src/SDCCast.h (struct ast),
2360         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2361
2362 2004-10-20 Borut Razem <borut.razem AT siol.net>
2363
2364         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2365         package
2366
2367 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2368
2369         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2370         makefile targets,
2371         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2372         support functions to replace long sequences of MOVFF's from access
2373         bank registers to stack and vice versa,
2374         * src/pic16/device.h: added new field opt_flags, where optimization
2375         flags can be set to enable certain features,
2376         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2377         * pBlock, (genFunction, genEndFunction): surroung loop for
2378         saving/loading used registers in stack with PC_INFO pCodes,
2379         INF_LREGS. Code in between can then be optimized by pCode optimizer
2380         to support function calls,
2381         * (genDataPointerSet): fixed bug which loaded float fields in
2382         structures with corrupt data,
2383         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2384         in a standard way debug info on stderr. Feature used for developing
2385         and debugging only,
2386         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2387         obsolete chunks of code,
2388         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2389         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2390         * pic16/src/pcode.c (pic16_newpCodeInfo,
2391         * (pic16_newpCodeOpLocalRegs),
2392         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2393         feature,
2394         * (pic16_pCodeConstString): printing of the initial value of a
2395         symbol as a comment is inhibited since parsing was already done by
2396         copyStr and output is corrupt,
2397         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2398
2399 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2400
2401         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2402
2403 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2404
2405         * as/mcs51/lkarea.c: removed old K&R style,
2406           (lnksect): changed check on boundary error,
2407           (lnksect2): changed check on boundary error,
2408           (lnksect2): extend XSTK to end of page if size = 1
2409         * as/mcs51/lkmain.c: removed old K&R style,
2410           (Areas51): create l_IRAM symbol
2411         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2412         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2413           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2414         * device/lib/_mullong.c: added version to be compiled with xstack
2415         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2416         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2417         * device/lib/mcs51/crtxstack.asm: fixed comment
2418         * src/SDCCglue.c: maxInterrupts defaults to 0,
2419           (emitMaps): added pdata,
2420           (createInterruptVect): (re)moved default,
2421           (glue): added pdata,
2422           (glue): moved __start__xstack to XSTK with default size 1
2423         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2424           and options.float_rent when options.stackAuto is set,
2425           (linkEdit): only write XDATA_NAME if provided on command line
2426         * src/SDCCmem.h,
2427         * src/SDCCmem.c: added pdata
2428         * src/port.h: added pdata_name to PORT
2429         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2430           (saveRegisters, unsaveRegisters): removed usage of B,
2431           (genMinus): fixed accumulator clash,
2432           (genJumpTab): added comment, this needs another look
2433         * src/mcs51/gen.c: added check for "B in use" paranoia,
2434           added pushB() and popB()
2435         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2436           chance
2437         * src/avr/main.c,
2438         * src/ds390/main.c,
2439         * src/hc08/main.c,
2440         * src/mcs51/main.c,
2441         * src/pic/main.c,
2442         * src/pic16/main.c,
2443         * src/xa51/main.c,
2444         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2445           added PSEG (PAG,XDATA) or NULL to port specifier
2446         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2447         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2448           (_mcs51_genInitStartup): removed __start__xstack equ,
2449           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2450         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2451         * src/z80/gen.c (_rleAppend): fixed warnings
2452         * support/regression/tests/zeropad.c: added pdata test
2453         * .version: bumped to 2.4.6
2454
2455 2004-10-17 Borut Razem <borut.razem AT siol.net>
2456
2457         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2458         as a part of nightly build
2459
2460 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2461
2462         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2463         WREG holds the first byte function parameters,
2464         * (aopForSym): take special case for symbols which are in FARSPACE
2465         but in CODESPACE too,
2466         * (assignResultValue): modified to take into account _G.useWreg,
2467         * (genCall): don't use wreg for parameter passing when function is
2468         declared as reentrant, too, added optimization INCF to stack
2469         pointer when stack parameter count is 1,
2470         * (genFunction, genEndFunction): refurnished and fixed to not using
2471         wreg for passing parameters when function has varargs or is
2472         reentrant, fixed bug with symbol name compare for generating
2473         functions in absolute address,
2474         * (pic16_storeForReturn): refurnished,
2475         * (genCmp): began writing a new version of the function, not ready
2476         yet, therefore it is disabled,
2477         * (genAssign): do not read code memory when assigning a function to
2478         a pointer function,
2479         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2480         array of characters, not pointer,
2481         * (pic16initialComments): in debug mode emit an .ident directive for
2482         the assembler,
2483         * (_process_pragma): emit a new warning type (internal to pic16)
2484         when setting stack to default length, emit a similar warning when
2485         placing a function at absolute address and address is not word aligned
2486         * (_pic16_parseOptions): added 'return TRUE' statement,
2487         * (_pic16_linkEdit): if compiling a source, then add the source's
2488         file object, first in the list of objects to link,
2489
2490 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2491
2492         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2493         * src/pic/main.c : removed VC warning.
2494         * src/pic/gen.c : changed comment.
2495
2496 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2497
2498         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2499         reference to a deprecated symbol _GPTRREG was causing failure to
2500         link. Thanks G. M. Gallant for the info.
2501
2502 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2503
2504         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2505         comments for Bugs item #954788.
2506
2507 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2508
2509         * src/pic16/device.c (pic16_dump_gsection,
2510         * pic16_groupRegistersInSection): handle symbols declared to be in
2511         access bank differently,
2512         * src/pic16/gen.c (struct _G): added field resDirect,
2513         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2514         send values read from stack directly to result and don't allocate
2515         temporary values,
2516         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2517         same registers,
2518         * (pic16_sameRegsOfs): NEW,
2519         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2520         free because they were not allocated from temporary pool,
2521         * pic16_popRegFromString): workaround to fix a problem with
2522         allocating variables twice or never,
2523         * (genGenPointerGet): using PRODL instead of FSR0H,
2524         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2525         instead of FSR0H,
2526         * (genAssign): take advantage of the _G.resDirect flag,
2527         * (genCast): around line 11844, use mov2f instead of directly
2528         MOVFF'ing between operands to account for literal values,
2529         * src/pic16/genutils.c: some new debug functions for gpsim have been
2530         added,
2531         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2532         float with integer part only,
2533         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2534         place variables in access bank
2535         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2536         updated sources to reflect recent changes in gen.c
2537
2538 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2539
2540         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2541         sources that searched for headers in installation path, now the
2542         device/include/pic16 is used,
2543         * src/pic16/glue.c (pic16glue),
2544         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2545         .line directives if not in debug mode, this suppresses assembler's
2546         warnings for ignored directives
2547
2548 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2549
2550         * src/port.h: made reset_regparms prototype void parameter explicit.
2551         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2552         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2553         * doc/sdccman.lyx: documented warning disabling and how to use
2554           printf_large to make it print floats.
2555         * device/include/stdbool.h: NEW
2556         * device/lib/_atof.c,
2557         * device/lib/_divuint.c,
2558         * device/lib/_divulong.c,
2559         * device/lib/expf.c,
2560         * device/lib/printf_large.c,
2561         * device/lib/sincosf.c,
2562         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2563         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2564           a completely reentrant lib.
2565
2566 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2567
2568         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2569         * device/include/pic16/stdio.h: fixed bug with colon
2570
2571 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2572
2573         * device/include/pic16/stdio.h,
2574         * device/include/pic16/stdlib.h,
2575         * device/include/pic16/math.h: NEW
2576         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2577         declared as _naked to reduce overhead
2578         * device/lib/Makefile.in (target port-specific-objects-pic16):
2579         changed * to *.* so to ignore the CVS directory,
2580         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2581         stacked variables back in stack,
2582         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2583         corruption
2584
2585 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2586
2587         * .version: bumped version number to 2.4.5
2588         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2589         * support/Util/SDCCerr.c (messages structure): added entry for
2590         W_POSSBUG2
2591
2592         Large cumulative patch for pic16 port and libraries.
2593         * device/include/pic16/sdcc-lib.h,
2594         * device/include/pic16/stdarg.h,
2595         * device/include/asm/pic16/features.h,
2596         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2597         * device/include/pic16/float.h: changes reentrant keyword with
2598         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2599         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2600         updated target build-libraries to include objects from gptr,
2601         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2602         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2603         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2604         all function headings,
2605         * src/SDCCmain.c: added global parameter userIncDirsSet,
2606         * (parseCmdLine): when option -I is encountered add directory to
2607         userIncDirsSet too,
2608         * src/version.awk: added space between control and long,
2609         * src/pic16/NOTES: added some notes for the port,
2610         * src/pic16/gen.c: added prototype for mov2fp function,
2611         * (fReturnpic16[]): properly named return value registers,
2612         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2613         * (aopForSym): added code to handle symbols with onStack flag set,
2614         symbols onStack are allocated PTRSIZE bytes,
2615         * (aopFreeAsmop): handles special case where asmops are stack objects,
2616         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2617         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2618         added argument lock to trace flaws in allocating temporary registers
2619         when developing port,
2620         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2621         * (pic16_popRegFromString): reenabled allocating a direct register
2622         from string,
2623         * (assignResultValue): various beautifications,
2624         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2625         referenced function argument,
2626         * (genIpush): reenabled to allow stacked arguments, handles only
2627         ic->parmPush iCodes,
2628         * (genCall, genPcall): major changes to allow for variable argument
2629         functions, fixed a bug with falsely restoring stack pointer after
2630         returning from call,
2631         * (genFunction): pending code for critical function,
2632         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2633         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2634         * (genNearPointerGet): fixed bug with indirect reading, was always
2635         reading from INDF0
2636         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2637         pointers,
2638         * (genAddrOf): rewrote code to take address of a stacked function parameter
2639         * (genCast): fixed casting to generic pointer type,
2640         * src/pic16/gen.h: added AOP_STA,
2641         * (struct asmop): added field stk,
2642         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2643         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2644         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2645         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2646         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2647         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2648         generic pointers,
2649         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2650         and library paths,
2651         * (pic16_port structure): generic pointer size is set to 3,
2652         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2653         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2654         compiler warning,
2655         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2656         operand is an iTemp,
2657
2658 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2659
2660         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2661         * debugger/mcs51/simi.c: addapt new syntax of s51
2662
2663 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2664
2665         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2666         * src/pic16/pcode.c: commented out some calls to free() in order to
2667         fix bug #989576,
2668
2669 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2670
2671         * src/SDCCicode.h,
2672         * src/SDCCicode.c (isiCodeInFunctionCall),
2673         * src/avr/ralloc.c (selectSpil),
2674         * src/pic/ralloc.c (selectSpil),
2675         * src/pic16/ralloc.c (selectSpil),
2676         * src/ds390/ralloc.c (selectSpil),
2677         * src/hc08/ralloc.c (selectSpil),
2678         * src/xa51/ralloc.c (selectSpil),
2679         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2680         stack in the middle of a function call sequence (fixes bug #1020268)
2681         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2682         costs associated with the minimum switch case.
2683
2684 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2685
2686         * src/SDCC.lex: fixed bug #1030549
2687
2688 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2689
2690         * src/SDCCcse.h (struct cseDef),
2691         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2692         over a function call if the CSE is derived from a symbol whose
2693         address has been taken (fixes bug #1029883)
2694         * support/regression/tests/bug-1029883: a new regression test for
2695         this bug
2696
2697 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2698
2699         * src/hc08/gen.c (emitinline): fixed bug #1029778
2700         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2701         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2702         and starts toward RFE #905167)
2703
2704 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2705
2706         * src/pic16/gen.c (mov2f): New function to move an operand to
2707         another without considering if it is a literal or a register,
2708         * (pic16_sameRegs): don't check if they are both AOP_REG,
2709         * (AccRsh): removed andmask=0 lines,
2710         * (genLeftShift): duplicated to be improved in future versions,
2711         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2712         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2713         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2714         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2715         * (insertBankSwitch): fixed inserting banksel directives algorithm
2716         for instructions that follow a skip instruction, this fixes a report
2717         for broken subtraction code generation,
2718         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2719         iCode is a left op, just in case result and right share the same
2720         registers
2721
2722 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2723
2724         * src/hc08/main.c,
2725         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2726         preservation of HX
2727         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2728         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2729         on 2004-09-12; it was buggy
2730
2731 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2732
2733         * src/SDCCsymt.h: removed RESULT_CHECK
2734         * src/SDCCast.c,
2735         * src/SDCCglue.c,
2736         * src/SDCCval.c,
2737         * src/pic/glue.c,
2738         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2739
2740 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2741
2742         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2743         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2744         configuration values no more rejected by compiler, they are assigned
2745         to configuration registers with a warning message instead,
2746         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2747         the for-loop so last conf register is emitted too,
2748         * (_pic16_initPaths): link library libsdcc.lib by default,
2749         * (_hasNativeMulFor): modified test for multiplication according to
2750         Raphael Neider's remarks. Integer multiplication is also done with
2751         support functions,
2752         * device/include/pic16/pic18fregs.h: corrected type error in while
2753         testing and including 18f6720 header file
2754
2755 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2756
2757         * src/pic16/device.h (pic16_options): removed field use_crt,
2758         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2759         until an optimization to handle single bits is added,
2760         * (pic16_loadFSR0): moved before genUnpackBits,
2761         * (genAnd): some white lines removed,
2762         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2763         leave_reset flags in pic16_options when using crt modules,
2764
2765 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2766
2767         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2768           for bugs 898889 & 979599. Also used some safer print instructions.
2769
2770 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2771
2772         * src/pic16/device.h (pic16_options_t): added field use_crt,
2773         crt_name, no_crt,
2774         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2775         catch a probable future bug,
2776         * src/pic16/gen.c: aopIdx function commented out,
2777         * (genAssign): commented out old code which used aopIdx,
2778         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2779         code, added if conditionals to take into account the --use-crt
2780         command line options,
2781         * src/pic16/main.c (pic16_optionsTable): added new command line
2782         options, --use-crt= and --no-crt,
2783         * (_pic16_linkEdit): now the proper crt object is added in the
2784         linker command line except than when --no-crt is specified,
2785         * src/pic16/pcode.c,
2786         * src/pic16/pcode.h: added some structures and functions for a new
2787         optimization scheme to compansate for instruction overhead between
2788         same iCodes, this scheme is currently under development and is not
2789         working in any way,
2790         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2791         to && operator,
2792         * device/lib/pic16/startup/crt0i.c,
2793         * device/lib/pic16/startup/crt0iz.c: added global char variable
2794         __uflags to force the generation of an idata section
2795
2796 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2797
2798         * doc/Makefile,
2799         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2800         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2801
2802 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2803
2804         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2805         Frieder) and clarified the default code optimization mode
2806
2807 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2808
2809         * src/SDCC.lex (doPragma, process_pragma),
2810         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2811         "opt_code_size", and "opt_code_balanced"
2812         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2813         regrouped options by category, added support for category headers
2814         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2815         and "--opt-code-size"
2816         * doc/sdccman.lyx: documented these new options and pragmas
2817         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2818         preference into account
2819
2820 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2821
2822         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2823           geniCodePreDec): Fixed bug 904237 by generating a warning
2824         * src/SDCCerr.h,
2825         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2826
2827 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2828
2829         * src/pic/device.c : When no max ram set validate full memory range.
2830         * src/pic/pcode.c,
2831         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2832
2833 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2834
2835         * device/lib/_gptrget.c,
2836         * device/lib/_gptrput.c: updated comment
2837         * device/lib/calloc.c,
2838         * device/lib/free.c,
2839         * device/lib/malloc.c,
2840         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2841         * src/SDCCcse.c (cseBBlock),
2842         * src/SDCCicode.c (printOperand, geniCodeArray),
2843         * src/SDCCicode.h (struct operand): fixed bug 868103
2844         * support/regression/tests/bug-868103.c: added
2845         * src/SDCCast.c (searchLitOp),
2846         * src/SDCCcse.h (struct cseDef),
2847         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2848         * src/SDCCicode.h (struct operand),
2849         * src/SDCCsymt.h (struct sym_link),
2850         * src/avr/gen.c (hasInc),
2851         * src/ds390/gen.c (hasInc),
2852         * src/hc08/gen.c (genPlusIncr, hasInc),
2853         * src/mcs51/gen.c (hasInc),
2854         * src/pic16/glue.c (pic16_printIvalChar),
2855         * src/pic16/ralloc.c (regWithIdx),
2856         * src/xa51/gen.c (hasInc) : removed warnings
2857         * src/SDCCast.c (createBlock): added comment ???
2858         * src/hc08/ralloc.c: updated comments
2859
2860 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2861
2862         * doc/sdccman.lyx: updated section on switch statements, added
2863         section about semaphore locking
2864         * doc/Makefile: added option -info for latex2html
2865         * device/lib/_gptrget.c,
2866         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2867
2868 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2869
2870         * src/pic/device.h,
2871         * src/pic/device.c,
2872         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2873          maxram is less than 0x100.
2874
2875 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2876
2877         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2878
2879 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2880
2881         * src/port.h,
2882         * src/mcs51/main.c,
2883         * src/ds390/main.c,
2884         * src/z80/main.c,
2885         * src/hc08/main.c,
2886         * src/pic/main.c,
2887         * src/pic16/main.c,
2888         * src/avr/main.c,
2889         * src/xa51/main.c
2890         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2891         a jump table is the best form for a switch statement, including
2892         automatic insertion of missing cases to make the case range
2893         continuous. Developed in collaboration with Frieder Ferlemann.
2894
2895 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2896
2897         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2898         accumulator result if it needs sign extension
2899
2900 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2901
2902         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2903
2904 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2905
2906         * device/lib/gbz80/printf.c,
2907         * device/lib/z80/printf.c: removed define for NULL
2908
2909 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2910
2911         * as/xa51/xa_link.c,
2912         * device/examples/ds390/ow390/ad26.c,
2913         * device/examples/ds390/ow390/cnt1d.c,
2914         * device/examples/ds390/ow390/counter.c,
2915         * device/examples/ds390/ow390/ds2480.h,
2916         * device/examples/ds390/ow390/ds2480ut.c,
2917         * device/examples/ds390/ow390/findtype.c,
2918         * device/examples/ds390/ow390/gethumd.c,
2919         * device/examples/ds390/ow390/owllu.c,
2920         * device/examples/ds390/ow390/ownetu.c,
2921         * device/examples/ds390/ow390/swt12.c,
2922         * device/examples/ds390/ow390/swtloop.c,
2923         * device/examples/ds390/ow390/temp.c,
2924         * device/examples/ds390/ow390/temp10.c,
2925         * device/examples/ds390/ow390/thermo21.c,
2926         * device/examples/ds390/ow390/tinilnk.c,
2927         * device/examples/ds390/ow390/tstfind.c,
2928         * device/examples/serialcomm/windows/serial.cpp,
2929         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2930         * device/include/reg51.h: fixed line endings for cvs
2931
2932 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2933
2934         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2935         packRegsForAccUse, packRegisters): new accumulator register
2936         packing algorithm
2937         * support/regression/ports/hc08/support.c (_putchar): suppress
2938         warning of unused variable
2939         * src/SDCCicode.c: added SWAP entry to codeTable
2940
2941 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2942
2943         * device/lib/sprintf.c: forgot to add this file before previous commit
2944
2945 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2946
2947         * src/pic16/gen.c (genPackBits): added operand right in function
2948         parameters, load result directly if p_type is POINTER (that is
2949         called by genNearPointerSet)
2950         * (genUnPackBits): added operand left in function parameters,
2951         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2952         FSR0 if accessing bitfields,
2953
2954 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2955
2956         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2957           _print_format; updated printf, sprintf, vsprintf
2958         * device/include/asm/default/features.h: corrected comment/define
2959         * device/lib/Makefile.in: added sprintf.c
2960         * device/lib/libsdcc.lib: added sprintf module
2961         * device/lib/printf_large.c,
2962         * device/lib/vprintf.c,
2963         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2964           into these 3 files
2965         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2966         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2967         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2968           hc08 test
2969         * support/regression/tests/zeropad.c: define idata as data for hc08
2970
2971 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2972
2973         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2974         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2975         labels are referenced at least once (even if a reference is not found)
2976         * src/hc08/gen.c (emitcode): set isComment flag for comments
2977         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2978         loads), rules 6a..6b (optimize jumps to return)
2979
2980 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2981
2982         * device/lib/acosf.c (acosf),
2983         * device/lib/asinf.c (asinf),
2984         * device/lib/atanf.c (atanf),
2985         * device/lib/ceilf.c (ceilf),
2986         * device/lib/cosf.c (cosf),
2987         * device/lib/coshf.c (coshf),
2988         * device/lib/cotf.c (cotf),
2989         * device/lib/fabsf.c (fabsf),
2990         * device/lib/floorf.c (floorf),
2991         * device/lib/log10f.c (log10f),
2992         * device/lib/logf.c (logf),
2993         * device/lib/sinf.c (sinf),
2994         * device/lib/sinhf.c (sinhf),
2995         * device/lib/sqrtf.c (sqrtf),
2996         * device/lib/tanf.c (tanf),
2997         * device/lib/tanhf.c (tanhf),
2998         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2999         replaced all instances of "reentrant" in the library functions
3000         defined in math.h with this macro.
3001         * support/regression/tests/float_trans.c: reenabled test for hc08
3002
3003 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3004
3005         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3006         erroneously deleted
3007
3008 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3009
3010         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3011         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3012         multi-byte volatile operands are used
3013         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3014         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3015         initialization to area GSINIT0 so that it would always precede
3016         any static initializers in GSINIT
3017         * support/regression/tests/zeropad.c: fixed idata define for hc08
3018         * support/regression/tests/bug-927659.c,
3019         * support/regression/tests/float_trans.c: disabled tests for hc08
3020         pending missing library routines
3021         * .version: increased version number to 2.4.4 - hc08 port now passes
3022         regression tests
3023
3024
3025 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3026
3027         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3028         * Makefile.common.in,
3029         * as/Makefile,
3030         * as/hc08/Makefile.in,
3031         * as/mcs51/Makefile.in,
3032         * as/z80/Makefile.in,
3033         * debugger/mcs51/Makefile.in,
3034         * device/include/Makefile.in,
3035         * device/lib/Makefile.in,
3036         * doc/Makefile,
3037         * link/Makefile,
3038         * link/z80/Makefile.in,
3039         * packihx/Makefile.in,
3040         * sim/ucsim/main_in.mk,
3041         * sim/ucsim/avr.src/Makefile.in,
3042         * sim/ucsim/doc/Makefile.in,
3043         * sim/ucsim/gui.src/serio.src/Makefile.in,
3044         * sim/ucsim/hc08.src/Makefile.in,
3045         * sim/ucsim/s51.src/Makefile.in,
3046         * sim/ucsim/xa.src/Makefile.in,
3047         * sim/ucsim/z80.src/Makefile.in,
3048         * src/Makefile.in,
3049         * support/cpp2/Makefile.in,
3050         * support/librarian/Makefile,
3051         * support/makebin/Makefile: added DESTDIR to the install path proposed
3052         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3053         * doc/sdccman.lyx: added DESTDIR documentation
3054
3055 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3056
3057         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3058         instruction for interrupt handlers, use fast returns when returning
3059         from high priority interrupts
3060
3061 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3062
3063         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3064         code generation
3065         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3066         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3067         bugs, ported much of Bernhard's code from mcs51
3068         * src/mcs51/gen.c (genSend),
3069         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3070         than one when calling a reentrant function
3071         * device/lib/_mullong.c: defined an alternate struct layout for big
3072         endian ports (hc08)
3073
3074 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3075
3076         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3077         test
3078
3079 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3080
3081         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3082         are sane and complete before asking the port its prefered parameter
3083         passing method (fixes bug #1017633)
3084         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3085         and _ret3
3086
3087 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3088
3089         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3090         problem in bitfields >= 8 bits.
3091
3092 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3093
3094         * src/SDCCsymt.c: undid changes that were not meant to be committed
3095
3096 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3097
3098         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3099
3100 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3101
3102         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3103           copied and wrong bit got inverted
3104
3105 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3106
3107         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3108         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3109         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3110         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3111         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3112         assignments to bitfields at known addresses
3113         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3114         reads from bitfields at known addresses
3115         * src/hc08/ralloc.c (packRegisters),
3116         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3117         genhc08Code): optimize pointer get values used as conditionals
3118         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3119         and branch
3120
3121 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3122
3123         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3124         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3125         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3126         as conditionals
3127
3128 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3129
3130         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3131
3132 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3133
3134         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3135         related problems
3136
3137 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3138
3139         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3140
3141 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3142
3143         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3144         mcs51 port
3145
3146 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3147
3148         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3149
3150 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3151
3152         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3153         cases use more compact code.
3154
3155 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3156
3157         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3158
3159 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3160
3161         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3162
3163 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3164
3165         * src/SDCCsymt.h,
3166         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3167         parameter of changePointer() from symbol* to sym_link*
3168         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3169         * src/SDCCsymt.c (compareType): void* type is castable to other
3170         pointers, but not necesarily an exact match.
3171         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3172         is no longer blindly treated as an exact match.
3173         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3174
3175 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3176
3177         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3178
3179 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3180
3181         * src/pic/gen.c,
3182         * src/pic/pcode.c,
3183         * src/pic/ralloc.h,
3184         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3185
3186 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3187
3188         * src/pic/device.c,
3189         * src/pic/device.h,
3190         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3191
3192 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3193
3194         * src/mcs51/gen.c (emitcode): fixed bug #992819
3195
3196 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3197
3198         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3199           there's no need to make it worse
3200
3201 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3202
3203         * src/mcs51/ralloc.c (deassignLR),
3204         * src/ds390/ralloc.c (deassignLR),
3205         * src/hc08/ralloc.c (deassignLR),
3206         * src/z80/ralloc.c (deassignLR),
3207         * src/pic/ralloc.c (deassignLR),
3208         * src/pic16/ralloc.c (deassignLR),
3209         * src/avr/ralloc.c (deassignLR),
3210         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3211         rlivePoint): fixed another part of bug #971834
3212
3213 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3214
3215         * src/z80/main.c: enabled "critical" keyword
3216         * src/z80/mappings.i,
3217         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3218         functions (fixes bug #979646)
3219         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3220
3221 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3222
3223         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3224           such as c:\mydir.
3225
3226 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3227
3228         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3229           doesn't disable too much optimizations
3230
3231 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3232
3233         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3234
3235 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3236
3237         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3238
3239 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3240
3241         * src/pic/gen.c tidied up tabs
3242         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3243         * src/pic/main.c tidied up tabs
3244         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3245         * src/pic/pcoderegs.c tidied up tabs
3246         * src/pic/ralloc.c tidied up tabs
3247
3248 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3249
3250         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3251         to S_FIXED for pic16 port and when symbol is not in level 0,
3252         allocate for S_REGISTER storage class and pic16 port, too,
3253         * src/pic16/device.h: prototype for checkSym,
3254         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3255         * (pic16_assignConfigWordValue): test the value and the mask to
3256         validate that the value is suitable for the configuration word,
3257         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3258         collect extern declared symbols, don't emit symbol twice, check
3259         first if symbol is in publics set first,
3260         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3261         * added command line '--fstack' which enables an experimental
3262         feature for stack access, too buggy to be used yet...
3263         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3264         * (pic16_allocDirReg): when register has storage class S_REGISTER
3265         allocate in pic16_dynAccessRegs,
3266         * device/include/pic16/pic18f????.h: modified configuration word
3267         naming convention, words started as CONFIG0H but should be CONFIG1H
3268
3269 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3270
3271         * device/include/mcs51reg.h: fixed bug 970993
3272
3273 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3274
3275         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3276         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3277         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3278         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3279         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3280         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3281           error/warning numbers,
3282           added function setWarningDisabled()
3283         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3284         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3285           _memcmp.c _memmove.c calloc.c realloc.c free.c
3286         * support/regression/tests/malloc.c: added tests for new functionality
3287         * support/regression/tests/zeropad.c: added tests for truncated initializers
3288           and initialized char arrays starting with '\x0'
3289         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3290
3291 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3292
3293         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3294
3295 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3296
3297         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3298         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3299         peephole 177.e. Thanks to anonymous
3300
3301 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3302
3303         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3304         function isn't used in the source but referenced as a
3305         variable initializer then declare it as extern in .asm file
3306
3307 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3308
3309         * .version: increased version number to 2.4.3
3310
3311         Adding version extension according to ChangeLog CVS revision
3312         * src/Makefile.in (target all): added dependency 'version.h'
3313         * (rule version.h): added rule to create version.h from ChangeLog,
3314         * (rule dep): added dependency version.h,
3315         * src/version.awk: AWK script to create version.h
3316         * src/SDCCdwarf2.c (dwWriteModule),
3317         * src/SDCCglue.c (initialComments),
3318         * src/SDCCmain.c (printVersionInfo): modified to write after
3319         version string the version extension number,
3320         * src/SDCCutil.c: included "version.h"
3321         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3322         number,
3323         * src/SDCCutil.h: added prototype for getBuildNumber
3324
3325         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3326         includeDirsSet, too,
3327         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3328         const char [] is found in function prototype...
3329
3330         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3331         moving to WREG with source is already in WREG,
3332         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3333         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3334         * (aopForSym): stack'ed symbols are partially supported, added
3335         if-clause to support symbols in FARSPACE,
3336         * (sameRegs): added test for AOP_ACC to see if registers are same,
3337         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3338         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3339         * (pic16_popRegFromString): will not allocate a new register if it
3340         doesn't find one by name, bug may have introduced...
3341         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3342         * (genIpush): revived to use pic16 port's stack,
3343         * (genAddrOf): added incomplete case for stack'ed operand,
3344         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3345         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3346         can handle multibyte operands,
3347         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3348         * (pic16initialComments): added message for MPLAB compatibility
3349         mode enabled,
3350         * src/pic16/main.h: prototype for pic16_mplab_comp,
3351         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3352         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3353         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3354         because of increased complexity of procedure,
3355         * (_process_pragma): stack pragma changed to format 'stack pos len',
3356         emit symbol '_stack_end' to conform with gplink,
3357         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3358         to search for register,
3359         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3360         PO_GPR_REGISTER,
3361         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3362         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3363         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3364         case for PO_GPR_REGISTER,
3365         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3366         dies, the new era is ahead !...
3367         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3368         pic16_dynInternalRegs,
3369         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3370         * (pic16_allocDirReg): minor optimizations and bug fixes,
3371         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3372
3373         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3374         load stack and frame pointer with address of 'stack_end' symbol
3375
3376 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3377
3378         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3379         without source code but only variable initializers
3380
3381 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3382
3383         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3384         external are not declared as extern to reduce overhead while linking
3385
3386 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3387
3388         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3389
3390 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3391
3392         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3393           Yee Keat for the patch
3394         * src/SDCCast.c (decorateType): fixed bug #979599
3395         * src/ds390/gen.h: removed local fReturnSizeDS390
3396         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3397         * src/ds390/gen.c (genAnd, genOr, genXor),
3398         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3399
3400 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3401
3402         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3403         add relFilesSet to $3, manipulate $2 to handle linking of object
3404         files without source files in command line,
3405         * device/include/pic16 (all headers): added ID location macros,
3406         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3407         entries for ID location bytes,
3408         * (pic16_assignIdByteValue): NEW,
3409         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3410         added field dumpcalltree to pic16_options_t,
3411         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3412         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3413         emitting rFalseIfx label after check_carry label,
3414         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3415         pic16_emitDIRegs), NEW
3416         * (pic16glue): dump .calltree file when option --calltree found,
3417         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3418         * (_pic16_genAssemblerPreamble): emit ID locations after
3419         configuration registers,
3420         * (pic16_linkCmd): modifications of the link command,
3421         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3422         * (pic16_pCodeInitRegisters): don't init stack registers,
3423         * (pic16_findPrevInstruction): fixed bug,
3424         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3425         bug with immediate registers,
3426         * (buildCallTree): traces stack push and pop,
3427         * (pct2): dump also stack usage for each function,
3428         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3429         * (pic16_allocDirReg): various modifications,
3430         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3431         fixed to 1,
3432
3433 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3434
3435         * src/pic16/pcode.c: removed buggy double colon
3436
3437 2004-07-01 Borut Razem <borut.razem AT siol.net>
3438
3439         * support/scripts/sdcc.nsi: added include/pic16 to setup
3440
3441 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3442
3443         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3444         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3445         target 'clean',
3446         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3447         specific command line arguments. Also added sample lkr script
3448         for placing a variable at a specific memory bank.
3449         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3450         at a specific memory bank,
3451         * (pic16_dump_isection): fixed bug which caused string literals to
3452         be omitted when dumping idata section,
3453         * (pic16_groupRegistersInSection): added code to handle registers
3454         in specific memory banks,
3455         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3456         public, all references are renamed too,
3457         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3458         AOP_DPTR2,
3459         * (pic16_storeForReturn): added case to handle when dest is WREG,
3460         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3461         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3462         pic16_rel_udata, check to see if that register is marked as being
3463         a member of a specific memory bank,
3464         * (pic16_printIvalCharPtr): added code to add string literals either
3465         to code or the idata sections,
3466         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3467         also accept the 'udata' pragma,
3468         * src/pic16/main.h: new structure types sectName and sectSym
3469         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3470         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3471         * (pic16_findPrevInstruction): fixed, it returned nothing,
3472         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3473         instruction combinations,
3474         * (pic16_FixRegisterBanking): heavily reorganised,
3475         * (pic16_AnalyzeBanking): if generating banksel directives is
3476         disabled, then don't call FixRegisterBanking at all,
3477         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3478         completely removed,
3479         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3480
3481 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3482
3483         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3484         Phuah Yee Keat <yk.phuah AT nestac.com>
3485
3486 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3487
3488         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3489         correctly the IVT even if it is relocated to some other location
3490
3491 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3492
3493         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3494         * device/include/pic16/pic18f2220.h: NEW,
3495         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3496         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3497         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3498         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3499         nodefaultlibs, ivt_loc is the location of the interrupt vector
3500         table, and nodefaultlibs signs that default libraries should not be
3501         linked in link stage,
3502         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3503         according to --ivt-loc argument,
3504         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3505         when pragma stack is found,
3506
3507 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3508
3509         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3510         256 (range check), 257 (do while), 258.a-f (bit banging
3511         f.e. on 3-wire SPI bus)
3512
3513 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3514
3515         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3516         variables used exclusively within a loop
3517
3518 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3519
3520         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3521
3522 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3523
3524         * src/SDCClrange.c (computeClash): fixed bug #971834
3525
3526 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3527
3528         * src/mcs51/gen.c (genCmp): fixed bug #975903
3529         * src/hc08/gen.c (operandsEqu),
3530         * src/ds390/gen.c (operandsEqu),
3531         * src/z80/gen.c (operandsEqu),
3532         * src/pic/gen.c (operandsEqu),
3533         * src/pic16/gen.c (operandsEqu),
3534         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3535         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3536
3537 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3538
3539         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3540
3541 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3542
3543         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3544         default case in switch statement,
3545         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3546         to eliminate problem with initialisation of pointers, but problem
3547         still exists,
3548         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3549         * (emitStaticSegment): removed various lines emitting debug info,
3550         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3551         added processor registers for utilizing EEPROM,
3552         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3553         configurable and set 8
3554
3555 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3556
3557         * .version: increased version number to 2.4.2,
3558
3559         Cumulative patch for pic16 port
3560         * src/pic16/device.c: changed scheme to dump initial values for
3561         variables in idata segment, all print_idata* functions were removed,
3562         now the pic16_printIval* will be called,
3563         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3564         * _pic16_printPointerType, pic16_printPointerType,
3565         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3566         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3567         NEW, similar to the respective functions in SDCCglue.c,
3568         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3569         way, emitting hex bytes,
3570         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3571
3572 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3573
3574         * src/avr/ralloc.c (serialRegAssign),
3575         * src/xa51/ralloc.c (serialRegAssign),
3576         * src/pic/ralloc.c (serialRegAssign),
3577         * src/pic16/ralloc.c (serialRegAssign),
3578         * src/hc08/ralloc.c (serialRegAssign),
3579         * src/z80/ralloc.c (serialRegAssign),
3580         * src/ds390/ralloc.c (serialRegAssign),
3581         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3582
3583 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3584
3585         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3586         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3587
3588 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3589
3590         Cumulative patch for pic16 port:
3591         * src/pic16/device.h (typedef PIC16_device) modified fields for
3592         defining microcontrollers,
3593         * src/pic16/device.c: added new info for all devices in Pics16 array,
3594         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3595         to be optimised out by the pCode optimiser,
3596         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3597         specially, bug reported by G.M. Gallant,
3598         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3599         as force'd so that cannot be optimised out by pCode optimiser,
3600         * src/pic16/pcode.c,
3601         * src/pic16/pcodepeeph.c,
3602         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3603         they are disabled by default, but can be enabled explicit with
3604         command argument --denable-peeps, for testing,
3605         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3606         --pomit-ivt in COMPILE_FLAGS
3607
3608 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3609
3610         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3611           compilation on MSVC
3612
3613 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3614
3615         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3616
3617 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3618
3619         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3620         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3621
3622 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3623
3624         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3625         would only assign 0x300001 register.
3626
3627 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3628
3629         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3630         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3631
3632 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3633
3634         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3635         for ds80c400
3636         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3637         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3638         added peephole 254 (left shift), 255 (jump table)
3639
3640 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3641
3642         * device/lib/Makefile.in: removed comment line with model-pic16,
3643         * (target port-specific-objects-pic16): the libraries and objects
3644         are copied to the build directory form the device/lib/pic16/bin
3645         directory
3646
3647         Cumulative patch concerning pic16 port:
3648         * library directory has been re-organized,
3649         * added support for PIC18F1220,
3650         * added headers and library sources for chips 18f1220,18f6520,
3651         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3652
3653         * configuration registers setting has changed, now each supported
3654         device has a complete description of the registers it uses,
3655         * all initialisations are moved to idata sections, these section
3656         can be absolute or relocatable,
3657         * fixed initialisation of codespace variables,
3658         * fixed warning about PCLATU and gpsim,
3659         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3660         * (genAssign): use table reads when assigning from variables in codespace,
3661         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3662         char/int variables placed in codespace,
3663         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3664         registers set in .asm file, no need for --pomit-config-words anymore,
3665         * (pic16glue): some 8051 legacy segments are commented out
3666         (to be removed completely),
3667         * added support for alternative assembler and linker with --asm=
3668         and --link= command line arguments,
3669         * peepholes are disabled automatically in the port, no need to
3670         specify on command line,
3671         * port supports natively char/int/long multiplication, but converts
3672         all divisions to support functions,
3673         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3674         to the file set in variable $2,
3675         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3676         strings in ASCII format and not in hex,
3677         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3678         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3679         allocate proper register if iCodes aren't temporary,
3680
3681 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3682
3683         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3684
3685 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3686
3687         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3688         is commented out
3689
3690 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3691
3692         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3693         computed address is reused
3694         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3695         multi-byte bitfields
3696
3697 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3698
3699         * src/z80/gen.c: (genArrayInit): must check for pointers too
3700
3701 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3702
3703         * support/regression/tests/zeropad.c: never meant to commit the
3704           nestedstruct test: removed, added check for GCC version
3705
3706 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3707
3708         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3709         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3710         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3711           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3712           bugs 928906 and 954082 half-empty initializers
3713         * src/SDCCsymt.h,
3714         * src/SDCCsymt.c (getAllocSize): added for above fix
3715         * src/z80/gen.c (genArrayInit): fixed bug 741044
3716         * support/regression/tests/zeropad.c: added tests
3717
3718 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3719
3720         * src/pic16/device.c (pic16_dump_section): corrected bug which
3721         caused some symbols of the libraries to be misplaced
3722
3723 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3724
3725         * src/pic16/glue.c,
3726         * src/pic16/ralloc.h,
3727         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3728         to fix conflict with pic port
3729
3730 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3731
3732         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3733         externs configuration variables,
3734         * src/pic16/ralloc.h,
3735         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3736         prototype in header, commented out some debug messages
3737
3738 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3739
3740         * src/pic16/glue.c,
3741         * src/pic16/main.c,
3742         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3743         for gpasm COFF object generation. Thanks to D. Hawkins for
3744         his patch info
3745
3746 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3747
3748         * src/ds390/main.c,
3749         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3750         Brock for spotting this)
3751         * src/ds390/gen.c (genEndFunction),
3752         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3753         interrupt handler and critical. Disable push/pop optimizations when
3754         peephole optimizations disabled.
3755
3756 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3757
3758         Updated pic16 library sources and headers.
3759         * device/lib/pic16/pic18f*/ ,
3760         * device/include/pic16/*.h: modified to handle structured SFR
3761         definitions
3762
3763 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3764
3765         * src/port.h (PORT structure): added hook initPaths, now each
3766         port can declare its own default search paths,
3767         which can been seen with the --print-search-dirs option,
3768         see pic16 port for example,
3769         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3770         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3771         * (doPrintSearchDirs): NEW, replaces in a central manner the
3772         printing of search dirs which was split in set*Paths functions,
3773         * (main): added call to port->initPaths and doPrintSearchDirs,
3774         * src/avr/main.c,
3775         * src/ds390/main.c,
3776         * src/hc08/main.c,
3777         * src/izt/i186.c,
3778         * src/izt/tlcs900h.c,
3779         * src/mcs51/main.c,
3780         * src/pic/main.c,
3781         * src/pic16/main.c: modified port structures to reflect addition of
3782         initPaths hook,
3783
3784         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3785         * (pic16_dump_section): for registers in same address reserve memory once,
3786         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3787         to no_banksel,
3788         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3789         result is greater in size than right or left,
3790         * (pic16_genUMult8X8_8): there are some cases where the result can
3791         be 16 bits size, so handle these,
3792         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3793         * (pic16_outBitC): modified to emit pcodes,
3794         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3795         or not,
3796         * (genDivOneByte): implemented algorithm to divide 8-bits,
3797         * (genCmp): uncommented goto, but issues still exist,
3798         * (genAnd): fixed a bug with variables >8bits,
3799         * (genPackBits): optimization added that uses BCF/BSF to change a
3800         single bit,
3801         * (genAssign): fixed bug when assigning floating point literals,
3802         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3803         __sdcc_gsinit_startup label,
3804         * src/pic16/main.c (_pic16_init): removed search directory
3805         initialisations,
3806         * (_pic16_initPaths): NEW, used to initialise search directories,
3807         * (_hasNativeMulFor): support functions for all except char/int
3808         multiplication, and char division,
3809         * (PIC16_port struct): modified entry for native mul support,
3810         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3811         no_banksel option,
3812         * (buildCallTree): call to register_usage is ifdef'ed out,
3813
3814 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3815
3816         * device/include/string.h: applied Stas Sergeev's patch to make this
3817         header file compatible with the preprocessor -Wundef option
3818         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3819         failure (fixes bug #941458)
3820
3821 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3822
3823         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3824         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3825         that the variable, not the function, should be static
3826         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3827         to be consistent with non-literal case
3828
3829 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3830
3831         * src/SDCCast.c (isConformingBody): fixed bug #949967
3832         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3833         convilong): fixed bug #952086
3834
3835 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3836
3837         * src/SDCCmem.c (allocVariables): fixed bug #955321
3838
3839 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3840
3841         * src/hc08/main.c (_hc08_genAssemblerEnd),
3842         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3843         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3844         completely eliminated the use of a temporary file
3845         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3846         when more than one file linked
3847         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3848
3849 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3850
3851         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3852         which fixes bug #543481
3853         * support/regression/tests/bug-751703.c: fixed comments left from a
3854         cut and paste error
3855         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3856         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3857         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3858         scopes
3859         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3860         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3861         are now changed to underscores in moduleName
3862
3863 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3864
3865         * as/mcs51/lkmem.c: better fix for bug #954173
3866
3867 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3868         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3869
3870         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3871         * device/include/c8051f000.h,
3872         * device/include/c8051f120.h,
3873         * device/include/c8051f300.h,
3874         * device/include/c8051f310.h,
3875         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3876         PWM16) and detab'ed
3877
3878 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3879
3880         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3881         and mailing lists, doc'ed --no-peep-comments, removed reference
3882         to knoppix (newest version has no LyX/LaTeX), other minor changes
3883         * src/SDCCglue.c (glue): save 2 bytes stack space with
3884         option --main-return. The ljmp could probably be avoided too
3885
3886 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3887
3888         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3889
3890 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3891
3892         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3893         * src/SDCCopt.c (isLocalWithoutDef),
3894         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3895         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3896         (credit to Maarten Brock for patch #949363, on which this is based)
3897         * support/regression/tests/bug-751703.c: some test cases of extern used
3898         within inner scopes.
3899
3900 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3901
3902         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3903         SPEC_STRUCT
3904         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3905         struct definitions
3906         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3907         dwWriteLabel): fix to create valid debugger symbols even when
3908         the module name has non-alphanumeric symbols in it
3909         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3910         when a variable's allocation has been optimized away
3911
3912
3913 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3914
3915         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3916         * src/hc08/main.c,
3917         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3918         * src/mcs51/main.c,
3919         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3920         * src/ds390/main.c,
3921         * src/z80/gen.c (z80_emitDebuggerSymbol),
3922         * src/z80/main.c,
3923         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3924         * src/pic/main.c,
3925         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3926         * src/pic16/main.c,
3927         * src/avr/gen.c (avr_emitDebuggerSymbol),
3928         * src/avr/main.c,
3929         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3930         * src/xa51/main.c,
3931         * src/SDCCdebug.c (emitDebuggerSymbol),
3932         * src/SDCCdebug.h,
3933         * src/port.h: added a debugger struct to the port struct. Added a
3934         callback for defining debugger symbols
3935
3936         * src/SDCCast.c (createLabel),
3937         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3938         with isitmp = 1
3939         * src/SDCCicode.h,
3940         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3941         iCode back to the ast for the function
3942
3943         * src/hc08/ralloc.c (hc08_assignRegisters),
3944         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3945         unneeded fields from the regs struct.
3946         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3947         pushReg() & pullReg() functions instead of emitcode()
3948
3949         * src/hc08/gen.c (genLabel, genhc08Code),
3950         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3951
3952         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3953         debugger hooks
3954
3955         * src/hc08/gen.c (genEndFunction, genhc08Code),
3956         * src/hc08/gen.h,
3957         * src/mcs51/gen.c (genEndFunction, gen51Code),
3958         * src/mcs51/gen.h,
3959         * src/ds390/gen.c (genEndFunction, gen390Code),
3960         * src/ds390/gen.h,
3961         * src/z80/gen.c (genEndFunction, genZ80Code),
3962         * src/z80/gen.h,
3963         * src/z80/z80.h,
3964         * src/pic/gen.c (genEndFunction, genpic14Code),
3965         * src/pic/gen.h,
3966         * src/pic16/gen.c (genEndFunction, genpic16Code),
3967         * src/pic16/gen.h,
3968         * src/avr/gen.c (genEndFunction, genAVRCode),
3969         * src/avr/gen.h,
3970         * src/xa51/gen.c (genEndFunction, genXA51Code),
3971         * src/xa51/gen.h,
3972         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3973         specific code to cdbFile.c and out of the backend code generators
3974
3975         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3976         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3977         starting address is now 0
3978
3979         * as/hc08/asm.h,
3980         * as/hc08/m08pst.c,
3981         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3982         assembler directive for DWARF support
3983         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3984
3985         * src/src.dsp,
3986         * src/Makefile.in,
3987         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3988
3989 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3990
3991         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3992         and inappropriate peephole optimization in jump tables
3993
3994 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3995
3996         * as/hc08/m08pst.c,
3997         * src/SDCCglue.c: sdccopt works for the hc08 port now
3998
3999 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4000
4001         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4002
4003 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4004
4005         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4006
4007 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4008
4009         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4010         rules
4011         * src/SDCCmain.c,
4012         * src/SDCCglobl.h,
4013         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4014         comments from the peephole optimizer replacement rules
4015         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4016         symbols
4017         * src/SDCCcse.c (updateSpillLocation),
4018         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4019         equivalents
4020         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4021         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4022         objects far pointers
4023
4024 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4025
4026         * src/SDCCsymt.h: a missing part of my last change
4027         * src/pic/ralloc.c (regTypeNum),
4028         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4029
4030 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4031
4032         * src/SDCCicode.h,
4033         * src/SDCCicode.c (aggrToPtrDclType),
4034         * src/SDCCptropt.h,
4035         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4036         ptrPseudoSymConvert),
4037         * src/pic/ralloc.c (regTypeNum),
4038         * src/pic16/ralloc.c (regTypeNum),
4039         * src/hc08/ralloc.c (regTypeNum),
4040         * src/ds390/ralloc.c (regTypeNum),
4041         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4042         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4043
4044 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4045
4046         * link/z80/lkmain.c (afile),
4047         * as/hc08/lkmain.c (afile),
4048         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4049         prevent a pointer problem when a filename has no directory and
4050         no extension specified.
4051
4052 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4053
4054         * link/z80/lkmain.c (afile): allow periods in directory names
4055         * link/z80/lkmain.c (afile),
4056         * as/mcs51/lkmain.c (afile),
4057         * as/hc08/lkmain.c (afile): allow linker script file to have an
4058         extension other than ".lnk"
4059         * link/z80/lklex.c (getfid),
4060         * link/z80/lkmain.c (parse),
4061         * as/mcs51/lklex.c (getfid),
4062         * as/mcs51/lkmain.c (parse),
4063         * as/hc08/lklex.c (getfid),
4064         * as/hc08/lkmain.c (parse): Support comments in the linker script
4065         file on lines by themselves and after filenames
4066
4067 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4068
4069         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4070
4071 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4072
4073         * src/z80/peeph-z80.def: removed some peephole rules that don't
4074         work with multibyte arithmetic (fixed bug #937126)
4075         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4076         to registers and not global variables
4077         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4078         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4079         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4080         checking for assignments not internally generated (fixed bug #931895)
4081         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4082         structure member (fixed bug #930072)
4083
4084 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4085
4086         * src/SDCCmain.c (linkEdit),
4087         * src/hc08/main.c (_hc08_parseOptions),
4088         * as/hc08/Makefile.in,
4089         * as/hc08/aslink.h,
4090         * as/hc08/asm.h,
4091         * as/hc08/m08pst.c,
4092         * as/hc08/lkrloc.c (relr, rele),
4093         * as/hc08/lkarea.c (lnkarea)
4094         * as/hc08/lkmain.c (afile, parse),
4095         * as/hc08/lkelf.c: support for ELF output
4096         * as/hc08/lks19.c (s19),
4097         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4098
4099 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4100
4101         * as/mcs51/lkihx.c: Fixed bug #899105.
4102
4103 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4104
4105         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4106         .dsp files from Unix to DOS.
4107
4108 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4109
4110         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4111         function pointers; we have been compliant for several months now.
4112         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4113         change that was accidently commented out
4114         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4115         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4116         bug #922319
4117
4118 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4119
4120         * src/hc08/gen.c: output of all of the internal debugging information
4121         is now controlled by the D() macro; it is disabled by default
4122
4123 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4124
4125         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4126         harder to keep the same registers during a CAST iCode
4127         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4128         long via int can be done in a single cast, if the signedness is
4129         correct.
4130         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4131         putchar() in tinibios.c in ds390's library
4132
4133 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4134
4135         * src/SDCCast.c (decorateType): fixed bug #898889,
4136         cast result of a literal complement too
4137         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4138         fixed check for bitfields
4139
4140 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4141
4142         * src/SDCCicode.c (geniCodeLogic): made it static,
4143         (geniCodeLogicAndOr): added in order to fix bug #905492,
4144         (ast2iCode): fixed bug #905492
4145         * support/regression/tests/bug-905492.c: added
4146         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4147         (processParms): fixed bug #927659: don't copy parms, this will clear
4148         decorated flag
4149         * support/regression/tests/bug-927659.c: added
4150
4151 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4152
4153         * src/SDCCast.c (addCast): don't cast float to char
4154         * device/lib/libsdcc.lib: added _memmove
4155
4156 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4157
4158         * device/lib/large/Makefile: fixed parallel execution by
4159         replacing `make` by `$(MAKE)`
4160
4161 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4162
4163         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4164         offsets (fixes bug #923936)
4165
4166 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4167
4168         * device/lib/small/Makefile: fixed parallel execution by
4169         replacing `make` by `$(MAKE)`
4170
4171 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4172
4173         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4174
4175 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4176
4177         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4178         * src/regression/Makefile: Regression test was not running.
4179
4180 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4181
4182         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4183         complement if possible
4184         * src/SDCCval.c (valComplement),
4185         * src/SDCCicode.c (operandOperation): fixed complement of literal
4186         * support/regression/tests/onebyte.c (testComplement): added
4187
4188 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4189
4190         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4191         return an optimized tree; actually replace actParm with the new tree
4192         * src/SDCCast.h: added some parantheses to remove side effects
4193         * support/regression/tests/bug-920866.c
4194
4195 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4196         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4197         Bit operands were not being handled properly in the pic14 port.
4198         (now src/regression/add.c passes again).
4199
4200 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4201
4202         * src/SDCC.y (labeled_statement): case and default no longer require
4203         a following statement (RFE #893037)
4204
4205 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4206
4207         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4208         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4209         disabled (fixes bug #916294)
4210         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4211         "mov a,acc"; patch provided by Lenny Story
4212         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4213
4214 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4215
4216         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4217         functions
4218         * src/ds390/gen.c (genFunction, genEndFunction),
4219         * src/ds390/ralloc.c (ds390_assignRegisters),
4220         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4221         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4222         pushed if there are parameters passed on the stack. Also, a cleaner
4223         way to decide if r0/r1 should be pushed/popped. (Together they fix
4224         bug #918693)
4225
4226 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4227
4228         * doc/sdccman.lyx,
4229         * device/lib/mcs51/crtpagesfr.asm,
4230         * device/lib/mcs51/crtxinit.asm,
4231         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4232         to avoid confusion with Si Lab's SFRPAGE register.
4233
4234 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4235
4236         * src/SDCCglue.c (emitMaps): allow public sfr variables
4237         * src/SDCCglue.c (initialComments): include compiler build date
4238         with compiler version and put the timestamp of the generated
4239         assembly file on a serperate line to be less confusing.
4240         * src/port.h: added genInitStartup hook
4241         * src/avr/main.c,
4242         * src/ds390/main.c,
4243         * src/hc08/main.c,
4244         * src/pic/main.c,
4245         * src/pic16/main.c,
4246         * src/xa51/main.c,
4247         * src/z80/main.c: genInitStartup initialize as NULL (default to
4248         historical behaviour)
4249         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4250         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4251         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4252         library instead of hard coding it into the compiler.
4253         * support/regression/ports/mcs51-stack-auto/spec.mk,
4254         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4255         * device/lib/mcs51/Makefile,
4256         * device/lib/small/Makefile,
4257         * device/lib/large/Makefile,
4258         * device/lib/mcs51/crtpagesfr.asm,
4259         * device/lib/mcs51/crtstart.asm,
4260         * device/lib/mcs51/crtxclear.asm,
4261         * device/lib/mcs51/crtxinit.asm,
4262         * device/lib/mcs51/crtclear.asm,
4263         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4264         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4265         and into user configurable files.
4266         * device/lib/clean.mk: clean mcs51 directory too
4267         * support/regression/tests/longlit.c: added static to T1 declaration
4268         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4269         accesses in the initialization code
4270
4271 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4272
4273         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4274         OSCTRIMVAL as noted in bug #916008
4275
4276 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4277
4278         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4279         in loops with multiple exits (reported as incorrect registers
4280         used by Martin Helmling in Sdcc-user list)
4281
4282 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4283
4284         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4285         made ds390 register extensions look less like error messages
4286
4287 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4288
4289         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4290         reported by Adam Wozniak in Sdcc-user list
4291
4292 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4293
4294         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4295         arithmetic optimizations, added debug output
4296
4297 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4298
4299         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4300         * sdcc.spec: updated and split sdcc into 3 rpms
4301         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4302         needed for literals of LEFT_OP and '+'
4303         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4304         introduced RESULT_TYPE_NOPROM
4305         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4306         left shift
4307         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4308         limited promotion to int only for '*'
4309         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4310
4311 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4312
4313         * src/pic16/gen.c (genSkip),
4314         (genc16bit2lit), (gencjneshort): commented out
4315         (is_LitOp): new helper function, checks operand type
4316         (genCmpEq): rewritten
4317
4318 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4319
4320         * support/regression/tests/bug-908454.c: added
4321
4322 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4323
4324         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4325         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4326         (geniCodeCast): cosmetic, don't preserve bit storage class
4327         (geniCodeLeftShift): added promotion
4328         (geniCodeLogic): fixed regression
4329         * src/SDCCsymt.c (computeTypeOr): accept bits too
4330         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4331
4332 2004-03-07  Borut Razem <borut.razem AT siol.net>
4333
4334         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4335
4336 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4337
4338         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4339         version of pic16_genPackRegisters which does not check if ic is a
4340         CAST operator,
4341         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4342         function cause string1.c regression test fails
4343
4344 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4345
4346         * sim/ucsim/configure.in,
4347         * sim/ucsim/configure,
4348         * sim/ucsim/doc/Makefile.in: use docdir
4349         * src/SDCC.y: fixed sbit atrributes
4350         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4351         * src/SDCCast.c (decorateType): |^& need special promotion handling
4352         * src/SDCCast.h,
4353         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4354         * src/SDCCsymt.h (computeType),
4355         * src/SDCCicode.c: computeType() needs op
4356         * src/SDCCsymt.c (checkTypeSanity),
4357         * doc/sddman.lyx: "plain" bitfields are unsigned
4358         * src/SDCCsymt.c (computeTypeOr): added
4359         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4360         |^& ops
4361         * src/SDCCval.c (val*): computeType() needs op
4362         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4363         * support/regression/tests/onebyte.c: added tests for |^&
4364
4365 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4366
4367         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4368         for writing icode into asm output.
4369
4370 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4371
4372         * src/pic16/device.c: added some debug lines enabled
4373         with macro DEBUG_CHECK,
4374         * src/pic16/genarith.c: more debug in genPlus,
4375         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4376         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4377         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4378         * (aopForSym): onStack symbols are re-placed in data memspace,
4379         and onStack flag is cleared,
4380         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4381         copy temporary pcodeop,
4382         * (genPcall): added warning for not updating PCLATU,
4383         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4384         always true for pic16 port,
4385         * (genMultOneWord): NEW, supports integer multiplication,
4386         * (genMult): modified to call genMultOneWord,
4387         * (ifxForOp): added warning when return NULL,
4388         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4389         flag is set before call to operandFromSymbol for implicit
4390         added structures,
4391         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4392         options.intlong_rent are set by default,
4393         * (_hasNativeMulFor): modified to allow port generation of integer
4394         multiplication,
4395         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4396         set regtype to REG_SFR for all registers, restricting seting the
4397         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4398
4399 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4400
4401         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4402         more than 500 times in the regression tests
4403
4404 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4405
4406         * support/Util/SDCCerr.h,
4407         * support/Util/SDCCerr.c,
4408         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4409         enumerator_list),
4410         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4411         for symbol conflicts.
4412         * support/valdiags/tests/enum.c,
4413         * support/valdiags/tests/tentdecl.c,
4414         * support/valdiags/tests/struct.c: expect possible error messages
4415         referring to original symbol definitions.
4416         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4417         * src/SDCCsymt.h,
4418         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4419
4420 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4421
4422         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4423
4424 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4425
4426         * src/pic16/ralloc.c (newReg): fixed bug #908929
4427
4428 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4429
4430         * src/ds390/gen.c: added missing #include "main.h"
4431
4432 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4433
4434         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4435         checking if symbol is already in set,
4436         * src/pic16/device.h: prototype for checkAddSym,
4437         * src/pic16/gen.c: (_G): added entry interruptvector,
4438         * (assignResultValue): removed some commented out lines,
4439         * (genFunction): check for ISR via sym->type, absolute section for
4440         interrupt code is created via a new pBlock, the goto instruction is
4441         placed now correctly at the interrupt vector position, changed all
4442         references from ivec to _G.interruptvector,
4443         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4444         is the interrupt is a high priority one, same for return from ISR,
4445         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4446         externs to calls of checkAddSym,
4447         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4448         pic16_pcode_verbose flag is set,
4449         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4450         * src/pic16/pcoderegs.c: message about how many registers are saved
4451         will only be emitted if pic16_pcode_verbose flag is set,
4452
4453 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4454
4455         * src/ds390/ralloc.h,
4456         * src/ds390/ralloc.c (ds390_regWithIdx),
4457         * src/ds390/gen.c (emitcode),
4458         * src/ds390/main.h,
4459         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4460         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4461         ds390operandCompare, getRegsRead, getRegsWritten,
4462         initializeAsmLineNode): customized instruction size calculation for
4463         ds390, started basis for some register optimizations
4464         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4465         corresponding assembly output
4466         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4467         missing push/pop of r0/r1. Optimized push/pops
4468
4469 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4470
4471         * src/mcs51/main.c (instructionSize): fixed ACALL size
4472         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4473
4474 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4475
4476         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4477         the sorting of rlist with NULL elements
4478         * (print_idataType, print_idata): NEW to create idata sections
4479         * src/pic16/device.h: idataSymSet new variable
4480         * src/pic16/gen.c (genFunction): fixed some bugs in string
4481         comparing, improved the absolute section creation for ISRs,
4482         added FSR0L/FSR0H in registers that are saved in an ISR,
4483         * (genInline): fixed the processing of inline snippets,
4484         now they undergo no process by the peephole optimizer
4485         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4486         are placed in idataSymSet,
4487         * (pic16emitStaticSeg): extern symbols are added in externs,
4488         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4489         switching when aboslute variables are placed in access bank memory
4490         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4491         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4492         commented out with #if,
4493         * (pic16_packRegisters): reintroduce the check for CAST because some
4494         symbols are not correctly handled,
4495         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4496         pCodeInstruction instead of pCode,
4497         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4498         pCodeAsmDir definition,
4499         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4500         directive, then the argument directive is emitted without the leading
4501         tab, hack for inline labels which must be in the first column,
4502         * (compareLabel,pic16_findNextInstruction),
4503         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4504         * (insertBankSwitch): modified for the new pCodeAsmDir,
4505
4506 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4507         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4508
4509         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4510         instance,
4511         * (pushSide): commented out with #if,
4512         * (assignResultValue): fixed some typos in saving
4513         registers,
4514         * (genPcall): FIXED and sync'ed with genCall,
4515         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4516         * (genNearPointerGet): fixed to handle some more cases,
4517         implementation scheme via table reads,
4518         * (genConstPointerGet): modified to access code memory correct,
4519         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4520         and improved to handle some cases
4521         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4522         instead of "RETLW" for init data
4523         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4524         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4525         variables are placed in access bank memory (<0x80 and >=0xf80),
4526         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4527         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4528         TBLWT_POSTDEC,TBLWT_PREINC
4529         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4530         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4531         directives
4532         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4533         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4534         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4535         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4536
4537 2004-02-29  Borut Razem <borut.razem AT siol.net>
4538
4539         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4540         support/Util/findme.h, support/Util/system.h: enhance binary relative
4541         search for lib and include by using findProgramPath()
4542
4543 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4544
4545         * src/SDCCpeeph.h,
4546         * src/SDCCpeeph.c (pcDistance),
4547         * src/port.h,
4548         * src/mcs51/ralloc.h,
4549         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4550         * src/mcs51/main.h,
4551         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4552         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4553         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4554         size calculation port specific, started basis for some register
4555         optimizations
4556         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4557         missing push/pop of r0/r1. Optimized push/pops
4558         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4559         * device/lib/_modsint.c (_modsint),
4560         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4561         and stack version so regression tests pass
4562
4563 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4564
4565         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4566         * src/SDCCast.c (decorateType): catch another small optimization
4567         with '?' operator
4568         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4569         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4570         modified to finally use computeType() all over SDCC,
4571         see Feature Request #877103
4572         * src/SDCCval.h: cosmetic
4573         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4574         valCompare(); regression tested in muldiv.c
4575         * support/regression/tests/muldiv.c (testMod): mod sign follows
4576         dividend only
4577
4578 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4579
4580         * src/SDCCast.c (decorateType): fixed bug #902362
4581         * doc/INSTALL.txt: fixed install instructions for win32
4582
4583 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4584
4585         * device/include/Makefile.in (install): fixed by replacing spaces
4586         by tabs
4587         * doc/README.txt,
4588         * doc/INSTALL.txt: updated for release
4589         * doc/sdccman.lyx: added warning for --xstack being buggy
4590
4591 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4592
4593         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4594         to eliminate build warnings.
4595         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4596
4597 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4598            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4599
4600         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4601         removed -penable-stack, added comment for stack pragma, added
4602         warning for not initializing the stack/frame registers, removed
4603         comment at interrupts section
4604
4605         Stack is made permanent, there is no ability to disable stack usage.
4606         * src/pic16/device.h,
4607         * src/pic16/device.c: removed all references to USE_STACK macro,
4608         * src/pic16/device.c (pic16_dump_section): when no elements in
4609         rlist, free rlist before return,
4610         * (pic16_dump_int_registers): NEW, internal registers are a new set
4611         of general purpose registers reused by each function,
4612         * (checkAddReg): returns 1 if registers is added to set,
4613         * (pic16_groupRegistersInSection): when a registers is of type
4614         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4615         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4616         SRCASECMP macro is moved here from device.c
4617         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4618         PO_PCLATU, PO_PRODL, PO_PRODH,
4619         * (pic16_pCodeOpType, genMinus,
4620         changed compares to "a" register, with AOP_ACC,
4621         * (pic16_genPlus): fixed some bugs and indented properly,
4622         * (pic16_addSign): changed size to size+offset in the MOVWF
4623         instruction,
4624         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4625         multiply 8-bit operand by literal, result is 8-bit,
4626         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4627         multiply 2 8-bit operand, result is 8-bit,
4628         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4629         genUMult8X*_16,
4630         * src/pic16/gen.c: changed accUse to contain WREG only,
4631         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4632         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4633         true, do not use immediate addressing any more unless sym is a
4634         pointer in codespace,
4635         * (aopForRemat): do not use immediate addressing when symbol not in
4636         codespace and when symbol's address is requested,
4637         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4638         accUse size (= 1),
4639         * (aopGet): added case for AOP_ACC and don't return "accumulator
4640         bug" but WREG instead,
4641         * (popGetTempReg): pushes contents of temporary register in stack,
4642         * (popReleaseTempReg): pops contents of temporary register from
4643         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4644         * (pic16_popGet): separated case AOP_ACC to return register WREG
4645         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4646         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4647         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4648         the use of immediate pointers to certain cases only.
4649
4650         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4651         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4652         * (assignResultValue, genCall, genRet): modified to use the new
4653         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4654         genPcall is still broken,
4655         * (genFunction): added code to create 'A' type pBlocks when
4656         interrupt functions are generated, code not extensively tested yet,
4657         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4658         * (genEndFunction): modified so ISRs pop stored registers from stack,
4659         * (genMultOneByte): cleanup,
4660         * (AccRsh): added flag andmask, to and result with appropriate mask,
4661         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4662         * (genDataPointerGet): fixed and reenabled its use,
4663         * (genNearDataPointerGet): bugs fixed,
4664         * (genDataPointerSet): bugs fixed,
4665         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4666         pic16_DumpSymbol, pic16_DumpOp,
4667         * src/pic16/genutils.h: function prototypes for the above functions,
4668         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4669         pointers,
4670         * (pic16emitRegularMap): many many many improvements, but needs a
4671         major cleanup,
4672         * src/pic16/main.c: enable_stack in pic16_options is removed,
4673         * (_pic16_parseOptions): removed command line options -penable-stack,
4674         * (_process_pragma): emit stack symbol only when stack pragma is
4675         processed,
4676         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4677         redirected to FSR0L/FSR0H pair,
4678         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4679         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4680         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4681         for immediates,
4682         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4683         * (dumpPicOptype): NEW,
4684         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4685         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4686         with movff instruction,
4687         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4688         added pic16_int_regs, some packRegsFor* functions are commented out,
4689         because produce errors,
4690         * src/pic16/NOTES: minor modifications
4691
4692 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4693
4694         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4695         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4696         --pack-iram.
4697         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4698         * as/mcs51/lkaomf51.c: fixed bug #895763
4699
4700 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4701
4702         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4703
4704 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4705
4706         * doc/sdccman.lyx: added details about the HC08 storage classes and
4707         interrupts, fixed the register usage info for z80 & gbz80
4708
4709 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4710
4711         * doc/sdccman.lyx: added more pic16 port documentation
4712         * device/include/pic16/: added header pic18fregs.h
4713
4714 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4715
4716         * doc/sdccman.lyx: added Vangelis' contribution
4717
4718 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4719
4720         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4721         extend to the next CALL or PCALL, not just to the next CALL.
4722
4723 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4724
4725         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4726
4727 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4728
4729         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4730         bug #895752 and a better fix for bug #716790
4731
4732 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4733
4734         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4735
4736 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4737
4738         * doc/sdccman.lyx: minor changes, minor changed
4739
4740 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4741
4742         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4743         which can't handle SDCC_NEWONEBYTEOPS,
4744         (geniCodeMultiply): removed conversion from mult to shift for pic14
4745         and pic16
4746
4747 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4748
4749         * src/hc08/gen.h,
4750         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4751         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4752         thus fixing bug #895406
4753
4754 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4755
4756         * device/lib/_modsint.c,
4757         * device/lib/_modslong.c: sign follows divisor only
4758         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4759         signs or signedness can be ignored
4760         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4761         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4762         added optimization for IFX,
4763         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4764         arguments;
4765         reenabled optimization for IFX, which was removed on 2004-01-11
4766         * src/SDCCast.h: added return type IFX
4767         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4768         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4769         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4770         SDCC_OLDONEBYTEOPS selects the old behaviour
4771         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4772         changed again and commented promotion rule
4773         * src/SDCCval.c (valDiv): promotion no longer necessary
4774         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4775         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4776         rewritten
4777         * support/regression/tests/onebyte.c: added
4778
4779 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4780
4781         * gen.c (genInline): reverted to old code for assemnling inline
4782         code because of bug reported James Chadd
4783
4784 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4785
4786         * ralloc.h: missing declarations from previous patch,
4787         seems that patch for ralloc.h was never applied, fixed
4788
4789 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4790            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4791
4792         * pcode.c,
4793         * pcode.h,
4794         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4795         indirect addressing. Marked FSR0 as deprecated
4796         * gen.c (pointerCode): commented out, not needed now
4797         (pic16_popGet2p): new MOVFF helper function
4798         (genGenPointerGet),
4799         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4800         (shiftRLong): removed duplicate debugging info
4801
4802 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4803
4804         * src/ds390/gen.c (genNearPointerGet),
4805         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4806         optimization with bits, but not bitfields.
4807         * src/ds390/ralloc.c (packRegisters),
4808         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4809
4810 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4811
4812         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4813
4814 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4815
4816         * src/SDCCsymt.h,
4817         * src/SDCCicode.c (operandFromSymbol),
4818         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4819         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4820         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4821         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4822         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4823         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4824         bug #892038
4825         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4826         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4827         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4828         * src/SDCCsymt.c (newSymbol),
4829         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4830         enumerator_list),
4831         * src/SDCCval.h,
4832         * src/SDCCval.c (newiList): fixed bug #885705
4833
4834 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4835
4836         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4837         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4838
4839 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4840
4841         * device/include/c8051f120.h,
4842         * device/include/c8051f300.h,
4843         * device/include/c8051f310.h: added/updated header files for Silicon
4844         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4845         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4846         in new section Submitting patches
4847
4848 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4849
4850         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4851         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4852         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4853         genGenPointerSet),
4854         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4855         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4856         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4857         genGenPointerSet),
4858         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4859         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4860         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4861         genGenPointerSet),
4862         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4863         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4864         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4865         genGenPointerSet): fixed bug #892400
4866         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4867         to eliminate build warnings.
4868         * src/SDCCast.c (processParms),
4869         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4870         fixed bug 751859
4871         * support/valdiag/valdiag.py: added GCC to the list of defines active
4872         when compiling with gcc
4873
4874 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4875
4876         * support/Util/SDCCerr.h,
4877         * support/Util/SDCCerr.c,
4878         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4879         with an incomplete type (fixed bug #883734)
4880         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4881
4882 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4883
4884         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4885
4886 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4887
4888         * src/SDCCast.c (decorateType),
4889         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4890         function pointer implementation
4891         * support/regression/tests/funptrs.c: added tests to verify both forms
4892         of function pointers work correctly. Added tests to verify parameters
4893         are passed in the correct order.
4894
4895 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4896
4897         * device.c (regCompare): registers are sorted by ascending
4898         address and increasing size,
4899         * main.c (_pic16_finaliseOptions): removed the declaration
4900         of compiler macro MCU. Now a macro of the format pic18fxxxx
4901         will be defined from the command line
4902
4903 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4904             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4905
4906         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4907         PCOP_RLCF was overwritten!
4908         * gen.c (genSkip): commented out calls to pic16_emitcode,
4909         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4910         * (genlshTwo),
4911         * (genRRC): added debugging info,
4912         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4913         overwritten while shifting,
4914         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4915         overwritten while shifting,
4916         * (AccLsh),
4917         * (AccRsh),
4918         * (shiftLLeftOrResult),
4919         * (shiftRLeftOrResult),
4920         * (shiftRLong),
4921         * (shiftLLong): Implemented with pic16_emitpcode
4922         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4923         * (genLeftShift): Fixed bug, operand for shift by variable always
4924         was "and"ed with 0x0f,
4925         * (genLeftShiftLiteral),
4926         * (genrshTwo),
4927         * (genRightShiftLiteral): added debugging info,
4928         * (genrshFour): added comment,
4929         * (genRightShift): determined signedness from operand "left"
4930         instead of "result"
4931
4932 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4933
4934         * src/SDCCicode.c (geniCodeParms),
4935         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4936         function pointers, fixed function pointer bugs #861242 and #861896
4937
4938 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4939
4940         * device/include/c8051f000.h,
4941         * device/include/c8051f120.h,
4942         * device/include/c8051f300.h: added header files for Silicon
4943         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4944
4945 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4946
4947         * src/SDCCast.c (processParams): added new type flow and restructured
4948         (gatherAutoInit): added new type flow
4949         (addCast): cosmetic changes
4950         (getLeftResultType): added new type flow for array indices, patch
4951         provided by Stas, see FR #877103
4952         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4953         array index patch by Stas
4954         * src/SDCCast.h: added prototype getResultTypeFromType()
4955         * src/SDCCval.h,
4956         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4957         * src/pic/glue.c (pic14emitStaticSeg),
4958         * src/pic16/glue.c (pic16emitStaticSeg),
4959         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4960         for initialization of symbols
4961         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4962         * support/Util/SDCCerr.h:
4963         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4964         * .version: bumped version number to 2.3.8
4965         * device/include/Makefile.in (install),
4966         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4967         avoid warnings
4968
4969 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4970
4971         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4972         Slade Rich fixed an optimization bug
4973         * src/pic/pcodepeep.c,
4974         * src/pic/pcoderegs.c
4975         * doc/Makefile (install): added test for directory
4976
4977 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4978
4979         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4980         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4981         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4982         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4983         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4984         * as/mcs51/asexpr.c (term),
4985         * as/hc08/asexpr.c (term): fixed bug #887146
4986
4987 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4988
4989         * src/z80/gen.c (genMult): handle single byte result product
4990         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4991         DUMMY_READ_VOLATILE (fixed bug #886367)
4992
4993 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4994
4995         * support/regression/tests/libmullong.c: fixed logic, on little endian
4996         hosts we ended without a mullong_wrapper()
4997
4998 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4999
5000         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5001         virus/worm forged address usage.
5002
5003 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5004
5005         Fixed promotion, it should be done on AST level:
5006         * src/SDCCast.c (addCast): added promotion to int
5007         (decorateType): updated call to upCast()
5008         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5009         usualUnaryConversions()
5010
5011 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5012
5013         * support/regression/tests/literalop.c (mulWrapper): Added a
5014         wrapper to remove integer overflow warnings.
5015
5016         * support/regression/tests/float_trans.c: Made work on host.
5017
5018         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5019         location of sz80.
5020
5021         * support/regression/generate-cases.py (main): Changed from inline
5022         to a main method.
5023
5024         * doc/Makefile (install): Changed to depth first to get rid of
5025         missing directory install warning.
5026
5027         * as/Makefile (install-doc): Made work on Mac.
5028
5029 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5030
5031         * src/SDCCast.c: added an additional type flow in decorateType() of
5032         opposite direction, see feature request #860006; it's enabled at runtime
5033         by setting the environment variable SDCC_NEWTYPEFLOW
5034         * src/SDCCast.h: changed prototype of decorateType()
5035         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5036         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5037         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5038         see feature request #877103
5039         * src/SDCCval.c: updated call of decorateType()
5040         (valBitwise): fixed bug #882876
5041         (valMinus): added promotion
5042         (valLogicAndOr): result is unsigned
5043         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5044         * src/SDCCsymt.c (computeType),
5045         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5046         must not cause an unsigned operation
5047         * src/pic/glue (pic14emitRegularMap),
5048         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5049
5050 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5051
5052         * src/pic/pcode.c (PCodeID): commented out left over debug code
5053
5054 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5055
5056         * support/valdiag/tests/overflow.c: added shift tests
5057         * src/pic/device.c,
5058         * src/pic/gen.c,
5059         * src/pic/gen.h,
5060         * src/pic/glue.c,
5061         * src/pic/main.c,
5062         * src/pic/pcode.c,
5063         * src/pic/pcode.h,
5064         * src/pic/pcodepeep.c,
5065         * src/pic/pcoderegs.c,
5066         * src/pic/ralloc.c,
5067         * src/pic/ralloc.h: applied patch from Slade Rich;
5068         added support for multiple code pages and multiple RAM banks on the
5069         PIC 14 port. The ASM files now no longer simply assume all the
5070         code / RAM are in the same page / bank. This means the linker can
5071         safely allocate code/RAM of separate ASM files to different pages/banks.
5072         * doc/sdccman.lyx: added Slade's tips
5073         * src/mcs51/peeph.def: fixed bug #880768
5074
5075 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5076
5077         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5078         * src/SDCCast.c (decorateType): fixed bug #880197
5079
5080 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5081
5082         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5083         getopt.h.
5084
5085         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5086         strtof is not part of C89 and isn't included with Mac OS X.
5087
5088 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5089
5090         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5091         shiftL2Left2Result): fixed bug #879326
5092         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5093         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5094         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5095         address fetch for clr instruction
5096         * device/lib/hc08/_mulint.c: created optimized assembly version
5097         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5098
5099 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5100
5101         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5102         proposed in FR #877103
5103
5104 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5105
5106         * src/SDCCval.c (cheapestVal): added missing checks
5107         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5108         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5109
5110 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5111
5112         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5113         equal operands
5114
5115 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5116
5117         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5118         loaded with the linker search paths (-L arguments) and the libraries
5119         to be linked with the current source (-l arguments). Changes
5120         currently will affect only the pic16 port.
5121         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5122         include path the port specific paths and port specific libraries,
5123         * gplink command now contains the $3 argument,
5124         * src/pic16/device.h,
5125         * src/pic16/device.c,: structure PIC_device is made public and
5126         renamed to PIC16_device, the same for variable Pics which is renamed
5127         to Pics16. Updated all references to them.
5128         * src/pic16/glue.c (pic16glue): corrected bug with code
5129         initialization which bypassed the variable initializations block.
5130
5131         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5132         COMPILE_FLAGS and added the --nostdinc option
5133
5134 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5135
5136         * device/include/mc68hc908jb8.h: Register defs for another member
5137         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5138
5139 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5140
5141         Documenting changes from previous commits.
5142         * configure.in (version 1.56),
5143         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5144         when generating output files to configure the pic16 library,
5145         but now I've commented it out, since gputils aren't installed in the
5146         SF compile farm, so library won't compile
5147
5148         * device/lib/Makefile.in (version 1.56): initially I've added in
5149         target 'all' the prerequestive 'model-pic16' so it compiled the
5150         pic16 library, but now I've commented it out for the same reasons
5151         above,
5152         * added targets 'model-pic16' and 'objects-pic16' to compile the
5153         library
5154         * added target 'port-specific-objects-pic16' to handle the
5155         generated libraries and copy them into the build/ directory
5156         * added target 'clean-intermediate-pic16' to clean intermediate
5157         files into pic16 directory
5158         * in target 'installdirs' added line to create directory pic16 in
5159         the installation path
5160
5161         * device/include/Makefile.in (version 1.11): in target 'install'
5162         added lines to copy all header files to installation path,
5163         * in target 'installdirs' added line create directory for pic16
5164         headers in the installation path
5165
5166 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5167
5168         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5169          a function call
5170
5171 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5172
5173         * configure,
5174         * device/lib/configure.in,
5175         * device/lib/configure: fixed for autoconf 2.57
5176
5177 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5178
5179         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5180         option so that it actually works. Made it specific to the z80, since
5181         the gbz80 doesn't have these kinds of I/O ports.
5182
5183 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5184
5185         * device/include/z180.h,
5186         * device/lib/_memcpy.c,
5187         * device/lib/_memmove.c,
5188         * device/lib/_mulint.c,
5189         * device/lib/ser_ir.c,
5190         * device/lib/ser_ir_cts_rts.c,
5191         * device/lib/_strcmp.c,
5192         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5193         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5194         portmode; added deprecation warning for bank= and protmode= forms.
5195         Also, guard against buffer overflow.
5196         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5197
5198 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5199
5200         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5201         changed interrupt vector table generation to only emit declared vectors.
5202         * device/include/Makefile.in: added missing backslash
5203         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5204
5205 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5206
5207         Mainly changes to support compilation of the device libraries
5208         * src/pic16/device.c: stack is allocated via symbol and not
5209         via literal number. The symbol is placed in the corresponding
5210         position of the data ram
5211         * (pic16_dump_section): relocatable and absolute uninitialized
5212         data are now emitted in sorted order to reduce section naming,
5213         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5214         weren't marked as being in the access bank,
5215
5216 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5217
5218         Added portion of GNU PIC Library under the directory
5219         device/include/pic16 and device/lib/pic16. These files
5220         contain the declarations of SFRs for the PIC18Fxx2 devices.
5221         The directory is initialized via configure from toplevel.
5222
5223 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5224
5225         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5226         the spilllocations to be compared correctly
5227
5228 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5229
5230         * src/SDCCast.c (decorateType): fixed bug introduced today
5231
5232 2004-01-12  Borut Razem <borut.razem AT siol.net>
5233
5234         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5235         doc/sdccman.lyx: upper case pragmas are deprecated
5236
5237 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5238
5239         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5240         in simpler and even better code
5241
5242 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5243
5244         * src/SDCCicode.c (operandOperation): fixed bug #874819
5245         * src/SDCCast.c (decorateType): fixed
5246         char foo (unsigned long ul) { return ul > 0; }
5247
5248 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5249
5250         * doc/sdccman.lyx: Moved and added some sections, small changes
5251         all over. Telling LaTeX to be less strict with word spacing
5252         to better keep the right margin. Changed some notes about
5253         maintainance of the ports in section 3.2.1 - is it OK like this?
5254
5255 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5256
5257         SDCC source changes:
5258         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5259         convilong): modified to inform the pic16 port that builtin functions
5260         are external
5261
5262         PIC16 PORT specific changes:
5263         * src/pic16/device.c pic16_dump_equates() added,
5264         processor registers declared internally by the port are emitted in
5265         the translation as equates,
5266         * src/pic16/gen.c: inline code is passed unprocessed to the
5267         translation,
5268         * (pic16_popGetLit2): fnuction modified to take second operand as
5269         pCodeOp pointer and not as literal,
5270         * (popRegFromIdx): prefixed with pic16_,
5271         * (pic16_popCombine2): modified to receive already allocated pCode
5272         operands,
5273         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5274         * (genFunction): initializes local stack frame and pushes on stack
5275         all the registers used by this function,
5276         * (genEndFunction): restores all registers from stack and restores
5277         stack frame,
5278         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5279         improvements,
5280         * (pic16glue): changed the program startup sequence,
5281         * added new dbName code 'A' for functions placed in absolute section
5282         * src/pic16/main.c: added function attribute _naked,
5283         * added pragma 'code' to place a fnuction at an absolute address,
5284         * added command line arguments --debug-ralloc and --pcode-verbose,
5285         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5286         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5287         * (pic16_newpCodeOpLit2): modified to take the second operand as
5288         pCodeOp pointer,
5289         * (pic16_printpBlock): modified to emit each function in a separate
5290         section,
5291         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5292         UPPER for immediate operands,
5293         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5294         instruction,
5295         * src/pic16/peeph.def: all peepholes with movff are commented out,
5296         because there is a problem in the pcode peep optimizer,
5297         * src/pic16/ralloc.c: the register allocator can now reuse local
5298         function symbols for another function. This saves register usage.
5299         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5300
5301         Added file src/pic16/NOTES with information about program writing on
5302         the current port version.
5303
5304 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5305
5306         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5307         and peephole 252 (array access)
5308
5309 2004-01-09  Borut Razem <borut.razem AT siol.net>
5310
5311         * src/SDCCmain.c : fixed #872250: -l command line defined library
5312           files are scanned before standard library files
5313
5314 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5315
5316         * src/SDCCast.c (decorateType): fixed bug #874046
5317
5318 2004-01-09  Borut Razem <borut.razem AT siol.net>
5319
5320         * support/scripts/sdcc.nsi: remove previous installation
5321
5322 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5323
5324         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5325         bytes for last interrupt vector (mcs51)
5326         * sdcc.spec: fixed typo
5327
5328 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5329
5330         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5331         gen51Code): more efficient parameter receive for --model-large
5332         ("bug" #845294)
5333
5334 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5335
5336         * src/ds390/main.c,
5337         * src/z80/main.c: added missed needLinkerScript flags (more than
5338         one port structure defined in these file)
5339         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5340         bug #795325
5341
5342 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5343
5344         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5345         * src/port.h: added flag needLinkerScript in port->linker
5346         structure to inform whether to create a .lnk file or not,
5347         * src/avr/main.c,
5348         * src/ds390/main.c,
5349         * src/hc08/main.c,
5350         * src/mcs51/main.c,
5351         * src/pic/main.c,
5352         * src/pic16/main.c,
5353         * src/xa51/main.c,
5354         * src/z80/main.c: changed appropriately to configure
5355         needLinkerScript flag
5356         * src/pic/gen.c,
5357         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5358         * src/pic/glue.c: added variable udata_section_name to
5359         override default uninitialized data segment definition for
5360         devices only with SHAREBANK memory (reported from Erik Epetrich)
5361         * (pic14emitOverlay): modified to emit a commented overlay segment
5362         directive when no overlay data exist
5363         * (picglue): modified to emit uninitialized data segment
5364         according to udata_section_name
5365         * src/pic/main.c (_pic14_parseOptions): added command line
5366         options --udata-section-name=[name] to override default
5367         udata definition name
5368         * modified _linkCmd and _asmCmd to include compiler passed
5369         arguments via -W option
5370         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5371         object file from '.rel' to '.o' in port->linker structure,
5372         changed size of fptr from 2 to 3 in port structure
5373
5374 2004-01-07  Borut Razem <borut.razem AT siol.net>
5375
5376         * support/scripts/sdcc.nsi: update PATH
5377         * support/scripts/sdcc.ico: craeted
5378
5379 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5380
5381         * device/include/Makefile.in: fix install
5382         * doc/Makefile: fix install
5383
5384 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5385
5386         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5387         in bug #860505
5388         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5389         how the function variable allocation summary is displayed; also
5390         include information about variables allocated to the overlay
5391         segment
5392
5393 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5394
5395         * as/mcs51/lkmain.c: Help about -Y option
5396         * as/mcs51/lkarea.c: Fixed gcc warnings
5397
5398 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5399
5400         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5401         fixed warning
5402         * support/valdiag/tests/overflow.c: added
5403         * src/SDCCast.c (decorateType),
5404         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5405         LEFT_OP (left shift)
5406
5407 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5408
5409         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5410         (default behaviour).
5411
5412 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5413
5414         A python script to validate compiler diagnostic messages. It can be
5415         used to verify that sdcc complains about bad c source code and
5416         gives a good location of the error.
5417         * support/valdiag/Makefile,
5418         * support/valdiag/valdiag.py,
5419         * support/valdiag/tests/*
5420
5421 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5422
5423         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5424         * src/SDCCsymt.c (newEnumType),
5425         * src/SDCCsymt.h
5426         * support/Util/SDCCerr.c,
5427         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5428         enum related bugs.
5429         * support/regression/tests/enum.c: added test for enum values that
5430         require at least 2 bytes of storage.
5431
5432 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5433
5434         * src/common.h: added ifndef/define/endif macros
5435         around the header file.
5436         Bug reported from Jesus Calvino-Fraga
5437
5438 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5439
5440         * sdcc.spec: updated
5441         * device/include/Makefile.in: don't install CVS directories
5442         * device/lib/Makefile.in: added removal of CVS directories after install
5443         * doc/Makefile: fixed install, added local_icons
5444         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5445         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5446         * src/ds390/gen.c (genRightShift): fixed bug #870788
5447         * src/SDCCast.c (decorateType): fixed bug #870781
5448
5449 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5450
5451         PIC16 port related changes:
5452         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5453         added variable stackPos,
5454
5455         * gen.c: genCall, assignResultValue: added support for
5456         pushing/retrieving function parameters to/from stack,
5457         genFunction,genEndFunction: setup stack frame for the
5458         generated function,
5459         genAddrOf: will be changed according to bug 863624
5460
5461         * added files genutils.c and genutils.h which contain gen*
5462         debugged and optimised functions extracted from gen.c
5463
5464         * glue.c: added variable 'externs' which holds extern symbols,
5465         pic16emitRegularMap: is modified to properly handle relocatable
5466          symbols under the new scheme,
5467         pic16createInterruptVect: is modified
5468         pic16printPublics: is modified to emit 'global' assembler directives,
5469         added pic16_printExterns to print extern symbols,
5470         pic16glue: initializes stack/frame pointer in the beginning of
5471         the assembly output. Temporary hack, will be corrected later,
5472         because gplink yet does not support stack and SDCC does not
5473         yet support a type of crt0.o object to create the final binary.
5474
5475         * Removed many lines that contain 8051 legacy code.
5476         * The code is finally placed under a 'code' directive.
5477         * Added port specific options.
5478
5479         * _process_pragma: simplified since now we do not need *special*
5480         include file to define SFR registers. But a separate header
5481         will be needed. This will be developed later.
5482         * _pic16_parseOptions: added, parses port specific options:
5483         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5484         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5485         --preplace-udata-with=
5486
5487         * _pic16_setDefaultOptions: modified to initialize section names,
5488         but hack is temporarly out of order since it needs improvement.
5489         * _pic16_genAssemblerPreamble: configuration words are emitted by
5490         their address instead of their name. This part is incomplete and
5491         supports only the 18Fxx2 devices. Other devices will emit an error
5492         during assembly since they do not contain the same set of config
5493         registers
5494         * _pic16_genIVT: is modified,
5495
5496         * pcode.c: added definitions for some hardware registers that are needed
5497         for stack support
5498         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5499         All PCI entries are updated. Now LFSR is supported.
5500         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5501         * added pic16_newpCodeOpLit2 to support instructions with
5502         two literal arguments
5503         * pic16_pCode2str: corrected code that emits assembler instructions
5504         with two literal operands and those that have an access bit modifier
5505         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5506         this fixes a bug which caused some labels to be lost, when an
5507         assembler directive was added, i.e. banksel,
5508         * pic16_FixRegisterBanking: improved logic that causes the insertion
5509         of bank switching,
5510         * InlineFunction: functions that are called once, are not any more
5511         inlined. This can be a port option in the future,
5512
5513         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5514
5515         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5516         hold the corresponding uninitialized symbols,
5517         * pic16_allocProcessorRegister: registers have explicit marked the
5518         accessBank field,
5519         * pic16_allocInternalRegister: registers are explicit marked as
5520         not used,
5521         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5522         processing list, so bit registers were lost,
5523         *
5524
5525         * ralloc.h: added field 'accessBank' and original symbol operand
5526         in register definition,
5527         * removed the field isMapped from register definition,
5528
5529         ** Several functions have been removed from various sources:
5530         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5531         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5532         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5533         pic16_assignRelocatableRegisters
5534
5535         ** others have been introduced:
5536         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5537         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5538
5539 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5540
5541         * support/scripts/inc2h.pl: changed definition of BIT_AT
5542         to emit 'sbit at' instead of 'bit at'. This was a request.
5543
5544         PIC16 port related preliminary changes:
5545         * gen.c: prefixed function popRegFromString with
5546         pic16_ and all references to it corrected
5547         * pcode.c: all pic16_pc_* hardware registers prefixed
5548         with underscore (_),
5549         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5550         * ralloc.c: newReg(): when register is REG_SFR then
5551         set address to rIdx,
5552         pic16_allocProcessorRegister(): marks register wasUsed=0
5553         pic16_writeUsedRegs(): added a call to assign processor
5554         registers via pic16_assignFixedRegisters
5555
5556 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5557
5558         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5559         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5560         variables in unused register banks.  Also the SSEG is placed
5561         wherever there is enough space for it, and IDATA can be anywhere
5562         in internal RAM.  For now compile using -Wl-Y[stack_size].
5563         The mem file is different for this option as well, since it
5564         makes no sense of talking about DSEG lenght.
5565
5566 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5567
5568         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5569         in certain cases, e.g. when ROM assignment, patch provided
5570         from Albert den Haan.
5571
5572 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         Many signedness and type propagation fixes:
5575         * src/SDCCicode.c: made geniCodeCast() static
5576         replaced SPEC_ by IS_ (cosmetic)
5577         (operandOperation): fixed div and mod operation
5578         (usualBinaryConversions): added support for promotion of char
5579         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5580         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5581         (geniCodeAdd): an array index will stay unsigned, even if promoted
5582         from char to int
5583         (geniCodeArray): ditto
5584         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5585         * src/SDCCsymt.c (computeType): added more support for char;
5586         promotion of char is selectable by promoteCharToInt, fixed signedness
5587         for all cases
5588         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5589         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5590         * src/SDCCval (val*): replaced signedness calculation by
5591         computeType()
5592         rearranged if-branches (cosmetic)
5593         (valShift): added warning W_SHIFT_CHANGED
5594         (valCompare): fixed problem with different types
5595         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5596         * support/regression/tests/literalop.c: added many cases
5597         * support/regression/tests/ast_constant_folding.c: changed finally to
5598         'unsigned int'
5599         * .version: new year, new version: 2.3.7
5600         * src/SDCCmain.c (main): applied patch #866468
5601         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5602         provided by Scott Bronson
5603         * doc/sdccman.lyx: updated documentation for sdcdb
5604         updated and added chapter tips
5605
5606 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5607
5608         * src/SDCCsymt.h: missing from yesterday's commits
5609
5610 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5611
5612         * src/SDCC.y (struct_or_union_specifier),
5613         * support/Util/SDCCerr.c,
5614         * support/Util/SDCCerr.h: verify that struct & union tags are used
5615         as declared.
5616
5617 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5618
5619         * src/SDCCglobl.h: missing from yesterday's commits
5620
5621 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5622
5623         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5624         sft_attributes, struct_declaration, parameter_declaration,
5625         type_name, start_block, declaration_list),
5626         * src/SDCC.lex (check_type): support redefinition of typedef names
5627
5628 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5629
5630         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5631         aligned xdata arrays. Erik helped me with the if clause.
5632
5633 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5634
5635         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5636         warning
5637
5638 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5639
5640         * src/SDCCast.h,
5641         * src/SDCCast.c (newAst_),
5642         * src/SDCCicode.h,
5643         * src/SDCCicode.c (ast2iCode, newiCode),
5644         * src/SDCCglobl.h,
5645         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5646         expr, statement, expression_statement, selection_statement,
5647         iteration_statement, expr_opt, jump_statement): foundation for tracking
5648         sequence points
5649         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5650         point code too)
5651
5652 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5653
5654         * support/Util/SDCCerr.c,
5655         * src/SDCCast.h,
5656         * src/SDCCast.c (createCase, createDefault, decorateType),
5657         * src/SDCClabel.c (labelUnreach),
5658         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5659         to error messages.
5660         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5661         (with thanks to Stas Sergeev)
5662         * device/include/time.h,
5663         * device/lib/time.c (CheckTime): suppress unreachable code warning
5664
5665 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5666
5667         * src/SDCCast.c (createIvalCharPtr),
5668         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5669         bug #753752)
5670         * support/regression/tests/nullstring.c: tests for these two bugs
5671
5672 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5673
5674         * support/Util/SDCCerr.h,
5675         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5676         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5677         about storage class and 'at' used inside struct or union
5678         * src/SDCCBBlock.c (iCodeFromeBBlock),
5679         * src/SDCCcse.c (ifxOptimize),
5680         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5681         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5682         printIval, emitStaticSeg, emitOverlay),
5683         * src/SDCClabel.c (deleteIfx),
5684         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5685         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5686         gatherAutoInit, processParms),
5687         * support/Util/SDCCerr.h,
5688         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5689         reporting for post-parse errors.
5690
5691 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5692
5693         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5694         implicit casts via union; they don't work on big endian systems
5695         (possible fix for bug #861138)
5696
5697 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5698
5699         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5700         * src/mcs51/main.c: fixed the fix for bug #737001
5701
5702 2003-12-15  Borut Razem <borut.razem AT siol.net>
5703
5704         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5705
5706 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5707
5708         * support/makebin/makebin.c: put output in binary mode
5709
5710 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5711
5712         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5713         xdata and data memory on startup. Set the environment variable
5714         SDCC_NOGENRAMCLEAR to disable this.
5715         * src/mcs51/peephole.def,
5716         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5717         (allows non-interrupt and interrupt code to safely compete for a resource
5718         without the non-interrupt code having to disable interrupts)
5719
5720 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5721
5722         * src/SDCCicode.c (geniCodeAdd),
5723         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5724         with valFromType if type might be a pointer and host is big endian).
5725         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5726         types, not just integer types.
5727         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5728         multiply defined with mismatching "at" address.
5729
5730 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5731
5732         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5733         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5734         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5735         with embedded nulls (fixed bug #753752)
5736
5737 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5738
5739         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5740         Apparently this did not see much testing (endless loop)
5741
5742 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5743
5744         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5745
5746 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5747
5748         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5749         gracefully handle NULL memmap pointers
5750
5751 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5752
5753         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5754         instead of deleting the iCode when an operand is volatile
5755         * src/z80/gen.c (genDummyRead),
5756         * src/mcs51/gen.c (genDummyRead),
5757         * src/ds390/gen.c (genDummyRead),
5758         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5759         not just IC_RIGHT
5760         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5761         * src/SDCC.y: fixed bug #850420
5762
5763 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5764
5765         Applied z80 i/o port patch from Peter Townson and fixed some operators
5766         to better handle operands in A register.
5767         * device/include/z180.h
5768         * src/SDCC.y
5769         * src/SDCCglue.c
5770         * src/z80/gen.c
5771         * src/z80/gen.h
5772         * src/z80/main.c
5773         * src/z80/peeph-z80.def
5774         * src/z80/peeph.def
5775         * src/z80/z80.h
5776
5777 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5778
5779         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5780
5781 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5782
5783         * device/lib/hc08/_mullong.c: Removed extra #endif
5784
5785 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5786
5787         * sim/ucsim/hc08.src/inst.cc,
5788         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5789         carries from x to h
5790         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5791         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5792         * device/include/stdarg.h: fixed varargs for hc08
5793         * device/lib/Makefile.in,
5794         * device/lib/hc08/Makefile,
5795         * device/lib/hc08/_mulint.c,
5796         * device/lib/hc08/_mullong.c: fixed some endian problems
5797
5798 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5799
5800         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5801         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5802         * device/lib/_gptrget.c,
5803         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5804
5805 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5806
5807         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5808         * src/SDCCast.c (astErrors): fixed bug #846007
5809         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5810
5811 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5812
5813         * src/SDCCast.c (decorateType): disabled a transformation I added in
5814         revision 1.188 (access to fields of a structure at an absolute address);
5815         it breaks with bitfields, extern declarations, and gcse analysis.
5816         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5817         could be assigned through a pointer, so don't complain.
5818         * src/SDCCast.c (astErrors),
5819         * src/SDCCast.h,
5820         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5821
5822 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5823
5824         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5825         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5826         output of __config directives, since gpasm now supports them
5827         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5828         pre-processor macro, i.e. -DMCU=p18f452
5829         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5830         and modified to handle 'cast' icode similarly to '=' icode
5831         * src/pic16/device.h (typedef struct PIC_device): added field
5832         'extMIface' to indicate that chip has external memory interface
5833         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5834         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5835         18F8720
5836
5837 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5838
5839         * src/SDCC.y (pointer): fixed bug #846006
5840         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5841         * src/SDCCast.c (decorateType): fixed bug #846009
5842         * src/ds390/peeph.def,
5843         * src/ds390/gen.c (genAnd, genOr),
5844         * src/mcs51/peeph.def,
5845         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5846
5847 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5848
5849         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5850         * src/SDCCdflow.c
5851         * src/SDCCcse.c
5852         * src/SDCCcse.h
5853         * src/SDCCBBlock.h
5854         * src/SDCCBBlock.c
5855
5856 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5857
5858         fixed bug #845089
5859         * src/SDCCbitv.h,
5860         * src/SDCCbitv.c: added function to free a bitvector
5861         * src/SDCClrange.h,
5862         * src/SDCClrange.c: added function to recompute the liveranges
5863         * src/avr/ralloc.c,
5864         * src/ds390/ralloc.c,
5865         * src/hc08/ralloc.c,
5866         * src/mcs51/ralloc.c,
5867         * src/pic/ralloc.c,
5868         * src/pic16/ralloc.c,
5869         * src/xa51/ralloc.c,
5870         * src/z80/ralloc.c: recompute the liveranges after register packing
5871
5872 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5873
5874         * src/SDCCloop.c (newInduction): fixed bug #845630
5875
5876 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5877
5878         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5879         inadvertantly left behind from my 2003-11-12 change
5880
5881 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5882
5883         Updated headers I neglected to commit yesterday.
5884         * src/SDCClrange.h,
5885         * src/SDCCicode.h
5886
5887 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5888
5889         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5890         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5891         * src/SDCCopt.c (eBBlockFromiCode),
5892         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5893         the creation of the key hash table from the sequencing so it can be used
5894         earlier (for some GCSE bug fixes still pending)
5895
5896 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5897
5898         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5899         * support/regression/tests/addsub.c: testing genPlus shortcut
5900
5901 2003-11-15  Borut Razem <borut.razem AT siol.net>
5902
5903         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5904
5905 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5906
5907         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5908         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5909         ordering is immaterial.
5910         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5911
5912 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5913
5914         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5915         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5916         (SIGSEV) of bug #840381
5917         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5918         unlink new file before rename if new and old filenames are the same)
5919
5920 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5921
5922         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5923         uninitialized variables) for the mcs51. Set environment variable
5924         SDCC_GENRAMCLEAR to test.
5925         xdata initialization slightly shorter
5926
5927 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5928
5929         * src/SDCCsymt.h,
5930         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5931         #838241 & 780691 (basicly the same bug)
5932         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5933         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5934
5935 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5936
5937         * src/SDCCmain.c (linkEdit): "fix" #834252
5938
5939 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5940
5941         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5942         * src/SDCCast.h,
5943         * src/SDCC.y: fixed bug #819403
5944
5945 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5946
5947         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5948         the reentrant attribute.
5949         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5950         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5951         simulation
5952         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5953         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5954         erroneously reduced to a literal.
5955         * src/hc08/ralloc.c (packRegisters, rematStr),
5956         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5957         some cases
5958
5959 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5960
5961         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5962         * doc/sdccman.lyx: changed from 'article' to 'book'
5963         * doc/Makefile: readded test_suite_spec and cdbfileformat
5964
5965 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5966
5967         * device/include/stdlib.h: include malloc.h to comply with ANSI
5968         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5969
5970 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5971
5972         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5973         * doc/clean.mk: also remove *.out files
5974         * doc/sdccman.lyx: some additions, larger top/bottom margins
5975
5976 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5977
5978         * src/SDCC.y: fixed bug #837365
5979         * support/regression/tests/bitopcse.c
5980         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5981         a symbol (might be valop instead)
5982         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5983         * device/lib/clean.mk: added hc08 to the cleaning list
5984
5985 2003-11-04  Borut Razem <borut.razem AT siol.net>
5986
5987         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5988           made 2003-11-04
5989         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5990           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5991           malloc is declared in standard stdlib.h
5992
5993 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5994
5995         * device/lib/hc08/Makefile: need to clean .rel not .o files
5996         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5997
5998 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5999
6000         * src/port.h,
6001         * src/hc08/main.c,
6002         * src/mcs51/main.c,
6003         * src/ds390/main.c,
6004         * src/z80/main.c,
6005         * src/avr/main.c,
6006         * src/pic/main.c,
6007         * src/pic16/main.c,
6008         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6009         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6010         tests (which uses the port's oclsExpense function)
6011         * src/SDCC.y,
6012         * src/SDCCast.c,
6013         * src/SDCCicode.c,
6014         * src/hc08/gen.c,
6015         * src/ds390/gen.c,
6016         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6017
6018 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6019
6020         * src/SDCCcse.c (ifxOptimize),
6021         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6022         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6023         deleting the IFX iCode.
6024         * src/hc08/ralloc.c: reduced unneeded slocs
6025         * src/hc08/gen.c: fixed bug in asmopToBoolean
6026
6027 2003-11-04  Borut Razem <borut.razem AT siol.net>
6028
6029         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6030           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6031           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6032           transferred to configure
6033
6034 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6035
6036         Use headers defined in the C[++] standards:
6037         * sim/ucsim/gui.src/serio.src/fileio.cc
6038         * sim/ucsim/gui.src/serio.src/frontend.cc
6039         * sim/ucsim/gui.src/serio.src/main.cc
6040         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6041         * support/Util/NewAlloc.c
6042         * as/hc08/lklibr.c
6043         * as/mcs51/lklibr.c
6044         * as/z80/aslist.c
6045         * as/z80/assym.c
6046
6047 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6048
6049         * Added MSVC projects for hc08 assembler and linker:
6050         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6051         /as/hc08/link_hc08.dsp
6052
6053 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6054
6055         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6056
6057 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6058
6059         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6060
6061 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6062
6063         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6064
6065 2003-10-31  Borut Razem <borut.razem AT siol.net>
6066
6067         * support/cpp2/cpplib.h,
6068           support/cpp2/cpplib.c,
6069           support/cpp2/cpplex.c,
6070           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6071           to switch _asm block preprocessing on / off. Default is
6072           #pragma preproc_asm +
6073
6074 2003-10-31  Borut Razem <borut.razem AT siol.net>
6075
6076         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6077           when outputting comment blocks (when executed with -C option) and
6078           _asm (SDCPP specific) blocks
6079
6080 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6081
6082         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6083
6084 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6085
6086         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6087
6088 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6089
6090         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6091         * src/SDCCast.c (decorateType): fixed bug #832664
6092
6093 2003-10-31  Borut Razem <borut.razem AT siol.net>
6094
6095         * support\cpp2\cpplex.c: fixed for SDCPP:
6096           comments(when executed with -C option) and _asm blocks
6097           were included even if they where in skipped #if block.
6098           Applied solution from GCC cpp 3.3.2
6099
6100 2003-10-31  Borut Razem <borut.razem AT siol.net>
6101
6102         * src/SDCC.lex: sdcc now understands both formats:
6103           '# <line_number> <file_name>' and
6104           '#line <line_number> <file_name>'
6105         * support/cpp2/cppmain.c: sdcpp now generates the standard
6106           '# <line_number> <file_name>' instead of former
6107           '#line <line_number> <file_name>'
6108
6109 2003-10-30  Borut Razem <borut.razem AT siol.net>
6110
6111         * support/cpp2/cpphash.h,
6112         * support/cpp2/cpplib.h
6113         * support/cpp2/cpplex.c,
6114         * support/cpp2/cppmain.c,
6115         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6116
6117 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6118
6119         Fixed a number of problems revealed by bug #827883.
6120         * src/SDCCloop.c (loopInvariants): Spill location of the
6121         result operand should be recomputed if extracted from
6122         a loop. Also, don't extract assignments of an iTemp
6123         from a literal.
6124         * src/SDCCast.c (isConformingBody): loop reversal should
6125         not occur if the control variable is involved with a
6126         relational operator.
6127
6128 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6129
6130         * .version: bumped to 2.3.6 to reflect the big improvements
6131         made by Erik and Klaus. Thanks!
6132
6133 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6134
6135         Replaced the livrange code.
6136         * src/SDCClrange.c: added new LR code
6137         * src/SDCCloop.c,
6138         * src/SDCCBBlock.h: removed remainig parts from old LR code
6139         * src/ds390/ralloc.c,
6140         * src/ds390/gen.c: minor fixes to make it work with new code
6141
6142 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6143
6144         * as/hc08/asm.h,
6145         * as/hc08/lkrloc.c,
6146         * src/hc08/gen.c,
6147         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6148         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6149         (tweaked fix for bug #818696)
6150
6151 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6152
6153         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6154
6155 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6156
6157         * src/SDCCmain.c,
6158         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6159         * src/mcs51/gen.c (gencjneshort),
6160         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6161         more efficient (per Scott Bronson's suggestion)
6162
6163 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6164
6165         Extended the semantics of the critical keyword to include
6166         individual statements. See RFE #827755 and #799831
6167         * src/SDCC.y
6168         * src/SDCCicode.c
6169         * src/SDCCopt.c
6170         * src/SDCCast.c
6171         * support/Util/SDCCerr.c
6172         * support/Util/SDCCerr.h
6173         * src/mcs51/gen.c
6174         * src/ds390/gen.c
6175         * src/hc08/gen.c
6176
6177 2003-10-19  Borut Razem <borut.razem AT siol.net>
6178
6179         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6180
6181 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6182
6183         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6184         Fixed bug #818696
6185         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6186         and predecrement operand is displayed
6187
6188 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6189
6190         * src/SDCCval.c (valMinus): fixed bug #826041
6191
6192 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6193
6194         Some hc08 related updates that I missed earlier
6195         * sim/ucsim/stypes.h
6196         * support/regression/ports/hc08/spec.mk
6197
6198 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6199
6200         New target "hc08" for the Motorola 68hc08 family of micros
6201
6202         * configure
6203         * configure.in
6204         * Makefile
6205         * src/hc08/*
6206         * src/SDCCmain.c
6207         * src/port.h
6208         * sim/ucsim/hc08.src/*
6209         * sim/ucsim/configure.in
6210         * src/ucsim/configure
6211         * sim/ucsim/packages_in.mk
6212         * as/hc08/*
6213         * as/Makefile
6214         * device/include/mc68hc908qy.h
6215         * device/lib/hc08/*
6216         * device/lib/Makefile.in
6217         * support/regression/ports/hc08/*
6218         * support/regression/Makefile
6219
6220 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6221
6222         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6223         regression test
6224         * src/ds390/gen.c (genCast): fixed bug #821957
6225
6226 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6227
6228         * device/lib/logf.c: "fixed" overlay bug
6229         * support/regression/ports/host/spec.mk: added m library
6230         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6231         * support/regression/tests/float_trans: added (for Eric)
6232
6233 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6234
6235         * src/mcs51/gen.c (genCpl): fixed bug
6236         http://sf.net/mailarchive/message.php?msg_id=6263915
6237
6238 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6239
6240         * src/SDCCast.c (decorateType): added extended constant folding
6241         * src/SDCCsymt.c (computeType): cleanup
6242         * src/SDCCval.c (valShift): minor optimization
6243         * support/regression/tests/ast_constant_folding.c: added
6244
6245 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6246
6247         * src/SDCCmain.c: removed some unintended changes
6248
6249 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6250
6251         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6252         * src/z80/gen.c: fixed part of bug #817589
6253         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6254
6255 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6256
6257         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6258         * src/SDCCcflow.c
6259         * src/SDCCcse.c
6260         * src/SDCCdflow.c
6261         * src/SDCClabel.c
6262         * src/SDCClrange.c
6263         * src/SDCCmem.c
6264         * src/SDCCopt.c
6265         * src/SDCCpeeph.c
6266         * src/SDCCset.c
6267         * src/avr/ralloc.c
6268         * src/ds390/ralloc.c
6269         * src/izt/ralloc.c
6270         * src/mcs51/ralloc.c
6271         * src/pic/ralloc.c
6272         * src/pic16/ralloc.c
6273         * src/xa51/ralloc.c
6274         * src/z80/ralloc.c
6275         * src/z80/gen.c: removed unused label "release:"
6276
6277 2003-10-06  Borut Razem <borut.razem AT siol.net>
6278
6279         * src/SDCC.lex: removed definition of unused variables
6280           save_optimize and save_options
6281
6282 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6283
6284         * clean.mk: removed '=' in "-maxdepth=1"
6285         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6286         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6287
6288 2003-10-06  Borut Razem <borut.razem AT siol.net>
6289
6290         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6291           my_unput() replaced by unput()
6292
6293 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6294
6295         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6296         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6297         type-punned pointer will break strict-aliasing rules"
6298         Old LR behaviour is again default; Klaus' LR can be choosen by
6299         defining the environment variable LRKLAUS
6300         * src/SDCCBBlock.h
6301         * src/SDCCloop.c
6302         * src/SDCClrange.c
6303         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6304         * clean.mk: fixed removal of files in bin/CVS/
6305         * device/lib/clean.mk: fixed removal of directories small and large
6306         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6307         * src/SDCCicode.c,
6308         * src/SDCCval.c: removed superflous test for pedantic
6309
6310 2003-10-05  Borut Razem <borut.razem AT siol.net>
6311
6312         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6313           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6314           message "unmatched #pragma SAVE and #pragma RESTORE"
6315
6316 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6317
6318         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6319           assembly, critical functions, atomic, nojtbound)
6320
6321 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6322
6323         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6324         * src/SDCCBBlock.h
6325         * src/SDCCloop.c
6326         * src/SDCCloop.h
6327         * src/SDCClrange.c
6328
6329 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6330
6331         * src/z80/gen.h,
6332         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6333         * src/mcs51/gen.h
6334         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6335         * src/ds390/gen.h
6336         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6337         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6338         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6339
6340 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6341
6342         * src/z80/gen.c (genRet): fixed bug #524753
6343         * src/z80/gen.c (genCast): fixed internal error on cast from
6344         pointer to long
6345         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6346         fix for bug #477835 to the z80
6347         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6348         for tracking iCodes in the peephole optimizer for z80
6349
6350 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6351
6352         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6353         the other part of bug #814548
6354         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6355
6356 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6357
6358         * src/SDCCcse.c: fixed part of bug #814548
6359
6360 2003-09-28  Borut Razem <borut.razem AT siol.net>
6361
6362         * src/asm.c: rewrite of printILine() to use temporary file instead
6363           a pipe
6364         * src/xa51/main.c: commented out declaration of int rewinds
6365
6366 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6367
6368         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6369
6370 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6371
6372         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6373         * src/asm.c (printILine): Fixed bug #811015
6374
6375 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6376
6377         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6378         freeing.
6379
6380 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6381
6382         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6383         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6384         to correctly handle general case of AOP_PAIRPTR
6385         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6386
6387 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6388
6389         * src/mcs51/ralloc.c (fillGaps),
6390         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6391         register positioning bug)
6392
6393 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6394
6395         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6396
6397 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6398
6399         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6400         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6401         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6402         (ralloc doesn't intentionally do this now, but perhaps later)
6403         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6404         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6405         register positioning bugs (Fixed bug #762602 and #795325)
6406         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6407         (Fixed bug #808779)
6408         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6409         lines that --i-code-in-asm generates
6410
6411 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6412
6413         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6414         trying to fclose a FILE* that was already closed.
6415
6416 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6417
6418         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6419         of const struct should be treated as if const themselves)
6420
6421 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6422
6423         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6424
6425 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6426
6427         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6428         Unix (/n) and DOS (/r/n) line terminations.
6429
6430 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6433         bug #613775
6434
6435 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6436
6437         * src/mcs51/gen.c (genFunction, genEndFunction),
6438         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6439         and restore of EA so that stack offsets to parameters are
6440         correct when using both critical and reentrant/stack-auto.
6441         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6442         size (can be triggered in error if sloc is shared between
6443         different sized objects)
6444         * device/include/float.h: fixed macros to explicitly use
6445         unsigned long where needed
6446
6447 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6448
6449         Feature req. 799831: added code to allow nesting of critical functions
6450         * src/mcs51/gen.c (genFunction, genEndFunction)
6451         * src/ds390/gen.c (genFunction, genEndFunction)
6452
6453 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6454
6455         * src/SDCCsymt.c (sclsFromPtr),
6456         * src/SDCCsymt.h,
6457         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6458         support for standard C idiom of memory mapped variables; for
6459         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6460         to xdata int at 0x1234 tempvar = 1.
6461         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6462         provided by Akiya ISHIDA
6463
6464 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6465
6466         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6467         * src/SDCCval.c (constVal): added reduction from int to char
6468         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6469         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6470         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6471         to ignore the sign
6472         * support/regression/tests/shifts.c: fixed
6473
6474 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6475
6476         * src/z80/gen.c (genXor): Fixed bug #805445
6477
6478 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6479
6480         Fixed bug #621531 (const & volatile confusion in the type chain).
6481         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6482         refer to the const or volatile state of the pointer itself.
6483
6484         * src/SDCCast.c
6485         * src/SDCCglue.c
6486         * src/SDCCicode.c
6487         * src/SDCCsymt.c
6488         * src/SDCCval.c
6489         * src/SDCC.y
6490         * src/SDCCsymt.h
6491         * src/pic/gen.c
6492         * src/pic/ralloc.c
6493         * src/pic16/gen.c
6494         * src/pic16/ralloc.c
6495         * support/regression/tests/const.c
6496
6497 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6498
6499         When checking for duplicated modules, use absolute paths
6500         instead of relative paths.  Files changed:
6501
6502         * as/mcs51/lklib.c
6503         * link/z80/lklib.c
6504
6505 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6506
6507         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6508
6509 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6510
6511         * device/include/string.h: added size_t typedef, changed
6512         prototypes to use size_t, eliminated separate reentrant and
6513         non-reentrant declarations, added _memmove declaration
6514         * device/lib/_memcpy.c: changed to use size_t instead of int,
6515         changed /4 to >>2 to avoid division library call
6516         * device/lib/_memcmp.c,
6517         * device/lib/_memset.c,
6518         * device/lib/_strncat.c,
6519         * device/lib/_strncpy.c,
6520         * device/lib/_strncmp.c: changed to use size_t instead of int
6521         * device/lib/_memmove.c: new file (fixed bug #772294)
6522         * device/lib/Makefile.in: added _memmove.c
6523         * device/lib/z80/asm_strings.s: fixed bug #772290
6524         * support/regression/tests/bitfields.c: attempt to fix host assertion
6525         failure on amd64-unknown-linux2.2
6526
6527 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6528
6529         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6530         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6531         * as/z80/asmain.c (main): fixed bug #801766
6532
6533 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6534
6535         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6536         compilers
6537
6538 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6539
6540         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6541         reported in bug #800609
6542
6543 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6544
6545         * Top header beautifications in src/pic16 directory:
6546           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6547           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6548           pcoderegs.h, ralloc.c, ralloc.h
6549         * main.c: added top header and GPL license notice
6550         * pcode.c: fixed the if-conditional warning
6551
6552 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6553
6554         * device/lib/_mullong.c: replaced int by short for gcc
6555
6556 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6557
6558         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6559         and JUMPTABLE iCodes properly now (worked by accident before)
6560         * src/mcs51/gen.c (leftRightUseAcc),
6561         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6562         iCode properly now. Use getSize instead of nRegs since a & b
6563         aren't part of the nRegs tally.
6564
6565 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6566
6567         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6568         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6569           before instructions that use the _STATUS register
6570
6571 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6572
6573         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6574         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6575         fetching of the pointer
6576         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6577         copied from genNearPointerSet()
6578         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6579         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6580         If they pop r0/r1 they must be called in the opposite order than aopOp().
6581         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6582         (resp. --stack-auto), prepared for --xstack
6583
6584 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6585
6586         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6587
6588 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6589
6590         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6591         these ports have their own __sdcc_external_start()
6592
6593 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6594
6595         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6596         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6597         type for bits was changed. It resulted in bit variables becoming
6598         global, which is not permitted in PIC 14 assembly output.
6599
6600 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6601
6602         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6603
6604 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6605
6606         Z80 and MCS51 linkers complaint if a public symbol is defined
6607         in more than one library module:
6608
6609         * as/mcs51/lklib.c
6610         * link/z80/lklib.c
6611         * as/mcs51/Makefile.in
6612
6613 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6614
6615         A few small changes that speed up the peephole optimizer.
6616
6617         * src/SDCCpeeph.c
6618
6619 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6620
6621         Try to make the peephole optimizer smarter by maintaining
6622         an association between the assembly source code and the
6623         iCodes that originated them. Put this information to use
6624         with a new peephole rule condition "notVolatile" so that
6625         the rules can be aggressive yet still safe.
6626
6627         * src/SDCCpeeph.c
6628         * src/SDCCpeeph.h
6629         * src/mcs51/gen.c
6630         * src/mcs51/peeph.def
6631
6632 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6633
6634         Fixed bug #741761
6635
6636         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6637         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6638         if the left or right operand symbols have the accuse flag set.
6639
6640 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6641
6642         Changed the type of the result of the ! (NOT) operator to char;
6643         previously it returned the same type as the source. This allows
6644         us to eliminate all the genFloatNot functions (all of its target
6645         implementations were very buggy) since !float can use the same
6646         code as !long now.
6647
6648         * src/SDCCicode.c (ast2iCode): ! returns char
6649         * src/mcs51/gen.c (genNot, genNotFloat),
6650         * src/ds390/gen.c (genNot, genNotFloat),
6651         * src/z80/gen.c (genNot, genNotFloat),
6652         * src/pic/gen.c (genNot, genNotFloat),
6653         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6654
6655 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6656
6657         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6658         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6659            during interrupts. Ensure WSAVE is located at a shared bank address.
6660         2. Fixed page selection in some places
6661         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6662            the registers name strings.
6663         4. Fixed "signed / unsigned compare" compiler warnings.
6664         5. The PIC port manages its own allocation of the general purpose
6665            registers, but makes no attempt to reuse them. As a result when
6666            compiling it soon runs out of general purpose registers. Some
6667            additional code was added to the files pcode.c and device.c to walk
6668            through the function call tree and rename the registers so that they
6669            get reused.
6670
6671         * src/pic/device.c
6672         * src/pic/gen.c
6673         * src/pic/glue.c
6674         * src/pic/pcode.c
6675         * src/pic/pcode.h
6676         * src/pic/ralloc.c
6677         * src/pic/ralloc.h
6678         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6679         genPlus() & genMinus() when the result is the same as left or right
6680
6681 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6682
6683         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6684
6685 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6686
6687         Made bitfield a distinct type from bit so that bitfields
6688         convert as per ANSI C and bits retain their traditional
6689         boolean style behaviour. Implemented bitfield support in
6690         the z80 port.
6691
6692         * src/SDCCsymt.h,
6693         * src/SDCCsymt.c,
6694         * src/SDCCast.c,
6695         * src/cdbFile.c,
6696         * src/mcs51/gen.c,
6697         * src/ds390/gen.c: bit v bitfield split
6698         * src/z80/gen.c: New support for bitfields
6699         * support/regression/tests/bitfields.c: reenabled z80,
6700         added more tests
6701
6702 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6703
6704         Rules 246.x, 247.x relate to bitfields, the others speed up
6705         access to xdata mapped I/O devices.
6706
6707         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6708
6709 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6710
6711         Cleaned up genPackBits and genUnpackBits and added two helper
6712         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6713         for literal assignments in genPackBits (thanks to Frieder for
6714         reminding me).
6715
6716         * src/mcs51/gen.c
6717         * src/ds390/gen.c
6718
6719 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6720
6721         Fixed bug #748310 (pointer to function type mishandled when the
6722         function name is omitted). Also fixed a SIGSEGV when a function
6723         attribute (reentrant, etc) is used on a non-function or on a
6724         function but misplaced before the parameter list.
6725
6726         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6727         bug #748310
6728         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6729         * support/Util/SDCCerr.h,
6730         * support/Util/SDCCerr.c: Added func attr misuse error msg
6731
6732 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6733
6734         Fixed bug #787649 by anonymous
6735         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6736         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6737
6738 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6739
6740         Fixed numerous bitfield problems.
6741
6742         * src/SDCC.y: More bitfield related error checking
6743         * src/SDCCsymt.h,
6744         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6745         * support/Util/SDCCerr.h,
6746         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6747         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6748         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6749         * support/regression/tests/bitfields.c: tests added
6750
6751 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6752
6753         Made the constant following the "interrupt" keyword optional. If
6754         omitted, the function will not automatically be given an entry
6755         in the interrupt vector table (similar to #pragma NOIV, but
6756         less syntacticly kludgy). The interrupt number is also now
6757         range checked. Also fixed a bug in the high order bit example
6758         in the manual.
6759
6760         * src/SDCC.y
6761         * src/SDCCmem.c
6762         * src/SDCCglue.c
6763         * src/SDCCsymt.h
6764         * support/Util/SDCCerr.c
6765         * support/Util/SDCCerr.h
6766         * doc/sdccman.lyx
6767
6768 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6769
6770         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6771         * src/SDCCicode.c (operandOperation): rewritten some ops
6772         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6773         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6774         other type
6775         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6776         be re-activated by defining REDUCE_LITERALS)
6777         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6778         unsigned, but are signed by default
6779         * src/SDCCval.c (constVal): rearranged
6780         * src/SDCCval.c (valMod): preliminary fix
6781         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6782         * support/regression/literalop.c: added, work in progress
6783
6784 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6785
6786         Generate warnings for useless declarations like "char data;"
6787         that don't do what new users expect.
6788
6789         * src/SDCC.y
6790         * support/Util/SDCCerr.h
6791         * support/Util/SDCCerr.c
6792
6793 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6794
6795         * src/SDCCval.c (valMult): fix overflow detection of negative int
6796
6797 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6798
6799         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6800
6801         Changes to support big endian targets:
6802
6803         * src/ports.h
6804         * src/SDCCglue.c
6805         * src/avr/main.c
6806         * src/ds390/main.c
6807         * src/izt/i186.c
6808         * src/mcs51/main.c
6809         * src/pic/main.c
6810         * src/pic16/main.c
6811         * src/xa51/main.c
6812         * src/z80/main.c
6813
6814 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6815
6816         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6817         * device/lib/time.c: fixed warning "integer overflow in expression"
6818
6819 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6820
6821         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6822         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6823         constants are unsigned; added recognition of "u" flag for unsigned
6824         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6825         * src/SDCCval.c (valDiv, valMod): fixed signdness
6826         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6827         signedness of modulo, left and right shift
6828         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6829         * support/Util/SDCCerr.h: added warning W_INT_OVL
6830         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6831         * src/SDCCast.c (ast_print): improved output of constants
6832
6833 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6834
6835         Fixed some warnings when building with MSVC:
6836
6837         * as\mcs51\asdata.c
6838         * as\z80\asdata.c
6839         * as\mcs51\asm.h
6840         * as\z80\asm.h
6841         * link\z80\aslink.h
6842         * link\z80\lkdata.c
6843         * link\z80\lkeval.c
6844         * link\z80\lkgb.c
6845         * link\z80\lkihx.c
6846         * link\z80\lks19.c
6847         * link\z80\lksym.c
6848         * support\cpp2\cpplib.c
6849         * src\ds390\gen.c
6850         * src\mcs51\gen.c
6851
6852 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6853
6854         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6855
6856 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6857
6858         * support\librarian\clean.mk: Do not remove Makefile.
6859         * support\librarian\Makefile: added.
6860
6861 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6862
6863         Added librarian to MSVC build:
6864         * all.dsp
6865         * sdcc.dsw
6866         * support\librarian\librarian.dsp
6867
6868         'configure' not needed for librarian, removed:
6869         * support\librarian\configure
6870         * support\librarian\configure.in
6871         * support\librarian\config_in.h
6872         * support\librarian\Makefile.in
6873
6874         Hopefully these ones built the librarian and the rest of sdcc properly:
6875         * Makefile
6876         * Makefile.common.in
6877
6878         Messed up 'configure', so revert to previous version:
6879         * configure
6880         * configure.in
6881
6882 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6883
6884         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6885         there, while the mantissa of a double is "only" 53 bits wide.
6886
6887 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6888
6889         Adding sdcclib to the build.  MSVC project coming soon.
6890         Files added/changed:
6891
6892         * support\librarian\clean.mk
6893         * support\librarian\configure
6894         * support\librarian\configure.in
6895         * support\librarian\config_in.h
6896         * support\librarian\Makefile.bcc
6897         * support\librarian\Makefile.in
6898         * support\librarian\sdcclib.c
6899         * Makefile.bcc
6900         * Makefile
6901         * Makefile.common.in
6902         * configure
6903         * configure.in
6904
6905 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6906
6907         Linker now complaints if linked modules have conflicting options, for
6908         example, one compiled using --model-large and another one compiled with
6909         --model-small.  The following files were modified:
6910
6911         * as\mcs51\asdata.c
6912         * as\mcs51\aslink.h
6913         * as\mcs51\asm.h
6914         * as\mcs51\asmain.c
6915         * as\mcs51\asout.c
6916         * as\mcs51\i51pst.c
6917         * as\mcs51\lkdata.c
6918         * as\mcs51\lklibr.c
6919         * as\mcs51\lkmain.c
6920         * as\z80\asdata.c
6921         * as\z80\asm.h
6922         * as\z80\asmain.c
6923         * as\z80\asout.c
6924         * as\z80\z80pst.c
6925         * link\z80\aslink.h
6926         * link\z80\lkdata.c
6927         * link\z80\lklibr.c
6928         * link\z80\lkmain.c
6929         * src\SDCCglue.c
6930
6931 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6932
6933         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6934         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6935
6936 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6937
6938         * src/z80/mappings.i: fix _mul[us][int,long] entries
6939
6940 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6941
6942         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6943
6944 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6945
6946         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6947         * support/regression/tests/bitopcse.c: added
6948         fixed warning:
6949         * src/avr/gen.c:
6950         * src/pic/gen.c:
6951         * src/pic16/gen.c:
6952         * src/z80/gen.c:
6953         * src/xa51/gen.c:
6954
6955 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6956
6957         added support for new library format to z80, gbz80 linkers:
6958         *link/z80/aslink.h
6959         *link/z80/lklex.c
6960         *link/z80/lklib.c
6961         *link/z80/lklist.c
6962
6963 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6964
6965         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6966         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6967
6968 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6969
6970         added DUMMY_READ_VOLATILE:
6971         * src/SDCC.y:
6972         * src/avr/gen.c:
6973         * src/xa51/gen.c:
6974         * src/z80/gen.c:
6975         * src/pic/gen.c:
6976         * src/pic16/gen.c:
6977         * src/mcs51/gen.c:
6978         * src/ds390/gen.c:
6979         * src/SDCCcse.c (algebraicOpts): many improvements
6980         * src/SDCCcse.h: removed algebraicOpts()
6981         * src/SDCCicode.c (picDummyRead): added
6982
6983 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6984
6985         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6986         "Insufficient space in data memory".
6987
6988 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6989
6990         * src/mcs51/gen.c: fixed bug #771358
6991         * src/z80/gen.c: fixed bug #759087
6992
6993 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6994
6995         * src/pic16/glue.c: minor cleanup by Vangelis
6996
6997 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6998
6999         * device/include/regc515c.h: fixed #758477
7000         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7001         * device/lib/_gptrput.c: saved a few bytes
7002         * my tab spacing is 8, yours too?)
7003         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7004         * device/lib/serial.c: process RX bytes earlier than TX bytes
7005         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7006
7007 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7008
7009         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7010
7011 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7012
7013     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7014
7015 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7016
7017         * device/lib/Makefile.in: bad fix, reverted to 1.43
7018
7019 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7020
7021         * device/lib/Makefile.in: added missing z80 object files
7022
7023 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7024
7025         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7026         pic16 progress by Vangelis:
7027         * src/SDCCglobl.h:
7028         * src/SDCCmain.c:
7029         * src/pic/Makefile:
7030         * src/pic:
7031         * pic/Makefile:
7032         * pic16/device.c:
7033         * pic16/device.h:
7034         * pic16/gen.c:
7035         * pic16/gen.h:
7036         * pic16/genarith.c:
7037         * pic16/glue.c:
7038         * pic16/main.c:
7039         * pic16/pcode.c:
7040         * pic16/pcode.h:
7041         * pic16/pcodepeep.c:
7042         * pic16/peeph.def:
7043
7044 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7045
7046     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7047
7048 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7049
7050     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7051     added gbz80 build to MSVC project.
7052     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7053     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7054     from 8051 stuff and setup so it links using a .lnk file.
7055
7056 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7057
7058     * support/librarian/sdcclib.c: sdcc librarian.
7059     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7060     with sdcclib.
7061
7062 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7063
7064     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7065
7066 2003-07-02  Borut Razem <borut.razem AT siol.net>
7067
7068         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7069         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7070         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7071         src/xa51/main.c, src/z80/main.c:
7072         virtualization of glue() function: each port has it's own glue function,
7073         which is accessed by do_glue function pointer in PORT.general structure
7074
7075 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7076
7077         * DS800C400 fun, improved ROM interface and tinibios.
7078
7079 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7080
7081         * More support for DS80C400. Now includes beginning of interface to ROM.
7082
7083 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7084
7085         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7086
7087 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7088
7089         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7090
7091 2003-06-19  Borut Razem <borut.razem AT siol.net>
7092
7093         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7094
7095 2003-06-19  Borut Razem <borut.razem AT siol.net>
7096
7097         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7098         fixed Z80 port - crt0.o: cannot open.
7099
7100 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7101
7102         * support/Util/MySystem.c (merge_command): revert bad fix
7103
7104 2003-06-18  Borut Razem <borut.razem AT siol.net>
7105
7106         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7107
7108 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7109
7110         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7111         option --use-stdout sends errors to stdout instead of stderr.
7112
7113 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7114
7115         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7116
7117 2003-06-15  Borut Razem <borut.razem AT siol.net>
7118
7119         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7120         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7121         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7122         fixed width array of pointers replaced with sets;
7123         multiple include and lib paths ared transferred to preprocessor and linker
7124         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7125         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7126         fixed width array of pointers
7127         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7128         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7129         fixupPath(), getPathDifference()
7130         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7131         fixed width array of pointers
7132
7133 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7134
7135         * src/pic16/ralloc.c: fix warnings
7136         * src/pic16/pcode.c: fix warning
7137
7138 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7139
7140          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7141         know all the details, but essentially this set of changes enable
7142         the pic16 port to generate movff instructions and generate assembler
7143         directives,
7144         * src/SDCCmain.c:
7145         * src/pic16/gen.c:
7146         * src/pic16/glue.c:
7147         * src/pic16/pcode.c:
7148         * src/pic16/device.c:
7149         * src/pic16/main.c:
7150         * src/pic16/pcode.h:
7151         * src/pic16/pcoderegs.c:
7152         * src/pic16/ralloc.c:
7153         * src/pic16/ralloc.h:
7154
7155 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7156
7157         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7158         added option --vc, so sdcc errors and warnings are compatible with
7159         Microsoft Visual Studio.
7160
7161 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7162
7163         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7164           device/lib/libfloat.lib: added atof function.
7165
7166 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7167
7168         * doc/sdccman.lyx: updated to Lyx 1.3
7169         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7170         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7171         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7172
7173 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7174
7175         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7176
7177 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7178
7179         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7180           additions to the "related tools/documentation" section
7181
7182 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7183
7184         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7185
7186 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7187
7188         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7189         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7190
7191 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7192
7193         * doc/sdccman.lyx: fix double dash and other minor things
7194         * doc/Makefile: fix double dash
7195
7196 2003-05-28  Karl Bongers(patches from Martin Helmling)
7197         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7198           condition and ignore commands.
7199
7200 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7201
7202         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7203           is in parts still quite out of date, I did changes as far as I felt makes sense
7204           for a non-native english speaker.
7205           Please feel free to add to the manual or to correct my changes.
7206         * doc/Makefile: undid touching the date of intermediate tex files.
7207
7208 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7209
7210         * doc/sdccman.lyx: Manual has an index now
7211
7212 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7213
7214         Finalize muluint/mulsint and mululong/mulslong merging:
7215         * device/lib/_mulint.c
7216         * device/lib/_mullong.c
7217         * device/lib/gbz80/mul.s
7218         * device/lib/gbz80/stubs.s
7219         * device/lib/z80/mul.s
7220         * device/lib/z80/stubs.s
7221         * src/SDCCsymt.c (initCSupport)
7222
7223 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7224
7225         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7226         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7227           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7228           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7229           instead of /Zm500.
7230
7231 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7232
7233         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7234           the regression tests I'm not brave enough to enable 245.b, 245.c
7235         * doc/sdccman.lyx: added latex preamble for hyperref package.
7236           Using pdflatex this will give you a hyperlinked pdf file with
7237           bookmarks. (prepend '%' before /usepackage if this breaks something)
7238
7239 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7240
7241          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7242
7243 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7244
7245         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7246
7247 2003-05-21    <johan AT balder>
7248
7249         * src/SDCCglue.c (printIval): fixed bug #739934
7250
7251 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7252
7253         Applied patch from bug 737905 (renamed yylineo to mylineno):
7254         * src/altlex.c
7255         * src/SDCCast.c
7256         * src/SDCglobl.h
7257         * src/SDCC.lex
7258         * src/SDCCsymt.c
7259         * src/SDCCval.c
7260         * src/pic16/pcode.c: Cleaned warnings
7261         * src/pic16/pcodeflow.c: Cleaned warnings
7262         * src/pic16/pcoderegs.c: Cleaned warnings
7263
7264 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7265
7266         * src/pic16/pcode.c: Cleaned warnings
7267         * src/pic16/pcodepeep.c: Cleaned warnings
7268         * src/pic16/ralloc.c: Cleaned warnings
7269
7270 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7271
7272         * doc/sdccman.lyx: fixed bug 739745
7273         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7274
7275 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7276
7277         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7278         it can be defined with CFLAGS when running configure
7279         * src/SDCCmain.c: fixed compiling + linking with object files
7280
7281 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7282
7283         * configure.in: configure for pic16 port,
7284             added --disable-pic16-port
7285         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7286         * src/SDCCmain.c: linkOptions is changed to set *,
7287             added if/endif conditional macros to remove options help
7288             messages from optionsTable when a port is not configured, added
7289             support for the PIc16 port in the ports table, when executing
7290             the compiler with no port specified on command line, a default
7291             port is selected with the new macro DEFAULT_PORT which is
7292             defined in port.h, in setDefaultOptions() linkOptions is removed
7293             from initialization assignment, since now it is a set,
7294             parseCmdLine uses setParseWithComma for linkOptions, in
7295             linkEdit() linkOptions are accessed with new function indexSet()
7296             which returns the i'th item of a set variable. See SDCCset.c, in
7297             linkEdit() when calling buildCmdLine(), added linkOptions as
7298             last argument. Now users can pass arguments to gplink via the
7299             -Wl option, main() uses pic16glue() to glue up pic16 programs
7300         * src/SDCCpeeph.c: various changes to support pic16
7301         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7302             return the i'th item of the set
7303         * src/SDCCset.h: added function prototype for indexSet()
7304         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7305         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7306         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7307             added macro DEFAULT_PORT
7308         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7309         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7310             generated
7311         * src/pic16/glue.c: commented out some error producing lines
7312         * src/pic16/main.c: __config directives are commented out to stop
7313             gpasm complaining and test the linkage with gplink, _linkCmd and
7314             _asmCmd changed to be more gplink and gpasm friendly
7315         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7316             produced an error when parsed, peep rule 12 is added to utilize
7317             movff, but it is commented out since the pCode does not support
7318             yet a command with 2 address arguments
7319
7320 2003-05-18    <johan AT balder>
7321
7322         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7323         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7324 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7325
7326         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7327   Added feature to script commands from file.
7328
7329 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7330
7331         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7332         * src/SDCCutil.c: include ctype.h for win32
7333
7334 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7335
7336         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7337
7338 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7339
7340         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7341   Fixed so you can set breakpoints prior to run, run does not stop
7342   on entry now.  Add tbreak.  Other enhancements and fixes for use
7343   with ddd.
7344
7345 2003-05-12  Borut Razem <borut.razem AT siol.net>
7346
7347         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7348
7349 2003-05-11  Borut Razem <borut.razem AT siol.net>
7350
7351         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7352         the path of bin directory, so that PATH is the only env. variable, which has to be set
7353         in case of standard installation.
7354         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7355         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7356         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7357
7358 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7359
7360         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7361         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7362         temp files are in the port dir; clean the gen/test directory when
7363         generating new test.c
7364         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7365         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7366         * support/regression/tests/zeropad.c: added
7367
7368 2003-05-09    <johan AT balder>
7369
7370         * src/SDCCglue.c: fixed bug #597940
7371
7372 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7373
7374         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7375   cache sfr, optimize next,step, fix off by one sourceline,
7376   support ddd list function.
7377         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7378
7379 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7380
7381         * support/regression/HTMLgen.py: added compare_s2f()
7382         * support/regression/Makefile: redo 1.27
7383         * support/regression/generate-cases.py: redo 1.5
7384
7385 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7386
7387         * support/regression/tests/float.c: workaround 33 bit hex constant
7388         * support/regression/tests/simplefloat.c: fix division for host
7389
7390 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7391
7392         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7393         that tame's the PIC's over-aggressive optimizer.
7394
7395 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7396
7397          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7398          support for MSVC.
7399
7400 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7401
7402         Initial support for DS80C400. "Hello world" runs on TINIm400
7403         (with polled I/O).
7404
7405 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7406
7407          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7408          * Some notes on ddd usage added in debugger/README
7409          Martin Helmling adding more features and fixes for ddd GUI debugger.
7410          Code added for nexti, stepi, up, down, and other adjustments.
7411
7412 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7413
7414         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7415         * src/pic/peeph.def Added two rules to optimize carry manipulation
7416         * src/pic/* removed debug printfs
7417
7418 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7419
7420         * debugger/mcs51/cmd.c: added header newalloc.h
7421
7422 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7423
7424         * as/Makefile: new EXEEXT
7425         * as/z80/Makefile: remove trailing slash of BUILDIR
7426         * as/z80/clean.mk: new EXEEXT
7427         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7428         * support/cpp2/Makefile.in: new EXEEXT
7429         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7430
7431 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7432
7433         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7434         EXEEXT was introduced to fix all related problems with targets
7435         "clean", "install" and "uninstall"; a couple of further flaws
7436         especially with "clean" have been fixed too
7437         * as/mcs51/Makefile.in
7438         * as/mcs51/clean.mk
7439         * as/z80/Makefile
7440         * Makefile
7441         * clean.mk
7442         * debugger/mcs51/Makefile.in
7443         * debugger/mcs51/clean.mk
7444         * link/z80/Makefile
7445         * link/z80/Makefile.in
7446         * link/z80/clean.mk
7447         * link/Makefile
7448         * packihx/Makefile.in
7449         * packihx/clean.mk
7450         * sim/ucsim/Makefile
7451         * sim/ucsim/clean.mk
7452         * sim/ucsim/avr.src/Makefile.in
7453         * sim/ucsim/avr.src/clean.mk
7454         * sim/ucsim/s51.src/Makefile.in
7455         * sim/ucsim/s51.src/clean.mk
7456         * sim/ucsim/xa.src/Makefile.in
7457         * sim/ucsim/xa.src/clean.mk
7458         * sim/ucsim/z80.src/Makefile.in
7459         * sim/ucsim/z80.src/clean.mk
7460         * sim/ucsim/main_in.mk
7461         * sim/ucsim/packages_in.mk
7462         * sim/ucsim/gui.src/Makefile.in
7463         * sim/ucsim/gui.src/serio.src/Makefile.in
7464         * sim/ucsim/gui.src/serio.src/clean.mk
7465         * src/Makefile.in
7466         * src/clean.mk
7467         * support/cpp2/Makefile.in
7468         * support/cpp2/clean.mk
7469         * support/makebin/Makefile
7470         * support/makebin/clean.mk
7471         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7472         * doc/sdccman.lyx: --program-suffix no longer needed
7473
7474 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7475
7476          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7477          Martin Helmling added support for ddd GUI debugger.
7478          Code added to display assembly, set variables, and other commands
7479          to interface to ddd.
7480
7481 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7482
7483         * as/Makefile: fix target clean
7484         * as/clean.mk: fix target clean
7485         * as/z80/clean.mk: fix target clean
7486
7487 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7488
7489         * Makefile.common.in: added  AT EXEEXT AT
7490         * configure.in: removed all mingw32 stuff
7491         * configure: rebuilt from configure.in
7492         * doc/sdccman.lyx: updated section "installation"
7493         * support/scripts/sdcc_mingw32: adapted to configure
7494         * support/scripts/sdcc_cygwin_mingw32: added
7495
7496 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7497
7498         * src/pic Added object file support for the PIC port
7499         * src/pic Applied patch from Craig Franklin (this started the object file support)
7500         * src/regression Updated the PIC regression tests for object files
7501
7502 2003-04-20  Borut Razem <borut.razem AT siol.net>
7503
7504         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7505           lklex.c: In function `getfid':
7506           lklex.c:203: warning: array subscript has type `char'
7507         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7508           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7509         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7510           stack handling macros
7511
7512 2003-04-19  Borut Razem <borut.razem AT siol.net>
7513
7514         * "handling space characters in file path" task:
7515         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7516         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7517         * support/Util/MySystem.h: make it self-sufficient
7518         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7519           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7520           handling space characters in file path
7521         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7522           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7523         * support/Util/MySystem.c: handling space characters in executable's path
7524
7525 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * as/z80/Makefile: fix permanent rebuild of z80
7528         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7529         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7530
7531 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7532
7533         * src/SDCCopt.c: add special case optimization to replace modulo by
7534           a power of two with a bitwise AND.
7535
7536 2003-04-18    <johan AT balder>
7537
7538         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7539
7540 2003-04-17    <johan AT balder>
7541
7542         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7543         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7544
7545 2003-04-13  Borut Razem <borut.razem AT siol.net>
7546
7547         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7548         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7549           fixed mingw problem in adl_NORMALIZE_PATH
7550
7551 2003-04-12  Borut Razem <borut.razem AT siol.net>
7552
7553         * fixed "#pragma SAVE/RESTORE can not be nested":
7554         * src/SDCC.lex: reworked pragma handling functions
7555         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7556         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7557
7558 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7559
7560         * src/SDCCutil.c (pathEquivalent): defined but not used
7561         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7562         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7563         * configure: rebuilt from configure.in
7564         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7565         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7566         * device/include/Makefile.in: replace sdcc_datadir
7567         * device/lib/Makefile.in: replace sdcc_datadir
7568         * Makefile.common.in: add LDFLAGS from configure
7569         * packihx/Makefile.in: use LDFLAGS
7570         * src/Makefile.in: use LDFLAGS
7571         * support/cpp2/Makefile.in: add LDFLAGS from configure
7572         * support/makebin/Makefile: use LDFLAGS
7573         * .version: bumped version number to 2.3.5
7574
7575 2003-04-12  Borut Razem <borut.razem AT siol.net>
7576
7577         * completed "different paths" task:
7578         * src/SDCCmacro.c: fixed bug in handling quotes
7579         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7580         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7581
7582 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7583
7584         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7585
7586 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7587
7588         * ds390/gen.c ds390/peeph.def: fix bug 706781
7589
7590 2003-04-11  Borut Razem <borut.razem AT siol.net>
7591
7592         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7593
7594 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7595
7596         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7597         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7598          set - this bit used to not be set...).
7599         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7600           bad code in PIC Port
7601         * src/regression/and2.c added to test bug 609268
7602         * src/regression/Makefile added and2.c to regression test
7603
7604
7605 2003-04-08    <johan AT CP255758-A>
7606
7607         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7608         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7609         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7610
7611 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7612
7613         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7614         fix bug #487815
7615         * support/cpp2/Makefile.in: fix bug #487815
7616         * configure: rebuilt from configure.in
7617         * Makefile.common.in: docdir changed, new path suffixes
7618         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7619         * sdcc_vc_in.h: reflect changes from sdccconf.h
7620         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7621         * src/SDCCutil.h: remove BINDIR hack
7622         * doc/sdccman.lyx: update new path hierarchy
7623
7624 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7625
7626         * src/SDCCpeeph.c: added okToRemoveSLOC test
7627
7628 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7629
7630         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7631
7632 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7633
7634         * src/SDCCpeeph.c: added labelIsReturnOnly test
7635         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7636
7637 2003-04-05    <johan AT balder>
7638
7639         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7640         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7641         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7642         * src/SDCCast.c: fixed a warning
7643         * src/SDCCast.h: fixed a warning
7644         * src/SDCCicode.c (operandFromAst): fixed a warning
7645
7646 2003-04-04    <johan AT balder>
7647
7648         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7649         * src/SDCCast.c (decorateType): fixed bug #715076
7650         * src/SDCC.y: fixed bug #702907
7651
7652 2003-04-03    <johan AT balder>
7653
7654         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7655         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7656         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7657         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7658         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7659
7660 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7661
7662         * _decdptr.c: fix return values
7663         * _gptrget.c: fix return values
7664         * _gptrgetc.c: fix return values
7665         * _gptrput.c: fix return values
7666         * _mulint.c: fix return values
7667         * as/z80/Makefile: fix 'make -j' problem
7668
7669 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7670
7671         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7672         * configure.in: big cleanup, updated to autoconf 2.5x
7673         * configure: rebuilt from configure.in
7674         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7675         * sdcc_vc_in.h: reflect changes from sdccconf.h
7676         * doc/Makefile: fixed a flaw in "make install"
7677
7678 2003-04-02    <johan AT balder>
7679
7680         * src/ds390/gen.c (genCmp): no comments
7681         * src/mcs51/gen.c (genCmp): no comments
7682         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7683         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7684
7685 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7686
7687         * support/regression/generate-cases.py: place generated file in given sub directory
7688         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7689         * support/regression/Makefile: improvements for 'make -j';
7690         side effect: it's simpler and faster now
7691
7692 2003-03-31  Borut Razem <borut.razem AT siol.net>
7693
7694         * src/z80/main.c: link-{port} and as-{port} defined without path
7695         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7696
7697 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7698
7699         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7700
7701 2003-03-30  Borut Razem <borut.razem AT siol.net>
7702
7703         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7704           changed type of list parameter to set
7705         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7706         * src/port.h: changed type of do_assemble() parameter to set
7707         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7708           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7709           definition of "cppoutfilename" macro with NULL value in preProcess()
7710         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7711         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7712         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7713           replaced with set *binPathSet
7714         * shash_add() deallocates the item, if allready exsists, before adding the new one
7715         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7716
7717 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7718
7719         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7720           a nested for loop bug in the PIC port
7721         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7722           for loops
7723
7724 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7725
7726         * support/Util/dbuf.h: remove C++ stuff to make it portable
7727
7728 2003-03-28  Borut Razem <borut.razem AT siol.net>
7729
7730         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7731           literal strings in stringLiteral()
7732         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7733         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7734           to the project
7735
7736 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7737
7738         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7739
7740 2003-03-26    <johan AT balder>
7741
7742         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7743         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7744         * src/SDCCast.c (decorateType): fixed " -v < 3"
7745
7746 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7747
7748         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7749         Added Lenny Story's debug infrastructure changes:
7750         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7751         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7752         * src/cdbFile.c: added
7753         * src/SDCCdebug.c: added
7754         * src/SDCCdebug.h: added
7755         * src/SDCCast.c (createFunction)
7756         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7757         * src/SDCCmain.c (parseCmdLine, main)
7758         * src/SDCCmem.c (redoStackOffsets)
7759         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7760         * src/SDCCsymt.h
7761         * src/common.h
7762         * src/avr/gen.c (genAVRCode)
7763         * src/ds390/gen.c (gen390Code)
7764         * src/mcs51/gen.c (gen51Code)
7765         * src/pic/gen.c (genpic14Code)
7766         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7767         * src/xa51/gen.c (genXA51Code)
7768         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7769
7770 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7771
7772         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7773         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7774
7775 2003-03-22    <johan AT balder>
7776
7777         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7778
7779 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7780
7781         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7782         * doc/cdbfileformat.lyx: added, written by Lenny Story
7783         * doc/Makefile: added cdbfileformat.lyx
7784         * doc/clean.mk: added cdbfileformat.lyx
7785
7786 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7787
7788         * src/mcs51/peeph.def: fix bug #705773
7789
7790 2003-03-20    <johan AT balder>
7791
7792         An sfr/sbit can have an "at #" AND an initializer
7793         * src/SDCCsymt.c (checkSClass):
7794         * src/SDCCmem.c (allocGlobal):
7795         * src/SDCCmem.c (allocLocal):
7796         * src/SDCCast.c (createBlock):
7797
7798 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7799
7800         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7801
7802 2003-03-16    <johan AT balder>
7803
7804         Undid the hackup of const and volatile, the problem is much bigger
7805         * src/SDCC.y:1.65
7806         * src/SDCCast.c:1.171
7807         * src/SDCCglue.c:1.138
7808         * src/SDCCicode.c:1.146
7809         * src/SDCCsymt.c:1.150
7810         * src/SDCCval.c:1.65
7811
7812 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7815         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7816
7817 2003-03-13    <johan AT balder>
7818
7819         Hackup const and volatile modifiers in type chains a bit:
7820         * src/SDCC.y:1.63
7821         * src/SDCCast.c:1.169
7822         * src/SDCCglue.c:1.136
7823         * src/SDCCicode.c:1.143
7824         * src/SDCCsymt.c1.146
7825         * src/SDCCsymt.h1.59
7826         * src/SDCCval.c:1.63
7827
7828 2003-03-12    <johan AT balder>
7829
7830         * src/SDCCBBlock.h: more LRH debugging junk
7831         * src/SDCCcflow.h: more LRH debugging junk
7832         * src/SDCCloop.c: more LRH debugging junk
7833         * src/SDCC.y (struct_declaration): fixed bug #697590
7834         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7835         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7836         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7837
7838 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7839         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7840         test function names must now match exactly).
7841         * src/SDCCcse.c: added special case in findCheaperOp to allow
7842         extending a short integer. Makes less awful code for bug 700121 test case.
7843
7844 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7845
7846         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7847         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7848
7849 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7850
7851         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7852         actually called (operandsNotEqual() was called for all
7853         operandsNotEqualX tests).
7854
7855 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7856
7857         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7858         with shorter literals. Fixes bug 700121.
7859
7860 2003-03-11    <johan AT balder>
7861
7862         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7863
7864 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7865
7866         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7867         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7868
7869 2003-03-10  Borut Razem <borut.razem AT siol.net>
7870
7871         * src/SDCCmain.c: pipe preprocessor's output
7872         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7873         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7874         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7875         which closes all pipes in pipeSet set
7876         * src/SDCCset.c: free deleted item in function deleteSetItem()
7877         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7878         moved from z80 to src subproject
7879         * .version: increased version number to 2.3.4
7880
7881 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7882
7883         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7884         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7885         * support/regression/ports/xa51/spec.mk: fix typo
7886
7887 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7888
7889         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7890
7891 2003-03-09  Borut Razem <borut.razem AT siol.net>
7892
7893         * src/SDCCmain.c: pipe preprocessor's output
7894         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7895         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7896         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7897         which closes all pipes in pipeSet set
7898         * src/SDCCset.c: free deleted item in function deleteSetItem()
7899         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7900         moved from z80 to src subproject
7901
7902 2003-03-09  Borut Razem <borut.razem AT siol.net>
7903
7904         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7905         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7906         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7907         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7908         * src/SDCCglobl.h: unification of WIN32 native definitions
7909
7910 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7911
7912         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7913
7914 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7915
7916         * src/configure.in:   check for endianess (even while cross-compiling)
7917         * src/configure:      check for endianess (even while cross-compiling)
7918         * src/configure_in.h: check for endianess (even while cross-compiling)
7919         * src/avr/gen.c:        remove old endianess stuff
7920         * src/mcs51/gen.c:      remove old endianess stuff
7921         * src/ds390/gen.c:      remove old endianess stuff
7922         * src/pic/gen.c:        remove old endianess stuff
7923         * src/pic/genarith.c:   remove old endianess stuff
7924         * src/pic/glue.c:       fix endianess check
7925         * src/pic16/gen.c:      remove old endianess stuff
7926         * src/pic16/genarith.c: remove old endianess stuff
7927         * src/pic16/glue.c:     fix endianess check
7928         * src/xa51/gen.c:       remove old endianess stuff
7929         * src/z80/gen.c:        fix endianess check
7930         * src/SDCCglue.c:       fix endianess check
7931         * src/ds390/peeph.def: fix bug 700036
7932
7933 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7934
7935         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7936         * src/configure: find appropriate data-types on host for SDCC's int and long
7937         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7938         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7939         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7940
7941 2003-03-07    <johan AT balder>
7942
7943         Just a big NOOP:
7944                 some minor cleanups before the big shot
7945                 OP_DEFS and OP_USES now use Kevin's protection
7946                 new option --nolabelopt
7947
7948         * src/SDCCBBlock.c:
7949         * src/SDCCast.c,:
7950         * src/SDCCcflow.c:
7951         * src/SDCCcse.c:
7952         * src/SDCCicode.c:
7953         * src/SDCCicode.h:
7954         * src/SDCClabel.c:
7955         * src/SDCCloop.c:
7956         * src/SDCCmain.c:
7957         * src/ds390/ralloc.c:
7958         * src/mcs51/ralloc.c:
7959         * src/pic/ralloc.c:
7960         * src/xa51/ralloc.c:
7961         * src/z80/ralloc.c:
7962
7963 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7964
7965         * src/pic/pcode.c (get_op): fix 64 bit warnings
7966         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7967         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7968         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7969         * support/regression/tests/malloc.c: fix 64 bit warnings
7970
7971 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7972
7973         * src/mcs51/gen.c (genMinus): fixed bug 696436
7974
7975 2003-03-02  Borut Razem <borut.razem AT siol.net>
7976
7977         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7978
7979 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7980
7981         * configure.in: test for mkstemp
7982         * sdccconf_in.h: add HAVE_MKSTEMP
7983
7984 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7985
7986         * device/include/ctype.h: removed warning while using --stack-auto
7987         * device/include/malloc.h: removed warning while using --stack-auto
7988         * device/include/string.h: removed warning while using --stack-auto
7989
7990 2003-02-23  Borut Razem <borut.razem AT siol.net>
7991
7992         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7993         because NDEBUG is defined (see man assert)
7994         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7995
7996 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7997
7998         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7999         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8000
8001 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8002
8003         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8004         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8005
8006 2003-02-18    <johan AT balder>
8007
8008         * as/mcs51/asmain.c (asmbl): module can start with a digit
8009         * as/z80/asmain.c (asmbl): module can start with a digit
8010
8011 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8012
8013         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8014         * src/asm.c: fix pipe() for Mingw32
8015
8016 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8017
8018         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8019         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8020         make -V work again; --c1mode reads now from stdin
8021         * doc/sdccman.lyx: added --c1mode
8022         * support/Util/SDCCerr.c: new messages for c1 mode
8023         * support/Util/SDCCerr.h: new messages for c1 mode
8024         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8025
8026 2003-02-15    <johan AT balder>
8027
8028         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8029
8030 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8031
8032         * doc/sdccman.lyx: Environment variables, -o and other minor things
8033
8034 2003-02-14    <johan AT balder>
8035
8036         * src/xa51/main.c: before anyone really tries to use it :)
8037
8038         * Install doc's in share/sdcc/doc
8039         * removed some obsolete files
8040         * Do a proper make distclean and uninstall
8041         M Makefile.common.in
8042         R sdccbuild.sh
8043         M as/Makefile
8044         M device/include/Makefile.in
8045         M device/lib/Makefile.in
8046         M doc/sdccman.lyx
8047         M link/Makefile
8048         M sim/ucsim/doc/Makefile.in
8049         M src/clean.mk
8050         R src/avr/peeph.rul
8051         R src/xa51/peeph.rul
8052         M support/cpp2/Makefile.in
8053         M support/makebin/Makefile
8054
8055
8056 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8057
8058         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8059
8060 2003-02-10  Borut Razem <borut.razem AT siol.net>
8061
8062         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8063         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8064         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8065         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8066         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8067         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8068         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8069         src/z80/Makefile.bcc: Borland Makefile cleanup
8070         * as/z80/Makefile.bcc: Added Borland Makefile
8071         * support/cpp2/borland.h: Removed
8072
8073 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8074
8075         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8076         * src/SDCC.lex: new pragma NOIV
8077         * src/SDCCglobl.h: new pragma NOIV
8078         * src/SDCCmem.c: new pragma NOIV
8079
8080 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8081
8082         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8083
8084 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8085
8086         * src/SDCCmain.c: signal handling is switched off by --debug
8087         * doc/Makefile: small fix for install; use clean.mk again
8088         * doc/clean.mk: clean *.pdf and *.html too
8089
8090 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8091
8092         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8093         * device/lib/printfl.c: fix a ds390 bug by making it portable
8094         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8095         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8096         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8097         * debugger/mcs51/cmd.c: converted multi-line string literals
8098         * sim/ucsim/globals.cc: converted multi-line string literals
8099         * src/SDCCmain.c: introduced signal handler to remove temp files
8100         * doc/Makefile: small tweaks, implement clean
8101         * doc: removed generated files
8102
8103 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8104
8105         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8106         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8107         Address Record is not correctly generated for DS390."
8108
8109 2003-02-02  Borut Razem <borut.razem AT siol.net>
8110
8111         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8112         * as/mcs51/asm.h: fixed compilation with Borland C
8113         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8114         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8115         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8116         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8117         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8118         src/z80/Makefile.bcc: delete $(LIB) only if exist
8119         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8120
8121 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8122
8123         * device/include/malloc.h: introduced NULL
8124         * device/include/string.h: introduced NULL
8125         * device/include/stdlib.h: introduced NULL
8126         * device/lib/_memcpy.c: removed NULL
8127         * device/lib/_strcat.c: removed NULL
8128         * device/lib/_strchr.c: removed NULL
8129         * device/lib/_strcmp.c: removed NULL
8130         * device/lib/_strcpy.c: removed NULL
8131         * device/lib/_strcspn.c: removed NULL
8132         * device/lib/_strlen.c: removed NULL
8133         * device/lib/_strncat.c: removed NULL
8134         * device/lib/_strncmp.c: removed NULL
8135         * device/lib/_strncpy.c: removed NULL
8136         * device/lib/_strpbrk.c: removed NULL
8137         * device/lib/_strrchr.c: removed NULL
8138         * device/lib/_strspn.c: removed NULL
8139         * device/lib/_strstr.c: removed NULL
8140         * device/lib/_strtok.c: removed NULL
8141         * device/lib/malloc.c: removed NULL, include own header
8142
8143 2003-02-02    <johan AT balder>
8144
8145         * 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
8146         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8147         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8148         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8149         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8150         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8151
8152 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8153
8154         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8155         area 'DATA'"
8156
8157 2003-02-01    <johan AT balder>
8158
8159         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8160
8161 2003-01-31    <johan AT CP255758-A>
8162
8163         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8164
8165 2003-01-30    <johan AT balder>
8166
8167         * src/SDCCBBlock.c: automatic bug detection
8168         * src/SDCCicode.c: automatic bug detection
8169
8170 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8171
8172         * src/SDCCglobl.h:   now --xram-size 0 works
8173         * src/SDCCmain.c:    now --xram-size 0 works
8174
8175 2003-01-29    <johan AT balder>
8176
8177         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8178
8179 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8180
8181         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8182         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8183         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8184         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8185         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8186         * src/SDCCmain.c:    Added options --xram-size and --code-size
8187
8188 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8189
8190         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8191         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8192
8193 2003-01-27    <johan AT balder>
8194
8195         * src/SDCC.y: fixed bug #613764
8196
8197 2003-01-26    <johan AT balder>
8198
8199         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8200         * src/SDCCsymt.h: fixed bug #673374
8201         * src/SDCCglue.c: fixed bug #661910
8202         * src/SDCCast.c: fixed bug #458099 and 673374
8203
8204 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8205
8206         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8207         * as/mcs51/strcmpi.h: added
8208         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8209         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8210         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8211         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8212         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8213         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8214         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8215         * as/mcs51/Makefile.aslink: new module strcmpi
8216         * as/mcs51/Makefile.asx8051: new module strcmpi
8217         * as/mcs51/Makefil.bcc: new module strcmpi
8218         * as/mcs51/Makefile.in: new module strcmpi
8219         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8220
8221 2003-01-26    <johan AT balder>
8222
8223         * src/SDCCglue.c: reverted back to 1.124
8224         * src/SDCCast.c: reverted back to 1.156
8225         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8226
8227 2003-01-25    <johan AT balder>
8228
8229         * src/SDCCglue.c: A better fix for bug #661910
8230         * src/SDCCast.c: A better fix for bug #661910
8231         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8232
8233 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8234
8235         * src/Makefile.in: remove spawn.o
8236         * src/SDCCmain.c: remove spawn.h
8237         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8238         * src/spawn.c: removed
8239         * src/spawn.h: removed
8240         * support/regression/ports/ds390/spec.mk: link with -r
8241
8242 2003-01-24    <johan AT CP255758-A>
8243
8244         * src/ds390/gen.c (aopOp): fixed bug #667458
8245         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8246         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8247         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8248
8249 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8250
8251         * src/mcs51/peeph.def: better assembler identation by Frieder
8252         * src/mcs51/gen.c: better assembler identation by Frieder
8253
8254 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8255
8256         * as/z80/string.h: removed for gcc 3.2
8257         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8258         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8259
8260 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8261
8262         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8263         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8264         * support/regression/Makefile: separate temp files for ports
8265         * support/regression/generate-cases.py: separate temp files for ports
8266         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8267         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8268
8269 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8270
8271         * moved tinitalk to device/examples/ds390
8272
8273 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8274
8275         * as/mcs51/lkmem.c: rflag is for DS390
8276         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8277         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8278                          (linkEdit): move mem- and map-files the same way as ihx-files
8279         * src/z80/main.c (_setDefaultOptions): removed --generic
8280         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8281         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8282         * src/pic/glue.c (picglue): --c1mode works again
8283         * src/pic16/glue.c (pic16glue): --c1mode works again
8284         * src/asm.c (printCLine): fix #660034
8285
8286 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8287
8288         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8289         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8290         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8291         * as/mcs51/lkmem (summary): better fix for sp problem
8292         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8293         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8294         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8295                                               remove --stack-after-data
8296
8297 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8298
8299         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8300         * src/SDCCutil.c (join): ugly bug: missing '\0'
8301         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8302
8303 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8304
8305         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8306         * src/port.h: typo
8307         * src/pic/main.c (_asmCmd): gpasm supports -o
8308         * src/z80/main.c: more general macros
8309         * device/lib/Makefile.in: remove intermediate files
8310
8311 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8312
8313         * .version: Bumped version number to 2.3.3
8314         * src/SDCCBBlock.c: new option -o
8315         * src/SDCCglobl.h: new option -o
8316         * src/SDCCglue.c: new option -o
8317         * src/SDCCmain.c: new option -o
8318         * src/asm.c: new option -o
8319         * src/ds390/main.c: new option -o
8320         * src/pic/glue.c: new option -o
8321         * src/pic/pcode.c: new option -o
8322         * src/pic/ralloc.c: new option -o
8323         * src/pic16/glue.c: new option -o
8324         * src/pic16/pcode.c: new option -o
8325         * src/pic16/ralloc.c: new option -o
8326         * src/z80/main.c: new option -o
8327         * device/lib/Makefile.in: use -o
8328         * support/regression/ports/ds390/spec.mk: use -o
8329         * support/regression/ports/gbz80/spec.mk: use -o
8330         * support/regression/ports/mcs51/spec.mk: use -o
8331         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8332         * support/regression/ports/z80/spec.mk: use -o
8333         * support/regression/ports/ucz80/spec.mk: use -o
8334         * support/regression/ports/xa51/spec.mk: use -o
8335         * support/regression/fwk/lib/timeout.c: fix usage string
8336
8337 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8338         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8339
8340 2003-01-07    <johan AT balder>
8341
8342         * src/SDCCast.c (decorateType): fixed bug #600035
8343
8344 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8345         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8346         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8347         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8348         * src/pic/pcode.c: outcommented unused variable to remove warnings
8349         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8350
8351 2003-01-06    <karl AT turbobit.com>
8352         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8353    regression tests.
8354
8355 2003-01-06    <johan AT balder>
8356
8357         * src/SDCCicode.c: fixed array add
8358
8359 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8360         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8361         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8362
8363 2003-01-04    <johan AT balder>
8364
8365         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8366
8367 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8368         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8369
8370 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8371         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8372         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8373
8374 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8375         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8376
8377 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8378         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8379
8380 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8381         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8382
8383 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8384
8385     * in \sdcc\as\mcs51\ changed these files in order to create an
8386     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8387     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8388     following files to include the previous two files: aslink.dsp,
8389     Makefile.aslink, Makefile.bcc, and Makefile.in.
8390
8391     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8392     .adb instead of .cdb
8393
8394 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8395
8396         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8397         value from option --iram-size.
8398
8399 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8400
8401         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8402         dram[] array.
8403
8404 2002-09-18    <wiml AT hhhh.org>
8405
8406         * SDCClrange.h: exposed setFromRange() and setToRange()
8407         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8408           packRegsForAccUse() (bug 542397)
8409         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8410           multiple times and emitting the fetch operations more than once
8411           added aopGetUsesAcc() function to allow binary operators to
8412           fetch their operands in the correct order; made genMinus() emit
8413           compact code for X = LITERAL - Y
8414
8415 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8416         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8417         sprintf() in line 1267.
8418
8419 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8420         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8421         like ports.
8422
8423 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8424         Changes to aslink (All the changes are marked with 'JCF'):
8425
8426         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8427         summary().
8428
8429         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8430         area BSEG.  Also moves, if possible, the DATA area down into the internal
8431         ram so more space is available.
8432
8433         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8434         sflag.
8435
8436         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8437         not bytes.  Function summary() which creates a memory usage summary
8438         file with extension .mem.  Reports of overlaping stack and small stack
8439         size.  If the space for the stack is less than 16 bytes aslink trows a
8440         warning.
8441
8442         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8443         the 8051.  Option 'y' for memory summary output file.
8444
8445         Changes to sdcc (All the changes are marked with 'JCF'):
8446
8447         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8448
8449         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8450         overlaying area for it (uses RegBankUsed[4]).
8451
8452         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8453         bank zero as used by default.  By default aslink locates the stack
8454         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8455         the creation of the .mem file.  Delegates the allocation of data area
8456         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8457         the begining of the stack area to aslink.
8458
8459         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8460         glue() in SDCCglue.c creates an area for it.
8461
8462 2002-09-03  Borut Razem <borut.razem AT siol.net>
8463         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8464         sdcc/src/pic/glue.c:
8465         introduced atexit() handler for teporay files removal in case of
8466         errors, assertions, ...
8467
8468 2002-08-29  Borut Razem <borut.razem AT siol.net>
8469         * sdcc/support/cpp2/auto-host_vc_in.h:
8470         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8471         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8472         Maybe there is a similar problem with BORLANDC? It should be checked!
8473
8474         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8475         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8476         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8477         was not executed, and the compiler (cl) launched a warning:
8478         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8479
8480 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8481         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8482
8483 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8484         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8485
8486         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8487           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8488           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8489           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8490           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8491           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8492           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8493         - added Release configuration in VS projects
8494         - review of compiler an linker options
8495         - VC .exe files are generated in bin_vc directory, not to interfere
8496           with binaries generated from other projects (cygwin, mingw, bcc ...)
8497
8498         * sdcc/src/yacc.dsp: added
8499
8500         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8501         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8502         and insert the version number definitions from .version
8503
8504         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8505
8506         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8507         added - genarate auto-host.h using auto-host_vc_in.h as template
8508
8509         * sdcc/sdcc_vc.h,
8510         removed from CVS, generated automatically
8511
8512 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8513         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8514
8515 2002-08-11  Borut Razem <borut.razem AT siol.net>
8516         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8517
8518 2002-08-10  Borut Razem <borut.razem AT siol.net>
8519         * src/SDCCmain.c (main):
8520         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8521         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8522         The consequence was that some temporary files were not removed.
8523
8524         * src/SDCCglue.c:
8525         unification of code in functions tempfilename() and tempfile():
8526         function tempnam() is defined in Visual Studio 6.0 and .NET
8527
8528         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8529
8530         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8531           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8532         - removed compiler command line option /WX: Treats all warnings as errors
8533         - update a list of source files, included into the project
8534
8535         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8536           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8537         changed project type to Generic Project so that can be correcly converted to VS.NET project
8538
8539         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8540
8541         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8542
8543         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8544
8545         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8546         added return 0 statements after assert() to make compiler happy
8547
8548         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8549         added newline in the def file to keep MSC compiler satisfied
8550
8551         * sdcc/src/z80/gen.c:
8552         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8553           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8554         - solved MSC error in function aopDump()
8555
8556         * sdcc_vc.h: define PREFIX as "\\sdcc"
8557
8558 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8559         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8560
8561 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8562         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8563         - Rewrote the register banking algorithm.
8564         - Added pCode live-range analysis to registers (for now, only non-used and
8565         singly-used registers optimized away)
8566
8567         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8568
8569         * 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.
8570
8571 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8572         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8573
8574 2002-04-22  Michael Hope  <michaelh AT vroom>
8575
8576         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8577
8578         * configure.in (DD_COPT): Added include support required for gbdk.
8579
8580         * .version: Bumped version number just to increase it.
8581
8582         * src/SDCCmain.c: Added -nostdinc to the default options.
8583
8584 2002-04-15  Michael Hope  <michaelh AT vroom>
8585
8586         * device/lib/z80/printf.c (sprintf): Added.
8587
8588         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8589
8590         * src/z80/peeph.def: Added transpose redundent load rule.
8591
8592         * src/z80/main.c: Added force callee saves for jaune.
8593
8594         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8595
8596         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8597
8598 2002-03-28  Johan Knol  <johan AT balder>
8599
8600         * src/SDCCval.c: fixed bug #532436
8601
8602 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8603         * /src/port.h:
8604         Added "char *Processor" field to the port structure.
8605
8606         * /src/SDCCmain.c:
8607         Added -p option. Allows port dependent processor to be specified.
8608
8609         * all ports:
8610         Initialized the new field char *Processor field to NULL in all ports
8611
8612         * /src/pic/*:
8613         Compiler generated registers for interrupt context saving
8614         were not getting allocated.
8615
8616 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8617
8618         * /src/SDCCast.c:
8619         Fixed left shift. Will promote the left side of a left shift
8620         if a) left shifting more than size of operand or b) when assigned
8621         to something size > size of left side
8622
8623 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8624         * src/pic/*
8625         tons of changes. Register allocation has been
8626         rewritten. Added customization for the various PICs. Flow
8627         analysis is restructured. ...
8628
8629         * src/pic/device.h:
8630         Added
8631
8632         * src/pic/device.c:
8633         Added. device.c is a PIC port hack to accomodate variations
8634         in PIC devices.
8635
8636 2002-03-13  Michael Hope  <michaelh AT vroom>
8637
8638         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8639
8640 2002-03-04  johanknol  <johanknol AT manik>
8641
8642         * /src/SDCCval.c: fixed
8643
8644         const unsigned char arr[][2] = { { 0, 1 } };
8645         t18.c:1: error: Initializer element is not constant
8646
8647 2002-03-04  bela  <bela AT manik>
8648
8649         * /device/include/mcs51reg.h:
8650         ds89c420 register definition update
8651
8652 2002-03-03    <johan AT FRIJA>
8653
8654         * support/Util/SDCCerr.c: did something, but don't no why anymore
8655
8656         * support/regression/tests/bug-524691.c: made it a little less shy
8657
8658         * src/SDCCast.c (decorateType): fixed bug #524697
8659
8660         * src/SDCCast.c: made some lineno improvements
8661
8662         * src/SDCCval.c (getNelements): changed warning to error
8663
8664         * src/SDCCglue.c (printIvalArray): changed warning to error
8665
8666         * src/SDCCicode.c: fixed a warning for mingw
8667
8668         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8669
8670         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8671
8672 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8673
8674         * src/ds390/peeph.def:
8675         Added some more peephole rules
8676
8677         * src/ds390/gen.c: Various fixes & enhancements
8678
8679         * src/SDCClrange.c, src/SDCClrange.h:
8680         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8681
8682         * src/ds390/ralloc.c:
8683         various fixes & enhancements (ds390) specific
8684
8685         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8686         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8687         from rallocs.
8688
8689         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8690
8691 2002-03-02    <johan AT FRIJA>
8692
8693         * src/SDCCast.c (decorateType): fixed bug #524708
8694
8695         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8696
8697         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8698
8699 2002-03-01  Michael Hope  <michaelh AT vroom>
8700
8701         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8702
8703         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8704
8705 2002-03-01    <johan AT FRIJA>
8706
8707         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8708
8709         * src/SDCCast.c (decorateType): fixed bug #524209
8710
8711         * src/SDCCval.c (valNot): fixed bug #524195
8712
8713 2002-02-26    <johan AT balder>
8714
8715         * src/xa51/gen.c: fixed a warning
8716
8717         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8718
8719         * src/SDCCast.c (decorateType): fixed bug #522534
8720
8721 2002-02-23    <johan AT balder>
8722
8723         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8724
8725 2002-02-22    <johan AT balder>
8726
8727         * src/SDCCast.c: fixed bug #514865
8728
8729         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8730
8731 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8732
8733         * sdcc/src/SDCCloop.c:
8734         Previous fix was not good. basic blocks that have "break" or "return" are
8735         not really partof a loop , but live ranges used in these blocks should
8736         be live thru the entire loop, so set partOfLoop but don't add them to
8737         loop region
8738
8739 2002-02-21    <johan AT FRIJA>
8740
8741         * src/SDCCcse.c: fixed bug #514308
8742
8743 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8744
8745         * src/SDCCloop.c:
8746         Fixed BUG #519583. If a conditional block ended in a return/break
8747         statement inside a loop, it was not being considered part of the loop.
8748
8749         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8750
8751 2002-02-10  Karl Bongers <karl AT turbobit.com>
8752
8753         * debugger/*:
8754         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8755         with lots of comments and notes.
8756
8757         * device/examples/test2.c:
8758         Fix bug, "red" variable not being initialized(compiler complained).
8759
8760         * device/examples/Makefile, examples/test3.c:
8761         Add Makefile in device/examples folder, compiles test3.c
8762         for use as a multiple module SDCDB test case.
8763
8764         * sim/ucsim/cmd.src/cmdset.cc:
8765         Took out debug printfs in ucsim "next" command.
8766
8767         * sim/ucsim/xa.src:
8768         Karl and Johan start ucsim XA support.  Most dissassembly working,
8769         about 75% emulation done(plenty of work remaining).
8770
8771         * sim/ucsim/z80.src:
8772         Add Z80 support to ucsim, add test-ucz80 regression test,
8773         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8774         Notice z80 compiler fails on examples/test3.c/crc code.
8775
8776 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8777
8778         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8779         Added support for --parms-in-bank1
8780
8781         * src/ds390/peeph.def:
8782         added a few more peephole optimzations
8783
8784         * src/ds390/main.c:
8785         1) added __builtin_inp & __builtin_outp used to read in data of given length
8786            from a memory mapped port
8787         2) added __builtin_memcmp
8788         3) added __builtin_swapw swap bytes of a short
8789
8790         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8791         1) handle multiple send & receives from register bank1
8792         2) ralloc can now allocate DPTR1 to some liveRanges
8793
8794         * src/SDCCsymt.c, src/SDCCsymt.h:
8795         changes to handle multiple sends & receives
8796
8797         * src/SDCCptropt.h:
8798         added some pointer arithmetic optimization
8799
8800         * src/SDCCptropt.c:
8801         added some pointer arithmetic optimizations but not stable yet so not
8802         called from anywhere (will get this working shortly)
8803
8804         * src/SDCCopt.c: fixed for multiple sends & receives
8805
8806         * src/SDCCmain.c:
8807         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8808         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8809            set preprocessor defines (depending on options)
8810
8811         * src/SDCCicode.c, src/SDCCicode.h:
8812         changes made to handle multiple sends & receives
8813
8814         * src/SDCCglobl.h:
8815         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8816
8817         * src/SDCCcse.c, src/SDCCcse.h:
8818         added function findbackward def (to be used in upcoming optimization)
8819
8820         * src/SDCCcflow.c, src/SDCCcflow.h:
8821         added function returnAtEnd - to determine if a basic block terminates with
8822         a RETURN iCode
8823
8824         * src/SDCCast.c, src/SDCCast.h:
8825         added option parms-in-bank1
8826
8827         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8828         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8829         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8830         adjusted for --parms-in-bank1 option
8831
8832         * device/include/string.h:
8833         donot redefine "reentrant" keyword
8834
8835         * device/include/ds80c390.h: Added some more SFRs
8836
8837 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8838
8839         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8840
8841 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8842
8843         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8844
8845 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8846
8847         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8848
8849 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8850
8851         * Added --xram-movc option
8852
8853 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8854
8855         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8856
8857 2002-01-11  Johan Knol
8858
8859         * Added math lib of Jesus Calvino-Fraga
8860
8861 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8862
8863         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8864         * support/regression/Makefile: new target test-mcs51-stack-auto
8865         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8866
8867 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8868
8869         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8870
8871 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8872
8873         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8874
8875 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8876
8877         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8878
8879         * src/SDCCglue.h: add definition for printIvalChar()
8880
8881 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8882
8883         * src/SDCCast.c: fix #498138 by Johan
8884
8885         * src/SDCCglue.c: fix #498138 by Johan
8886
8887 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8888
8889         * support/regression/Makefile: fix clean
8890
8891         * support/regression/ports/ds390/support.c: fix transmission of last character
8892
8893 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8894
8895         * /sdcc/src/ds390/gen.c:
8896         a) improved computing address of stack variable
8897         b) took out some #if 0 code
8898         c) improved parmBytes adjustment
8899         d) improved genPlusIncr & genMinusIncr
8900         e) genCmp could generate bad code (when left assigned to DPTR)
8901         f) Fixed bug in hasInc
8902
8903         * /sdcc/src/ds390/ralloc.c:
8904         a) packRegsForSupport could mess up live information (Fixed)
8905         b) packRegsDPTRuse could be incorrect for left & right shift
8906
8907         * /sdcc/src/mcs51/ralloc.c:
8908         packRegsForSupport could mess up the live information (Fixed)
8909
8910         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8911
8912         * /sdcc/src/SDCCast.c:
8913         can reverse a loop even if function call is present as long
8914         as the loop control variable is local & is not passed as parameter
8915
8916 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8917
8918         * /sdcc/ChangeLog: *** empty log message ***
8919
8920         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8921         More builtin function additions for TININative
8922
8923         * /sdcc/src/ds390/ralloc.c:
8924         Had broken the regression testsuite
8925
8926         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8927
8928         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8929         Added funcattr hasStackParms will be set for reentrant functions when there
8930         are paramteres on the stack, this helps in minimizing frame pointer generation
8931         typeFromStr can handle function pointers now
8932
8933         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8934         *** empty log message ***
8935
8936 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8937
8938         * /src/ds390/gen.c, /src/ds390/main.c:
8939         More builtin function additions for TININative
8940
8941         * /src/ds390/ralloc.c:
8942         Had broken the regression testsuite
8943
8944         * /src/SDCCast.c: Fixed a bug in dumptree
8945
8946         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8947         Added funcattr hasStackParms will be set for reentrant functions when there
8948         are paramteres on the stack, this helps in minimizing frame pointer generation
8949         typeFromStr can handle function pointers now
8950
8951         * /doc/builtins.txt, /doc/TININative.txt:
8952         *** empty log message ***
8953
8954
8955 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8956
8957         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8958         ALPHA version for -mTININative
8959
8960         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8961         updated to reflect changes in the port structure
8962
8963         * /src/port.h:
8964         added function do_assemble (similar to do_link) if non-null this function
8965         will be called to do assembly (-mTININative) requires a multi command
8966         assembly
8967         added function genAssemblerEnd will be called to generate assembler Epilogue
8968
8969         * /src/SDCCsymt.c:
8970         added _JavaNative to debug info printing
8971
8972         * /src/SDCCmain.c: added option --tini-libid
8973         added port->do_assemble function (-mTININative) has a multi command assemble
8974
8975         * /src/SDCCglue.c: Disabled "constExpr" check
8976         added port->genAssemblerEnd function
8977
8978         * /src/SDCCglobl.h: Added option --tini-libid value
8979
8980         * /src/SDCCast.h:
8981         tookout optimizeCompare from the header (has no external references)
8982
8983         * /src/SDCCast.c: made one more function "static"
8984
8985 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8986
8987         * src/z80/mappings.i: Added z80asm support.
8988
8989         * src/z80/main.c: Added z80asm support on --asm=z80asm
8990
8991         * src/z80/gen.c: Fixed asm portability issues.
8992
8993         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8994
8995         * src/SDCCglue.c (printExterns): Added global/extern split.
8996
8997 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8998
8999         * support/regression/Makefile: added test for mcs51 model large
9000
9001         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9002
9003         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9004
9005 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9006
9007         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9008
9009 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9010
9011         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9012
9013         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9014
9015 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9016
9017         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9018
9019         * support/regression/tests/simplefloat.c: Port to mcs51.
9020
9021 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9022         * support/regression/tests/bug-485362.c: Added.
9023
9024         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9025
9026         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9027
9028         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9029
9030         * src/z80/gen.c (aopDump): Added a dump function.
9031
9032 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9033         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9034
9035         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9036
9037         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9038
9039         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9040
9041         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9042
9043         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9044
9045         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9046
9047         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9048
9049         * support/regression/ports/ds390/support.c: Use tinibios.
9050
9051         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9052
9053 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9054
9055         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9056         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9057
9058         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9059
9060         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9061
9062 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9063
9064         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9065
9066         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9067         (packRegsForIYUse): Created and optimised.
9068
9069 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9070
9071         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9072 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9073
9074         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9075
9076         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9077
9078         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9079
9080 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9081
9082         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9083
9084         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9085
9086 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9087
9088         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9089
9090         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9091
9092         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9093
9094 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9095
9096         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9097         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9098         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9099
9100         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9101
9102         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9103         (genNotFloat): Added.
9104         (genUminusFloat): Added.
9105
9106         * device/lib/z80/Makefile: Added floating pt stubs.
9107
9108         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9109
9110         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9111
9112         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9113
9114 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9115
9116         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9117
9118         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9119
9120         * sdcc/support/regression/Makefile: Add port ds390.
9121
9122         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9123
9124         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9125
9126         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9127
9128         * sdcc/support/regression/ports/ds390/support.c: Added.
9129
9130         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9131
9132         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9133
9134         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9135
9136 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9137
9138         * device/include/malloc.h: Added z80 and gbz80 support.
9139
9140         * device/lib/gbz80/heap.s: Added.
9141
9142         * device/lib/z80/heap.s: Added.
9143
9144         * device/lib/malloc.c: Added z80 and gbz80 support.
9145
9146         * support/regression/tests/malloc.c (testMalloc): Added.
9147
9148         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9149
9150         * support/regression/tests/bug-478094.c: Added.
9151
9152         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9153
9154 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9155
9156         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9157
9158         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9159
9160         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9161
9162         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9163
9164         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9165
9166 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9167
9168         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9169
9170 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9171
9172         * support/regression/tests/bug-477927.c: Added.
9173
9174         * src/z80/peeph.def: Added minor rules.
9175
9176         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9177
9178         * src/z80/peeph.def: Added jump optimisation modification.
9179
9180 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9181
9182         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9183
9184 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9185
9186         * support/regression/tests/funptrs.c: Added.
9187
9188 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9189
9190         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9191
9192 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9193
9194         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9195
9196         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9197
9198         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9199         (movLeft2ResultLong): Created.
9200
9201         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9202         (joinPushes): Added.  Joins two char pushes into a word push.
9203
9204 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9205
9206         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9207
9208         * support/makebin/Makefile (install): Added creation of dest dir.
9209
9210 2001-10-24 Karl Bongers <karl AT turbobit.com>
9211
9212         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9213
9214 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9215
9216         * src/z80/ralloc.c: Turned off faulty pack for one use.
9217
9218         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9219
9220         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9221
9222 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9223
9224         * support/regression/Makefile: Improved clean
9225
9226         * support/regression/ports/gbz80/spec.mk: Added clean
9227
9228         * support/regression/ports/host/spec.mk: Added clean
9229
9230         * support/regression/ports/z80/spec.mk: Added clean
9231
9232         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9233
9234         * support/regression/ports/mcs51/timeout.c: little improvements
9235
9236 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9237
9238         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9239
9240         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9241
9242         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9243
9244 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9245
9246         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9247
9248         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9249
9250 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9251         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9252
9253         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9254
9255         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9256
9257         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9258
9259         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9260
9261         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9262
9263         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9264
9265         * support/regression/tests/longor.c: Added.
9266
9267 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9268
9269         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9270
9271         * as/mcs51/aslink.h: define PATH_MAX
9272
9273         * as/mcs51/asm.h: define PATH_MAX
9274
9275         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9276
9277         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9278
9279         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9280
9281         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9282
9283         * src/SDCCglobl.h: define PATH_MAX
9284
9285         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9286
9287         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9288
9289 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9290
9291         * src/z80/gen.c (gencjneshort): Fixed
9292
9293         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9294
9295 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9296
9297         * support/regression/tests/bug-469671.c: Added.
9298
9299         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9300
9301 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9302
9303         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9304
9305         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9306
9307 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9308
9309         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9310
9311         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9312
9313         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9314
9315         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9316
9317         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9318
9319         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9320
9321         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9322
9323 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9324
9325         * 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.
9326
9327         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9328
9329         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9330
9331 2001-10-07    <johan AT FRIJA>
9332
9333         * device/lib/gets.c (gets): fixed the return value.
9334
9335 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9336         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9337
9338         * 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.
9339
9340         * 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.
9341
9342         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9343
9344         * src/pic/gen.c: Removed Safe_strdup.
9345
9346         * configure.in: Added option to enable libgc support.
9347
9348         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9349         (bitVectUnion): Optimised.
9350         (bitVectIntersect): Optimised.
9351         (bitVectBitsInCommon): Optimised.
9352         (bitVectCplAnd): Optimised.
9353
9354         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9355
9356 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9357
9358         * src/SDCCmain.c: distinguish between assembler debug and plain options
9359
9360         * src/avr/main.c:   remove standard assembler options
9361
9362         * src/ds390/main.c: remove standard assembler options
9363
9364         * src/mcs51/main.c: remove standard assembler options
9365
9366         * src/port.h: removed "PENDING" comment
9367
9368 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9369
9370         * src/device/lib/_mulint.c  : new, with assember functions
9371
9372         * src/device/lib/_mullong.c : new, with assember functions
9373
9374         * src/device/lib/_divuint.c : with assember functions
9375
9376         * src/device/lib/_divsint.c : with assember functions
9377
9378         * src/device/lib/_divulong.c: with assember functions
9379
9380         * src/device/lib/_divslong.c: with assember functions
9381
9382         * src/device/lib/_moduint.c : with assember functions
9383
9384         * src/device/lib/_modsint.c : with assember functions
9385
9386         * src/device/lib/_modulong.c: with assember functions
9387
9388         * src/device/lib/_modslong.c: with assember functions
9389
9390         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9391
9392         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9393
9394         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9395                                       replaced _mululong.c and _mulslong.c by _mullong.c
9396
9397 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9398
9399         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9400
9401 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9402
9403         * src/SDCCglue.c: test, if win32api is available for MINGW
9404
9405 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9406
9407         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9408         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9409         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9410         * support/regression/ports/host/spec.mk: removed GENERIC
9411         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9412         * support/regression/ports/z80/spec.mk: removed GENERIC
9413
9414 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9415
9416         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9417
9418         * support/regression/tests/bug-467035.c: Created.
9419
9420 2001-10-01    <johan AT FRIJA>
9421
9422         * src/SDCC.y: fixed bug #466586 part 1
9423
9424 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9425
9426         * SDCCicode.c: z80 has no generic pointers
9427         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9428
9429 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9430
9431         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9432
9433 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9434
9435         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9436
9437         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9438
9439 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9440
9441         * configure.in: Fixed up so that ucsim is only configured once.
9442
9443         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9444
9445         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9446         (getPathDifference): As above.
9447
9448         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9449
9450         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9451
9452 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9453         * .version: Updated to 2.3.1
9454
9455         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9456         Added copyright header.
9457
9458         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9459         (assemble): Added support for macro based assembler commands.
9460         (linkEdit): Added support for macro based linker commands.
9461         (preProcess): Changed the pre-processor to use macros.
9462         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9463         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9464
9465         * device/lib/z80/crt0.s: Added module name for debugging.
9466
9467 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9468
9469         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9470
9471         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9472
9473         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9474
9475         * src/Makefile.in: Added SDCCmacro and SDCCutil
9476
9477 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9478
9479         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9480
9481 2001-09-16    <johan AT FRIJA>
9482
9483         * 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.
9484
9485 2001-09-15    <johan AT FRIJA>
9486
9487         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9488         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9489
9490 2001-09-11    <johan AT FRIJA>
9491
9492         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9493
9494 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9495
9496         * support/regression/tests/bug-460444.c: Added test case.
9497
9498         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9499         (genCast): Added justification for all of the asserts.
9500
9501 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9502
9503         * support/regression/support.c: _xdata replaced by xdata
9504
9505         * support/regression/spec.mk: removed _generic
9506
9507 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9508
9509         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9510
9511         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9512         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9513
9514         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9515
9516         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9517
9518         * support/regression/tests/bug-460010.c: Added test case.
9519
9520         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9521
9522 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9523
9524         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9525
9526         * support/regression/testfwk.c: removed workaround for bug #436344
9527
9528         * support/regression/tests/bp.c: use less memory with mcs51
9529
9530         * support/regression/tests/bug-441448.c: use less memory
9531
9532         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9533
9534         * support/regression/collate-results.py: typo
9535
9536 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9537
9538         * support/regression/tests/fetchoverlap.c: Added new test case.
9539
9540         * support/regression/tests/bp.c: Added new test case.
9541
9542         * support/regression/tests/bug-448984.c: Added new test case.
9543
9544         * support/regression/tests/pow2shifts.c: Added new test case.
9545
9546         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9547         (genlshTwo): Fixed right shift for count > 8.
9548
9549         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9550
9551 2001-09-08    <johan AT FRIJA>
9552
9553         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9554
9555 2001-09-07    <johan AT FRIJA>
9556
9557         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9558
9559         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9560
9561 2001-09-06    <johan AT FRIJA>
9562
9563         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9564         * bernhard noted me at this: "() equals to (void)" (1.38)
9565
9566 2001-09-05    <johan AT FRIJA>
9567
9568         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9569
9570 2001-09-04    <johan AT FRIJA>
9571
9572         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9573
9574
9575 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9576
9577         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9578
9579 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9580
9581         * link/z80/aslink.h: Fixed path for PATH_MAX
9582
9583 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9584
9585         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9586
9587         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9588
9589         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9590
9591         * 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.
9592
9593 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9594
9595         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9596         (genCmp): Fixed up genCmp for the GB with longs.
9597
9598         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9599
9600         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9601
9602         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9603
9604         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9605
9606 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9607
9608         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9609
9610 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9611
9612         * 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.
9613
9614         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9615
9616 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9617
9618         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9619
9620         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9621
9622 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9623
9624   * sim/ucsim/configure:    little improvement of Cygwin-detection
9625   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9626   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9627   * support/regression/tests/bug-221100.c: small changes for mcs51
9628   * support/regression/tests/bug-221168.c: small changes for mcs51
9629   * support/regression/tests/bug-227710.c: small changes for mcs51
9630   * support/regression/tests/staticinit.c: small changes for mcs51
9631   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9632   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9633   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9634
9635 $Revision$