46cbbc3829c068da7b33142374071db0c76aad94
[fw/sdcc] / ChangeLog
1 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * src/SDCCval.c (constVal): fixed bug 730366
4         * support/Util/SDCCerr.c,
5         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
6
7 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
8
9         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
10
11 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
12
13         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
14
15 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
16
17         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
18           (hex2dec): made hex_digit unsigned char, removed ascii dependance
19         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
20           (hex2dec): made hex_digit unsigned char, removed ascii dependance
21         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
22         * packihx/packihx.c (hexDigit): made c unsigned char
23         * as/mcs51/lklibr.c (fndsym),
24         * link/z80/lkgb.c (gb),
25         * link/z80/lklibr.c (fndsym),
26         * link/z80/lkrloc.c (relr),
27         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
28         * src/SDCC.lex (checkCurrFile, process_pragma),
29         * src/SDCCglue.c (spacesToUnderscores),
30         * src/SDCCmain.c (setParseWithComma, processFile),
31         * src/asm.c (tvsprintf, printCLine),
32         * src/avr/gen.c (emitcode, aopPut),
33         * src/ds390/gen.c (emitcode),
34         * src/hc08/gen.c (emitcode, emitinline),
35         * src/mcs51/gen.c (emitcode, genInline),
36         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
37           tokenizeLineNode),
38         * src/pic/ralloc.c (debugLog),
39         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
40           tokenizeLineNode),
41         * src/pic16/ralloc.c (debugLog),
42         * src/z80/main.c (_process_pragma):
43            made all ctype.h function calls safe
44         * src/SDCCopt.c: include math.h for fabs
45         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
46           and used them throughout the code to make ctype.h function calls safe
47         * src/ds390/main.c (asmLineNodeFromLineNode),
48         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
49         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
50            unsigned char*
51         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
52           (newpCodeAsmDir): made ctype.h function calls safe
53         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
54           pic16_emitcode):  made lbp unsigned char*
55         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
56           (pic16_newpCodeAsmDir): made ctype.h function calls safe
57         * src/xa51/gen.c (emitcode),
58         * src/z80/gen.c (_emit2): made lbp unsigned char*
59         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
60            char*
61
62 2005-09-05 Raphael Neider <rneider AT web.de>
63
64         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
65           access bank splitpoint
66
67 2005-09-05 Raphael Neider <rneider AT web.de>
68
69         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
70
71 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
72
73         * .version: changed to version 2.5.3
74         * doc/sdccman.lyx: changed version to 2.5.3,
75           documented --codeseg and --constseg and pragma codeseg and constseg,
76           documented bit parameters (reentrant) and bit returning
77         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
78            currFunc->recvSize, but is this ok for all ports?
79           (ast2iCode): result of ~ on unsigned char must be cast to int for
80            bool to work
81         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
82           function pointers in bit space
83         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
84           (processFuncArgs): call port.reg_parm() with reentrancy info
85         * src/port.h,
86         * src/avr/main.c,
87         * src/ds390/main.c,
88         * src/hc08/main.c,
89         * src/pic/main.c,
90         * src/pic16/main.c,
91         * src/xa51/main.c,
92         * src/z80/main.c: port.reg_parm prototype extended with
93           "bool reentrant" parameter
94         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
95           options.stackAuto for allocating bit register parameters
96         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
97           (genSend): set BitBankUsed if it is,
98           (selectRegBank): factored out of genCall for use in genPcall,
99           (genCall): removed redundant dtype assignmen, use selectRegBank,
100           (genPcall): handle returning in Carry properly, save in F0 if needed,
101           (genReceive): handle bit register parameters
102         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
103           (mcs51_assignRegisters): enable bit registers for all reentrant
104            functions and don't set BitBankUsed unconditionally
105         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
106         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
107         * support/regression/tests/funptrs.c: added tests for BOOL and for return
108
109 2005-08-27 Borut Razem <borut.razem AT siol.net>
110
111         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
112         ppc-osx (Darwin) does not support -u option. It seems that it is
113         supported only on Linux - GNU cp
114
115 2005-08-25 Borut Razem <borut.razem AT siol.net>
116
117         * sim/ucsim/gui.src/serio.src/Makefile.in,
118           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
119           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
120           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
121           install and strip, since the strip at /usr/ccs/bin should be used
122           on solaris
123
124 2005-08-24 Borut Razem <borut.razem AT siol.net>
125
126         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
127
128 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
129
130         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
131         ffffffffu
132
133 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
134
135         * as/mcs51/aslink.h: completed lkrloc.c prototypes
136         * as/mcs51/lkmain.c (link_main): fixed warning
137         * device/include/stdbool.h: ds390 has no advanced bit support yet
138         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
139         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
140         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
141           and updated their macros
142         * src/SDCCval.c (constVal): updated comment for renamed b_long
143
144 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
145
146         * as/mcs51/asdata.c: changed ctype['['] to BINOP
147         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
148           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
149           (oprio): set priority for '['
150         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
151            and adb_24_bit
152         * as/mcs51/asm.h: added defines R_BIT and S_BIT
153         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
154         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
155         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
156           added overlayable BIT_BANK area
157         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
158           (summary2): explain 'T' in legenda
159         * as/mcs51/lkrloc.c: replaced old K&R style,
160           (relr): added R_BIT processing,
161           (errmsg): added "Bit-addressable relocation error",
162           (adb_bit): added for converting from byte- to bit-addressable space,
163           (adb_24_bit): added for converting from byte- to bit-addressable space
164         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
165            used in reentrant functions now even as return value
166         * device/lib/_gptrput.c (_gptrput): removed obsolete code
167         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
168           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
169         * src/SDCCglobl.h: added indicator BitBankUsed
170         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
171            the bit registers b0-b7
172         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
173           (geniCodeCast): fixed bug 1263853,
174           (geniCodeLogicAndOr): put result in bool or char,
175           (geniCodeReceive): added parameter func for accessing the return type,
176           (geniCodeFunctionBody): pass func to geniCodeReceive
177         * src/SDCCmain.c: added indicator BitBankUsed
178         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
179         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
180           (checkSClass): don't put automatic bool/bit on stack,
181           (checkFunction): removed check on function cannot return bit
182         * src/SDCCsymt.h: added newBoolLink prototype
183         * src/mcs51/gen.c (rb1regs): added bit registers,
184           (movc): created for assigning to carry,
185           (pushReg, popReg): created for pushing registers,
186           (sameRegs): check both AOP_REG and AOP_CRY types,
187           (aopOp): handle bit registers,
188           (aopPut): optimization no self-assign,
189           (saveRegisters): push reg->base (bits) only once for bit registers,
190            and use pushReg,
191           (unsaveRegisters): pop reg->base only once and use popReg,
192           (assignResultValue): added parameter func and return in carry for bits,
193           (genIpush): optimization no reload in A if not changed,
194           (genSend): bit parameters in reentrant functions are passed in bit
195            registers by first assigning to bits in B, then save registers and
196            copy B to bits,
197           (genCall): handle returning in Carry properly, save it in F0 if needed,
198           (genPcall): updated assignResultValue call, this is not safe yet for bit
199            returning function !!!
200           (genFunction): don't generate equ's for bit registers and use pushReg,
201           (genEndFunction): take care of bit returning functions and use popReg,
202           (genRet): return bit in Carry,
203           (genIfx): optimize bit registers and other directly addressable bits,
204           (genReceive): updated assignResultValue call
205         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
206           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
207            registers when using stack-auto
208         * src/mcs51/ralloc.c (_G): added allBitregs,
209           (regs8051): added the bit registers,
210           (createStackSpil): use macro IS_BIT,
211           (getRegBit): added to allocate a bit register, else spill,
212           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
213           (updateRegUsage): factored out to ease stepping while debugging,
214           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
215            also allocate bit registers,
216           (fillGaps): handle bit registers,
217           (findAllBitregs): added to create bit vector with all bit registers,
218           (mcs51_allBitregs): returns this bit vector,
219           (mcs51_assignRegisters): when using stack-auto use bit registers for
220            passing parameters and creating local variables
221         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
222
223 2005-08-22 Borut Razem <borut.razem AT siol.net>
224
225         * device/lib/Makefile.in: replaced find option -or with -o
226           to make it run on solaris
227
228 2005-08-22 Raphael Neider <rneider AT web.de>
229
230         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
231           fixes #1265442 (crash on Solaris)
232
233 2005-08-20 Borut Razem <borut.razem AT siol.net>
234
235         * configure, configure.in: added tests for libsocket and libnsl libraries,
236           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
237           from support/regression/Makefile.in
238         * support/regression/Makefile.in: added
239         * device/lib/pic16/Makefile.common.in: force make to use bash shell
240         * sim/ucsim/libtool: regenerated on sparc-solaris
241         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
242           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
243           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
244           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
245           sparc-solaris, which doesn't use GNU ld linker
246         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
247         * as/Makefile: find on sparc-solaris does not support -maxdepth option
248
249 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
250
251         * src/mcs51/peeph.def: updated comments
252
253 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
254
255         * device/lib/_gptrget.c,
256         * device/lib/_gptrput.c: slightly shorter
257         * doc/sdccman.lyx: incremented version
258         * src/mcs51/peeph.def: moved peephole comments to the line of first
259           change to better keep line correlation, reanimated 186.e
260         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
261
262 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
263
264         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
265           David Saxton with quotes around file name.
266
267 2005-08-15 Borut Razem <borut.razem AT siol.net>
268
269         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
270           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
271           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
272           make tests run on x86_64 platform
273
274 2005-08-13 Raphael Neider <rneider AT web.de>
275
276         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
277           as it might be executed DURING a build (parallel make is wonderful)
278
279 2005-08-13 Raphael Neider <rneider AT web.de>
280
281         * device/lib/Makefile.in (port-specific-objects-pic16):
282           revert to cp $(PORT)/bin/*.* $(PORTDIR)
283         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
284           dependency
285         * device/lib/pic16/Makefile.rules: build subdirs before creating
286           the library, removed builddir rule, create $(builddir) early in
287           recurse rule, use empty recurse rule for leaf directories
288         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
289           mkdir errors (race condition), removed duplicate suffix "hex"
290           from clean rules
291         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
292         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
293           prevents mkdir -p from aborting on Alpha
294
295 2005-08-12 Raphael Neider <rneider AT web.de>
296
297         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
298           db-statements in order to allow for arrays of pointers in code
299           sections to be placed without interspersed 0-padding, fixes
300           bug #1256215
301         * (emitStatistics): fixed division by zero for pic18f1220
302         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
303           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
304         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
305         * (pic16_pCodeConstString): keep track of already emitted string
306           literals to prevent "duplicate definitions of symbol _str_NR"
307         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
308           debug message
309         * device/lib/Makefile.in: ignore failing PIC16 library builds
310         * device/lib/pic16/Makefile: do not build if gputils are missing
311         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
312
313 2005-08-10 Raphael Neider <rneider AT web.de>
314
315         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
316           my last commit)
317
318 2005-08-10 Raphael Neider <rneider AT web.de>
319
320         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
321           Rokas' patch to add the new fixed point type "__fixed16x16"
322         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
323           functions for __fixed16x16 arithmetics
324         * device/lib/pic16: reimplemented the build system to support
325           a separate build directory, better handling of libio (create
326           the library in a separate subdir for each architecture) and
327           easier configuration (centralized in Makefile.common)
328
329 2005-08-07 Raphael Neider <rneider AT web.de>
330
331         * src/pic16/gen.c (genrshTwo): fixed sign extension
332         * src/pic16/device.c: added pic18f2320, 4220 and 4320
333         * device/include/pic16/pic18f2220.h: changed some bit definitions,
334           added T0CONbits
335         * device/include/pic16/pic18f4220.h: NEW, header for
336           pic18f4220 and pic18f4320
337         * device/include/pic16/pic18fregs.h: added new devices,
338           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
339         * device/include/pic16/signal.h: resolved name clashes
340           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
341           to also allow testing for interrupt enable bits, added
342           comments on how to use the macros
343         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
344         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
345           register definitions for the devices
346         * device/lib/pic16/pics.all: added new devices
347         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
348           allocated memory
349         * device/lib/pic16/libc/stdlib/memfree: do not count
350           the block header as free memory
351         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
352           simplified and added missing end-of-blocklist-marker
353           (reported by Peter Onion, fixes #1252814)
354         * (_mergeHeapBlock): fixed loop condition
355         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
356           len==0, restructured code
357         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
358           up a bit, reduced bitfield accesses, prevent endless loops
359           in case of heap corruption
360         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
361           "unreferenced arguments/must return a value" warnings
362         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
363           replaced BAUDREG with SPBRG
364         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
365           device/lib/pic16/debug/gstack/gstack.c: replaced
366           _naked, _asm, _endasm with __naked, __asm, __endasm
367
368 2005-08-05 Raphael Neider <rneider AT web.de>
369
370         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
371           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
372
373 2005-08-05 Borut Razem <borut.razem AT siol.net>
374
375         * device/lib/Makefile.in: added missing ';'
376         * configure: removed ^M characters
377
378 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
379
380         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
381           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
382           License
383
384 2005-08-04 Borut Razem <borut.razem AT siol.net>
385
386         * configure.in: pic16 libraries build 2nd try - enable running
387           configure in device/lib/pic16
388         * configure: regenerated from configure.in
389         * device/lib/Makefile.in: create $(PORT)/bin directory
390
391 2005-08-03 Raphael Neider <rneider AT web.de>
392
393         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
394           to get/set values via pointers
395         * (genUnpackBits,genPackBits): changed detection of
396           ptr->bitfield vs. sym.bitfield, fixed access via generic
397           pointers, removed dead (wrong) code for multibyte bitfields
398         * (genNearPointerGet, genGenPointerGet): removed useless code,
399           fixed bitfield detection, fixes #1250594
400         * (genNearPointerSet): removed useless code
401         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
402           and introduced macro pic16_emitpcode that conditionally emits
403           the origin of the following pCode (useful for debugging SDCC)
404         * src/pic16/pcode.c: changed (and disabled) some debug outputs
405         * (createDefmap): fixed handling of LFSR for --optimize-df
406
407 2005-08-02 Borut Razem <borut.razem AT siol.net>
408
409         * device/lib/Makefile.in: pic16 libraries build enabled since
410           gputils-0.13.2 are now localy installed at sourceforge's compile farm
411
412 2005-08-02 Raphael Neider <rneider AT web.de>
413
414         * src/pic16/gen.c (genPackBits): removed deprecated warning
415         * (genGenPointerSet): fixed bitfield detection
416
417 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
418
419         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
420
421 2005-07-31 Raphael Neider <rneider AT web.de>
422
423         * device/lib/pic16/libdev/pic18f458.c,
424           device/include/pic16/pic18f458.h: added missing T0CONbits
425
426 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
427
428         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
429
430 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
431
432         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
433
434 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
435
436         * device/include/mcs51/at89c51ed2.h: added.
437
438 2005-07-23 Raphael Neider <rneider AT web.de>
439
440         * src/pic/gen.h: added emitpcode macro for debugging
441         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
442           and replace by macro adding debug information on demand
443         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
444         * (gencjne): tried to fix; replaced with correct (slower) code
445         * (gen{Unp,P}ackBits): fixed single bit access
446         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
447         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
448           previous instruction
449         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
450           register has to be handled with care (forbidding movement
451           of assignments/uses, removing assignments completely, ...)
452         * (pCodeOptime2pCodes): make use of regIsSpecial
453         * added lots of debugging output (commented out)
454         * src/pic/rallloc.c (deassignLRs): prevent operand registers
455           from being reused as result UNLESS it is known to work
456
457 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
458
459         * support/Util/dbuf.h: include <stddef.h> for size_t
460         * .version: changed to version 2.5.2
461
462 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
463
464         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
465
466 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
467
468         * src/hc08/gen.c (genMinus): fixed bug #1241835,
469           (genModOneByte): removed needless psha/pula
470
471 2005-07-22 Raphael Neider <rneider AT web.de>
472
473         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
474           have PIC14 handled like PIC16, fixes broken pic14 linker calls
475         * src/pic/gen.c (resolveIfx): do not "invent" labels
476         * (genSkipc): changed to positive logic
477         * (genSkipCond): removed as no longer needed
478         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
479           backport from PIC16
480         * (genLeftShift): check operands are in different registers
481         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
482           INCF does not update CARRY...
483         * src/pic/main.c: fixed _linkCmd
484         * src/pic/pcode.c (unlinkpCode): added inactive code
485         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
486           alive (do not assign result and operand overlapping registers)
487
488 2005-07-22 Raphael Neider <rneider AT web.de>
489
490         * src/pic/device.c (dump_sfr): replaced register declaration with
491           call to emitSymbolToFile() to avoid duplicate symbols
492         * (assignRelocatableRegisters): do not declare external symbols
493         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
494           right (take size of type, not etype)
495         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
496         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
497         * (packRegsForAccUse): disabled assignment of WREG as
498           the result reg to prevent occurence of just fixed #1235003,
499           fixes #1242954
500         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
501           symbols (avoids duplicate symbols in .asm file)
502         * (pic14emitRegularMap): use emitSymbolToFile()
503         * src/pic/gen.c (aopOp): fixed spillLocation handling
504         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
505         * (genDataPointerSet): removed unneccessary variables/output
506
507 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
508
509         * as/mcs51/lkarea.c: enlarged codemap for banked memory
510         * device/lib/mcs51/crtbank.asm: added # to 0x0F
511
512 2005-07-21 Raphael Neider <rneider AT web.de>
513
514         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
515           architecture cannot handle them efficiently, fixes bug #1235003
516         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
517           check for empty sets before using them (fixes bug #1232190)
518
519 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
520
521         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
522           (lnksect2): generate warnings for memory overlap
523         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
524           constseg to set the name of these segments so you can instruct the linker
525           to place them in banks
526         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
527         * src/SDCCglobl.h: added MODEL_HUGE to enum,
528           added code_seg and const_seg to options
529         * src/SDCCglue.c (emitMaps): use options.const_seg,
530           (createInterruptVect): put interrupt vectors in segment HOME,
531           (glue): put HOME before static segment and put the main glue in HOME,
532           (glue): use options.code_seg
533         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
534         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
535           these segments so you can instruct the linker to place them in banks
536           (linkEdit): use code_loc for HOME segment which should be the first
537           segment in code memory now
538         * src/SDCCmem.c: fixed more stuff like bug 1238386
539         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
540           (changePointer): don't change function pointers to code pointers for
541           banked functions,
542           (compareType): added exceptional check for banked function pointers
543         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
544         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
545           after static in code memory
546         * src/mcs51/gen.c: added aopLiteralLong prototype,
547           (aopForSym): use getSize for functions,
548           (genCall): generate banked calls over one trampoline __sdcc_banked_call
549           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
550           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
551           the segment,
552           (genPcall): use call for literal function pointers and generate banked
553           calls over the one trampoline so there's only one place for the user to
554           modify according to his/hers hardware,
555           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
556           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
557         * src/mcs51/main.c: added keyword banked,
558           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
559         * support/Util/SDCCerr.c,
560         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
561           needed for passing the bank and address to the trampoline
562         * device/lib/mcs51/crtbank.asm: added for bankswitching
563         * device/lib/mcs51/Makefile: added crtbank
564
565 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
566
567         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
568           for fields at offset 0 of a struct or union as reported
569           on 2005-07-07 in the developer mailing list.
570
571 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
572
573         * src/SDCCmem.c: fixed bug 1238386
574
575 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
576
577         * src/mcs51/peeph.def: added labelrefcounting for peepholes
578           (patch #1144962), added peephole 300, enabled 259.x
579         * doc/sdccman.lyx: removed screenshot and provided link instead
580
581 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
582
583         * doc/sdccman.lyx: added section about debugging with ddd
584         * doc/figures/ddd_example.eps: screenshot of debugging session
585
586 2005-07-04 Raphael Neider <rneider AT web.de>
587
588         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
589           like CODE pointers, fixes #1115683
590         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
591           call, fixes bugs #1232211, #1228110,
592           fixed wrong casts to pCodeFlow from pCodeInstructions
593
594 2005-07-04 Raphael Neider <rneider AT web.de>
595
596         * src/pic/gen.c (popGet): changed assert to allow for
597           bit operands
598         * (popGetAddr): changed signature to provide
599           an additional index, patched all call sites
600         * (genCmpEq): handle literal-like operands correctly
601         * (genAddrOf): added sanity checks on __code/__data pointers
602         * (genAssign): added handling of symbols from __code section
603         * (gencjne): do not generate code for comparisons whose result
604           is neither stored nor used, fixes bug #1171114
605         * (AccLsh, AccRsh): operate on operand instead of WREG
606         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
607           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
608           by known count
609         * rewrote complete shift-by-literal logic, commented unused
610           functions out
611         * (genConstPointerGet): get multiple bytes (if result size > 1),
612           fixed handling of non-immediate addresses
613         * (genPointerGet): handle CODE pointers like CONST pointers
614         * (genpic14Code): insert C-SRC lines as Cource-pCodes
615         * ({aop,op}_isLitLike): NEW, single place to decide whether an
616           operand is to be treated as a literal or not
617         * (mov2w,genPcall,genCmpEq),
618           src/pic/genarith.c: use aop_isLitLike() to decide between
619           literal/register contents
620         * (addSign): added missing offset
621         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
622           only emit comment in debug-mode,
623           use {aop,op}_isLitLike throughout the file
624         * src/pic/glue.c: fix initializers for pointers (work in progress)
625         * src/pic/pcode.c (get_op): honor index on _const symbols
626         * ({reset,dump}pCodeStatistics): NEW, estimate code size
627         * (dumppBlock): added pCode size estimation
628         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
629           check for IS_SYMOP before OP_SYMBOL'ing
630         * fixed indentation, compacted switch-statements
631         * (allocReg): find free register and allocate it instead of
632           allocating new registers all the time
633         * (deassignLRs): prevent POINTER_GET's from being assigned the same
634           registers as its operands (necessary only for multibyte GETs)
635
636 2005-07-01 Raphael Neider <rneider AT web.de>
637
638         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
639           debugging .asm-output macros FENTRY + FEXIT
640         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
641           way... I wonder...
642         * (emitpComment): NEW, printf to pCode
643         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
644           offset handling
645         * (popGetAddr): NEW, variant of popGet to access an immediates
646           high(er) bytes instead of the n'th byte of memory they reference,
647           replaced popGet with popGetAddr where neccessary
648         * (genDataPointerGet): reactivated and fixed implementation
649         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
650           accesses
651         * (genDataPointerSet): fixed multibyte assignments
652         * (genpic14Code): fixed --i-code-in-asm handling
653         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
654         * (genPlus): fixed index-out-of-bounds error
655         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
656         * src/pic/ralloc.c: added debugging output macro FENTRY2
657         * (spillThis): fixed indentation, enbraced for-body for clarity
658         * (rematStr): commented out as now unused
659         * (regTypeNum): commented out special spill case (overwrites
660           arbitrary values)
661         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
662
663 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
664
665         * doc/sdccman.lyx: documented sfr16/sfr32,
666           added example for using storage class with function pointers
667         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
668
669 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
670
671         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
672         * device/lib/_itoa.c,
673         * device/lib/_ltoa.c: optimized codesize
674         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
675           but don't know how to suppress the double warning.
676         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
677         * support/Util/SDCCerr.c,
678         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
679
680 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
681
682         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
683           fixed old K&R prototypes
684         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
685         * device/lib/_gptrget.c,
686         * device/lib/_gptrgetc.c,
687         * device/lib/_gptrput.c: changed versions for new memory indicator values,
688           also new versions for small generic pointers and banked generic pointers
689         * src/port.h: added const_name
690         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
691         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
692         * src/SDCCcse.c (findPrevIc): check all associative operators
693         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
694         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
695         * src/SDCCmem.c: updated comments,
696           set far-space to 0 for pdata, results in optimized code
697         * src/SDCCmem.h: added macro CONST_NAME
698         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
699           moving the info into the highest bits, see also gptrget/gptrput
700         * src/src.dsp: added sdcc.ico to project files
701         * src/avr/gen.c (genCast): fixed bug 0x%d
702         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
703         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
704           relation between ptr_type and DCL_TYPE,
705           (genCast): fixed bug 0x%d
706         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
707           (CODE)" for const_name
708         * src/hc08/gen.c (genCast): fixed bug 0x%d
709         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
710           (hc08_port): added "CONST (CODE)" for const_name
711         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
712           (aopForRemat, adjustArithmeticResult): disconnected direct relation
713           between ptr_type and DCL_TYPE,
714           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
715           operand* and took AOP() inside function so sfr-ness can be checked,
716           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
717           new prototype,
718           (genFunction, genEndFunction): optimized stack setup,
719           (genMinus): optimized for literals with ending zeroes (in bytes),
720           (genCast): fixed bug 0x%d
721         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
722           (mcs51_port): added "CONST (CODE)" for const_name
723         * src/mcs51/peeph.def: made rule 226 more generic
724         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
725         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
726         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
727         * src/z80/main.c (z80_port): added NULL for const_name,
728           (gbz80_port): added NULL for const_name
729         * support/regression/tests/bug663539.c,
730         * support/regression/tests/sfr16.c: new tests
731
732 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
733
734         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
735
736 2005-06-24 Raphael Neider <rneider AT web.de>
737
738         * device/lib/pic16/libdev/pic18f[68][567]20.c:
739           corrected typos...
740         * device/include/pic16/signal.h: added USBIF
741           and SIG_USB
742
743 2005-06-24 Raphael Neider <rneider AT web.de>
744
745         * device/lib/pic16/libdev/pic18f2455.c,
746           device/include/pic16/pic18f2455.h: NEW
747         * device/include/pic16/pic18fregs.h,
748           device/lib/pic16/pics.all,
749           src/pic16/device.c: added 18f2455
750         * device/lib/pic16/libdev/pic18f[68][567]20.c,
751           device/include/pic16/{pic18f[68][567].h,usart.h}:
752           replaced MULTIPLE_USARTS define with more relaible
753           compatibility sfrs (for USART access)
754
755 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
756
757         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
758           and the output asm file line is printed on two lines.
759
760 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
761
762         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
763           BGT, BLE, BHI, and BLS instructions
764         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
765           genCmpEq): removed
766         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
767           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
768           fixes bug #1216342
769         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
770
771 2005-06-15 Raphael Neider <rneider AT web.de>
772
773         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
774         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
775         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
776           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
777           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
778
779 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
780
781         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
782           Marcel Telka in bug #1215704
783
784 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
785
786         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
787           located in shared memory bank.
788
789 2005-05-31 Raphael Neider <rneider AT web.de>
790
791         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
792           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
793           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
794
795 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
796
797         * device/lib/_strncpy.c: fixed the fix
798
799 2005-05-26 Raphael Neider <rneider AT web.de>
800
801         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
802           initializers with \0, bug #1208187
803         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
804           intializers with \0, bug #1208187
805
806 2005-05-26 Raphael Neider <rneider AT web.de>
807
808         * src/pic16/glue.c (pic16_printIvalChar): fixed string
809           initializers with \0, bug #1208187
810         * src/pic16/main.c (_process_pragma): added sanity checks
811           for stack position and size, emit warnings when appropriate
812
813 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
814
815         * device/lib/_strncpy.c: fixed not filling with \0
816
817 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
818
819         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
820           createFunction),
821         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
822           compound_statement),
823         * src/SDCCsymt.h,
824         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
825
826 2005-05-24 Raphael Neider <rneider AT web.de>
827
828         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
829
830 2005-05-24 Raphael Neider <rneider AT web.de>
831
832         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
833           TRISE definitions, closes bug #1162453
834
835 2005-05-22 Raphael Neider <rneider AT web.de>
836
837         * src/pic16/main.c (_process_pragma): check for missing
838           arguments to pragmas code and udata
839         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
840           consistency fixes to match other headers (thanks to Jim Paris)
841         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
842
843 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
844
845         * src/SDCCicode.c (isOperandEqual): fixed missing ;
846
847 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
848
849         * support/regression/tests/bug1198642.c: new test
850         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
851         * src/SDCCcse.c (findPrevIc): added comment, please have a look
852         * support/scripts/resource.h,
853         * support/scripts/resource.rc,
854         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
855         * support/scripts/sdcc.ico: added 32x32 icon
856
857 2005-05-18 Raphael Neider <rneider AT web.de>
858
859         * device/lib/pic16/libdev/pic18f*.c,
860         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
861           keywords to "__sfr" and "__at (X)"
862         * device/include/pic16/pic18fregs.h: added pic18f4520
863         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
864           #1203088 (MPLAB compatibility)
865
866 2005-05-17 Raphael Neider <rneider AT web.de>
867
868         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
869         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
870         * device/lib/pic16/pics.all: added new devices
871         * src/pic16/device.c: added support for pic18f4520
872
873 2005-05-16 Raphael Neider <rneider AT web.de>
874         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
875         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
876         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
877           convenience function for bit access
878
879 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
880
881         * device/lib/printf_large.c: fixed bug 1193299
882         * support/regression/tests/bug1057979.c: added test %3.3s
883
884 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
885
886         * device/include/mcs51/8051.h,
887         * device/include/mcs51/8052.h: made parseable with lint
888         * device/include/mcs51/lint.h: added include file for (sp)lint
889         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
890         * doc/cdbfileformat.lyx,
891         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
892
893 2005-05-14 Raphael Neider <rneider AT web.de>
894
895         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
896         * device/lib/pic16/libc/stdlib/itoa.c (new)
897         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
898         * device/lib/pic16/libio/Makefile: exclude subdir according to
899           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
900         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
901         * src/pic16/gen.c (genFunction): prevent annoying warning
902         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
903           nameclashes on BeOS
904         * support/cpp2/cppmain.c (cpp_output_string): new
905         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
906           fixes bug 1116802
907
908 2005-05-13 Borut Razem <borut.razem AT siol.net>
909
910         * src/SDCCmain.c (linkEdit): fixed bug 1195202
911
912 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
913
914         * .version: changed to version 2.5.1; back to bleeding edge development
915
916 2005-05-11 Borut Razem <borut.razem AT siol.net>
917
918         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
919           generate PDF version 1.3 documents
920
921 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
922
923         * .version: changed to version 2.5.0
924
925 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
926
927         * doc/sdccman.lyx: updated weblinks, index and smaller updates
928
929 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
930
931         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
932         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
933         well as many smaller updates.
934         * .version: changed to version 2.5.0-pre1
935
936 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
937
938         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
939
940 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
941
942         * support/regression/tests/bug1185672.c: added
943         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
944           bug 1185672
945         * src/mcs51/gen.c (genCall): added comments, made it look safer
946         * src/mcs51/gen.c (genEndFunction): simplified
947
948 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
949
950         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
951
952 2005-04-14 Borut Razem <borut.razem AT siol.net>
953
954         * fixed bug 1045046 - SIGSEGV with really simple code?:
955           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
956           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
957
958 2005-04-14 Borut Razem <borut.razem AT siol.net>
959
960         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
961           src/pic16/device.h: temporarily disabled experimental #inline pragma
962           for 2.5.0 release
963
964 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
965
966         * device/include/z80/stdio.h,
967         * device/include/z80/string.h: removed these highly incomplete files so
968           SDCC can use the default ones in device/include/
969
970 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
971
972         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
973         gcc warning.
974         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
975         fix sdcpp warnings.
976
977 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
978
979         * device/include/malloc.h: removed redundant __reentrant prototypes
980         * device/lib/_mullong.c: added working xstack variant in asm (C version
981           doesn't pass regression tests)
982         * device/lib/bpx.c: used __data and made bpx char for mcs51
983         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
984           (createFunction): fixed bug with xstackPtr
985         * src/SDCCcse.c: corrected comments
986         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
987           (killDeadCode, eBBlockFromiCode): removed unused code
988         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
989           corrected comments
990         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
991           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
992           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
993           (genModOneByte): fixed warning in MSVC
994         * src/mcs51/main.c (): added comments
995         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
996
997 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
998
999         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1000
1001 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1002
1003         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1004
1005 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1006
1007         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1008         characters arrays of larger size than the declared one.
1009
1010 2005-04-10 Borut Razem <borut.razem AT siol.net>
1011
1012         * src/pic/gen.c (genInline),
1013           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1014           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1015           (findNextInstruction), (findPrevInstruction),
1016           (findInstructionUsingLabel),
1017           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1018         * src/pic/pcode.c (findLabel): added missing '\n'
1019         * src/src.dsp: added SDCCdwarf2.c to the project
1020
1021 2005-04-09 Borut Razem <borut.razem AT siol.net>
1022
1023         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1024
1025 2005-04-08 Raphael Neider <rneider AT web.de>
1026
1027         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1028           into the chain after a given one) and mergeDefmapSymbols (combine
1029           defmap entries for each symbol per pcode)
1030         * (createDefmap): have defmap entries merged in the end
1031         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1032           a symbol before replacing one access type's symbol, merge symbols in
1033           the end (replacement symbol might already have an entry)
1034         * (assignValnums): keep reference to written WREG intact
1035
1036 2005-04-08 Raphael Neider <rneider AT web.de>
1037
1038         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1039           Alpha)
1040
1041 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1042
1043         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1044         bytes
1045
1046 2005-04-07 Raphael Neider <rneider AT web.de>
1047
1048         * device/include/pic16/usart.h: added compatibility defines for
1049           devices with more than one USART
1050         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1051
1052 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1053
1054         * device/lib/Makefile.in: updated for port specific include
1055
1056 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1057
1058         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1059
1060 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1061
1062         * device/include/8051.h,
1063         * device/include/8052.h,
1064         * device/include/at89S8252.h,
1065         * device/include/at89c55.h,
1066         * device/include/at89x051.h,
1067         * device/include/at89x51.h,
1068         * device/include/at89x52.h,
1069         * device/include/mcs51reg.h,
1070         * device/include/reg51.h,
1071         * device/include/reg764.h,
1072         * device/include/regc515c.h,
1073         * device/include/sab80515.h: (re)moved these 12 files
1074         * device/include/mcs51/8051.h,
1075         * device/include/mcs51/8052.h,
1076         * device/include/mcs51/at89S8252.h,
1077         * device/include/mcs51/at89c55.h,
1078         * device/include/mcs51/at89x051.h,
1079         * device/include/mcs51/at89x51.h,
1080         * device/include/mcs51/at89x52.h,
1081         * device/include/mcs51/mcs51reg.h,
1082         * device/include/mcs51/reg51.h,
1083         * device/include/mcs51/reg764.h,
1084         * device/include/mcs51/regc515c.h,
1085         * device/include/mcs51/sab80515.h: and added them here
1086
1087 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1088
1089         * device/include/stdarg.h: changed SDCC specific keywords to double
1090           underlined form.
1091         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1092           mcs51 and ds390.
1093         * device/include/hc08/mc68hc908gp32.h,
1094         * device/include/hc08/mc68hc908jb8.h,
1095         * device/include/hc08/mc68hc908jkjl.h,
1096         * device/include/hc08/mc68hc908qy.h: fixed comments
1097         * device/include/mcs51/README: updated
1098         * device/include/mcs51/c8051f120.h: added PINRSF
1099         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1100         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1101           amidst code. Also inline is not supported.
1102
1103 2005-04-06 Raphael Neider <rneider AT web.de>
1104
1105         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1106         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1107           callers stack/frame pointers
1108
1109 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1110
1111         * device/include/pic16/usart.h: added, missing in previous commit,
1112         * device/include/pic16/adc.h: fixed typo,
1113         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1114         commit,
1115         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1116         <p18fxxx.inc>
1117         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1118         uninitialized because a bug appears with gplink
1119         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1120         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1121         complains for unrecognised option
1122
1123 2005-04-05 Raphael Neider <rneider AT web.de>
1124
1125         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1126           structs as well (using memcpy)
1127         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1128           on ISRs (GOTO has no label)
1129         * src/pic16/device.h: added OF_OPTIMIZE_DF
1130         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1131           new data flow analysis/optimization
1132         * src/pic16/pcode.c: added (prototypes for and implementation of)
1133           dataflow analysis functions, fixed pCodeInstructions' inCond and
1134           outCond values, made RCALL a branch instruction
1135         * (pic16_unlinkpCode): keep C line if possible
1136         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1137           C line moved if possible
1138         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1139         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1140           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1141         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1142           new flow)
1143         * (pic16_getJumptabpCode): NEW, needed in...
1144         * (LinkFlow): fixed handling of jumptables, calls and conditional
1145           branches
1146         * (pic16_InsertCommentAfter): NEW
1147         * (pic16_pCodeReplace): made verbose and flow preserving
1148         * (AnalyzeFlow): added call to data flow analysis
1149         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1150         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1151         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1152
1153 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1154
1155         * src/SDCCast.c (decorateType): fixed bug #1105626
1156
1157 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1158
1159         * device/include/asm/pic16/features.h,
1160         * pic18f*.h headers,
1161         * device/include/pic16/adc.h,
1162         * device/include/pic16/delay.h,
1163         * device/include/pic16/i2c.h,
1164         * device/include/pic16/malloc.h,
1165         * device/include/pic16/stdio.h,
1166         * device/include/pic16/stdlib.h,
1167         * device/include/pic16/string.h,
1168         * device/lib/pic16/libc/stdio/printf_tiny.c,
1169         * device/lib/pic16/libc/stdio/printf_small.c,
1170         * device/lib/pic16/libc/stdio/strmgpsim.c,
1171         * device/lib/pic16/libc/stdio/strmmssp.c,
1172         * device/lib/pic16/libc/stdio/strmusart.c,
1173         * device/lib/pic16/libc/stdio/vfprintf.c,
1174         * device/lib/pic16/libc/stdlib/ltoa.c,
1175         * device/lib/pic16/libc/stdlib/putchar.c,
1176         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1177         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1178         * device/lib/pic16/libc/stdlib/memchrram.c,
1179         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1180         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1181         * device/lib/pic16/libio/adc/adcbusy.c,
1182         * device/lib/pic16/libio/adc/adcread.c,
1183         * device/lib/pic16/libio/adc/adcsetch.c,
1184         * device/lib/pic16/libio/usart/ubaud.c,
1185         * device/lib/pic16/libio/usart/ubusy.c,
1186         * device/lib/pic16/libio/usart/udrdy.c,
1187         * device/lib/pic16/libio/usart/uopen.c,
1188         * device/lib/pic16/libio/usart/uputc.c,
1189         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1190         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1191         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1192         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1193         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1194         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1195         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1196         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1197         specific keywords to double underlined form,
1198         * device/lib/pic16/libc/Makefile.rules,
1199         * device/lib/pic16/libsdcc/Makefile.rules,
1200         * device/lib/pic16/libm/Makefile,
1201         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1202         to compile with C standard set in Makefile.common
1203         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1204         rand.c and crc.c in compilation process,
1205         * device/lib/pic16/libsdcc/int/divuint.c,
1206         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1207         `c' from signed to unsigned,
1208         * device/lib/pic16/startup/crt0.c,
1209         * device/lib/pic16/startup/crt0i.c,
1210         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1211         keywords to double underlined form, bug fixes in _do_cinit function
1212         which prevented the correct initialization of the .idata segment,
1213         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1214         core to enter a infinite loop
1215         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1216
1217 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1218
1219         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1220
1221 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1222
1223         * device/include/Makefile.in: add support for hc08 subdirectory
1224         * device/include/hc08/: new subdirectory
1225         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1226         Lucas Loizaga, thanks!
1227         * device/include/hc08/mc68hc908qy.h,
1228         * device/include/hc08/mc68hc908gp32.h,
1229         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1230         their own directory. Changed internal macro names to use the compiler
1231         reserved namespace. Changed SDCC specific keywords to double
1232         underlined form.
1233         * device/include/math.h,
1234         * device/include/malloc.h,
1235         * device/include/stdarg.h,
1236         * device/include/stdbool.h
1237         * device/include/string.h,
1238         * device/include/tinibios.h,
1239         * device/include/ds400rom.h,
1240         * device/include/8051.h,
1241         * device/include/8052.h,
1242         * device/include/80c51xa.h,
1243         * device/include/at89c55.h,
1244         * device/include/at89S8252.h,
1245         * device/include/at89x51.h,
1246         * device/include/at89x52.h,
1247         * device/include/ds80c390.h,
1248         * device/include/reg764.h,
1249         * device/include/regc515c.h,
1250         * device/include/sab80515.h,
1251         * device/include/mcs51/c8051f000.h,
1252         * device/include/mcs51/c8051f018.h,
1253         * device/include/mcs51/c8051f020.h,
1254         * device/include/mcs51/c8051f040.h,
1255         * device/include/mcs51/c8051f060.h,
1256         * device/include/mcs51/c8051f120.h,
1257         * device/include/mcs51/c8051f300.h,
1258         * device/include/mcs51/c8051f310.h,
1259         * device/include/mcs51/c8051f320.h,
1260         * device/include/mcs51/c8051f330.h,
1261         * device/include/mcs51/c8051f350.h,
1262         * device/include/z180.h: Changed SDCC specific keywords to double
1263         underlined form.
1264
1265 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1266
1267         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1268         18F4455,
1269         * (pic16_assignConfigWordValue): disable testing of configuration
1270         register value with config mask,
1271         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1272         function with port->fun_prefix,
1273         * (genFunction): when generating a naked interrupt function never
1274         create an absolute segment placed in interrupt vector address, place
1275         the actual interrupt function at IVA instead, when an interrupt
1276         function is generated with unspecified interrupt then do not create
1277         the absolute section,
1278         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1279         code for generating a call to generic pointer get/put function with
1280         a call to function pic16_callGenericPointer(),
1281         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1282         the call to the generic pointer get/put functions with prefixing the
1283         function name with port->fun_prefix,
1284         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1285         * src/pic16/main.c (_process_pragma): prefix function with
1286         port->fun_prefix,
1287         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1288         calling assembler, old 18Fxxxx macro is deprecated,
1289         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1290         PC_ASMDIR in while condition,
1291         * (findInstruction): add PC_ASMDIR in while condition,
1292         * (buildCallTree): prefix main with port->fun_prefix,
1293         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1294         identifier for variable with banked access in instructions BTFSS,
1295         BTFSC, BCF, BSF, BTG
1296         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1297         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1298         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1299         perform optimization when enviroment variable NO_REG_OPT is set,
1300         * (insideLRBlock): NEW, return 1 if register is inside an
1301         INF_LOCALREGS block,
1302         * (RemoveRegFromLRBlock): remove a register that is completely
1303         eliminated by register optimization, but it is still left in local
1304         register store/restore in/from stack block,
1305         * (Remove2pcodes): after removing register, check to see if it
1306         should be removed from local register store/restore in/from stack
1307         block,
1308         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1309         DUMMY_READ_VOLATILE,
1310
1311         * device/include/pic16/adc.h: minor prototype modifications and
1312         update,
1313         * device/include/pic16/malloc.h: added GPL notice various
1314         modifications,
1315         * device/include/pic16/stdint.h: NEW, standard header for ints
1316         * device/include/pic16/delay.h: NEW, header for delay functions,
1317         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1318         delay1mtcy,
1319         * device/include/pic16/signal.h: NEW, header providing helper macros
1320         for implementing signal handlers,
1321         * device/include/pic16/stdio.h: added prototypes for functions,
1322         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1323         prototypes for stdin and stdout, added macro PUTCHAR to
1324         automatically implement putchar function prototype,
1325         * device/include/pic16/usart.h: modified and updated USART library,
1326         * device/lib/pic16/libio/adc/,
1327         * device/lib/pic16/libio/i2c: some modifications to improve library
1328         performance,
1329         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1330         family of functions,
1331         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1332         family of functions and other sources,
1333         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1334         of the PIC18Fxx[28] devices,
1335         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1336         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1337         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1338         _do_cinit function, because the previous failed when local variables
1339         where not placed in the same memory bank,
1340         * device/lib/pic16/libsdcc/char/: various modifications to improve
1341         library performance,
1342         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1343         information on the new functions of the c library and more...
1344
1345 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1346
1347         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1348
1349 2005-03-26 Raphael Neider <rneider AT web.de>
1350
1351         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1352           if condition == CARRY)
1353         * (genCmp): adapted to new genSkipc semantics
1354         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1355           on rIfx (genCmp was broken)
1356
1357 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1358
1359         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1360         * src/z80/main.c (_keywords[]),
1361         * src/SDCCglobal.h (struct options),
1362         * src/SDCC.y,
1363         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1364         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1365         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1366         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1367         always available in leading double underscore form. The C99 support is
1368         mostly missing, but it's a start.
1369         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1370         reserved identifier "__data".
1371
1372 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1373
1374         * src/mcs51/peeph.def: fixed bug 1170013
1375
1376 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1377
1378         * device/include/mcs51reg.h: fixed bug 842007
1379
1380 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1381
1382         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1383         last time.
1384
1385 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1386
1387         * src/port.h (struct PORT),
1388         * src/avr/ralloc.c (avr_assignRegisters),
1389         * src/avr/main.c,
1390         * src/ds390/ralloc.c (ds390_assignRegisters),
1391         * src/ds390/main.c,
1392         * src/hc08/ralloc.c (hc08_assignRegisters),
1393         * src/hc08/main.c,
1394         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1395         * src/mcs51/main.c,
1396         * src/pic/ralloc.c (pic14_assignRegisters),
1397         * src/pic/main.c,
1398         * src/pic16/ralloc.c (pic16_assignRegisters),
1399         * src/pic16/main.c,
1400         * src/xa51/ralloc.c (xa51_assignRegisters),
1401         * src/xa51/main.c,
1402         * src/z80/ralloc.c (z80_assignRegisters),
1403         * src/z80/ralloc.h,
1404         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1405         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1406         * src/SDCCcse.h,
1407         * src/SDCCdflow.c (computeDataFlow),
1408         * src/SDCCdflow.h,
1409         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1410         * src/SDCCloop.h,
1411         * src/SDCCcflow.c (*),
1412         * src/SDCCcflow.h,
1413         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1414         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1415         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1416         immedDom() returning wrong block; probably fixes bug #1160833)
1417
1418 2005-03-20 Borut Razem <borut.razem AT siol.net>
1419
1420         * support/scripts/inc2h.pl: WIN32 port
1421
1422 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1423
1424         * device/lib/makefile.in: added abs.c and labs.c
1425
1426 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1427
1428         * device/include/stdint.h: added
1429         * device/lib/abs.c: added
1430         * device/lib/labs.c: added
1431         * device/include/stdlib.h: added abs() and labs() prototypes
1432         * device/lib/libsdcc.lib: added abs and labs
1433         * device/include/float.h,
1434         * device/lib/_fsmul.c,
1435         * device/lib/printf_fast.c,
1436         * device/lib/printf_tiny.c: updated comments
1437
1438 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1439
1440         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1441         bug #1164313
1442
1443 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1444
1445         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1446         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1447
1448 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1449
1450         * device/lib/printf_large.c: removed inline assembly for portability and
1451           readability. Use printf_fast if speed or size are more important.
1452         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1453         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1454
1455 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1456
1457         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1458         prevent compiler warning
1459
1460 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1461
1462         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1463         moved to level 0 and declared as static. Also they are explicit
1464         placed in access bank. This was necessery because some times they
1465         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1466         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1467         optimizations. Currently only compare to unsigned char is implemented,
1468         * src/pic16/gen.c: added fReturnIdx array,
1469         * (struct resolvedIfx) is moved to gen.h and made public,
1470         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1471         * (aopForSym): added an optimization to directly store in stack of
1472         the operand of a SEND iCode,
1473         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1474         but as registers instead (AOP_REG) using the fReturnIdx array,
1475         * (pic16_freeAsmop): remove the freed register from the
1476         _G.sregsAlloc field,
1477         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1478         a compare of 'WREG',
1479         * (pic16_popGetTempRegCond): changed function prototype, now
1480         function takes also a bitVector argument v which holds the current
1481         set of registers that are allocated for stack access by aopForSym,
1482         registers allocated in aopForSym for accessing stack symbols are not
1483         any more part of the functions usedRegs field,
1484         * (genCall): some times aopOp is called for a stack variable to be
1485         send, aopForSym might perform the push, if this is true make sure
1486         that genCall doesn't push the variable twice by testing _G.resDirect,
1487         * (genFunction): changed testing for unspecified interrupt number
1488         from 256 to INTNO_UNSPEC,
1489         * modified selection scheme of frame pointer generation. Previously
1490         if function did use local registers a frame pointer was generated,
1491         now a frame pointer is generated only if function has arguments
1492         (that need PLUSW2 register access), or has stack arguments, or the
1493         compiler is not instructed to omit the frame pointer,
1494         * (genEndFunction): before restoring local registers that were saved
1495         in the function preamble, also restore the registers that *might*
1496         have been allocated for stack access,
1497         * (genRet): removed some old comments,
1498         * (genCmp, the active (RN's) version): added a call to the
1499         pic16_genCmp_special function to perform the compare with a more
1500         robust and optimized way,
1501         * (genInline): a feature has been added in inline code generation,
1502         which allows a wildcard variable substitution when writing inline
1503         assembly. Code is incomplete and experimental therefore undocumented,
1504         * (genCast): changed order of aopOp for result and right to allow
1505         aopForSym to directly load the result if possible,
1506         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1507         perform an optimized compare on some selected special occasions,
1508         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1509         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1510         generate an IVT any more,
1511         * src/pic16/main.c (pic16_optionsTable): added command line option
1512         --optimize-cmp,
1513         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1514         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1515         macros,
1516         * src/pic16/NOTES: Raphael Neider added in list of active developers
1517         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1518         jumptable_end to prevent bug #,
1519         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1520         inCond and outCond fields,
1521         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1522         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1523         turn off register spilling,
1524         * (packRegsForOneUse): synced with other ports' versions although it
1525         is not used currently,
1526         * (pic16_packRegisters): added an optimization while reading
1527         structure bitfields, some registers may be saved (malloc code is
1528         decreased by 80 bytes)
1529
1530 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1531
1532         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1533         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1534         this can be optimized more?
1535
1536 2005-03-10 Raphael Neider <rneider AT web.de>
1537
1538         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1539           genNearPointerGet): (hopefully) fixed access to bitfields via
1540           pointers (p->bitN = x; and x = p->bitN; failed)
1541
1542 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1543
1544         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1545
1546 2005-03-09 Raphael Neider <rneider AT web.de>
1547
1548         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1549
1550 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1551
1552         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1553         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1554           (regTypeNum): set REG_BIT type if necessary
1555         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1556         * support/regression/tests/critical.c: check bug 1144613
1557
1558 2005-03-02 Raphael Neider <rneider AT web.de>
1559
1560         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1561
1562 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1563
1564         * src/avr/ralloc.c (serialRegAssign),
1565         * src/ds390/ralloc.c (serialRegAssign),
1566         * src/hc08/ralloc.c (serialRegAssign),
1567         * src/mcs51/ralloc.c (serialRegAssign),
1568         * src/pic/ralloc.c (serialRegAssign),
1569         * src/pic16/ralloc.c (serialRegAssign),
1570         * src/xa51/ralloc.c (serialRegAssign),
1571         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1572
1573 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1574
1575         * src/SDCCast.c (decorateType): fixed bug 1124787
1576
1577 2005-02-20 Hubert Sack <sack AT digiplan.de>
1578         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1579
1580         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1581         patch #1121755
1582
1583 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1584
1585         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1586         to keep the correct label reference count when adding/removing references
1587         to labels. A peephole file using this is appended to patch #1144962.
1588
1589 2005-02-14 Raphael Neider <rneider AT web.de>
1590
1591         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1592         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1593         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1594           retrievals of result operand's value on assignment
1595
1596 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1597
1598         * device/include/pic16/string.h: modified prototype for memccpy()
1599         to memccpy(void *, void *, char, size_t)
1600         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1601         check whether to omit frame pointer or not,
1602         * (genInline): convert all occurences of "\n" to LF in inline
1603         assembler blocks, this helps formatting the inline text,
1604         * (pic16_loadFSR0): modified prototype,
1605         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1606         removed some 8051 legacy code,
1607         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1608         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1609         before allocating temporary registers in functions,
1610
1611 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1612
1613         * support/regression/tests/bitvars.c: corrected the "fix"
1614
1615 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1616
1617         * support/regression/tests/bitvars.c,
1618         * support/regression/tests/bitwise.c,
1619         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1620
1621 2005-02-10 Raphael Neider <rneider AT web.de>
1622
1623         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1624           different size for Alpha
1625         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1626
1627 2005-02-09 Raphael Neider <rneider AT web.de>
1628
1629         * src/SDCC.lex(doPragma) : save and restore warning options as well
1630           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1631         * have #pragma less_pedantic set the errorlevel to WARNING
1632           (fixes #1117001)
1633         * (cloneOptimize) : fixed wrong malloc's size
1634         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1635           facilitate correct handling of #pragma (save|restore)
1636
1637 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1638
1639         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1640
1641 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1642
1643         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1644
1645 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1646
1647         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1648
1649 2005-02-02 Raphael Neider <rneider AT web.de>
1650
1651         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1652         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1653         * (pic16_storeForReturn): fixed to allow returning function pointers
1654         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1655         * device/include/pic16/{stddef.h,stdbool.h}: added
1656
1657 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1658
1659         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1660
1661 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1662
1663         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1664         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1665          appeared to be required
1666
1667 2005-01-31 Borut Razem <borut.razem AT siol.net>
1668
1669         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1670           include/mcs51 and include/z80 directories to the package
1671
1672 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1673
1674         * src/hc08/gen.c (genFunction): fixed bug #1112752
1675
1676 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1677
1678         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1679
1680 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1681
1682         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1683
1684 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1685
1686         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1687
1688 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1689
1690         * device/include/c8051fxxx.h: removed these 6 files
1691         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1692
1693 2005-01-26 Raphael Neider <rneider AT web.de>
1694
1695         * src/pic16/gen.c (genAssign): fixed assignment from longs
1696           in codespace (were cut to three bytes)
1697         * (genDummyRead): implemented (except for CODESPACE...),
1698           fixed bug #1108575
1699         * src/pic16/glue.c (emitStatistics): beautified
1700         * device/lib/pic16/libm/Makefile: added include path
1701
1702 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1703
1704         * src/z80/gen.c (aopPut): fixed bug #1103902
1705
1706 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1707
1708         * device/lib/expf.c: fixed bug #1095792
1709
1710 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1711
1712         * device/lib/pic16/libm: added Math library sources
1713
1714 2005-01-24 Raphael Neider <rneider AT web.de>
1715
1716         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1717           to enable upcast to pCodeOpReg2 (there is no type tag to
1718           differenciate the two and pic16_popGet2p cast into PCOR2)
1719         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1720           (sizeof(sectNames) changed to sizeof(sectName))
1721           Both patches fix segfaults under MinGW.
1722
1723 2005-01-23 Raphael Neider <rneider AT web.de>
1724
1725         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1726           Safe_[mc]?alloc()'ed variables
1727         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1728           of (byte sized) temporaries (assign them to WREG for now)
1729         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1730           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1731           this might fix SIGSEGVs on MinGW...
1732         * src/SDCCopt.c (killDeadCode): restored original behaviour
1733           (volatile operands might get thrown away though)
1734
1735 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1736
1737         * src/pic16/gen.c: fixed bug #1106975,
1738         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1739         pointer update, INTCON is saved, global interrupts are disabled and
1740         restored after updateing TOS.
1741         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1742         * added function attribute 'shadowregs' to take advantage of shadow
1743         registers,
1744         * added function attribute 'wparam' as an alternative to the wparam
1745         pragma,
1746         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1747         user declares a non-ISR function as 'shadowregs',
1748         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1749
1750 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1751
1752         * .version: bumped version number to 2.4.8
1753         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1754         pic16 port,
1755         * device/lib/pic16/libio/i2c/: I2C module support library,
1756         * device/include/pic16/i2c.h: I2C support library header,
1757         * device/lib/pic16/libc/stdio/: standard IO support sources,
1758         * (printf_small.c): printf_small() source, supports float print,
1759         * (printf_tiny.c): printf_tiny() source, does not support floats,
1760         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1761         enable global optimizations for entire library source, other
1762         Makefiles in the source tree are also modified to reflect this,
1763         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1764         function,
1765         * doc/sdccman.lyx: updated to reflect new changes,
1766         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1767         sym->onStack if-case,
1768         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1769         sbit, idata, _idata, xdata, _xdata,
1770         * added pragma library, to link an external library, (see doc),
1771         * removed command line options, --pomit-config-words, --pomit-ivt,
1772         --pleave-reset-vector,
1773         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1774         when calling assembler to reflect memory model used, also define
1775         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1776         reflect stack model used,
1777         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1778         on stack return NULL,
1779
1780 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1781
1782         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1783           of the operands is volatile. Fixes #1020220
1784
1785 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1786
1787         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1788         * (OptimizeRegUsage): make sure that there is really no other flow where
1789           the first pCode is used
1790
1791 2005-01-22 Raphael Neider <rneider AT web.de>
1792
1793         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1794           to fix #1106967 (pCode->seq are not set up correctly)
1795
1796 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1797
1798         * src/SDCCglue.c (glue): make sure code area is declared before the
1799         static initialization area.
1800
1801 2005-01-21 Raphael Neider <rneider AT web.de>
1802
1803         * device/lib/Makefile.in: fixed test for pic16 install dir
1804         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1805           optimizations
1806         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1807           added --optimize-goto compiler switch and pragma wparam documentation
1808         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1809         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1810           and PRODH closing bug #1071770 (peephole optimizer)
1811
1812 2005-01-19 Raphael Neider <rneider AT web.de>
1813
1814         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1815           cmdLine buffers (used when calling sdcpp...) are large enough
1816           (MAX_PATH=256 truncates arguments leading to system halts when
1817           used in MinGW...)
1818         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1819         * (genUminus): rewritten to for efficiency
1820         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1821           used uninitialized in some cases)
1822         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1823           copy the third byte from the int -- now assumes 0x80 (data memory)
1824         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1825           operands (genAddLit expects the iCode's operands to swapped as
1826           well), fixed leftover bytes (crashed for short left operands)
1827         * (pic16_genMinusDec): performance improvements, removed false
1828           PIC14 emitSKPNCs
1829         * (pic16_genMinus): fixed to cope with differently sized operands
1830         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1831           for --obanksel > 1
1832         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1833         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1834           new banksel optimization
1835         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1836           analysis for temporary registers (segfaults...)
1837         * src/pic16/peeph.def: added rule
1838
1839 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1840
1841         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1842         which converts a float number to its ASCII representation
1843         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1844         functions to convert the fractional and integer part of a float to ASCII,
1845         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1846         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1847         ram
1848         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1849         _STATMEM macros,
1850         * device/include/pic16/adc.h: added GPL info,
1851         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1852         a pCodeOp as tested operand,
1853         * (genNearPointerGet): optimized bit testing, does not use
1854         intermediate register for bit value, test directly instead with
1855         BTFSS, BTFSC, works only for single bits,
1856         * (genpic16Code): dump the name of the iCode in the asm,
1857         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1858         renamed to pic16_decodeOp,
1859         * (serialRegAssign): do not allocate a temporary register for iCode
1860         sequences that test a single bit for 1/0
1861
1862 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1863
1864         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1865         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1866         access stack and frame pointers. They are initially assigned to
1867         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1868         accessing SFRs. Updated all occurences of modification of stack or
1869         frame pointer in gen.c and pcode.c,
1870         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1871         assigning of a literal value to pointers,
1872         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1873         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1874         selected
1875
1876 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1877
1878         * doc/sdccman.lyx: update documentation about stack pragma, added
1879         some info for stack memory models
1880
1881 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1882
1883         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1884
1885 2005-01-08 Raphael Neider <rneider AT web.de>
1886
1887         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1888           udata sections to fix bug #1097823
1889
1890 2005-01-05 Raphael Neider <rneider AT web.de>
1891
1892         * src/pic16/gen.c (genGenericShift): added handling of differently
1893           sized left operand and result
1894
1895 2005-01-04 Raphael Neider <rneider AT web.de>
1896
1897         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1898         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1899           to hold the condition bit)
1900         * added new version of genCmp (old code available via #define)
1901         * added new version of genShiftLeft/genShiftRight in a generic
1902           way, now supports shifting by negative values
1903         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1904           shiftCount (expected by genGenericShift)
1905         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1906         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1907           dump
1908         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1909           is an invalid literal too...)
1910
1911 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1912
1913         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1914         from Raphael Neider,
1915         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1916         for 8-bit literals. This fixes some literal operands which are sign
1917         extended to 16-bits ints when instruction needs only 8-bits.
1918
1919 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1920
1921         * device/lib/logf.c: added mcs51 assembly version
1922         * device/lib/expf.c: added mcs51 assembly version
1923         * device/lib/_logexpf.c: new shared asm code for expf and logf
1924         * device/include/math.h: add defines for assembly math library
1925         * device/lib/Makefile.in: build new _logexpf.c
1926         * device/lib/libfloat.lib: use new _logexpf.c
1927
1928 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1929
1930         * src/pic/device.c
1931         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1932           device types which have less than 0x7f registers.
1933
1934 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1935
1936         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1937
1938 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1939
1940         * device/lib/printf_fast.c: only build on supported arch.
1941         * device/lib/printf_tiny.c: only build on supported arch.
1942         * device/lib/printf_fast_f.c: only build if asm float lib
1943         * device/lib/_fsget1arg.c: only build if asm float lib
1944         * device/lib/_fsget2args.c: only build if asm float lib
1945         * device/lib/_fsnormalize.c: only build if asm float lib
1946         * device/lib/_fsreturnval.c: only build if asm float lib
1947         * device/lib/_fsrshift.c: only build if asm float lib
1948         * device/lib/_fsswapargs.c: only build if asm float lib
1949         * device/include/stdio.h: don't provide print_fast,
1950           print_fast_f, print_tiny prototypes if --xstack used
1951
1952 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1953
1954         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1955         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1956           to the SOURCES
1957
1958 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1959
1960         * device/lib/printf_fast_f.c: same as printf_fast, but
1961           with floating point enabled
1962         * device/lib/printf_fast.c: minor tweaks
1963         * device/include/stdio.h: add printf_fast_f
1964
1965 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1966
1967         * src/SDCCmain.c: make --float-reent default for mcs51
1968         * device/lib/_fsadd.c: added mcs51 assembly version
1969         * device/lib/_fssub.c: added mcs51 assembly version
1970         * device/lib/_fsmul.c: added mcs51 assembly version
1971         * device/lib/_fsdiv.c: added mcs51 assembly version
1972         * device/lib/_fseq.c: added mcs51 assembly version
1973         * device/lib/_fsneq.c: added mcs51 assembly version
1974         * device/lib/_fsgt.c: added mcs51 assembly version
1975         * device/lib/_fslt.c: added mcs51 assembly version
1976         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1977         * device/lib/Makefile.in: add _fscmp to build
1978         * device/lib/libfloat.lib: add _fscmp to build
1979
1980 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1981
1982         * device/lib/_fs2slong.c: added mcs51 assembly version
1983         * device/lib/_fs2sint.c: added mcs51 assembly version
1984         * device/lib/_fs2schar.c: added mcs51 assembly version
1985         * device/lib/_fs2ulong.c: added mcs51 assembly version
1986         * device/lib/_fs2uint.c: added mcs51 assembly version
1987         * device/lib/_fs2uchar.c: added mcs51 assembly version
1988         * device/lib/_slong2fs.c: added mcs51 assembly version
1989         * device/lib/_sint2fs.c: added mcs51 assembly version
1990         * device/lib/_schar2fs.c: added mcs51 assembly version
1991         * device/lib/_ulong2fs.c: added mcs51 assembly version
1992         * device/lib/_uint2fs.c: added mcs51 assembly version
1993         * device/lib/_uchar2fs.c: added mcs51 assembly version
1994         * device/include/float.h: added #define to select asm vs c
1995
1996 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1997
1998         * device/lib/printf_fast.c: improvements to float output
1999         * device/include/float.h: add defines for assembly float library
2000         * device/lib/_fsget1arg.c: receive 1 float arg
2001         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2002         * device/lib/_fsnormalize.c: normalize a float
2003         * device/lib/_fsreturnval.c: return float, various helper routines
2004         * device/lib/_fsrshift.c: right shift a float's mantissa
2005         * device/lib/_fsswapargs.c: swap 2 floats
2006         * device/lib/Makefile.in: build these 6 new files for mcs51
2007         * device/lib/libfloat.lib: add these 6 files to the library
2008
2009 2004-12-26 Borut Razem <borut.razem AT siol.net>
2010
2011         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2012           built by gcc 3.4.2
2013
2014 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2015
2016         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2017           and fully reentrant and register bank neutral.
2018         * device/lib/printf_fast.c: added float (not enabled by default),
2019           added compact/slower integer (also not enabled by default),
2020           improved size/speed of fast integer code, other minor changes
2021         * device/include/stdio.h, device/lib/Makefile.in,
2022           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2023
2024 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2025
2026         * src/pic16/pcode.c: declaring variables other than at the start of a
2027           block is not supported in C by VC6.
2028
2029 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2030
2031         * applied a previous patch from Raphael Neider that wasn't included
2032         in the previous commits, which fixes infinite loops within jumptable
2033         improvements,
2034         * made some fixes that previous patches introduced
2035
2036 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2037
2038         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2039         that fixes an issue with AOP_PCODE asmop's offset,
2040         * (pic16_popCopyReg): update instance field too,
2041         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2042         function of pic port,
2043         * (genCmp, genAnd, genAssign),
2044         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2045
2046 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2047
2048         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2049         variables initial values to idata section,
2050         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2051         variables in some functions. This utilizes parmBytes field of iCode
2052         structure to hold the offset of the variable in stack. (might be
2053         able to use the stack field too?)
2054         * applied patch from Raphael Neider # ### , # ###
2055         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2056         variable initial values in idata section,
2057         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2058         for static variables with initial value
2059         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2060         applied fix in while loop from Raphael Neider.
2061
2062 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2063
2064         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2065         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2066         * src/ds390/ralloc.c (serialRegAssign): spill bits
2067         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2068         * support/Util/SDCCerr.c,
2069         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2070         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2071         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2072
2073 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2074
2075         * device/include/sdcc-lib.h: inserted LGPL, added includes
2076           asm/ds390/features.h and asm/mcs51/features.h
2077         * device/include/asm/default/features.h,
2078         * device/include/asm/gbz80/features.h,
2079         * device/include/asm/z80/features.h: added empty _AUTOMEM
2080           and _STATMEM
2081         * device/include/asm/ds390/features.h,
2082         * device/include/asm/mcs51/features.h: added files with defines for
2083           _AUTOMEM and _STATMEM indicating automatic and static storage class
2084         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2085         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2086         * src/SDCCicode.c (geniCodeCast),
2087         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2088         * src/SDCCloop.c (loopInduction): removed unused variable lr
2089         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2090           to convertToFcall to include char modulo (RFE 1065037), added check
2091           if left operand is unsigned and use abs of literal value
2092         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2093           as it doesn't work after conversion from peephole.def to peephole.rul
2094         * src/mcs51/gen.c (toBoolean): added check for size,
2095           (genModOneByte): optimized code for signed char modulo a literal
2096           power of 2 (thanks to Hubert Sack),
2097           (genRRC): removed unnecessary "clr c",
2098           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2099         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2100           jump optimization,
2101           swapped rules 256.c and 256.d,
2102           extended 256.d by using new multiple checks (thanks Erik),
2103           added rules 256.e and 256.f,
2104           updated rule 261.a and 261.b to new generated code
2105         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2106
2107 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2108
2109         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2110           induction related bugs, including first part of bug #1074377
2111
2112 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2113
2114         * applied patch from bug-report #1076292,
2115         * applied patches for genAnd and Goto-optimizations for Raphael
2116         Neider,
2117         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2118         dump a less iCode information,
2119         * src/pic16/device.h (pic16_options_t): added field debgen,
2120         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2121         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2122         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2123         puclic,
2124         * (various functions): added macros FENTRY and FENTRY2 to functions,
2125         to emit function prologue,
2126         * (various functions): fixed indentation,
2127         * (genNearPointerGet): fixed loading of FSR0,
2128         * (genPackBits): applied patch from Raphael Neider to fix updating
2129         of FSR0 and touching only the modified bits,
2130         * src/pic16/genarith.c (various functions): added macros FENTRY to
2131         emit function prologue in comments,
2132         * src/pic16/pcode.h: added functions debugf2, debugf3,
2133         * src/pic16/ralloc.c: partial fix for packForPush caused
2134         segmentation fault,
2135
2136 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2137
2138         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2139           <stsp AT users.sourceforge.net> with reversed byte order
2140         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2141
2142 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2143
2144         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2145           bug #1074377
2146         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2147         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2148
2149 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2150
2151         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2152
2153 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2154
2155         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2156           conditions,
2157           (setFromConditionArgs): friendly operand parser for peephole rules,
2158           (operandBaseName, operandsNotRelated): new peephole condition
2159           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2160           architecture specific register naming into account, handles n-way
2161           comparisons, and supports quoted literals
2162         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2163
2164 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2165
2166         * src/mcs51/peeph.def: fixed bug #1076940
2167
2168 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2169
2170         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2171
2172 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2173
2174         Adding support for replacing ljmps with sjmps in jumptables
2175         generated for switch statements. For now you need to set the
2176         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2177         Now 4 algorithms for mcs51 jumptable generation are used:
2178         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2179         addresses loaded pc-relative for up to 112 cases and stack-pushing
2180         target addresses loaded with offset from dptr for up to 256 cases.
2181
2182         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2183         * src/mcs51/main.c: adapted constants for switch table generation
2184         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2185
2186 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2187
2188         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2189         * support/regression/tests/bug1057979.c: added test for bug 1073386
2190
2191 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2192
2193         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2194         compilers
2195
2196 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2197
2198         * src/pic16/device.h,
2199         * src/pic16/genarith.c,
2200         * src/pic16/glue.c,
2201         * src/pic16/main.c,
2202         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2203
2204 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2205
2206         Large cummulative patch for pic16 port.
2207         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2208         to call when a stack overflow occurs,
2209         * (malloc.h): added CVS Id tag,
2210         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2211         variable,
2212         * added libc directory. The current version of LibC contains string
2213         functions, ctype functions and macros and some functions of the
2214         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2215         be extensively tested in the future. Standard disclaimer here.
2216         Library is not automatically build yet. But one can build it by
2217         invoking 'make' inside the libc directory.
2218         * added ADC library under libio. Preliminary version yet.
2219
2220         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2221         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2222         aopForRemat() now and not by pic16_aopOp(),
2223         * (pic16_popGetTempReg): removed warning messgae when allocating
2224         temporary registers, its a buggy feature and will be removed,
2225         * (pic16_popGet): set register instance field in AOP_CRY,
2226         * (pic16_outBitC): fixed for results in size greater than 1,
2227         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2228         * (pic16_storeForReturn): optimized return of 0,
2229         * (genCmp): experimental code for new genCmp which uses PIC18's
2230         special compare&skip instructions. Initial tests fail some times
2231         with variables grater than 1 byte in size, so new code is disabled,
2232         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2233         a single bit,
2234         * (genCast): began a fix to optimize the casting of a bit to another
2235         bit, now assigning a bitfield to another bitfield will fail, sorry,
2236         * src/pic16/main.c: disabled the use of lr-support feature,
2237         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2238         * added some function prototypes, added function _debugf prototype,
2239         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2240         bits with offset (case PO_GPR_BIT),
2241         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2242         command line,
2243         * (isBankInstruction): modified to return 0 for no banking instruction,
2244         and 1 for banking instruction,
2245         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2246         caused stop processing pCodes after a inline assembly block,
2247         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2248         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2249         registers when it shouldn't,
2250         * src/pic16/ralloc.c (allocReg): add preliminary support for
2251         supporting a limited set of temporary registers,
2252
2253 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2254
2255         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2256           genDataPointerSet): ensure assignments always copy in MSB to LSB
2257           order,
2258           (loadRegFromAop): recognize CLRH optimization,
2259           (genFunction): optimize RECEIVE iCodes in reentrant functions
2260
2261 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2262
2263         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2264           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2265           selected.
2266         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2267         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2268           contiguous with data
2269
2270 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2271
2272         * device/lib/_gptrget.c (_gptrget),
2273         * device/lib/_gptrgetc.c (_gptrgetc),
2274         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2275           instead of sjmp to ret
2276         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2277           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2278
2279 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2280
2281         * .version: bumped version to 2.4.7
2282         * device/lib/_gptrget.c (_gptrget): is now _naked
2283         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2284         * device/lib/_gptrput.c (_gptrput): is now _naked
2285         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2286           (createFunction): fixed xstack
2287         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2288         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2289           or bit either,
2290           (geniCodeCritical): store original interrupt state in an iTemp bit
2291           var unless stack-auto
2292         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2293         * src/SDCCmain.c (setIncludePath): added include/target to search path
2294         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2295         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2296           prototype,
2297           (processFuncArgs): put bit vars in bit area
2298         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2299           unsaveRBank): fixed xstack,
2300           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2301           (genFunction, genEndFunction): fixed xstack,
2302           (genAssign): optimization don't walk backwards through mem
2303         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2304         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2305         * support/regression/Makefile: also make library (for stack-auto) when
2306           making "all" and added "test-mcs51-xstack-auto"
2307         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2308         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2309         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2310         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2311         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2312           make-library by MAKE_LIBRARY
2313         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2314           regression tests for xstack
2315         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2316         * support/regression/tests/critical.c: test for critical on mcs51
2317
2318 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2319
2320         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2321           built version of sdcc instead of installed version
2322
2323 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2324
2325         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2326         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2327           vprintf.c now
2328         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2329         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2330           WARNING: remove device/lib/build/z80/printf.o by hand when
2331           updating from previous build!
2332         * device/lib/z80/printf.c: updated comment
2333         * support/regression/tests/bug1057979.c: test all ports now
2334         * support/regression/tests/bug1065458.c: file added
2335
2336 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2337
2338         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2339           *_start and *_end symbols for static functions
2340
2341 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2342
2343         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2344           and search crt0.o in all library paths,
2345           (setIncludePath): proper handling of --nostdinc,
2346           (setLibPath): proper handling of --nostdlib
2347         * support/regression/Makefile,
2348         * support/regression/ports/ds390/spec.mk,
2349         * support/regression/ports/gbz80/spec.mk,
2350         * support/regression/ports/hc08/spec.mk,
2351         * support/regression/ports/mcs51/spec.mk,
2352         * support/regression/ports/mcs51-large/spec.mk,
2353         * support/regression/ports/mcs51-stack-auto/spec.mk,
2354         * support/regression/ports/z80/spec.mk: use include and lib files from
2355           built version of sdcc instead of installed version
2356         * doc/sdccman.lyx: fixed typo in --nostdinc
2357
2358 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2359
2360         * src/pic/pcode.c,
2361         * src/pic/device.c,
2362         * src/pic/ralloc.c,
2363         * src/pic/gen.c : added support to generate code for struct bit fields.
2364
2365 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2366
2367         * as/xa51/xa_version.h,
2368         * device/include/errno.h,
2369         * device/include/regc515c.h,
2370         * device/lib/_itoa.c,
2371         * device/lib/_ltoa.c,
2372         * device/lib/ser_ir_cts_rts.c,
2373         * sim/ucsim/xa.src/glob.cc,
2374         * sim/ucsim/xa.src/inst_gen.cc,
2375         * sim/ucsim/xa.src/xa_bit.cc,
2376         * sim/ucsim/xa.src/xa_sfr.cc,
2377         * sim/ucsim/z80.src/inst_dd.cc,
2378         * sim/ucsim/z80.src/inst_fdcb.cc,
2379         * support/scripts/keil2sdcc.pl,
2380         * src/pic16/pic16.dsp,
2381         * src/pic16/pic16a.dsp: corrected cvs line endings
2382         * device/lib/printf_large.c: fixed bug 1057979
2383         * src/pic16/gen.c: fixed non-C standard code
2384         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2385         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2386         * support/regression/ports/mcs51/support.c: reload T1 asap
2387         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2388           pdata use and clear idata startup behaviour
2389         * support/regression/tests/bug1057979.c: added
2390
2391 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2392
2393         * device/examples/ds390/ow390/ad26.h,
2394         * device/examples/ds390/ow390/cnt1d.h,
2395         * device/examples/ds390/ow390/crcutil.c,
2396         * device/examples/ds390/ow390/ownet.h,
2397         * device/examples/ds390/ow390/owsesu.c,
2398         * device/examples/ds390/ow390/swt12.h,
2399         * device/examples/ds390/ow390/swtoper.c,
2400         * device/examples/ds390/ow390/temp10.h,
2401         * device/examples/ds390/ow390/thermodl.c,
2402         * device/examples/ds390/tinitalk/tinitalk.dsp,
2403         * device/examples/ds390/tinitalk/tinitalk.dsw,
2404         * device/examples/mcs51/clock/hw.h,
2405         * device/examples/mcs51/simple2/go.bat,
2406         * device/examples/serialcomm/windows/serial.h,
2407         * device/examples/xa51/dummy.c,
2408         * device/examples/xa51/hello.c,
2409         * device/include/80c51xa.h,
2410         * device/include/at89x051.h: corrected cvs line endings
2411
2412 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2413
2414         * src/pic16/main.c (options): added command line --gstack, to trace
2415         stack over/under flows,
2416         * added pragma 'wparam' to allow passing first byte of function
2417         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2418         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2419         call to __gstack_test function and sets up the symbol as extern,
2420         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2421         * popaop): added call to pic16_testStackOverflow,
2422         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2423         wparamList list,
2424         * (genCall, genPcall): now all parameters are passed via stack
2425         except in functions that are pass to wparam pragma in which WREG is
2426         used too,
2427         * (genPcall): REENTRANT flag is checked to see if variable prototype
2428         contains reentrant keyword, don't call a non-reentrant function, via
2429         a reentrant function pointer or vice versa, functions are never
2430         passed via WREG,
2431         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2432         D.Winkler,
2433         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2434         SIGSEGV when accessing a NULL register stucture,
2435         * (pic16_printGPointerType): modified to handle UPPER modifier for
2436         function initializers, changed prototype of function to simpler one,
2437         * (pic16_printIvalFuncPtr): check to see if function is already
2438         added in externs list,
2439         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2440         optimized a move from W to SFR with a move to the same register
2441         later after a CALL,
2442         * device/lib/pic16/debug: NEW directory, contains debug features
2443         which are enabled when linking with libdebug.lib, currently command
2444         line option --gstack enables stack pointer tracing for over/under
2445         flow, corresponding sources are in debug/gstack
2446
2447 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2448
2449         * doc/sdccman.lyx: updated SDCC version,
2450         * (PIC16 port): update list of command line options,
2451         * src/pic16/device.h (structure pic16_options_t): added field gstack
2452         to enable stack overflow tracing on push/pops,
2453         * src/pic16/device.c (statistics structure): added statistics
2454         structure,
2455         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2456         pic16_dump_int_registers): increase statistics counters for each
2457         * variable which is encountered
2458         * (pic16_dump_usection): emit each .udata variable to its own udata
2459         section,
2460         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2461         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2462         parameters via stack, otherwise use old scheme,
2463         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2464         assembler output file,
2465         * src/pic16/main.c: added command line options --gstack to enable
2466         push/pop tracing for stack overflow,
2467         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2468         instructions): added size of each instruction,
2469         * (pic16_countInstruction): estimate size of instructions in
2470         the_pFile list, inline assembly blocks are not counted,
2471         * (pic16_FixRegisterBanking): trace previous register usage, when
2472         banksel optimizations is greater than 0, don't emit a redudant
2473         banksel directive,
2474
2475 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2476
2477         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2478         * src/pic16/ralloc.c : applied same fix for pic16.
2479         * src/pic/gen.c : tidied it up a little.
2480
2481 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2482
2483         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2484         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2485
2486 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2487
2488         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2489
2490 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2491
2492         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2493         non-reentrant function __modsint in the interrupt function (thus
2494         corrupting math operations during serial I/O)
2495         * device/lib/ser_ir.c: as above, changed buffersize
2496         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2497         256.c,d for zeroing
2498         * doc/Makefile: added option -t for rsync
2499
2500 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2501
2502         * src/SDCCast.h (struct ast),
2503         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2504
2505 2004-10-20 Borut Razem <borut.razem AT siol.net>
2506
2507         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2508         package
2509
2510 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2511
2512         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2513         makefile targets,
2514         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2515         support functions to replace long sequences of MOVFF's from access
2516         bank registers to stack and vice versa,
2517         * src/pic16/device.h: added new field opt_flags, where optimization
2518         flags can be set to enable certain features,
2519         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2520         * pBlock, (genFunction, genEndFunction): surroung loop for
2521         saving/loading used registers in stack with PC_INFO pCodes,
2522         INF_LREGS. Code in between can then be optimized by pCode optimizer
2523         to support function calls,
2524         * (genDataPointerSet): fixed bug which loaded float fields in
2525         structures with corrupt data,
2526         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2527         in a standard way debug info on stderr. Feature used for developing
2528         and debugging only,
2529         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2530         obsolete chunks of code,
2531         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2532         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2533         * pic16/src/pcode.c (pic16_newpCodeInfo,
2534         * (pic16_newpCodeOpLocalRegs),
2535         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2536         feature,
2537         * (pic16_pCodeConstString): printing of the initial value of a
2538         symbol as a comment is inhibited since parsing was already done by
2539         copyStr and output is corrupt,
2540         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2541
2542 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2543
2544         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2545
2546 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2547
2548         * as/mcs51/lkarea.c: removed old K&R style,
2549           (lnksect): changed check on boundary error,
2550           (lnksect2): changed check on boundary error,
2551           (lnksect2): extend XSTK to end of page if size = 1
2552         * as/mcs51/lkmain.c: removed old K&R style,
2553           (Areas51): create l_IRAM symbol
2554         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2555         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2556           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2557         * device/lib/_mullong.c: added version to be compiled with xstack
2558         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2559         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2560         * device/lib/mcs51/crtxstack.asm: fixed comment
2561         * src/SDCCglue.c: maxInterrupts defaults to 0,
2562           (emitMaps): added pdata,
2563           (createInterruptVect): (re)moved default,
2564           (glue): added pdata,
2565           (glue): moved __start__xstack to XSTK with default size 1
2566         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2567           and options.float_rent when options.stackAuto is set,
2568           (linkEdit): only write XDATA_NAME if provided on command line
2569         * src/SDCCmem.h,
2570         * src/SDCCmem.c: added pdata
2571         * src/port.h: added pdata_name to PORT
2572         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2573           (saveRegisters, unsaveRegisters): removed usage of B,
2574           (genMinus): fixed accumulator clash,
2575           (genJumpTab): added comment, this needs another look
2576         * src/mcs51/gen.c: added check for "B in use" paranoia,
2577           added pushB() and popB()
2578         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2579           chance
2580         * src/avr/main.c,
2581         * src/ds390/main.c,
2582         * src/hc08/main.c,
2583         * src/mcs51/main.c,
2584         * src/pic/main.c,
2585         * src/pic16/main.c,
2586         * src/xa51/main.c,
2587         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2588           added PSEG (PAG,XDATA) or NULL to port specifier
2589         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2590         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2591           (_mcs51_genInitStartup): removed __start__xstack equ,
2592           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2593         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2594         * src/z80/gen.c (_rleAppend): fixed warnings
2595         * support/regression/tests/zeropad.c: added pdata test
2596         * .version: bumped to 2.4.6
2597
2598 2004-10-17 Borut Razem <borut.razem AT siol.net>
2599
2600         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2601         as a part of nightly build
2602
2603 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2604
2605         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2606         WREG holds the first byte function parameters,
2607         * (aopForSym): take special case for symbols which are in FARSPACE
2608         but in CODESPACE too,
2609         * (assignResultValue): modified to take into account _G.useWreg,
2610         * (genCall): don't use wreg for parameter passing when function is
2611         declared as reentrant, too, added optimization INCF to stack
2612         pointer when stack parameter count is 1,
2613         * (genFunction, genEndFunction): refurnished and fixed to not using
2614         wreg for passing parameters when function has varargs or is
2615         reentrant, fixed bug with symbol name compare for generating
2616         functions in absolute address,
2617         * (pic16_storeForReturn): refurnished,
2618         * (genCmp): began writing a new version of the function, not ready
2619         yet, therefore it is disabled,
2620         * (genAssign): do not read code memory when assigning a function to
2621         a pointer function,
2622         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2623         array of characters, not pointer,
2624         * (pic16initialComments): in debug mode emit an .ident directive for
2625         the assembler,
2626         * (_process_pragma): emit a new warning type (internal to pic16)
2627         when setting stack to default length, emit a similar warning when
2628         placing a function at absolute address and address is not word aligned
2629         * (_pic16_parseOptions): added 'return TRUE' statement,
2630         * (_pic16_linkEdit): if compiling a source, then add the source's
2631         file object, first in the list of objects to link,
2632
2633 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2634
2635         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2636         * src/pic/main.c : removed VC warning.
2637         * src/pic/gen.c : changed comment.
2638
2639 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2640
2641         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2642         reference to a deprecated symbol _GPTRREG was causing failure to
2643         link. Thanks G. M. Gallant for the info.
2644
2645 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2646
2647         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2648         comments for Bugs item #954788.
2649
2650 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2651
2652         * src/pic16/device.c (pic16_dump_gsection,
2653         * pic16_groupRegistersInSection): handle symbols declared to be in
2654         access bank differently,
2655         * src/pic16/gen.c (struct _G): added field resDirect,
2656         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2657         send values read from stack directly to result and don't allocate
2658         temporary values,
2659         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2660         same registers,
2661         * (pic16_sameRegsOfs): NEW,
2662         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2663         free because they were not allocated from temporary pool,
2664         * pic16_popRegFromString): workaround to fix a problem with
2665         allocating variables twice or never,
2666         * (genGenPointerGet): using PRODL instead of FSR0H,
2667         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2668         instead of FSR0H,
2669         * (genAssign): take advantage of the _G.resDirect flag,
2670         * (genCast): around line 11844, use mov2f instead of directly
2671         MOVFF'ing between operands to account for literal values,
2672         * src/pic16/genutils.c: some new debug functions for gpsim have been
2673         added,
2674         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2675         float with integer part only,
2676         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2677         place variables in access bank
2678         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2679         updated sources to reflect recent changes in gen.c
2680
2681 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2682
2683         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2684         sources that searched for headers in installation path, now the
2685         device/include/pic16 is used,
2686         * src/pic16/glue.c (pic16glue),
2687         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2688         .line directives if not in debug mode, this suppresses assembler's
2689         warnings for ignored directives
2690
2691 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2692
2693         * src/port.h: made reset_regparms prototype void parameter explicit.
2694         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2695         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2696         * doc/sdccman.lyx: documented warning disabling and how to use
2697           printf_large to make it print floats.
2698         * device/include/stdbool.h: NEW
2699         * device/lib/_atof.c,
2700         * device/lib/_divuint.c,
2701         * device/lib/_divulong.c,
2702         * device/lib/expf.c,
2703         * device/lib/printf_large.c,
2704         * device/lib/sincosf.c,
2705         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2706         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2707           a completely reentrant lib.
2708
2709 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2710
2711         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2712         * device/include/pic16/stdio.h: fixed bug with colon
2713
2714 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2715
2716         * device/include/pic16/stdio.h,
2717         * device/include/pic16/stdlib.h,
2718         * device/include/pic16/math.h: NEW
2719         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2720         declared as _naked to reduce overhead
2721         * device/lib/Makefile.in (target port-specific-objects-pic16):
2722         changed * to *.* so to ignore the CVS directory,
2723         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2724         stacked variables back in stack,
2725         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2726         corruption
2727
2728 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2729
2730         * .version: bumped version number to 2.4.5
2731         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2732         * support/Util/SDCCerr.c (messages structure): added entry for
2733         W_POSSBUG2
2734
2735         Large cumulative patch for pic16 port and libraries.
2736         * device/include/pic16/sdcc-lib.h,
2737         * device/include/pic16/stdarg.h,
2738         * device/include/asm/pic16/features.h,
2739         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2740         * device/include/pic16/float.h: changes reentrant keyword with
2741         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2742         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2743         updated target build-libraries to include objects from gptr,
2744         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2745         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2746         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2747         all function headings,
2748         * src/SDCCmain.c: added global parameter userIncDirsSet,
2749         * (parseCmdLine): when option -I is encountered add directory to
2750         userIncDirsSet too,
2751         * src/version.awk: added space between control and long,
2752         * src/pic16/NOTES: added some notes for the port,
2753         * src/pic16/gen.c: added prototype for mov2fp function,
2754         * (fReturnpic16[]): properly named return value registers,
2755         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2756         * (aopForSym): added code to handle symbols with onStack flag set,
2757         symbols onStack are allocated PTRSIZE bytes,
2758         * (aopFreeAsmop): handles special case where asmops are stack objects,
2759         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2760         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2761         added argument lock to trace flaws in allocating temporary registers
2762         when developing port,
2763         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2764         * (pic16_popRegFromString): reenabled allocating a direct register
2765         from string,
2766         * (assignResultValue): various beautifications,
2767         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2768         referenced function argument,
2769         * (genIpush): reenabled to allow stacked arguments, handles only
2770         ic->parmPush iCodes,
2771         * (genCall, genPcall): major changes to allow for variable argument
2772         functions, fixed a bug with falsely restoring stack pointer after
2773         returning from call,
2774         * (genFunction): pending code for critical function,
2775         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2776         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2777         * (genNearPointerGet): fixed bug with indirect reading, was always
2778         reading from INDF0
2779         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2780         pointers,
2781         * (genAddrOf): rewrote code to take address of a stacked function parameter
2782         * (genCast): fixed casting to generic pointer type,
2783         * src/pic16/gen.h: added AOP_STA,
2784         * (struct asmop): added field stk,
2785         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2786         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2787         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2788         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2789         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2790         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2791         generic pointers,
2792         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2793         and library paths,
2794         * (pic16_port structure): generic pointer size is set to 3,
2795         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2796         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2797         compiler warning,
2798         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2799         operand is an iTemp,
2800
2801 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2802
2803         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2804         * debugger/mcs51/simi.c: addapt new syntax of s51
2805
2806 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2807
2808         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2809         * src/pic16/pcode.c: commented out some calls to free() in order to
2810         fix bug #989576,
2811
2812 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2813
2814         * src/SDCCicode.h,
2815         * src/SDCCicode.c (isiCodeInFunctionCall),
2816         * src/avr/ralloc.c (selectSpil),
2817         * src/pic/ralloc.c (selectSpil),
2818         * src/pic16/ralloc.c (selectSpil),
2819         * src/ds390/ralloc.c (selectSpil),
2820         * src/hc08/ralloc.c (selectSpil),
2821         * src/xa51/ralloc.c (selectSpil),
2822         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2823         stack in the middle of a function call sequence (fixes bug #1020268)
2824         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2825         costs associated with the minimum switch case.
2826
2827 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2828
2829         * src/SDCC.lex: fixed bug #1030549
2830
2831 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2832
2833         * src/SDCCcse.h (struct cseDef),
2834         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2835         over a function call if the CSE is derived from a symbol whose
2836         address has been taken (fixes bug #1029883)
2837         * support/regression/tests/bug-1029883: a new regression test for
2838         this bug
2839
2840 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2841
2842         * src/hc08/gen.c (emitinline): fixed bug #1029778
2843         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2844         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2845         and starts toward RFE #905167)
2846
2847 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2848
2849         * src/pic16/gen.c (mov2f): New function to move an operand to
2850         another without considering if it is a literal or a register,
2851         * (pic16_sameRegs): don't check if they are both AOP_REG,
2852         * (AccRsh): removed andmask=0 lines,
2853         * (genLeftShift): duplicated to be improved in future versions,
2854         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2855         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2856         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2857         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2858         * (insertBankSwitch): fixed inserting banksel directives algorithm
2859         for instructions that follow a skip instruction, this fixes a report
2860         for broken subtraction code generation,
2861         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2862         iCode is a left op, just in case result and right share the same
2863         registers
2864
2865 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2866
2867         * src/hc08/main.c,
2868         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2869         preservation of HX
2870         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2871         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2872         on 2004-09-12; it was buggy
2873
2874 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2875
2876         * src/SDCCsymt.h: removed RESULT_CHECK
2877         * src/SDCCast.c,
2878         * src/SDCCglue.c,
2879         * src/SDCCval.c,
2880         * src/pic/glue.c,
2881         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2882
2883 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2884
2885         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2886         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2887         configuration values no more rejected by compiler, they are assigned
2888         to configuration registers with a warning message instead,
2889         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2890         the for-loop so last conf register is emitted too,
2891         * (_pic16_initPaths): link library libsdcc.lib by default,
2892         * (_hasNativeMulFor): modified test for multiplication according to
2893         Raphael Neider's remarks. Integer multiplication is also done with
2894         support functions,
2895         * device/include/pic16/pic18fregs.h: corrected type error in while
2896         testing and including 18f6720 header file
2897
2898 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2899
2900         * src/pic16/device.h (pic16_options): removed field use_crt,
2901         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2902         until an optimization to handle single bits is added,
2903         * (pic16_loadFSR0): moved before genUnpackBits,
2904         * (genAnd): some white lines removed,
2905         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2906         leave_reset flags in pic16_options when using crt modules,
2907
2908 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2909
2910         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2911           for bugs 898889 & 979599. Also used some safer print instructions.
2912
2913 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2914
2915         * src/pic16/device.h (pic16_options_t): added field use_crt,
2916         crt_name, no_crt,
2917         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2918         catch a probable future bug,
2919         * src/pic16/gen.c: aopIdx function commented out,
2920         * (genAssign): commented out old code which used aopIdx,
2921         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2922         code, added if conditionals to take into account the --use-crt
2923         command line options,
2924         * src/pic16/main.c (pic16_optionsTable): added new command line
2925         options, --use-crt= and --no-crt,
2926         * (_pic16_linkEdit): now the proper crt object is added in the
2927         linker command line except than when --no-crt is specified,
2928         * src/pic16/pcode.c,
2929         * src/pic16/pcode.h: added some structures and functions for a new
2930         optimization scheme to compansate for instruction overhead between
2931         same iCodes, this scheme is currently under development and is not
2932         working in any way,
2933         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2934         to && operator,
2935         * device/lib/pic16/startup/crt0i.c,
2936         * device/lib/pic16/startup/crt0iz.c: added global char variable
2937         __uflags to force the generation of an idata section
2938
2939 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2940
2941         * doc/Makefile,
2942         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2943         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2944
2945 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2946
2947         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2948         Frieder) and clarified the default code optimization mode
2949
2950 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2951
2952         * src/SDCC.lex (doPragma, process_pragma),
2953         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2954         "opt_code_size", and "opt_code_balanced"
2955         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2956         regrouped options by category, added support for category headers
2957         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2958         and "--opt-code-size"
2959         * doc/sdccman.lyx: documented these new options and pragmas
2960         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2961         preference into account
2962
2963 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2964
2965         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2966           geniCodePreDec): Fixed bug 904237 by generating a warning
2967         * src/SDCCerr.h,
2968         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2969
2970 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2971
2972         * src/pic/device.c : When no max ram set validate full memory range.
2973         * src/pic/pcode.c,
2974         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2975
2976 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2977
2978         * device/lib/_gptrget.c,
2979         * device/lib/_gptrput.c: updated comment
2980         * device/lib/calloc.c,
2981         * device/lib/free.c,
2982         * device/lib/malloc.c,
2983         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2984         * src/SDCCcse.c (cseBBlock),
2985         * src/SDCCicode.c (printOperand, geniCodeArray),
2986         * src/SDCCicode.h (struct operand): fixed bug 868103
2987         * support/regression/tests/bug-868103.c: added
2988         * src/SDCCast.c (searchLitOp),
2989         * src/SDCCcse.h (struct cseDef),
2990         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2991         * src/SDCCicode.h (struct operand),
2992         * src/SDCCsymt.h (struct sym_link),
2993         * src/avr/gen.c (hasInc),
2994         * src/ds390/gen.c (hasInc),
2995         * src/hc08/gen.c (genPlusIncr, hasInc),
2996         * src/mcs51/gen.c (hasInc),
2997         * src/pic16/glue.c (pic16_printIvalChar),
2998         * src/pic16/ralloc.c (regWithIdx),
2999         * src/xa51/gen.c (hasInc) : removed warnings
3000         * src/SDCCast.c (createBlock): added comment ???
3001         * src/hc08/ralloc.c: updated comments
3002
3003 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3004
3005         * doc/sdccman.lyx: updated section on switch statements, added
3006         section about semaphore locking
3007         * doc/Makefile: added option -info for latex2html
3008         * device/lib/_gptrget.c,
3009         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3010
3011 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3012
3013         * src/pic/device.h,
3014         * src/pic/device.c,
3015         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3016          maxram is less than 0x100.
3017
3018 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3019
3020         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3021
3022 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3023
3024         * src/port.h,
3025         * src/mcs51/main.c,
3026         * src/ds390/main.c,
3027         * src/z80/main.c,
3028         * src/hc08/main.c,
3029         * src/pic/main.c,
3030         * src/pic16/main.c,
3031         * src/avr/main.c,
3032         * src/xa51/main.c
3033         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3034         a jump table is the best form for a switch statement, including
3035         automatic insertion of missing cases to make the case range
3036         continuous. Developed in collaboration with Frieder Ferlemann.
3037
3038 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3039
3040         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3041         accumulator result if it needs sign extension
3042
3043 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3044
3045         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3046
3047 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3048
3049         * device/lib/gbz80/printf.c,
3050         * device/lib/z80/printf.c: removed define for NULL
3051
3052 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3053
3054         * as/xa51/xa_link.c,
3055         * device/examples/ds390/ow390/ad26.c,
3056         * device/examples/ds390/ow390/cnt1d.c,
3057         * device/examples/ds390/ow390/counter.c,
3058         * device/examples/ds390/ow390/ds2480.h,
3059         * device/examples/ds390/ow390/ds2480ut.c,
3060         * device/examples/ds390/ow390/findtype.c,
3061         * device/examples/ds390/ow390/gethumd.c,
3062         * device/examples/ds390/ow390/owllu.c,
3063         * device/examples/ds390/ow390/ownetu.c,
3064         * device/examples/ds390/ow390/swt12.c,
3065         * device/examples/ds390/ow390/swtloop.c,
3066         * device/examples/ds390/ow390/temp.c,
3067         * device/examples/ds390/ow390/temp10.c,
3068         * device/examples/ds390/ow390/thermo21.c,
3069         * device/examples/ds390/ow390/tinilnk.c,
3070         * device/examples/ds390/ow390/tstfind.c,
3071         * device/examples/serialcomm/windows/serial.cpp,
3072         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3073         * device/include/reg51.h: fixed line endings for cvs
3074
3075 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3076
3077         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3078         packRegsForAccUse, packRegisters): new accumulator register
3079         packing algorithm
3080         * support/regression/ports/hc08/support.c (_putchar): suppress
3081         warning of unused variable
3082         * src/SDCCicode.c: added SWAP entry to codeTable
3083
3084 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3085
3086         * device/lib/sprintf.c: forgot to add this file before previous commit
3087
3088 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3089
3090         * src/pic16/gen.c (genPackBits): added operand right in function
3091         parameters, load result directly if p_type is POINTER (that is
3092         called by genNearPointerSet)
3093         * (genUnPackBits): added operand left in function parameters,
3094         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3095         FSR0 if accessing bitfields,
3096
3097 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3098
3099         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3100           _print_format; updated printf, sprintf, vsprintf
3101         * device/include/asm/default/features.h: corrected comment/define
3102         * device/lib/Makefile.in: added sprintf.c
3103         * device/lib/libsdcc.lib: added sprintf module
3104         * device/lib/printf_large.c,
3105         * device/lib/vprintf.c,
3106         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3107           into these 3 files
3108         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3109         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3110         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3111           hc08 test
3112         * support/regression/tests/zeropad.c: define idata as data for hc08
3113
3114 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3115
3116         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3117         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3118         labels are referenced at least once (even if a reference is not found)
3119         * src/hc08/gen.c (emitcode): set isComment flag for comments
3120         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3121         loads), rules 6a..6b (optimize jumps to return)
3122
3123 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3124
3125         * device/lib/acosf.c (acosf),
3126         * device/lib/asinf.c (asinf),
3127         * device/lib/atanf.c (atanf),
3128         * device/lib/ceilf.c (ceilf),
3129         * device/lib/cosf.c (cosf),
3130         * device/lib/coshf.c (coshf),
3131         * device/lib/cotf.c (cotf),
3132         * device/lib/fabsf.c (fabsf),
3133         * device/lib/floorf.c (floorf),
3134         * device/lib/log10f.c (log10f),
3135         * device/lib/logf.c (logf),
3136         * device/lib/sinf.c (sinf),
3137         * device/lib/sinhf.c (sinhf),
3138         * device/lib/sqrtf.c (sqrtf),
3139         * device/lib/tanf.c (tanf),
3140         * device/lib/tanhf.c (tanhf),
3141         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3142         replaced all instances of "reentrant" in the library functions
3143         defined in math.h with this macro.
3144         * support/regression/tests/float_trans.c: reenabled test for hc08
3145
3146 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3147
3148         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3149         erroneously deleted
3150
3151 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3152
3153         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3154         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3155         multi-byte volatile operands are used
3156         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3157         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3158         initialization to area GSINIT0 so that it would always precede
3159         any static initializers in GSINIT
3160         * support/regression/tests/zeropad.c: fixed idata define for hc08
3161         * support/regression/tests/bug-927659.c,
3162         * support/regression/tests/float_trans.c: disabled tests for hc08
3163         pending missing library routines
3164         * .version: increased version number to 2.4.4 - hc08 port now passes
3165         regression tests
3166
3167
3168 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3169
3170         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3171         * Makefile.common.in,
3172         * as/Makefile,
3173         * as/hc08/Makefile.in,
3174         * as/mcs51/Makefile.in,
3175         * as/z80/Makefile.in,
3176         * debugger/mcs51/Makefile.in,
3177         * device/include/Makefile.in,
3178         * device/lib/Makefile.in,
3179         * doc/Makefile,
3180         * link/Makefile,
3181         * link/z80/Makefile.in,
3182         * packihx/Makefile.in,
3183         * sim/ucsim/main_in.mk,
3184         * sim/ucsim/avr.src/Makefile.in,
3185         * sim/ucsim/doc/Makefile.in,
3186         * sim/ucsim/gui.src/serio.src/Makefile.in,
3187         * sim/ucsim/hc08.src/Makefile.in,
3188         * sim/ucsim/s51.src/Makefile.in,
3189         * sim/ucsim/xa.src/Makefile.in,
3190         * sim/ucsim/z80.src/Makefile.in,
3191         * src/Makefile.in,
3192         * support/cpp2/Makefile.in,
3193         * support/librarian/Makefile,
3194         * support/makebin/Makefile: added DESTDIR to the install path proposed
3195         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3196         * doc/sdccman.lyx: added DESTDIR documentation
3197
3198 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3199
3200         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3201         instruction for interrupt handlers, use fast returns when returning
3202         from high priority interrupts
3203
3204 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3205
3206         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3207         code generation
3208         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3209         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3210         bugs, ported much of Bernhard's code from mcs51
3211         * src/mcs51/gen.c (genSend),
3212         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3213         than one when calling a reentrant function
3214         * device/lib/_mullong.c: defined an alternate struct layout for big
3215         endian ports (hc08)
3216
3217 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3218
3219         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3220         test
3221
3222 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3223
3224         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3225         are sane and complete before asking the port its prefered parameter
3226         passing method (fixes bug #1017633)
3227         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3228         and _ret3
3229
3230 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3231
3232         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3233         problem in bitfields >= 8 bits.
3234
3235 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3236
3237         * src/SDCCsymt.c: undid changes that were not meant to be committed
3238
3239 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3240
3241         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3242
3243 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3244
3245         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3246           copied and wrong bit got inverted
3247
3248 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3249
3250         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3251         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3252         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3253         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3254         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3255         assignments to bitfields at known addresses
3256         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3257         reads from bitfields at known addresses
3258         * src/hc08/ralloc.c (packRegisters),
3259         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3260         genhc08Code): optimize pointer get values used as conditionals
3261         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3262         and branch
3263
3264 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3265
3266         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3267         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3268         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3269         as conditionals
3270
3271 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3272
3273         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3274
3275 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3276
3277         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3278         related problems
3279
3280 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3281
3282         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3283
3284 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3285
3286         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3287         mcs51 port
3288
3289 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3290
3291         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3292
3293 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3294
3295         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3296         cases use more compact code.
3297
3298 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3299
3300         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3301
3302 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3303
3304         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3305
3306 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3307
3308         * src/SDCCsymt.h,
3309         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3310         parameter of changePointer() from symbol* to sym_link*
3311         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3312         * src/SDCCsymt.c (compareType): void* type is castable to other
3313         pointers, but not necesarily an exact match.
3314         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3315         is no longer blindly treated as an exact match.
3316         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3317
3318 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3319
3320         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3321
3322 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3323
3324         * src/pic/gen.c,
3325         * src/pic/pcode.c,
3326         * src/pic/ralloc.h,
3327         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3328
3329 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3330
3331         * src/pic/device.c,
3332         * src/pic/device.h,
3333         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3334
3335 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3336
3337         * src/mcs51/gen.c (emitcode): fixed bug #992819
3338
3339 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3340
3341         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3342           there's no need to make it worse
3343
3344 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3345
3346         * src/mcs51/ralloc.c (deassignLR),
3347         * src/ds390/ralloc.c (deassignLR),
3348         * src/hc08/ralloc.c (deassignLR),
3349         * src/z80/ralloc.c (deassignLR),
3350         * src/pic/ralloc.c (deassignLR),
3351         * src/pic16/ralloc.c (deassignLR),
3352         * src/avr/ralloc.c (deassignLR),
3353         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3354         rlivePoint): fixed another part of bug #971834
3355
3356 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3357
3358         * src/z80/main.c: enabled "critical" keyword
3359         * src/z80/mappings.i,
3360         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3361         functions (fixes bug #979646)
3362         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3363
3364 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3365
3366         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3367           such as c:\mydir.
3368
3369 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3370
3371         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3372           doesn't disable too much optimizations
3373
3374 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3375
3376         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3377
3378 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3379
3380         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3381
3382 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3383
3384         * src/pic/gen.c tidied up tabs
3385         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3386         * src/pic/main.c tidied up tabs
3387         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3388         * src/pic/pcoderegs.c tidied up tabs
3389         * src/pic/ralloc.c tidied up tabs
3390
3391 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3392
3393         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3394         to S_FIXED for pic16 port and when symbol is not in level 0,
3395         allocate for S_REGISTER storage class and pic16 port, too,
3396         * src/pic16/device.h: prototype for checkSym,
3397         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3398         * (pic16_assignConfigWordValue): test the value and the mask to
3399         validate that the value is suitable for the configuration word,
3400         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3401         collect extern declared symbols, don't emit symbol twice, check
3402         first if symbol is in publics set first,
3403         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3404         * added command line '--fstack' which enables an experimental
3405         feature for stack access, too buggy to be used yet...
3406         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3407         * (pic16_allocDirReg): when register has storage class S_REGISTER
3408         allocate in pic16_dynAccessRegs,
3409         * device/include/pic16/pic18f????.h: modified configuration word
3410         naming convention, words started as CONFIG0H but should be CONFIG1H
3411
3412 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3413
3414         * device/include/mcs51reg.h: fixed bug 970993
3415
3416 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3417
3418         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3419         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3420         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3421         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3422         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3423         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3424           error/warning numbers,
3425           added function setWarningDisabled()
3426         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3427         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3428           _memcmp.c _memmove.c calloc.c realloc.c free.c
3429         * support/regression/tests/malloc.c: added tests for new functionality
3430         * support/regression/tests/zeropad.c: added tests for truncated initializers
3431           and initialized char arrays starting with '\x0'
3432         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3433
3434 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3435
3436         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3437
3438 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3439
3440         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3441         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3442         peephole 177.e. Thanks to anonymous
3443
3444 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3445
3446         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3447         function isn't used in the source but referenced as a
3448         variable initializer then declare it as extern in .asm file
3449
3450 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3451
3452         * .version: increased version number to 2.4.3
3453
3454         Adding version extension according to ChangeLog CVS revision
3455         * src/Makefile.in (target all): added dependency 'version.h'
3456         * (rule version.h): added rule to create version.h from ChangeLog,
3457         * (rule dep): added dependency version.h,
3458         * src/version.awk: AWK script to create version.h
3459         * src/SDCCdwarf2.c (dwWriteModule),
3460         * src/SDCCglue.c (initialComments),
3461         * src/SDCCmain.c (printVersionInfo): modified to write after
3462         version string the version extension number,
3463         * src/SDCCutil.c: included "version.h"
3464         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3465         number,
3466         * src/SDCCutil.h: added prototype for getBuildNumber
3467
3468         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3469         includeDirsSet, too,
3470         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3471         const char [] is found in function prototype...
3472
3473         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3474         moving to WREG with source is already in WREG,
3475         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3476         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3477         * (aopForSym): stack'ed symbols are partially supported, added
3478         if-clause to support symbols in FARSPACE,
3479         * (sameRegs): added test for AOP_ACC to see if registers are same,
3480         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3481         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3482         * (pic16_popRegFromString): will not allocate a new register if it
3483         doesn't find one by name, bug may have introduced...
3484         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3485         * (genIpush): revived to use pic16 port's stack,
3486         * (genAddrOf): added incomplete case for stack'ed operand,
3487         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3488         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3489         can handle multibyte operands,
3490         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3491         * (pic16initialComments): added message for MPLAB compatibility
3492         mode enabled,
3493         * src/pic16/main.h: prototype for pic16_mplab_comp,
3494         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3495         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3496         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3497         because of increased complexity of procedure,
3498         * (_process_pragma): stack pragma changed to format 'stack pos len',
3499         emit symbol '_stack_end' to conform with gplink,
3500         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3501         to search for register,
3502         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3503         PO_GPR_REGISTER,
3504         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3505         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3506         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3507         case for PO_GPR_REGISTER,
3508         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3509         dies, the new era is ahead !...
3510         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3511         pic16_dynInternalRegs,
3512         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3513         * (pic16_allocDirReg): minor optimizations and bug fixes,
3514         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3515
3516         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3517         load stack and frame pointer with address of 'stack_end' symbol
3518
3519 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3520
3521         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3522         without source code but only variable initializers
3523
3524 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3525
3526         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3527         external are not declared as extern to reduce overhead while linking
3528
3529 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3530
3531         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3532
3533 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3534
3535         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3536           Yee Keat for the patch
3537         * src/SDCCast.c (decorateType): fixed bug #979599
3538         * src/ds390/gen.h: removed local fReturnSizeDS390
3539         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3540         * src/ds390/gen.c (genAnd, genOr, genXor),
3541         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3542
3543 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3544
3545         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3546         add relFilesSet to $3, manipulate $2 to handle linking of object
3547         files without source files in command line,
3548         * device/include/pic16 (all headers): added ID location macros,
3549         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3550         entries for ID location bytes,
3551         * (pic16_assignIdByteValue): NEW,
3552         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3553         added field dumpcalltree to pic16_options_t,
3554         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3555         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3556         emitting rFalseIfx label after check_carry label,
3557         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3558         pic16_emitDIRegs), NEW
3559         * (pic16glue): dump .calltree file when option --calltree found,
3560         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3561         * (_pic16_genAssemblerPreamble): emit ID locations after
3562         configuration registers,
3563         * (pic16_linkCmd): modifications of the link command,
3564         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3565         * (pic16_pCodeInitRegisters): don't init stack registers,
3566         * (pic16_findPrevInstruction): fixed bug,
3567         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3568         bug with immediate registers,
3569         * (buildCallTree): traces stack push and pop,
3570         * (pct2): dump also stack usage for each function,
3571         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3572         * (pic16_allocDirReg): various modifications,
3573         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3574         fixed to 1,
3575
3576 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3577
3578         * src/pic16/pcode.c: removed buggy double colon
3579
3580 2004-07-01 Borut Razem <borut.razem AT siol.net>
3581
3582         * support/scripts/sdcc.nsi: added include/pic16 to setup
3583
3584 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3585
3586         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3587         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3588         target 'clean',
3589         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3590         specific command line arguments. Also added sample lkr script
3591         for placing a variable at a specific memory bank.
3592         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3593         at a specific memory bank,
3594         * (pic16_dump_isection): fixed bug which caused string literals to
3595         be omitted when dumping idata section,
3596         * (pic16_groupRegistersInSection): added code to handle registers
3597         in specific memory banks,
3598         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3599         public, all references are renamed too,
3600         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3601         AOP_DPTR2,
3602         * (pic16_storeForReturn): added case to handle when dest is WREG,
3603         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3604         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3605         pic16_rel_udata, check to see if that register is marked as being
3606         a member of a specific memory bank,
3607         * (pic16_printIvalCharPtr): added code to add string literals either
3608         to code or the idata sections,
3609         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3610         also accept the 'udata' pragma,
3611         * src/pic16/main.h: new structure types sectName and sectSym
3612         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3613         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3614         * (pic16_findPrevInstruction): fixed, it returned nothing,
3615         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3616         instruction combinations,
3617         * (pic16_FixRegisterBanking): heavily reorganised,
3618         * (pic16_AnalyzeBanking): if generating banksel directives is
3619         disabled, then don't call FixRegisterBanking at all,
3620         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3621         completely removed,
3622         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3623
3624 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3625
3626         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3627         Phuah Yee Keat <yk.phuah AT nestac.com>
3628
3629 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3630
3631         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3632         correctly the IVT even if it is relocated to some other location
3633
3634 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3635
3636         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3637         * device/include/pic16/pic18f2220.h: NEW,
3638         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3639         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3640         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3641         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3642         nodefaultlibs, ivt_loc is the location of the interrupt vector
3643         table, and nodefaultlibs signs that default libraries should not be
3644         linked in link stage,
3645         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3646         according to --ivt-loc argument,
3647         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3648         when pragma stack is found,
3649
3650 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3651
3652         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3653         256 (range check), 257 (do while), 258.a-f (bit banging
3654         f.e. on 3-wire SPI bus)
3655
3656 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3657
3658         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3659         variables used exclusively within a loop
3660
3661 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3662
3663         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3664
3665 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3666
3667         * src/SDCClrange.c (computeClash): fixed bug #971834
3668
3669 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3670
3671         * src/mcs51/gen.c (genCmp): fixed bug #975903
3672         * src/hc08/gen.c (operandsEqu),
3673         * src/ds390/gen.c (operandsEqu),
3674         * src/z80/gen.c (operandsEqu),
3675         * src/pic/gen.c (operandsEqu),
3676         * src/pic16/gen.c (operandsEqu),
3677         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3678         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3679
3680 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3681
3682         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3683
3684 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3685
3686         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3687         default case in switch statement,
3688         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3689         to eliminate problem with initialisation of pointers, but problem
3690         still exists,
3691         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3692         * (emitStaticSegment): removed various lines emitting debug info,
3693         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3694         added processor registers for utilizing EEPROM,
3695         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3696         configurable and set 8
3697
3698 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3699
3700         * .version: increased version number to 2.4.2,
3701
3702         Cumulative patch for pic16 port
3703         * src/pic16/device.c: changed scheme to dump initial values for
3704         variables in idata segment, all print_idata* functions were removed,
3705         now the pic16_printIval* will be called,
3706         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3707         * _pic16_printPointerType, pic16_printPointerType,
3708         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3709         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3710         NEW, similar to the respective functions in SDCCglue.c,
3711         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3712         way, emitting hex bytes,
3713         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3714
3715 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3716
3717         * src/avr/ralloc.c (serialRegAssign),
3718         * src/xa51/ralloc.c (serialRegAssign),
3719         * src/pic/ralloc.c (serialRegAssign),
3720         * src/pic16/ralloc.c (serialRegAssign),
3721         * src/hc08/ralloc.c (serialRegAssign),
3722         * src/z80/ralloc.c (serialRegAssign),
3723         * src/ds390/ralloc.c (serialRegAssign),
3724         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3725
3726 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3727
3728         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3729         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3730
3731 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3732
3733         Cumulative patch for pic16 port:
3734         * src/pic16/device.h (typedef PIC16_device) modified fields for
3735         defining microcontrollers,
3736         * src/pic16/device.c: added new info for all devices in Pics16 array,
3737         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3738         to be optimised out by the pCode optimiser,
3739         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3740         specially, bug reported by G.M. Gallant,
3741         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3742         as force'd so that cannot be optimised out by pCode optimiser,
3743         * src/pic16/pcode.c,
3744         * src/pic16/pcodepeeph.c,
3745         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3746         they are disabled by default, but can be enabled explicit with
3747         command argument --denable-peeps, for testing,
3748         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3749         --pomit-ivt in COMPILE_FLAGS
3750
3751 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3752
3753         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3754           compilation on MSVC
3755
3756 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3757
3758         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3759
3760 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3761
3762         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3763         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3764
3765 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3766
3767         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3768         would only assign 0x300001 register.
3769
3770 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3771
3772         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3773         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3774
3775 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3776
3777         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3778         for ds80c400
3779         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3780         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3781         added peephole 254 (left shift), 255 (jump table)
3782
3783 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3784
3785         * device/lib/Makefile.in: removed comment line with model-pic16,
3786         * (target port-specific-objects-pic16): the libraries and objects
3787         are copied to the build directory form the device/lib/pic16/bin
3788         directory
3789
3790         Cumulative patch concerning pic16 port:
3791         * library directory has been re-organized,
3792         * added support for PIC18F1220,
3793         * added headers and library sources for chips 18f1220,18f6520,
3794         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3795
3796         * configuration registers setting has changed, now each supported
3797         device has a complete description of the registers it uses,
3798         * all initialisations are moved to idata sections, these section
3799         can be absolute or relocatable,
3800         * fixed initialisation of codespace variables,
3801         * fixed warning about PCLATU and gpsim,
3802         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3803         * (genAssign): use table reads when assigning from variables in codespace,
3804         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3805         char/int variables placed in codespace,
3806         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3807         registers set in .asm file, no need for --pomit-config-words anymore,
3808         * (pic16glue): some 8051 legacy segments are commented out
3809         (to be removed completely),
3810         * added support for alternative assembler and linker with --asm=
3811         and --link= command line arguments,
3812         * peepholes are disabled automatically in the port, no need to
3813         specify on command line,
3814         * port supports natively char/int/long multiplication, but converts
3815         all divisions to support functions,
3816         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3817         to the file set in variable $2,
3818         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3819         strings in ASCII format and not in hex,
3820         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3821         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3822         allocate proper register if iCodes aren't temporary,
3823
3824 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3825
3826         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3827
3828 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3829
3830         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3831         is commented out
3832
3833 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3834
3835         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3836         computed address is reused
3837         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3838         multi-byte bitfields
3839
3840 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3841
3842         * src/z80/gen.c: (genArrayInit): must check for pointers too
3843
3844 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3845
3846         * support/regression/tests/zeropad.c: never meant to commit the
3847           nestedstruct test: removed, added check for GCC version
3848
3849 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3850
3851         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3852         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3853         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3854           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3855           bugs 928906 and 954082 half-empty initializers
3856         * src/SDCCsymt.h,
3857         * src/SDCCsymt.c (getAllocSize): added for above fix
3858         * src/z80/gen.c (genArrayInit): fixed bug 741044
3859         * support/regression/tests/zeropad.c: added tests
3860
3861 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3862
3863         * src/pic16/device.c (pic16_dump_section): corrected bug which
3864         caused some symbols of the libraries to be misplaced
3865
3866 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3867
3868         * src/pic16/glue.c,
3869         * src/pic16/ralloc.h,
3870         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3871         to fix conflict with pic port
3872
3873 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3874
3875         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3876         externs configuration variables,
3877         * src/pic16/ralloc.h,
3878         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3879         prototype in header, commented out some debug messages
3880
3881 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3882
3883         * src/pic16/glue.c,
3884         * src/pic16/main.c,
3885         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3886         for gpasm COFF object generation. Thanks to D. Hawkins for
3887         his patch info
3888
3889 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3890
3891         * src/ds390/main.c,
3892         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3893         Brock for spotting this)
3894         * src/ds390/gen.c (genEndFunction),
3895         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3896         interrupt handler and critical. Disable push/pop optimizations when
3897         peephole optimizations disabled.
3898
3899 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3900
3901         Updated pic16 library sources and headers.
3902         * device/lib/pic16/pic18f*/ ,
3903         * device/include/pic16/*.h: modified to handle structured SFR
3904         definitions
3905
3906 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3907
3908         * src/port.h (PORT structure): added hook initPaths, now each
3909         port can declare its own default search paths,
3910         which can been seen with the --print-search-dirs option,
3911         see pic16 port for example,
3912         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3913         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3914         * (doPrintSearchDirs): NEW, replaces in a central manner the
3915         printing of search dirs which was split in set*Paths functions,
3916         * (main): added call to port->initPaths and doPrintSearchDirs,
3917         * src/avr/main.c,
3918         * src/ds390/main.c,
3919         * src/hc08/main.c,
3920         * src/izt/i186.c,
3921         * src/izt/tlcs900h.c,
3922         * src/mcs51/main.c,
3923         * src/pic/main.c,
3924         * src/pic16/main.c: modified port structures to reflect addition of
3925         initPaths hook,
3926
3927         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3928         * (pic16_dump_section): for registers in same address reserve memory once,
3929         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3930         to no_banksel,
3931         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3932         result is greater in size than right or left,
3933         * (pic16_genUMult8X8_8): there are some cases where the result can
3934         be 16 bits size, so handle these,
3935         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3936         * (pic16_outBitC): modified to emit pcodes,
3937         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3938         or not,
3939         * (genDivOneByte): implemented algorithm to divide 8-bits,
3940         * (genCmp): uncommented goto, but issues still exist,
3941         * (genAnd): fixed a bug with variables >8bits,
3942         * (genPackBits): optimization added that uses BCF/BSF to change a
3943         single bit,
3944         * (genAssign): fixed bug when assigning floating point literals,
3945         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3946         __sdcc_gsinit_startup label,
3947         * src/pic16/main.c (_pic16_init): removed search directory
3948         initialisations,
3949         * (_pic16_initPaths): NEW, used to initialise search directories,
3950         * (_hasNativeMulFor): support functions for all except char/int
3951         multiplication, and char division,
3952         * (PIC16_port struct): modified entry for native mul support,
3953         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3954         no_banksel option,
3955         * (buildCallTree): call to register_usage is ifdef'ed out,
3956
3957 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3958
3959         * device/include/string.h: applied Stas Sergeev's patch to make this
3960         header file compatible with the preprocessor -Wundef option
3961         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3962         failure (fixes bug #941458)
3963
3964 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3965
3966         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3967         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3968         that the variable, not the function, should be static
3969         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3970         to be consistent with non-literal case
3971
3972 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3973
3974         * src/SDCCast.c (isConformingBody): fixed bug #949967
3975         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3976         convilong): fixed bug #952086
3977
3978 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3979
3980         * src/SDCCmem.c (allocVariables): fixed bug #955321
3981
3982 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3983
3984         * src/hc08/main.c (_hc08_genAssemblerEnd),
3985         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3986         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3987         completely eliminated the use of a temporary file
3988         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3989         when more than one file linked
3990         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3991
3992 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3993
3994         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3995         which fixes bug #543481
3996         * support/regression/tests/bug-751703.c: fixed comments left from a
3997         cut and paste error
3998         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3999         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4000         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4001         scopes
4002         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4003         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4004         are now changed to underscores in moduleName
4005
4006 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4007
4008         * as/mcs51/lkmem.c: better fix for bug #954173
4009
4010 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4011         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4012
4013         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4014         * device/include/c8051f000.h,
4015         * device/include/c8051f120.h,
4016         * device/include/c8051f300.h,
4017         * device/include/c8051f310.h,
4018         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4019         PWM16) and detab'ed
4020
4021 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4022
4023         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4024         and mailing lists, doc'ed --no-peep-comments, removed reference
4025         to knoppix (newest version has no LyX/LaTeX), other minor changes
4026         * src/SDCCglue.c (glue): save 2 bytes stack space with
4027         option --main-return. The ljmp could probably be avoided too
4028
4029 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4030
4031         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4032
4033 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4034
4035         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4036         * src/SDCCopt.c (isLocalWithoutDef),
4037         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4038         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4039         (credit to Maarten Brock for patch #949363, on which this is based)
4040         * support/regression/tests/bug-751703.c: some test cases of extern used
4041         within inner scopes.
4042
4043 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4044
4045         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4046         SPEC_STRUCT
4047         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4048         struct definitions
4049         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4050         dwWriteLabel): fix to create valid debugger symbols even when
4051         the module name has non-alphanumeric symbols in it
4052         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4053         when a variable's allocation has been optimized away
4054
4055
4056 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4057
4058         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4059         * src/hc08/main.c,
4060         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4061         * src/mcs51/main.c,
4062         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4063         * src/ds390/main.c,
4064         * src/z80/gen.c (z80_emitDebuggerSymbol),
4065         * src/z80/main.c,
4066         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4067         * src/pic/main.c,
4068         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4069         * src/pic16/main.c,
4070         * src/avr/gen.c (avr_emitDebuggerSymbol),
4071         * src/avr/main.c,
4072         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4073         * src/xa51/main.c,
4074         * src/SDCCdebug.c (emitDebuggerSymbol),
4075         * src/SDCCdebug.h,
4076         * src/port.h: added a debugger struct to the port struct. Added a
4077         callback for defining debugger symbols
4078
4079         * src/SDCCast.c (createLabel),
4080         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4081         with isitmp = 1
4082         * src/SDCCicode.h,
4083         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4084         iCode back to the ast for the function
4085
4086         * src/hc08/ralloc.c (hc08_assignRegisters),
4087         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4088         unneeded fields from the regs struct.
4089         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4090         pushReg() & pullReg() functions instead of emitcode()
4091
4092         * src/hc08/gen.c (genLabel, genhc08Code),
4093         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4094
4095         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4096         debugger hooks
4097
4098         * src/hc08/gen.c (genEndFunction, genhc08Code),
4099         * src/hc08/gen.h,
4100         * src/mcs51/gen.c (genEndFunction, gen51Code),
4101         * src/mcs51/gen.h,
4102         * src/ds390/gen.c (genEndFunction, gen390Code),
4103         * src/ds390/gen.h,
4104         * src/z80/gen.c (genEndFunction, genZ80Code),
4105         * src/z80/gen.h,
4106         * src/z80/z80.h,
4107         * src/pic/gen.c (genEndFunction, genpic14Code),
4108         * src/pic/gen.h,
4109         * src/pic16/gen.c (genEndFunction, genpic16Code),
4110         * src/pic16/gen.h,
4111         * src/avr/gen.c (genEndFunction, genAVRCode),
4112         * src/avr/gen.h,
4113         * src/xa51/gen.c (genEndFunction, genXA51Code),
4114         * src/xa51/gen.h,
4115         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4116         specific code to cdbFile.c and out of the backend code generators
4117
4118         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4119         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4120         starting address is now 0
4121
4122         * as/hc08/asm.h,
4123         * as/hc08/m08pst.c,
4124         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4125         assembler directive for DWARF support
4126         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4127
4128         * src/src.dsp,
4129         * src/Makefile.in,
4130         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4131
4132 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4133
4134         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4135         and inappropriate peephole optimization in jump tables
4136
4137 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4138
4139         * as/hc08/m08pst.c,
4140         * src/SDCCglue.c: sdccopt works for the hc08 port now
4141
4142 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4143
4144         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4145
4146 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4147
4148         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4149
4150 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4151
4152         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4153         rules
4154         * src/SDCCmain.c,
4155         * src/SDCCglobl.h,
4156         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4157         comments from the peephole optimizer replacement rules
4158         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4159         symbols
4160         * src/SDCCcse.c (updateSpillLocation),
4161         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4162         equivalents
4163         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4164         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4165         objects far pointers
4166
4167 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4168
4169         * src/SDCCsymt.h: a missing part of my last change
4170         * src/pic/ralloc.c (regTypeNum),
4171         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4172
4173 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4174
4175         * src/SDCCicode.h,
4176         * src/SDCCicode.c (aggrToPtrDclType),
4177         * src/SDCCptropt.h,
4178         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4179         ptrPseudoSymConvert),
4180         * src/pic/ralloc.c (regTypeNum),
4181         * src/pic16/ralloc.c (regTypeNum),
4182         * src/hc08/ralloc.c (regTypeNum),
4183         * src/ds390/ralloc.c (regTypeNum),
4184         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4185         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4186
4187 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4188
4189         * link/z80/lkmain.c (afile),
4190         * as/hc08/lkmain.c (afile),
4191         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4192         prevent a pointer problem when a filename has no directory and
4193         no extension specified.
4194
4195 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4196
4197         * link/z80/lkmain.c (afile): allow periods in directory names
4198         * link/z80/lkmain.c (afile),
4199         * as/mcs51/lkmain.c (afile),
4200         * as/hc08/lkmain.c (afile): allow linker script file to have an
4201         extension other than ".lnk"
4202         * link/z80/lklex.c (getfid),
4203         * link/z80/lkmain.c (parse),
4204         * as/mcs51/lklex.c (getfid),
4205         * as/mcs51/lkmain.c (parse),
4206         * as/hc08/lklex.c (getfid),
4207         * as/hc08/lkmain.c (parse): Support comments in the linker script
4208         file on lines by themselves and after filenames
4209
4210 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4211
4212         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4213
4214 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4215
4216         * src/z80/peeph-z80.def: removed some peephole rules that don't
4217         work with multibyte arithmetic (fixed bug #937126)
4218         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4219         to registers and not global variables
4220         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4221         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4222         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4223         checking for assignments not internally generated (fixed bug #931895)
4224         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4225         structure member (fixed bug #930072)
4226
4227 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4228
4229         * src/SDCCmain.c (linkEdit),
4230         * src/hc08/main.c (_hc08_parseOptions),
4231         * as/hc08/Makefile.in,
4232         * as/hc08/aslink.h,
4233         * as/hc08/asm.h,
4234         * as/hc08/m08pst.c,
4235         * as/hc08/lkrloc.c (relr, rele),
4236         * as/hc08/lkarea.c (lnkarea)
4237         * as/hc08/lkmain.c (afile, parse),
4238         * as/hc08/lkelf.c: support for ELF output
4239         * as/hc08/lks19.c (s19),
4240         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4241
4242 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4243
4244         * as/mcs51/lkihx.c: Fixed bug #899105.
4245
4246 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4247
4248         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4249         .dsp files from Unix to DOS.
4250
4251 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4252
4253         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4254         function pointers; we have been compliant for several months now.
4255         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4256         change that was accidently commented out
4257         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4258         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4259         bug #922319
4260
4261 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4262
4263         * src/hc08/gen.c: output of all of the internal debugging information
4264         is now controlled by the D() macro; it is disabled by default
4265
4266 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4267
4268         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4269         harder to keep the same registers during a CAST iCode
4270         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4271         long via int can be done in a single cast, if the signedness is
4272         correct.
4273         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4274         putchar() in tinibios.c in ds390's library
4275
4276 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4277
4278         * src/SDCCast.c (decorateType): fixed bug #898889,
4279         cast result of a literal complement too
4280         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4281         fixed check for bitfields
4282
4283 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4284
4285         * src/SDCCicode.c (geniCodeLogic): made it static,
4286         (geniCodeLogicAndOr): added in order to fix bug #905492,
4287         (ast2iCode): fixed bug #905492
4288         * support/regression/tests/bug-905492.c: added
4289         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4290         (processParms): fixed bug #927659: don't copy parms, this will clear
4291         decorated flag
4292         * support/regression/tests/bug-927659.c: added
4293
4294 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4295
4296         * src/SDCCast.c (addCast): don't cast float to char
4297         * device/lib/libsdcc.lib: added _memmove
4298
4299 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4300
4301         * device/lib/large/Makefile: fixed parallel execution by
4302         replacing `make` by `$(MAKE)`
4303
4304 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4305
4306         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4307         offsets (fixes bug #923936)
4308
4309 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4310
4311         * device/lib/small/Makefile: fixed parallel execution by
4312         replacing `make` by `$(MAKE)`
4313
4314 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4315
4316         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4317
4318 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4319
4320         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4321         * src/regression/Makefile: Regression test was not running.
4322
4323 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4324
4325         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4326         complement if possible
4327         * src/SDCCval.c (valComplement),
4328         * src/SDCCicode.c (operandOperation): fixed complement of literal
4329         * support/regression/tests/onebyte.c (testComplement): added
4330
4331 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4332
4333         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4334         return an optimized tree; actually replace actParm with the new tree
4335         * src/SDCCast.h: added some parantheses to remove side effects
4336         * support/regression/tests/bug-920866.c
4337
4338 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4339         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4340         Bit operands were not being handled properly in the pic14 port.
4341         (now src/regression/add.c passes again).
4342
4343 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4344
4345         * src/SDCC.y (labeled_statement): case and default no longer require
4346         a following statement (RFE #893037)
4347
4348 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4349
4350         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4351         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4352         disabled (fixes bug #916294)
4353         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4354         "mov a,acc"; patch provided by Lenny Story
4355         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4356
4357 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4358
4359         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4360         functions
4361         * src/ds390/gen.c (genFunction, genEndFunction),
4362         * src/ds390/ralloc.c (ds390_assignRegisters),
4363         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4364         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4365         pushed if there are parameters passed on the stack. Also, a cleaner
4366         way to decide if r0/r1 should be pushed/popped. (Together they fix
4367         bug #918693)
4368
4369 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4370
4371         * doc/sdccman.lyx,
4372         * device/lib/mcs51/crtpagesfr.asm,
4373         * device/lib/mcs51/crtxinit.asm,
4374         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4375         to avoid confusion with Si Lab's SFRPAGE register.
4376
4377 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4378
4379         * src/SDCCglue.c (emitMaps): allow public sfr variables
4380         * src/SDCCglue.c (initialComments): include compiler build date
4381         with compiler version and put the timestamp of the generated
4382         assembly file on a serperate line to be less confusing.
4383         * src/port.h: added genInitStartup hook
4384         * src/avr/main.c,
4385         * src/ds390/main.c,
4386         * src/hc08/main.c,
4387         * src/pic/main.c,
4388         * src/pic16/main.c,
4389         * src/xa51/main.c,
4390         * src/z80/main.c: genInitStartup initialize as NULL (default to
4391         historical behaviour)
4392         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4393         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4394         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4395         library instead of hard coding it into the compiler.
4396         * support/regression/ports/mcs51-stack-auto/spec.mk,
4397         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4398         * device/lib/mcs51/Makefile,
4399         * device/lib/small/Makefile,
4400         * device/lib/large/Makefile,
4401         * device/lib/mcs51/crtpagesfr.asm,
4402         * device/lib/mcs51/crtstart.asm,
4403         * device/lib/mcs51/crtxclear.asm,
4404         * device/lib/mcs51/crtxinit.asm,
4405         * device/lib/mcs51/crtclear.asm,
4406         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4407         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4408         and into user configurable files.
4409         * device/lib/clean.mk: clean mcs51 directory too
4410         * support/regression/tests/longlit.c: added static to T1 declaration
4411         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4412         accesses in the initialization code
4413
4414 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4415
4416         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4417         OSCTRIMVAL as noted in bug #916008
4418
4419 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4420
4421         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4422         in loops with multiple exits (reported as incorrect registers
4423         used by Martin Helmling in Sdcc-user list)
4424
4425 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4426
4427         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4428         made ds390 register extensions look less like error messages
4429
4430 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4431
4432         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4433         reported by Adam Wozniak in Sdcc-user list
4434
4435 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4436
4437         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4438         arithmetic optimizations, added debug output
4439
4440 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4441
4442         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4443         * sdcc.spec: updated and split sdcc into 3 rpms
4444         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4445         needed for literals of LEFT_OP and '+'
4446         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4447         introduced RESULT_TYPE_NOPROM
4448         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4449         left shift
4450         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4451         limited promotion to int only for '*'
4452         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4453
4454 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4455
4456         * src/pic16/gen.c (genSkip),
4457         (genc16bit2lit), (gencjneshort): commented out
4458         (is_LitOp): new helper function, checks operand type
4459         (genCmpEq): rewritten
4460
4461 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4462
4463         * support/regression/tests/bug-908454.c: added
4464
4465 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4466
4467         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4468         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4469         (geniCodeCast): cosmetic, don't preserve bit storage class
4470         (geniCodeLeftShift): added promotion
4471         (geniCodeLogic): fixed regression
4472         * src/SDCCsymt.c (computeTypeOr): accept bits too
4473         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4474
4475 2004-03-07  Borut Razem <borut.razem AT siol.net>
4476
4477         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4478
4479 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4480
4481         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4482         version of pic16_genPackRegisters which does not check if ic is a
4483         CAST operator,
4484         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4485         function cause string1.c regression test fails
4486
4487 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4488
4489         * sim/ucsim/configure.in,
4490         * sim/ucsim/configure,
4491         * sim/ucsim/doc/Makefile.in: use docdir
4492         * src/SDCC.y: fixed sbit atrributes
4493         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4494         * src/SDCCast.c (decorateType): |^& need special promotion handling
4495         * src/SDCCast.h,
4496         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4497         * src/SDCCsymt.h (computeType),
4498         * src/SDCCicode.c: computeType() needs op
4499         * src/SDCCsymt.c (checkTypeSanity),
4500         * doc/sddman.lyx: "plain" bitfields are unsigned
4501         * src/SDCCsymt.c (computeTypeOr): added
4502         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4503         |^& ops
4504         * src/SDCCval.c (val*): computeType() needs op
4505         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4506         * support/regression/tests/onebyte.c: added tests for |^&
4507
4508 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4509
4510         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4511         for writing icode into asm output.
4512
4513 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4514
4515         * src/pic16/device.c: added some debug lines enabled
4516         with macro DEBUG_CHECK,
4517         * src/pic16/genarith.c: more debug in genPlus,
4518         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4519         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4520         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4521         * (aopForSym): onStack symbols are re-placed in data memspace,
4522         and onStack flag is cleared,
4523         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4524         copy temporary pcodeop,
4525         * (genPcall): added warning for not updating PCLATU,
4526         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4527         always true for pic16 port,
4528         * (genMultOneWord): NEW, supports integer multiplication,
4529         * (genMult): modified to call genMultOneWord,
4530         * (ifxForOp): added warning when return NULL,
4531         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4532         flag is set before call to operandFromSymbol for implicit
4533         added structures,
4534         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4535         options.intlong_rent are set by default,
4536         * (_hasNativeMulFor): modified to allow port generation of integer
4537         multiplication,
4538         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4539         set regtype to REG_SFR for all registers, restricting seting the
4540         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4541
4542 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4543
4544         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4545         more than 500 times in the regression tests
4546
4547 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4548
4549         * support/Util/SDCCerr.h,
4550         * support/Util/SDCCerr.c,
4551         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4552         enumerator_list),
4553         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4554         for symbol conflicts.
4555         * support/valdiags/tests/enum.c,
4556         * support/valdiags/tests/tentdecl.c,
4557         * support/valdiags/tests/struct.c: expect possible error messages
4558         referring to original symbol definitions.
4559         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4560         * src/SDCCsymt.h,
4561         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4562
4563 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4564
4565         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4566
4567 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4568
4569         * src/pic16/ralloc.c (newReg): fixed bug #908929
4570
4571 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4572
4573         * src/ds390/gen.c: added missing #include "main.h"
4574
4575 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4576
4577         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4578         checking if symbol is already in set,
4579         * src/pic16/device.h: prototype for checkAddSym,
4580         * src/pic16/gen.c: (_G): added entry interruptvector,
4581         * (assignResultValue): removed some commented out lines,
4582         * (genFunction): check for ISR via sym->type, absolute section for
4583         interrupt code is created via a new pBlock, the goto instruction is
4584         placed now correctly at the interrupt vector position, changed all
4585         references from ivec to _G.interruptvector,
4586         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4587         is the interrupt is a high priority one, same for return from ISR,
4588         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4589         externs to calls of checkAddSym,
4590         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4591         pic16_pcode_verbose flag is set,
4592         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4593         * src/pic16/pcoderegs.c: message about how many registers are saved
4594         will only be emitted if pic16_pcode_verbose flag is set,
4595
4596 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4597
4598         * src/ds390/ralloc.h,
4599         * src/ds390/ralloc.c (ds390_regWithIdx),
4600         * src/ds390/gen.c (emitcode),
4601         * src/ds390/main.h,
4602         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4603         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4604         ds390operandCompare, getRegsRead, getRegsWritten,
4605         initializeAsmLineNode): customized instruction size calculation for
4606         ds390, started basis for some register optimizations
4607         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4608         corresponding assembly output
4609         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4610         missing push/pop of r0/r1. Optimized push/pops
4611
4612 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4613
4614         * src/mcs51/main.c (instructionSize): fixed ACALL size
4615         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4616
4617 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4618
4619         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4620         the sorting of rlist with NULL elements
4621         * (print_idataType, print_idata): NEW to create idata sections
4622         * src/pic16/device.h: idataSymSet new variable
4623         * src/pic16/gen.c (genFunction): fixed some bugs in string
4624         comparing, improved the absolute section creation for ISRs,
4625         added FSR0L/FSR0H in registers that are saved in an ISR,
4626         * (genInline): fixed the processing of inline snippets,
4627         now they undergo no process by the peephole optimizer
4628         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4629         are placed in idataSymSet,
4630         * (pic16emitStaticSeg): extern symbols are added in externs,
4631         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4632         switching when aboslute variables are placed in access bank memory
4633         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4634         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4635         commented out with #if,
4636         * (pic16_packRegisters): reintroduce the check for CAST because some
4637         symbols are not correctly handled,
4638         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4639         pCodeInstruction instead of pCode,
4640         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4641         pCodeAsmDir definition,
4642         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4643         directive, then the argument directive is emitted without the leading
4644         tab, hack for inline labels which must be in the first column,
4645         * (compareLabel,pic16_findNextInstruction),
4646         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4647         * (insertBankSwitch): modified for the new pCodeAsmDir,
4648
4649 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4650         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4651
4652         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4653         instance,
4654         * (pushSide): commented out with #if,
4655         * (assignResultValue): fixed some typos in saving
4656         registers,
4657         * (genPcall): FIXED and sync'ed with genCall,
4658         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4659         * (genNearPointerGet): fixed to handle some more cases,
4660         implementation scheme via table reads,
4661         * (genConstPointerGet): modified to access code memory correct,
4662         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4663         and improved to handle some cases
4664         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4665         instead of "RETLW" for init data
4666         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4667         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4668         variables are placed in access bank memory (<0x80 and >=0xf80),
4669         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4670         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4671         TBLWT_POSTDEC,TBLWT_PREINC
4672         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4673         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4674         directives
4675         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4676         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4677         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4678         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4679
4680 2004-02-29  Borut Razem <borut.razem AT siol.net>
4681
4682         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4683         support/Util/findme.h, support/Util/system.h: enhance binary relative
4684         search for lib and include by using findProgramPath()
4685
4686 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4687
4688         * src/SDCCpeeph.h,
4689         * src/SDCCpeeph.c (pcDistance),
4690         * src/port.h,
4691         * src/mcs51/ralloc.h,
4692         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4693         * src/mcs51/main.h,
4694         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4695         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4696         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4697         size calculation port specific, started basis for some register
4698         optimizations
4699         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4700         missing push/pop of r0/r1. Optimized push/pops
4701         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4702         * device/lib/_modsint.c (_modsint),
4703         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4704         and stack version so regression tests pass
4705
4706 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4707
4708         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4709         * src/SDCCast.c (decorateType): catch another small optimization
4710         with '?' operator
4711         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4712         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4713         modified to finally use computeType() all over SDCC,
4714         see Feature Request #877103
4715         * src/SDCCval.h: cosmetic
4716         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4717         valCompare(); regression tested in muldiv.c
4718         * support/regression/tests/muldiv.c (testMod): mod sign follows
4719         dividend only
4720
4721 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4722
4723         * src/SDCCast.c (decorateType): fixed bug #902362
4724         * doc/INSTALL.txt: fixed install instructions for win32
4725
4726 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4727
4728         * device/include/Makefile.in (install): fixed by replacing spaces
4729         by tabs
4730         * doc/README.txt,
4731         * doc/INSTALL.txt: updated for release
4732         * doc/sdccman.lyx: added warning for --xstack being buggy
4733
4734 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4735
4736         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4737         to eliminate build warnings.
4738         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4739
4740 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4741            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4742
4743         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4744         removed -penable-stack, added comment for stack pragma, added
4745         warning for not initializing the stack/frame registers, removed
4746         comment at interrupts section
4747
4748         Stack is made permanent, there is no ability to disable stack usage.
4749         * src/pic16/device.h,
4750         * src/pic16/device.c: removed all references to USE_STACK macro,
4751         * src/pic16/device.c (pic16_dump_section): when no elements in
4752         rlist, free rlist before return,
4753         * (pic16_dump_int_registers): NEW, internal registers are a new set
4754         of general purpose registers reused by each function,
4755         * (checkAddReg): returns 1 if registers is added to set,
4756         * (pic16_groupRegistersInSection): when a registers is of type
4757         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4758         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4759         SRCASECMP macro is moved here from device.c
4760         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4761         PO_PCLATU, PO_PRODL, PO_PRODH,
4762         * (pic16_pCodeOpType, genMinus,
4763         changed compares to "a" register, with AOP_ACC,
4764         * (pic16_genPlus): fixed some bugs and indented properly,
4765         * (pic16_addSign): changed size to size+offset in the MOVWF
4766         instruction,
4767         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4768         multiply 8-bit operand by literal, result is 8-bit,
4769         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4770         multiply 2 8-bit operand, result is 8-bit,
4771         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4772         genUMult8X*_16,
4773         * src/pic16/gen.c: changed accUse to contain WREG only,
4774         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4775         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4776         true, do not use immediate addressing any more unless sym is a
4777         pointer in codespace,
4778         * (aopForRemat): do not use immediate addressing when symbol not in
4779         codespace and when symbol's address is requested,
4780         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4781         accUse size (= 1),
4782         * (aopGet): added case for AOP_ACC and don't return "accumulator
4783         bug" but WREG instead,
4784         * (popGetTempReg): pushes contents of temporary register in stack,
4785         * (popReleaseTempReg): pops contents of temporary register from
4786         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4787         * (pic16_popGet): separated case AOP_ACC to return register WREG
4788         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4789         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4790         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4791         the use of immediate pointers to certain cases only.
4792
4793         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4794         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4795         * (assignResultValue, genCall, genRet): modified to use the new
4796         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4797         genPcall is still broken,
4798         * (genFunction): added code to create 'A' type pBlocks when
4799         interrupt functions are generated, code not extensively tested yet,
4800         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4801         * (genEndFunction): modified so ISRs pop stored registers from stack,
4802         * (genMultOneByte): cleanup,
4803         * (AccRsh): added flag andmask, to and result with appropriate mask,
4804         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4805         * (genDataPointerGet): fixed and reenabled its use,
4806         * (genNearDataPointerGet): bugs fixed,
4807         * (genDataPointerSet): bugs fixed,
4808         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4809         pic16_DumpSymbol, pic16_DumpOp,
4810         * src/pic16/genutils.h: function prototypes for the above functions,
4811         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4812         pointers,
4813         * (pic16emitRegularMap): many many many improvements, but needs a
4814         major cleanup,
4815         * src/pic16/main.c: enable_stack in pic16_options is removed,
4816         * (_pic16_parseOptions): removed command line options -penable-stack,
4817         * (_process_pragma): emit stack symbol only when stack pragma is
4818         processed,
4819         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4820         redirected to FSR0L/FSR0H pair,
4821         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4822         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4823         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4824         for immediates,
4825         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4826         * (dumpPicOptype): NEW,
4827         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4828         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4829         with movff instruction,
4830         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4831         added pic16_int_regs, some packRegsFor* functions are commented out,
4832         because produce errors,
4833         * src/pic16/NOTES: minor modifications
4834
4835 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4836
4837         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4838         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4839         --pack-iram.
4840         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4841         * as/mcs51/lkaomf51.c: fixed bug #895763
4842
4843 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4844
4845         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4846
4847 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4848
4849         * doc/sdccman.lyx: added details about the HC08 storage classes and
4850         interrupts, fixed the register usage info for z80 & gbz80
4851
4852 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4853
4854         * doc/sdccman.lyx: added more pic16 port documentation
4855         * device/include/pic16/: added header pic18fregs.h
4856
4857 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4858
4859         * doc/sdccman.lyx: added Vangelis' contribution
4860
4861 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4862
4863         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4864         extend to the next CALL or PCALL, not just to the next CALL.
4865
4866 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4867
4868         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4869
4870 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4871
4872         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4873         bug #895752 and a better fix for bug #716790
4874
4875 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4876
4877         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4878
4879 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4880
4881         * doc/sdccman.lyx: minor changes, minor changed
4882
4883 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4884
4885         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4886         which can't handle SDCC_NEWONEBYTEOPS,
4887         (geniCodeMultiply): removed conversion from mult to shift for pic14
4888         and pic16
4889
4890 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4891
4892         * src/hc08/gen.h,
4893         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4894         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4895         thus fixing bug #895406
4896
4897 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4898
4899         * device/lib/_modsint.c,
4900         * device/lib/_modslong.c: sign follows divisor only
4901         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4902         signs or signedness can be ignored
4903         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4904         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4905         added optimization for IFX,
4906         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4907         arguments;
4908         reenabled optimization for IFX, which was removed on 2004-01-11
4909         * src/SDCCast.h: added return type IFX
4910         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4911         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4912         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4913         SDCC_OLDONEBYTEOPS selects the old behaviour
4914         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4915         changed again and commented promotion rule
4916         * src/SDCCval.c (valDiv): promotion no longer necessary
4917         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4918         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4919         rewritten
4920         * support/regression/tests/onebyte.c: added
4921
4922 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4923
4924         * gen.c (genInline): reverted to old code for assemnling inline
4925         code because of bug reported James Chadd
4926
4927 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4928
4929         * ralloc.h: missing declarations from previous patch,
4930         seems that patch for ralloc.h was never applied, fixed
4931
4932 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4933            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4934
4935         * pcode.c,
4936         * pcode.h,
4937         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4938         indirect addressing. Marked FSR0 as deprecated
4939         * gen.c (pointerCode): commented out, not needed now
4940         (pic16_popGet2p): new MOVFF helper function
4941         (genGenPointerGet),
4942         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4943         (shiftRLong): removed duplicate debugging info
4944
4945 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4946
4947         * src/ds390/gen.c (genNearPointerGet),
4948         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4949         optimization with bits, but not bitfields.
4950         * src/ds390/ralloc.c (packRegisters),
4951         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4952
4953 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4954
4955         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4956
4957 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4958
4959         * src/SDCCsymt.h,
4960         * src/SDCCicode.c (operandFromSymbol),
4961         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4962         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4963         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4964         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4965         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4966         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4967         bug #892038
4968         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4969         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4970         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4971         * src/SDCCsymt.c (newSymbol),
4972         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4973         enumerator_list),
4974         * src/SDCCval.h,
4975         * src/SDCCval.c (newiList): fixed bug #885705
4976
4977 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4978
4979         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4980         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4981
4982 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4983
4984         * device/include/c8051f120.h,
4985         * device/include/c8051f300.h,
4986         * device/include/c8051f310.h: added/updated header files for Silicon
4987         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4988         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4989         in new section Submitting patches
4990
4991 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4992
4993         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4994         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4995         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4996         genGenPointerSet),
4997         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4998         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4999         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5000         genGenPointerSet),
5001         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5002         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5003         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5004         genGenPointerSet),
5005         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5006         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5007         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5008         genGenPointerSet): fixed bug #892400
5009         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5010         to eliminate build warnings.
5011         * src/SDCCast.c (processParms),
5012         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5013         fixed bug 751859
5014         * support/valdiag/valdiag.py: added GCC to the list of defines active
5015         when compiling with gcc
5016
5017 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5018
5019         * support/Util/SDCCerr.h,
5020         * support/Util/SDCCerr.c,
5021         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5022         with an incomplete type (fixed bug #883734)
5023         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5024
5025 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5026
5027         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5028
5029 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5030
5031         * src/SDCCast.c (decorateType),
5032         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5033         function pointer implementation
5034         * support/regression/tests/funptrs.c: added tests to verify both forms
5035         of function pointers work correctly. Added tests to verify parameters
5036         are passed in the correct order.
5037
5038 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5039
5040         * device.c (regCompare): registers are sorted by ascending
5041         address and increasing size,
5042         * main.c (_pic16_finaliseOptions): removed the declaration
5043         of compiler macro MCU. Now a macro of the format pic18fxxxx
5044         will be defined from the command line
5045
5046 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5047             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5048
5049         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5050         PCOP_RLCF was overwritten!
5051         * gen.c (genSkip): commented out calls to pic16_emitcode,
5052         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5053         * (genlshTwo),
5054         * (genRRC): added debugging info,
5055         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5056         overwritten while shifting,
5057         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5058         overwritten while shifting,
5059         * (AccLsh),
5060         * (AccRsh),
5061         * (shiftLLeftOrResult),
5062         * (shiftRLeftOrResult),
5063         * (shiftRLong),
5064         * (shiftLLong): Implemented with pic16_emitpcode
5065         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5066         * (genLeftShift): Fixed bug, operand for shift by variable always
5067         was "and"ed with 0x0f,
5068         * (genLeftShiftLiteral),
5069         * (genrshTwo),
5070         * (genRightShiftLiteral): added debugging info,
5071         * (genrshFour): added comment,
5072         * (genRightShift): determined signedness from operand "left"
5073         instead of "result"
5074
5075 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5076
5077         * src/SDCCicode.c (geniCodeParms),
5078         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5079         function pointers, fixed function pointer bugs #861242 and #861896
5080
5081 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5082
5083         * device/include/c8051f000.h,
5084         * device/include/c8051f120.h,
5085         * device/include/c8051f300.h: added header files for Silicon
5086         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5087
5088 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5089
5090         * src/SDCCast.c (processParams): added new type flow and restructured
5091         (gatherAutoInit): added new type flow
5092         (addCast): cosmetic changes
5093         (getLeftResultType): added new type flow for array indices, patch
5094         provided by Stas, see FR #877103
5095         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5096         array index patch by Stas
5097         * src/SDCCast.h: added prototype getResultTypeFromType()
5098         * src/SDCCval.h,
5099         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5100         * src/pic/glue.c (pic14emitStaticSeg),
5101         * src/pic16/glue.c (pic16emitStaticSeg),
5102         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5103         for initialization of symbols
5104         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5105         * support/Util/SDCCerr.h:
5106         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5107         * .version: bumped version number to 2.3.8
5108         * device/include/Makefile.in (install),
5109         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5110         avoid warnings
5111
5112 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5113
5114         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5115         Slade Rich fixed an optimization bug
5116         * src/pic/pcodepeep.c,
5117         * src/pic/pcoderegs.c
5118         * doc/Makefile (install): added test for directory
5119
5120 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5121
5122         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5123         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5124         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5125         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5126         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5127         * as/mcs51/asexpr.c (term),
5128         * as/hc08/asexpr.c (term): fixed bug #887146
5129
5130 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5131
5132         * src/z80/gen.c (genMult): handle single byte result product
5133         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5134         DUMMY_READ_VOLATILE (fixed bug #886367)
5135
5136 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5137
5138         * support/regression/tests/libmullong.c: fixed logic, on little endian
5139         hosts we ended without a mullong_wrapper()
5140
5141 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5142
5143         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5144         virus/worm forged address usage.
5145
5146 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5147
5148         Fixed promotion, it should be done on AST level:
5149         * src/SDCCast.c (addCast): added promotion to int
5150         (decorateType): updated call to upCast()
5151         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5152         usualUnaryConversions()
5153
5154 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5155
5156         * support/regression/tests/literalop.c (mulWrapper): Added a
5157         wrapper to remove integer overflow warnings.
5158
5159         * support/regression/tests/float_trans.c: Made work on host.
5160
5161         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5162         location of sz80.
5163
5164         * support/regression/generate-cases.py (main): Changed from inline
5165         to a main method.
5166
5167         * doc/Makefile (install): Changed to depth first to get rid of
5168         missing directory install warning.
5169
5170         * as/Makefile (install-doc): Made work on Mac.
5171
5172 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5173
5174         * src/SDCCast.c: added an additional type flow in decorateType() of
5175         opposite direction, see feature request #860006; it's enabled at runtime
5176         by setting the environment variable SDCC_NEWTYPEFLOW
5177         * src/SDCCast.h: changed prototype of decorateType()
5178         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5179         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5180         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5181         see feature request #877103
5182         * src/SDCCval.c: updated call of decorateType()
5183         (valBitwise): fixed bug #882876
5184         (valMinus): added promotion
5185         (valLogicAndOr): result is unsigned
5186         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5187         * src/SDCCsymt.c (computeType),
5188         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5189         must not cause an unsigned operation
5190         * src/pic/glue (pic14emitRegularMap),
5191         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5192
5193 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5194
5195         * src/pic/pcode.c (PCodeID): commented out left over debug code
5196
5197 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5198
5199         * support/valdiag/tests/overflow.c: added shift tests
5200         * src/pic/device.c,
5201         * src/pic/gen.c,
5202         * src/pic/gen.h,
5203         * src/pic/glue.c,
5204         * src/pic/main.c,
5205         * src/pic/pcode.c,
5206         * src/pic/pcode.h,
5207         * src/pic/pcodepeep.c,
5208         * src/pic/pcoderegs.c,
5209         * src/pic/ralloc.c,
5210         * src/pic/ralloc.h: applied patch from Slade Rich;
5211         added support for multiple code pages and multiple RAM banks on the
5212         PIC 14 port. The ASM files now no longer simply assume all the
5213         code / RAM are in the same page / bank. This means the linker can
5214         safely allocate code/RAM of separate ASM files to different pages/banks.
5215         * doc/sdccman.lyx: added Slade's tips
5216         * src/mcs51/peeph.def: fixed bug #880768
5217
5218 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5219
5220         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5221         * src/SDCCast.c (decorateType): fixed bug #880197
5222
5223 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5224
5225         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5226         getopt.h.
5227
5228         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5229         strtof is not part of C89 and isn't included with Mac OS X.
5230
5231 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5232
5233         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5234         shiftL2Left2Result): fixed bug #879326
5235         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5236         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5237         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5238         address fetch for clr instruction
5239         * device/lib/hc08/_mulint.c: created optimized assembly version
5240         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5241
5242 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5243
5244         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5245         proposed in FR #877103
5246
5247 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5248
5249         * src/SDCCval.c (cheapestVal): added missing checks
5250         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5251         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5252
5253 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5254
5255         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5256         equal operands
5257
5258 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5259
5260         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5261         loaded with the linker search paths (-L arguments) and the libraries
5262         to be linked with the current source (-l arguments). Changes
5263         currently will affect only the pic16 port.
5264         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5265         include path the port specific paths and port specific libraries,
5266         * gplink command now contains the $3 argument,
5267         * src/pic16/device.h,
5268         * src/pic16/device.c,: structure PIC_device is made public and
5269         renamed to PIC16_device, the same for variable Pics which is renamed
5270         to Pics16. Updated all references to them.
5271         * src/pic16/glue.c (pic16glue): corrected bug with code
5272         initialization which bypassed the variable initializations block.
5273
5274         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5275         COMPILE_FLAGS and added the --nostdinc option
5276
5277 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5278
5279         * device/include/mc68hc908jb8.h: Register defs for another member
5280         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5281
5282 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5283
5284         Documenting changes from previous commits.
5285         * configure.in (version 1.56),
5286         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5287         when generating output files to configure the pic16 library,
5288         but now I've commented it out, since gputils aren't installed in the
5289         SF compile farm, so library won't compile
5290
5291         * device/lib/Makefile.in (version 1.56): initially I've added in
5292         target 'all' the prerequestive 'model-pic16' so it compiled the
5293         pic16 library, but now I've commented it out for the same reasons
5294         above,
5295         * added targets 'model-pic16' and 'objects-pic16' to compile the
5296         library
5297         * added target 'port-specific-objects-pic16' to handle the
5298         generated libraries and copy them into the build/ directory
5299         * added target 'clean-intermediate-pic16' to clean intermediate
5300         files into pic16 directory
5301         * in target 'installdirs' added line to create directory pic16 in
5302         the installation path
5303
5304         * device/include/Makefile.in (version 1.11): in target 'install'
5305         added lines to copy all header files to installation path,
5306         * in target 'installdirs' added line create directory for pic16
5307         headers in the installation path
5308
5309 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5310
5311         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5312          a function call
5313
5314 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5315
5316         * configure,
5317         * device/lib/configure.in,
5318         * device/lib/configure: fixed for autoconf 2.57
5319
5320 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5321
5322         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5323         option so that it actually works. Made it specific to the z80, since
5324         the gbz80 doesn't have these kinds of I/O ports.
5325
5326 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5327
5328         * device/include/z180.h,
5329         * device/lib/_memcpy.c,
5330         * device/lib/_memmove.c,
5331         * device/lib/_mulint.c,
5332         * device/lib/ser_ir.c,
5333         * device/lib/ser_ir_cts_rts.c,
5334         * device/lib/_strcmp.c,
5335         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5336         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5337         portmode; added deprecation warning for bank= and protmode= forms.
5338         Also, guard against buffer overflow.
5339         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5340
5341 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5342
5343         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5344         changed interrupt vector table generation to only emit declared vectors.
5345         * device/include/Makefile.in: added missing backslash
5346         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5347
5348 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5349
5350         Mainly changes to support compilation of the device libraries
5351         * src/pic16/device.c: stack is allocated via symbol and not
5352         via literal number. The symbol is placed in the corresponding
5353         position of the data ram
5354         * (pic16_dump_section): relocatable and absolute uninitialized
5355         data are now emitted in sorted order to reduce section naming,
5356         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5357         weren't marked as being in the access bank,
5358
5359 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5360
5361         Added portion of GNU PIC Library under the directory
5362         device/include/pic16 and device/lib/pic16. These files
5363         contain the declarations of SFRs for the PIC18Fxx2 devices.
5364         The directory is initialized via configure from toplevel.
5365
5366 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5367
5368         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5369         the spilllocations to be compared correctly
5370
5371 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5372
5373         * src/SDCCast.c (decorateType): fixed bug introduced today
5374
5375 2004-01-12  Borut Razem <borut.razem AT siol.net>
5376
5377         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5378         doc/sdccman.lyx: upper case pragmas are deprecated
5379
5380 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5381
5382         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5383         in simpler and even better code
5384
5385 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5386
5387         * src/SDCCicode.c (operandOperation): fixed bug #874819
5388         * src/SDCCast.c (decorateType): fixed
5389         char foo (unsigned long ul) { return ul > 0; }
5390
5391 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5392
5393         * doc/sdccman.lyx: Moved and added some sections, small changes
5394         all over. Telling LaTeX to be less strict with word spacing
5395         to better keep the right margin. Changed some notes about
5396         maintainance of the ports in section 3.2.1 - is it OK like this?
5397
5398 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5399
5400         SDCC source changes:
5401         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5402         convilong): modified to inform the pic16 port that builtin functions
5403         are external
5404
5405         PIC16 PORT specific changes:
5406         * src/pic16/device.c pic16_dump_equates() added,
5407         processor registers declared internally by the port are emitted in
5408         the translation as equates,
5409         * src/pic16/gen.c: inline code is passed unprocessed to the
5410         translation,
5411         * (pic16_popGetLit2): fnuction modified to take second operand as
5412         pCodeOp pointer and not as literal,
5413         * (popRegFromIdx): prefixed with pic16_,
5414         * (pic16_popCombine2): modified to receive already allocated pCode
5415         operands,
5416         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5417         * (genFunction): initializes local stack frame and pushes on stack
5418         all the registers used by this function,
5419         * (genEndFunction): restores all registers from stack and restores
5420         stack frame,
5421         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5422         improvements,
5423         * (pic16glue): changed the program startup sequence,
5424         * added new dbName code 'A' for functions placed in absolute section
5425         * src/pic16/main.c: added function attribute _naked,
5426         * added pragma 'code' to place a fnuction at an absolute address,
5427         * added command line arguments --debug-ralloc and --pcode-verbose,
5428         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5429         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5430         * (pic16_newpCodeOpLit2): modified to take the second operand as
5431         pCodeOp pointer,
5432         * (pic16_printpBlock): modified to emit each function in a separate
5433         section,
5434         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5435         UPPER for immediate operands,
5436         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5437         instruction,
5438         * src/pic16/peeph.def: all peepholes with movff are commented out,
5439         because there is a problem in the pcode peep optimizer,
5440         * src/pic16/ralloc.c: the register allocator can now reuse local
5441         function symbols for another function. This saves register usage.
5442         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5443
5444         Added file src/pic16/NOTES with information about program writing on
5445         the current port version.
5446
5447 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5448
5449         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5450         and peephole 252 (array access)
5451
5452 2004-01-09  Borut Razem <borut.razem AT siol.net>
5453
5454         * src/SDCCmain.c : fixed #872250: -l command line defined library
5455           files are scanned before standard library files
5456
5457 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5458
5459         * src/SDCCast.c (decorateType): fixed bug #874046
5460
5461 2004-01-09  Borut Razem <borut.razem AT siol.net>
5462
5463         * support/scripts/sdcc.nsi: remove previous installation
5464
5465 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5466
5467         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5468         bytes for last interrupt vector (mcs51)
5469         * sdcc.spec: fixed typo
5470
5471 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5472
5473         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5474         gen51Code): more efficient parameter receive for --model-large
5475         ("bug" #845294)
5476
5477 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5478
5479         * src/ds390/main.c,
5480         * src/z80/main.c: added missed needLinkerScript flags (more than
5481         one port structure defined in these file)
5482         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5483         bug #795325
5484
5485 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5486
5487         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5488         * src/port.h: added flag needLinkerScript in port->linker
5489         structure to inform whether to create a .lnk file or not,
5490         * src/avr/main.c,
5491         * src/ds390/main.c,
5492         * src/hc08/main.c,
5493         * src/mcs51/main.c,
5494         * src/pic/main.c,
5495         * src/pic16/main.c,
5496         * src/xa51/main.c,
5497         * src/z80/main.c: changed appropriately to configure
5498         needLinkerScript flag
5499         * src/pic/gen.c,
5500         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5501         * src/pic/glue.c: added variable udata_section_name to
5502         override default uninitialized data segment definition for
5503         devices only with SHAREBANK memory (reported from Erik Epetrich)
5504         * (pic14emitOverlay): modified to emit a commented overlay segment
5505         directive when no overlay data exist
5506         * (picglue): modified to emit uninitialized data segment
5507         according to udata_section_name
5508         * src/pic/main.c (_pic14_parseOptions): added command line
5509         options --udata-section-name=[name] to override default
5510         udata definition name
5511         * modified _linkCmd and _asmCmd to include compiler passed
5512         arguments via -W option
5513         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5514         object file from '.rel' to '.o' in port->linker structure,
5515         changed size of fptr from 2 to 3 in port structure
5516
5517 2004-01-07  Borut Razem <borut.razem AT siol.net>
5518
5519         * support/scripts/sdcc.nsi: update PATH
5520         * support/scripts/sdcc.ico: craeted
5521
5522 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5523
5524         * device/include/Makefile.in: fix install
5525         * doc/Makefile: fix install
5526
5527 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5528
5529         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5530         in bug #860505
5531         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5532         how the function variable allocation summary is displayed; also
5533         include information about variables allocated to the overlay
5534         segment
5535
5536 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5537
5538         * as/mcs51/lkmain.c: Help about -Y option
5539         * as/mcs51/lkarea.c: Fixed gcc warnings
5540
5541 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5542
5543         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5544         fixed warning
5545         * support/valdiag/tests/overflow.c: added
5546         * src/SDCCast.c (decorateType),
5547         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5548         LEFT_OP (left shift)
5549
5550 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5551
5552         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5553         (default behaviour).
5554
5555 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5556
5557         A python script to validate compiler diagnostic messages. It can be
5558         used to verify that sdcc complains about bad c source code and
5559         gives a good location of the error.
5560         * support/valdiag/Makefile,
5561         * support/valdiag/valdiag.py,
5562         * support/valdiag/tests/*
5563
5564 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5565
5566         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5567         * src/SDCCsymt.c (newEnumType),
5568         * src/SDCCsymt.h
5569         * support/Util/SDCCerr.c,
5570         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5571         enum related bugs.
5572         * support/regression/tests/enum.c: added test for enum values that
5573         require at least 2 bytes of storage.
5574
5575 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5576
5577         * src/common.h: added ifndef/define/endif macros
5578         around the header file.
5579         Bug reported from Jesus Calvino-Fraga
5580
5581 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5582
5583         * sdcc.spec: updated
5584         * device/include/Makefile.in: don't install CVS directories
5585         * device/lib/Makefile.in: added removal of CVS directories after install
5586         * doc/Makefile: fixed install, added local_icons
5587         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5588         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5589         * src/ds390/gen.c (genRightShift): fixed bug #870788
5590         * src/SDCCast.c (decorateType): fixed bug #870781
5591
5592 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5593
5594         PIC16 port related changes:
5595         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5596         added variable stackPos,
5597
5598         * gen.c: genCall, assignResultValue: added support for
5599         pushing/retrieving function parameters to/from stack,
5600         genFunction,genEndFunction: setup stack frame for the
5601         generated function,
5602         genAddrOf: will be changed according to bug 863624
5603
5604         * added files genutils.c and genutils.h which contain gen*
5605         debugged and optimised functions extracted from gen.c
5606
5607         * glue.c: added variable 'externs' which holds extern symbols,
5608         pic16emitRegularMap: is modified to properly handle relocatable
5609          symbols under the new scheme,
5610         pic16createInterruptVect: is modified
5611         pic16printPublics: is modified to emit 'global' assembler directives,
5612         added pic16_printExterns to print extern symbols,
5613         pic16glue: initializes stack/frame pointer in the beginning of
5614         the assembly output. Temporary hack, will be corrected later,
5615         because gplink yet does not support stack and SDCC does not
5616         yet support a type of crt0.o object to create the final binary.
5617
5618         * Removed many lines that contain 8051 legacy code.
5619         * The code is finally placed under a 'code' directive.
5620         * Added port specific options.
5621
5622         * _process_pragma: simplified since now we do not need *special*
5623         include file to define SFR registers. But a separate header
5624         will be needed. This will be developed later.
5625         * _pic16_parseOptions: added, parses port specific options:
5626         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5627         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5628         --preplace-udata-with=
5629
5630         * _pic16_setDefaultOptions: modified to initialize section names,
5631         but hack is temporarly out of order since it needs improvement.
5632         * _pic16_genAssemblerPreamble: configuration words are emitted by
5633         their address instead of their name. This part is incomplete and
5634         supports only the 18Fxx2 devices. Other devices will emit an error
5635         during assembly since they do not contain the same set of config
5636         registers
5637         * _pic16_genIVT: is modified,
5638
5639         * pcode.c: added definitions for some hardware registers that are needed
5640         for stack support
5641         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5642         All PCI entries are updated. Now LFSR is supported.
5643         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5644         * added pic16_newpCodeOpLit2 to support instructions with
5645         two literal arguments
5646         * pic16_pCode2str: corrected code that emits assembler instructions
5647         with two literal operands and those that have an access bit modifier
5648         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5649         this fixes a bug which caused some labels to be lost, when an
5650         assembler directive was added, i.e. banksel,
5651         * pic16_FixRegisterBanking: improved logic that causes the insertion
5652         of bank switching,
5653         * InlineFunction: functions that are called once, are not any more
5654         inlined. This can be a port option in the future,
5655
5656         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5657
5658         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5659         hold the corresponding uninitialized symbols,
5660         * pic16_allocProcessorRegister: registers have explicit marked the
5661         accessBank field,
5662         * pic16_allocInternalRegister: registers are explicit marked as
5663         not used,
5664         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5665         processing list, so bit registers were lost,
5666         *
5667
5668         * ralloc.h: added field 'accessBank' and original symbol operand
5669         in register definition,
5670         * removed the field isMapped from register definition,
5671
5672         ** Several functions have been removed from various sources:
5673         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5674         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5675         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5676         pic16_assignRelocatableRegisters
5677
5678         ** others have been introduced:
5679         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5680         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5681
5682 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5683
5684         * support/scripts/inc2h.pl: changed definition of BIT_AT
5685         to emit 'sbit at' instead of 'bit at'. This was a request.
5686
5687         PIC16 port related preliminary changes:
5688         * gen.c: prefixed function popRegFromString with
5689         pic16_ and all references to it corrected
5690         * pcode.c: all pic16_pc_* hardware registers prefixed
5691         with underscore (_),
5692         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5693         * ralloc.c: newReg(): when register is REG_SFR then
5694         set address to rIdx,
5695         pic16_allocProcessorRegister(): marks register wasUsed=0
5696         pic16_writeUsedRegs(): added a call to assign processor
5697         registers via pic16_assignFixedRegisters
5698
5699 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5700
5701         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5702         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5703         variables in unused register banks.  Also the SSEG is placed
5704         wherever there is enough space for it, and IDATA can be anywhere
5705         in internal RAM.  For now compile using -Wl-Y[stack_size].
5706         The mem file is different for this option as well, since it
5707         makes no sense of talking about DSEG lenght.
5708
5709 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5710
5711         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5712         in certain cases, e.g. when ROM assignment, patch provided
5713         from Albert den Haan.
5714
5715 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5716
5717         Many signedness and type propagation fixes:
5718         * src/SDCCicode.c: made geniCodeCast() static
5719         replaced SPEC_ by IS_ (cosmetic)
5720         (operandOperation): fixed div and mod operation
5721         (usualBinaryConversions): added support for promotion of char
5722         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5723         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5724         (geniCodeAdd): an array index will stay unsigned, even if promoted
5725         from char to int
5726         (geniCodeArray): ditto
5727         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5728         * src/SDCCsymt.c (computeType): added more support for char;
5729         promotion of char is selectable by promoteCharToInt, fixed signedness
5730         for all cases
5731         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5732         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5733         * src/SDCCval (val*): replaced signedness calculation by
5734         computeType()
5735         rearranged if-branches (cosmetic)
5736         (valShift): added warning W_SHIFT_CHANGED
5737         (valCompare): fixed problem with different types
5738         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5739         * support/regression/tests/literalop.c: added many cases
5740         * support/regression/tests/ast_constant_folding.c: changed finally to
5741         'unsigned int'
5742         * .version: new year, new version: 2.3.7
5743         * src/SDCCmain.c (main): applied patch #866468
5744         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5745         provided by Scott Bronson
5746         * doc/sdccman.lyx: updated documentation for sdcdb
5747         updated and added chapter tips
5748
5749 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5750
5751         * src/SDCCsymt.h: missing from yesterday's commits
5752
5753 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5754
5755         * src/SDCC.y (struct_or_union_specifier),
5756         * support/Util/SDCCerr.c,
5757         * support/Util/SDCCerr.h: verify that struct & union tags are used
5758         as declared.
5759
5760 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5761
5762         * src/SDCCglobl.h: missing from yesterday's commits
5763
5764 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5765
5766         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5767         sft_attributes, struct_declaration, parameter_declaration,
5768         type_name, start_block, declaration_list),
5769         * src/SDCC.lex (check_type): support redefinition of typedef names
5770
5771 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5772
5773         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5774         aligned xdata arrays. Erik helped me with the if clause.
5775
5776 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5777
5778         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5779         warning
5780
5781 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5782
5783         * src/SDCCast.h,
5784         * src/SDCCast.c (newAst_),
5785         * src/SDCCicode.h,
5786         * src/SDCCicode.c (ast2iCode, newiCode),
5787         * src/SDCCglobl.h,
5788         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5789         expr, statement, expression_statement, selection_statement,
5790         iteration_statement, expr_opt, jump_statement): foundation for tracking
5791         sequence points
5792         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5793         point code too)
5794
5795 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5796
5797         * support/Util/SDCCerr.c,
5798         * src/SDCCast.h,
5799         * src/SDCCast.c (createCase, createDefault, decorateType),
5800         * src/SDCClabel.c (labelUnreach),
5801         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5802         to error messages.
5803         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5804         (with thanks to Stas Sergeev)
5805         * device/include/time.h,
5806         * device/lib/time.c (CheckTime): suppress unreachable code warning
5807
5808 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5809
5810         * src/SDCCast.c (createIvalCharPtr),
5811         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5812         bug #753752)
5813         * support/regression/tests/nullstring.c: tests for these two bugs
5814
5815 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5816
5817         * support/Util/SDCCerr.h,
5818         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5819         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5820         about storage class and 'at' used inside struct or union
5821         * src/SDCCBBlock.c (iCodeFromeBBlock),
5822         * src/SDCCcse.c (ifxOptimize),
5823         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5824         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5825         printIval, emitStaticSeg, emitOverlay),
5826         * src/SDCClabel.c (deleteIfx),
5827         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5828         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5829         gatherAutoInit, processParms),
5830         * support/Util/SDCCerr.h,
5831         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5832         reporting for post-parse errors.
5833
5834 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5835
5836         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5837         implicit casts via union; they don't work on big endian systems
5838         (possible fix for bug #861138)
5839
5840 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5841
5842         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5843         * src/mcs51/main.c: fixed the fix for bug #737001
5844
5845 2003-12-15  Borut Razem <borut.razem AT siol.net>
5846
5847         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5848
5849 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5850
5851         * support/makebin/makebin.c: put output in binary mode
5852
5853 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5854
5855         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5856         xdata and data memory on startup. Set the environment variable
5857         SDCC_NOGENRAMCLEAR to disable this.
5858         * src/mcs51/peephole.def,
5859         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5860         (allows non-interrupt and interrupt code to safely compete for a resource
5861         without the non-interrupt code having to disable interrupts)
5862
5863 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5864
5865         * src/SDCCicode.c (geniCodeAdd),
5866         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5867         with valFromType if type might be a pointer and host is big endian).
5868         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5869         types, not just integer types.
5870         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5871         multiply defined with mismatching "at" address.
5872
5873 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5874
5875         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5876         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5877         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5878         with embedded nulls (fixed bug #753752)
5879
5880 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5881
5882         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5883         Apparently this did not see much testing (endless loop)
5884
5885 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5886
5887         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5888
5889 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5890
5891         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5892         gracefully handle NULL memmap pointers
5893
5894 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5895
5896         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5897         instead of deleting the iCode when an operand is volatile
5898         * src/z80/gen.c (genDummyRead),
5899         * src/mcs51/gen.c (genDummyRead),
5900         * src/ds390/gen.c (genDummyRead),
5901         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5902         not just IC_RIGHT
5903         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5904         * src/SDCC.y: fixed bug #850420
5905
5906 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5907
5908         Applied z80 i/o port patch from Peter Townson and fixed some operators
5909         to better handle operands in A register.
5910         * device/include/z180.h
5911         * src/SDCC.y
5912         * src/SDCCglue.c
5913         * src/z80/gen.c
5914         * src/z80/gen.h
5915         * src/z80/main.c
5916         * src/z80/peeph-z80.def
5917         * src/z80/peeph.def
5918         * src/z80/z80.h
5919
5920 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5921
5922         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5923
5924 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5925
5926         * device/lib/hc08/_mullong.c: Removed extra #endif
5927
5928 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5929
5930         * sim/ucsim/hc08.src/inst.cc,
5931         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5932         carries from x to h
5933         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5934         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5935         * device/include/stdarg.h: fixed varargs for hc08
5936         * device/lib/Makefile.in,
5937         * device/lib/hc08/Makefile,
5938         * device/lib/hc08/_mulint.c,
5939         * device/lib/hc08/_mullong.c: fixed some endian problems
5940
5941 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5942
5943         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5944         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5945         * device/lib/_gptrget.c,
5946         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5947
5948 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5949
5950         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5951         * src/SDCCast.c (astErrors): fixed bug #846007
5952         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5953
5954 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5955
5956         * src/SDCCast.c (decorateType): disabled a transformation I added in
5957         revision 1.188 (access to fields of a structure at an absolute address);
5958         it breaks with bitfields, extern declarations, and gcse analysis.
5959         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5960         could be assigned through a pointer, so don't complain.
5961         * src/SDCCast.c (astErrors),
5962         * src/SDCCast.h,
5963         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5964
5965 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5966
5967         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5968         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5969         output of __config directives, since gpasm now supports them
5970         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5971         pre-processor macro, i.e. -DMCU=p18f452
5972         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5973         and modified to handle 'cast' icode similarly to '=' icode
5974         * src/pic16/device.h (typedef struct PIC_device): added field
5975         'extMIface' to indicate that chip has external memory interface
5976         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5977         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5978         18F8720
5979
5980 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5981
5982         * src/SDCC.y (pointer): fixed bug #846006
5983         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5984         * src/SDCCast.c (decorateType): fixed bug #846009
5985         * src/ds390/peeph.def,
5986         * src/ds390/gen.c (genAnd, genOr),
5987         * src/mcs51/peeph.def,
5988         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5989
5990 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5991
5992         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5993         * src/SDCCdflow.c
5994         * src/SDCCcse.c
5995         * src/SDCCcse.h
5996         * src/SDCCBBlock.h
5997         * src/SDCCBBlock.c
5998
5999 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6000
6001         fixed bug #845089
6002         * src/SDCCbitv.h,
6003         * src/SDCCbitv.c: added function to free a bitvector
6004         * src/SDCClrange.h,
6005         * src/SDCClrange.c: added function to recompute the liveranges
6006         * src/avr/ralloc.c,
6007         * src/ds390/ralloc.c,
6008         * src/hc08/ralloc.c,
6009         * src/mcs51/ralloc.c,
6010         * src/pic/ralloc.c,
6011         * src/pic16/ralloc.c,
6012         * src/xa51/ralloc.c,
6013         * src/z80/ralloc.c: recompute the liveranges after register packing
6014
6015 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6016
6017         * src/SDCCloop.c (newInduction): fixed bug #845630
6018
6019 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6020
6021         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6022         inadvertantly left behind from my 2003-11-12 change
6023
6024 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6025
6026         Updated headers I neglected to commit yesterday.
6027         * src/SDCClrange.h,
6028         * src/SDCCicode.h
6029
6030 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6031
6032         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6033         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6034         * src/SDCCopt.c (eBBlockFromiCode),
6035         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6036         the creation of the key hash table from the sequencing so it can be used
6037         earlier (for some GCSE bug fixes still pending)
6038
6039 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6040
6041         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6042         * support/regression/tests/addsub.c: testing genPlus shortcut
6043
6044 2003-11-15  Borut Razem <borut.razem AT siol.net>
6045
6046         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6047
6048 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6049
6050         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6051         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6052         ordering is immaterial.
6053         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6054
6055 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6056
6057         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6058         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6059         (SIGSEV) of bug #840381
6060         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6061         unlink new file before rename if new and old filenames are the same)
6062
6063 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6064
6065         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6066         uninitialized variables) for the mcs51. Set environment variable
6067         SDCC_GENRAMCLEAR to test.
6068         xdata initialization slightly shorter
6069
6070 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6071
6072         * src/SDCCsymt.h,
6073         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6074         #838241 & 780691 (basicly the same bug)
6075         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6076         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6077
6078 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6079
6080         * src/SDCCmain.c (linkEdit): "fix" #834252
6081
6082 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6083
6084         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6085         * src/SDCCast.h,
6086         * src/SDCC.y: fixed bug #819403
6087
6088 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6089
6090         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6091         the reentrant attribute.
6092         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6093         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6094         simulation
6095         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6096         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6097         erroneously reduced to a literal.
6098         * src/hc08/ralloc.c (packRegisters, rematStr),
6099         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6100         some cases
6101
6102 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6103
6104         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6105         * doc/sdccman.lyx: changed from 'article' to 'book'
6106         * doc/Makefile: readded test_suite_spec and cdbfileformat
6107
6108 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6109
6110         * device/include/stdlib.h: include malloc.h to comply with ANSI
6111         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6112
6113 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6114
6115         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6116         * doc/clean.mk: also remove *.out files
6117         * doc/sdccman.lyx: some additions, larger top/bottom margins
6118
6119 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6120
6121         * src/SDCC.y: fixed bug #837365
6122         * support/regression/tests/bitopcse.c
6123         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6124         a symbol (might be valop instead)
6125         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6126         * device/lib/clean.mk: added hc08 to the cleaning list
6127
6128 2003-11-04  Borut Razem <borut.razem AT siol.net>
6129
6130         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6131           made 2003-11-04
6132         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6133           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6134           malloc is declared in standard stdlib.h
6135
6136 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6137
6138         * device/lib/hc08/Makefile: need to clean .rel not .o files
6139         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6140
6141 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6142
6143         * src/port.h,
6144         * src/hc08/main.c,
6145         * src/mcs51/main.c,
6146         * src/ds390/main.c,
6147         * src/z80/main.c,
6148         * src/avr/main.c,
6149         * src/pic/main.c,
6150         * src/pic16/main.c,
6151         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6152         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6153         tests (which uses the port's oclsExpense function)
6154         * src/SDCC.y,
6155         * src/SDCCast.c,
6156         * src/SDCCicode.c,
6157         * src/hc08/gen.c,
6158         * src/ds390/gen.c,
6159         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6160
6161 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6162
6163         * src/SDCCcse.c (ifxOptimize),
6164         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6165         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6166         deleting the IFX iCode.
6167         * src/hc08/ralloc.c: reduced unneeded slocs
6168         * src/hc08/gen.c: fixed bug in asmopToBoolean
6169
6170 2003-11-04  Borut Razem <borut.razem AT siol.net>
6171
6172         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6173           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6174           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6175           transferred to configure
6176
6177 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6178
6179         Use headers defined in the C[++] standards:
6180         * sim/ucsim/gui.src/serio.src/fileio.cc
6181         * sim/ucsim/gui.src/serio.src/frontend.cc
6182         * sim/ucsim/gui.src/serio.src/main.cc
6183         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6184         * support/Util/NewAlloc.c
6185         * as/hc08/lklibr.c
6186         * as/mcs51/lklibr.c
6187         * as/z80/aslist.c
6188         * as/z80/assym.c
6189
6190 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6191
6192         * Added MSVC projects for hc08 assembler and linker:
6193         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6194         /as/hc08/link_hc08.dsp
6195
6196 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6197
6198         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6199
6200 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6201
6202         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6203
6204 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6205
6206         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6207
6208 2003-10-31  Borut Razem <borut.razem AT siol.net>
6209
6210         * support/cpp2/cpplib.h,
6211           support/cpp2/cpplib.c,
6212           support/cpp2/cpplex.c,
6213           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6214           to switch _asm block preprocessing on / off. Default is
6215           #pragma preproc_asm +
6216
6217 2003-10-31  Borut Razem <borut.razem AT siol.net>
6218
6219         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6220           when outputting comment blocks (when executed with -C option) and
6221           _asm (SDCPP specific) blocks
6222
6223 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6224
6225         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6226
6227 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6228
6229         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6230
6231 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6232
6233         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6234         * src/SDCCast.c (decorateType): fixed bug #832664
6235
6236 2003-10-31  Borut Razem <borut.razem AT siol.net>
6237
6238         * support\cpp2\cpplex.c: fixed for SDCPP:
6239           comments(when executed with -C option) and _asm blocks
6240           were included even if they where in skipped #if block.
6241           Applied solution from GCC cpp 3.3.2
6242
6243 2003-10-31  Borut Razem <borut.razem AT siol.net>
6244
6245         * src/SDCC.lex: sdcc now understands both formats:
6246           '# <line_number> <file_name>' and
6247           '#line <line_number> <file_name>'
6248         * support/cpp2/cppmain.c: sdcpp now generates the standard
6249           '# <line_number> <file_name>' instead of former
6250           '#line <line_number> <file_name>'
6251
6252 2003-10-30  Borut Razem <borut.razem AT siol.net>
6253
6254         * support/cpp2/cpphash.h,
6255         * support/cpp2/cpplib.h
6256         * support/cpp2/cpplex.c,
6257         * support/cpp2/cppmain.c,
6258         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6259
6260 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6261
6262         Fixed a number of problems revealed by bug #827883.
6263         * src/SDCCloop.c (loopInvariants): Spill location of the
6264         result operand should be recomputed if extracted from
6265         a loop. Also, don't extract assignments of an iTemp
6266         from a literal.
6267         * src/SDCCast.c (isConformingBody): loop reversal should
6268         not occur if the control variable is involved with a
6269         relational operator.
6270
6271 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6272
6273         * .version: bumped to 2.3.6 to reflect the big improvements
6274         made by Erik and Klaus. Thanks!
6275
6276 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6277
6278         Replaced the livrange code.
6279         * src/SDCClrange.c: added new LR code
6280         * src/SDCCloop.c,
6281         * src/SDCCBBlock.h: removed remainig parts from old LR code
6282         * src/ds390/ralloc.c,
6283         * src/ds390/gen.c: minor fixes to make it work with new code
6284
6285 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6286
6287         * as/hc08/asm.h,
6288         * as/hc08/lkrloc.c,
6289         * src/hc08/gen.c,
6290         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6291         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6292         (tweaked fix for bug #818696)
6293
6294 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6295
6296         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6297
6298 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6299
6300         * src/SDCCmain.c,
6301         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6302         * src/mcs51/gen.c (gencjneshort),
6303         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6304         more efficient (per Scott Bronson's suggestion)
6305
6306 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6307
6308         Extended the semantics of the critical keyword to include
6309         individual statements. See RFE #827755 and #799831
6310         * src/SDCC.y
6311         * src/SDCCicode.c
6312         * src/SDCCopt.c
6313         * src/SDCCast.c
6314         * support/Util/SDCCerr.c
6315         * support/Util/SDCCerr.h
6316         * src/mcs51/gen.c
6317         * src/ds390/gen.c
6318         * src/hc08/gen.c
6319
6320 2003-10-19  Borut Razem <borut.razem AT siol.net>
6321
6322         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6323
6324 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6325
6326         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6327         Fixed bug #818696
6328         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6329         and predecrement operand is displayed
6330
6331 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6332
6333         * src/SDCCval.c (valMinus): fixed bug #826041
6334
6335 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6336
6337         Some hc08 related updates that I missed earlier
6338         * sim/ucsim/stypes.h
6339         * support/regression/ports/hc08/spec.mk
6340
6341 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6342
6343         New target "hc08" for the Motorola 68hc08 family of micros
6344
6345         * configure
6346         * configure.in
6347         * Makefile
6348         * src/hc08/*
6349         * src/SDCCmain.c
6350         * src/port.h
6351         * sim/ucsim/hc08.src/*
6352         * sim/ucsim/configure.in
6353         * src/ucsim/configure
6354         * sim/ucsim/packages_in.mk
6355         * as/hc08/*
6356         * as/Makefile
6357         * device/include/mc68hc908qy.h
6358         * device/lib/hc08/*
6359         * device/lib/Makefile.in
6360         * support/regression/ports/hc08/*
6361         * support/regression/Makefile
6362
6363 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6364
6365         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6366         regression test
6367         * src/ds390/gen.c (genCast): fixed bug #821957
6368
6369 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6370
6371         * device/lib/logf.c: "fixed" overlay bug
6372         * support/regression/ports/host/spec.mk: added m library
6373         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6374         * support/regression/tests/float_trans: added (for Eric)
6375
6376 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6377
6378         * src/mcs51/gen.c (genCpl): fixed bug
6379         http://sf.net/mailarchive/message.php?msg_id=6263915
6380
6381 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6382
6383         * src/SDCCast.c (decorateType): added extended constant folding
6384         * src/SDCCsymt.c (computeType): cleanup
6385         * src/SDCCval.c (valShift): minor optimization
6386         * support/regression/tests/ast_constant_folding.c: added
6387
6388 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6389
6390         * src/SDCCmain.c: removed some unintended changes
6391
6392 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6393
6394         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6395         * src/z80/gen.c: fixed part of bug #817589
6396         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6397
6398 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6399
6400         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6401         * src/SDCCcflow.c
6402         * src/SDCCcse.c
6403         * src/SDCCdflow.c
6404         * src/SDCClabel.c
6405         * src/SDCClrange.c
6406         * src/SDCCmem.c
6407         * src/SDCCopt.c
6408         * src/SDCCpeeph.c
6409         * src/SDCCset.c
6410         * src/avr/ralloc.c
6411         * src/ds390/ralloc.c
6412         * src/izt/ralloc.c
6413         * src/mcs51/ralloc.c
6414         * src/pic/ralloc.c
6415         * src/pic16/ralloc.c
6416         * src/xa51/ralloc.c
6417         * src/z80/ralloc.c
6418         * src/z80/gen.c: removed unused label "release:"
6419
6420 2003-10-06  Borut Razem <borut.razem AT siol.net>
6421
6422         * src/SDCC.lex: removed definition of unused variables
6423           save_optimize and save_options
6424
6425 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6426
6427         * clean.mk: removed '=' in "-maxdepth=1"
6428         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6429         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6430
6431 2003-10-06  Borut Razem <borut.razem AT siol.net>
6432
6433         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6434           my_unput() replaced by unput()
6435
6436 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6437
6438         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6439         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6440         type-punned pointer will break strict-aliasing rules"
6441         Old LR behaviour is again default; Klaus' LR can be choosen by
6442         defining the environment variable LRKLAUS
6443         * src/SDCCBBlock.h
6444         * src/SDCCloop.c
6445         * src/SDCClrange.c
6446         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6447         * clean.mk: fixed removal of files in bin/CVS/
6448         * device/lib/clean.mk: fixed removal of directories small and large
6449         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6450         * src/SDCCicode.c,
6451         * src/SDCCval.c: removed superflous test for pedantic
6452
6453 2003-10-05  Borut Razem <borut.razem AT siol.net>
6454
6455         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6456           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6457           message "unmatched #pragma SAVE and #pragma RESTORE"
6458
6459 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6460
6461         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6462           assembly, critical functions, atomic, nojtbound)
6463
6464 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6465
6466         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6467         * src/SDCCBBlock.h
6468         * src/SDCCloop.c
6469         * src/SDCCloop.h
6470         * src/SDCClrange.c
6471
6472 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6473
6474         * src/z80/gen.h,
6475         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6476         * src/mcs51/gen.h
6477         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6478         * src/ds390/gen.h
6479         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6480         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6481         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6482
6483 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6484
6485         * src/z80/gen.c (genRet): fixed bug #524753
6486         * src/z80/gen.c (genCast): fixed internal error on cast from
6487         pointer to long
6488         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6489         fix for bug #477835 to the z80
6490         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6491         for tracking iCodes in the peephole optimizer for z80
6492
6493 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6494
6495         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6496         the other part of bug #814548
6497         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6498
6499 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6500
6501         * src/SDCCcse.c: fixed part of bug #814548
6502
6503 2003-09-28  Borut Razem <borut.razem AT siol.net>
6504
6505         * src/asm.c: rewrite of printILine() to use temporary file instead
6506           a pipe
6507         * src/xa51/main.c: commented out declaration of int rewinds
6508
6509 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6510
6511         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6512
6513 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6514
6515         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6516         * src/asm.c (printILine): Fixed bug #811015
6517
6518 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6519
6520         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6521         freeing.
6522
6523 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6524
6525         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6526         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6527         to correctly handle general case of AOP_PAIRPTR
6528         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6529
6530 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6531
6532         * src/mcs51/ralloc.c (fillGaps),
6533         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6534         register positioning bug)
6535
6536 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6537
6538         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6539
6540 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6541
6542         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6543         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6544         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6545         (ralloc doesn't intentionally do this now, but perhaps later)
6546         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6547         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6548         register positioning bugs (Fixed bug #762602 and #795325)
6549         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6550         (Fixed bug #808779)
6551         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6552         lines that --i-code-in-asm generates
6553
6554 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6555
6556         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6557         trying to fclose a FILE* that was already closed.
6558
6559 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6560
6561         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6562         of const struct should be treated as if const themselves)
6563
6564 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6565
6566         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6567
6568 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6569
6570         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6571         Unix (/n) and DOS (/r/n) line terminations.
6572
6573 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6574
6575         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6576         bug #613775
6577
6578 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6579
6580         * src/mcs51/gen.c (genFunction, genEndFunction),
6581         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6582         and restore of EA so that stack offsets to parameters are
6583         correct when using both critical and reentrant/stack-auto.
6584         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6585         size (can be triggered in error if sloc is shared between
6586         different sized objects)
6587         * device/include/float.h: fixed macros to explicitly use
6588         unsigned long where needed
6589
6590 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6591
6592         Feature req. 799831: added code to allow nesting of critical functions
6593         * src/mcs51/gen.c (genFunction, genEndFunction)
6594         * src/ds390/gen.c (genFunction, genEndFunction)
6595
6596 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6597
6598         * src/SDCCsymt.c (sclsFromPtr),
6599         * src/SDCCsymt.h,
6600         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6601         support for standard C idiom of memory mapped variables; for
6602         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6603         to xdata int at 0x1234 tempvar = 1.
6604         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6605         provided by Akiya ISHIDA
6606
6607 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6608
6609         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6610         * src/SDCCval.c (constVal): added reduction from int to char
6611         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6612         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6613         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6614         to ignore the sign
6615         * support/regression/tests/shifts.c: fixed
6616
6617 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6618
6619         * src/z80/gen.c (genXor): Fixed bug #805445
6620
6621 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6622
6623         Fixed bug #621531 (const & volatile confusion in the type chain).
6624         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6625         refer to the const or volatile state of the pointer itself.
6626
6627         * src/SDCCast.c
6628         * src/SDCCglue.c
6629         * src/SDCCicode.c
6630         * src/SDCCsymt.c
6631         * src/SDCCval.c
6632         * src/SDCC.y
6633         * src/SDCCsymt.h
6634         * src/pic/gen.c
6635         * src/pic/ralloc.c
6636         * src/pic16/gen.c
6637         * src/pic16/ralloc.c
6638         * support/regression/tests/const.c
6639
6640 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6641
6642         When checking for duplicated modules, use absolute paths
6643         instead of relative paths.  Files changed:
6644
6645         * as/mcs51/lklib.c
6646         * link/z80/lklib.c
6647
6648 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6649
6650         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6651
6652 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6653
6654         * device/include/string.h: added size_t typedef, changed
6655         prototypes to use size_t, eliminated separate reentrant and
6656         non-reentrant declarations, added _memmove declaration
6657         * device/lib/_memcpy.c: changed to use size_t instead of int,
6658         changed /4 to >>2 to avoid division library call
6659         * device/lib/_memcmp.c,
6660         * device/lib/_memset.c,
6661         * device/lib/_strncat.c,
6662         * device/lib/_strncpy.c,
6663         * device/lib/_strncmp.c: changed to use size_t instead of int
6664         * device/lib/_memmove.c: new file (fixed bug #772294)
6665         * device/lib/Makefile.in: added _memmove.c
6666         * device/lib/z80/asm_strings.s: fixed bug #772290
6667         * support/regression/tests/bitfields.c: attempt to fix host assertion
6668         failure on amd64-unknown-linux2.2
6669
6670 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6671
6672         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6673         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6674         * as/z80/asmain.c (main): fixed bug #801766
6675
6676 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6677
6678         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6679         compilers
6680
6681 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6682
6683         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6684         reported in bug #800609
6685
6686 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6687
6688         * Top header beautifications in src/pic16 directory:
6689           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6690           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6691           pcoderegs.h, ralloc.c, ralloc.h
6692         * main.c: added top header and GPL license notice
6693         * pcode.c: fixed the if-conditional warning
6694
6695 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6696
6697         * device/lib/_mullong.c: replaced int by short for gcc
6698
6699 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6700
6701         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6702         and JUMPTABLE iCodes properly now (worked by accident before)
6703         * src/mcs51/gen.c (leftRightUseAcc),
6704         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6705         iCode properly now. Use getSize instead of nRegs since a & b
6706         aren't part of the nRegs tally.
6707
6708 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6709
6710         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6711         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6712           before instructions that use the _STATUS register
6713
6714 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6715
6716         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6717         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6718         fetching of the pointer
6719         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6720         copied from genNearPointerSet()
6721         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6722         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6723         If they pop r0/r1 they must be called in the opposite order than aopOp().
6724         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6725         (resp. --stack-auto), prepared for --xstack
6726
6727 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6728
6729         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6730
6731 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6732
6733         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6734         these ports have their own __sdcc_external_start()
6735
6736 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6737
6738         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6739         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6740         type for bits was changed. It resulted in bit variables becoming
6741         global, which is not permitted in PIC 14 assembly output.
6742
6743 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6744
6745         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6746
6747 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6748
6749         Z80 and MCS51 linkers complaint if a public symbol is defined
6750         in more than one library module:
6751
6752         * as/mcs51/lklib.c
6753         * link/z80/lklib.c
6754         * as/mcs51/Makefile.in
6755
6756 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6757
6758         A few small changes that speed up the peephole optimizer.
6759
6760         * src/SDCCpeeph.c
6761
6762 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6763
6764         Try to make the peephole optimizer smarter by maintaining
6765         an association between the assembly source code and the
6766         iCodes that originated them. Put this information to use
6767         with a new peephole rule condition "notVolatile" so that
6768         the rules can be aggressive yet still safe.
6769
6770         * src/SDCCpeeph.c
6771         * src/SDCCpeeph.h
6772         * src/mcs51/gen.c
6773         * src/mcs51/peeph.def
6774
6775 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6776
6777         Fixed bug #741761
6778
6779         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6780         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6781         if the left or right operand symbols have the accuse flag set.
6782
6783 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6784
6785         Changed the type of the result of the ! (NOT) operator to char;
6786         previously it returned the same type as the source. This allows
6787         us to eliminate all the genFloatNot functions (all of its target
6788         implementations were very buggy) since !float can use the same
6789         code as !long now.
6790
6791         * src/SDCCicode.c (ast2iCode): ! returns char
6792         * src/mcs51/gen.c (genNot, genNotFloat),
6793         * src/ds390/gen.c (genNot, genNotFloat),
6794         * src/z80/gen.c (genNot, genNotFloat),
6795         * src/pic/gen.c (genNot, genNotFloat),
6796         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6797
6798 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6799
6800         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6801         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6802            during interrupts. Ensure WSAVE is located at a shared bank address.
6803         2. Fixed page selection in some places
6804         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6805            the registers name strings.
6806         4. Fixed "signed / unsigned compare" compiler warnings.
6807         5. The PIC port manages its own allocation of the general purpose
6808            registers, but makes no attempt to reuse them. As a result when
6809            compiling it soon runs out of general purpose registers. Some
6810            additional code was added to the files pcode.c and device.c to walk
6811            through the function call tree and rename the registers so that they
6812            get reused.
6813
6814         * src/pic/device.c
6815         * src/pic/gen.c
6816         * src/pic/glue.c
6817         * src/pic/pcode.c
6818         * src/pic/pcode.h
6819         * src/pic/ralloc.c
6820         * src/pic/ralloc.h
6821         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6822         genPlus() & genMinus() when the result is the same as left or right
6823
6824 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6825
6826         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6827
6828 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6829
6830         Made bitfield a distinct type from bit so that bitfields
6831         convert as per ANSI C and bits retain their traditional
6832         boolean style behaviour. Implemented bitfield support in
6833         the z80 port.
6834
6835         * src/SDCCsymt.h,
6836         * src/SDCCsymt.c,
6837         * src/SDCCast.c,
6838         * src/cdbFile.c,
6839         * src/mcs51/gen.c,
6840         * src/ds390/gen.c: bit v bitfield split
6841         * src/z80/gen.c: New support for bitfields
6842         * support/regression/tests/bitfields.c: reenabled z80,
6843         added more tests
6844
6845 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6846
6847         Rules 246.x, 247.x relate to bitfields, the others speed up
6848         access to xdata mapped I/O devices.
6849
6850         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6851
6852 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6853
6854         Cleaned up genPackBits and genUnpackBits and added two helper
6855         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6856         for literal assignments in genPackBits (thanks to Frieder for
6857         reminding me).
6858
6859         * src/mcs51/gen.c
6860         * src/ds390/gen.c
6861
6862 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6863
6864         Fixed bug #748310 (pointer to function type mishandled when the
6865         function name is omitted). Also fixed a SIGSEGV when a function
6866         attribute (reentrant, etc) is used on a non-function or on a
6867         function but misplaced before the parameter list.
6868
6869         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6870         bug #748310
6871         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6872         * support/Util/SDCCerr.h,
6873         * support/Util/SDCCerr.c: Added func attr misuse error msg
6874
6875 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6876
6877         Fixed bug #787649 by anonymous
6878         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6879         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6880
6881 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6882
6883         Fixed numerous bitfield problems.
6884
6885         * src/SDCC.y: More bitfield related error checking
6886         * src/SDCCsymt.h,
6887         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6888         * support/Util/SDCCerr.h,
6889         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6890         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6891         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6892         * support/regression/tests/bitfields.c: tests added
6893
6894 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6895
6896         Made the constant following the "interrupt" keyword optional. If
6897         omitted, the function will not automatically be given an entry
6898         in the interrupt vector table (similar to #pragma NOIV, but
6899         less syntacticly kludgy). The interrupt number is also now
6900         range checked. Also fixed a bug in the high order bit example
6901         in the manual.
6902
6903         * src/SDCC.y
6904         * src/SDCCmem.c
6905         * src/SDCCglue.c
6906         * src/SDCCsymt.h
6907         * support/Util/SDCCerr.c
6908         * support/Util/SDCCerr.h
6909         * doc/sdccman.lyx
6910
6911 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6912
6913         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6914         * src/SDCCicode.c (operandOperation): rewritten some ops
6915         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6916         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6917         other type
6918         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6919         be re-activated by defining REDUCE_LITERALS)
6920         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6921         unsigned, but are signed by default
6922         * src/SDCCval.c (constVal): rearranged
6923         * src/SDCCval.c (valMod): preliminary fix
6924         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6925         * support/regression/literalop.c: added, work in progress
6926
6927 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6928
6929         Generate warnings for useless declarations like "char data;"
6930         that don't do what new users expect.
6931
6932         * src/SDCC.y
6933         * support/Util/SDCCerr.h
6934         * support/Util/SDCCerr.c
6935
6936 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6937
6938         * src/SDCCval.c (valMult): fix overflow detection of negative int
6939
6940 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6941
6942         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6943
6944         Changes to support big endian targets:
6945
6946         * src/ports.h
6947         * src/SDCCglue.c
6948         * src/avr/main.c
6949         * src/ds390/main.c
6950         * src/izt/i186.c
6951         * src/mcs51/main.c
6952         * src/pic/main.c
6953         * src/pic16/main.c
6954         * src/xa51/main.c
6955         * src/z80/main.c
6956
6957 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6958
6959         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6960         * device/lib/time.c: fixed warning "integer overflow in expression"
6961
6962 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6963
6964         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6965         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6966         constants are unsigned; added recognition of "u" flag for unsigned
6967         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6968         * src/SDCCval.c (valDiv, valMod): fixed signdness
6969         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6970         signedness of modulo, left and right shift
6971         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6972         * support/Util/SDCCerr.h: added warning W_INT_OVL
6973         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6974         * src/SDCCast.c (ast_print): improved output of constants
6975
6976 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6977
6978         Fixed some warnings when building with MSVC:
6979
6980         * as\mcs51\asdata.c
6981         * as\z80\asdata.c
6982         * as\mcs51\asm.h
6983         * as\z80\asm.h
6984         * link\z80\aslink.h
6985         * link\z80\lkdata.c
6986         * link\z80\lkeval.c
6987         * link\z80\lkgb.c
6988         * link\z80\lkihx.c
6989         * link\z80\lks19.c
6990         * link\z80\lksym.c
6991         * support\cpp2\cpplib.c
6992         * src\ds390\gen.c
6993         * src\mcs51\gen.c
6994
6995 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6996
6997         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6998
6999 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7000
7001         * support\librarian\clean.mk: Do not remove Makefile.
7002         * support\librarian\Makefile: added.
7003
7004 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7005
7006         Added librarian to MSVC build:
7007         * all.dsp
7008         * sdcc.dsw
7009         * support\librarian\librarian.dsp
7010
7011         'configure' not needed for librarian, removed:
7012         * support\librarian\configure
7013         * support\librarian\configure.in
7014         * support\librarian\config_in.h
7015         * support\librarian\Makefile.in
7016
7017         Hopefully these ones built the librarian and the rest of sdcc properly:
7018         * Makefile
7019         * Makefile.common.in
7020
7021         Messed up 'configure', so revert to previous version:
7022         * configure
7023         * configure.in
7024
7025 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7026
7027         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7028         there, while the mantissa of a double is "only" 53 bits wide.
7029
7030 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7031
7032         Adding sdcclib to the build.  MSVC project coming soon.
7033         Files added/changed:
7034
7035         * support\librarian\clean.mk
7036         * support\librarian\configure
7037         * support\librarian\configure.in
7038         * support\librarian\config_in.h
7039         * support\librarian\Makefile.bcc
7040         * support\librarian\Makefile.in
7041         * support\librarian\sdcclib.c
7042         * Makefile.bcc
7043         * Makefile
7044         * Makefile.common.in
7045         * configure
7046         * configure.in
7047
7048 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7049
7050         Linker now complaints if linked modules have conflicting options, for
7051         example, one compiled using --model-large and another one compiled with
7052         --model-small.  The following files were modified:
7053
7054         * as\mcs51\asdata.c
7055         * as\mcs51\aslink.h
7056         * as\mcs51\asm.h
7057         * as\mcs51\asmain.c
7058         * as\mcs51\asout.c
7059         * as\mcs51\i51pst.c
7060         * as\mcs51\lkdata.c
7061         * as\mcs51\lklibr.c
7062         * as\mcs51\lkmain.c
7063         * as\z80\asdata.c
7064         * as\z80\asm.h
7065         * as\z80\asmain.c
7066         * as\z80\asout.c
7067         * as\z80\z80pst.c
7068         * link\z80\aslink.h
7069         * link\z80\lkdata.c
7070         * link\z80\lklibr.c
7071         * link\z80\lkmain.c
7072         * src\SDCCglue.c
7073
7074 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7075
7076         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7077         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7078
7079 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7080
7081         * src/z80/mappings.i: fix _mul[us][int,long] entries
7082
7083 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7084
7085         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7086
7087 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7088
7089         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7090         * support/regression/tests/bitopcse.c: added
7091         fixed warning:
7092         * src/avr/gen.c:
7093         * src/pic/gen.c:
7094         * src/pic16/gen.c:
7095         * src/z80/gen.c:
7096         * src/xa51/gen.c:
7097
7098 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7099
7100         added support for new library format to z80, gbz80 linkers:
7101         *link/z80/aslink.h
7102         *link/z80/lklex.c
7103         *link/z80/lklib.c
7104         *link/z80/lklist.c
7105
7106 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7107
7108         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7109         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7110
7111 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7112
7113         added DUMMY_READ_VOLATILE:
7114         * src/SDCC.y:
7115         * src/avr/gen.c:
7116         * src/xa51/gen.c:
7117         * src/z80/gen.c:
7118         * src/pic/gen.c:
7119         * src/pic16/gen.c:
7120         * src/mcs51/gen.c:
7121         * src/ds390/gen.c:
7122         * src/SDCCcse.c (algebraicOpts): many improvements
7123         * src/SDCCcse.h: removed algebraicOpts()
7124         * src/SDCCicode.c (picDummyRead): added
7125
7126 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7127
7128         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7129         "Insufficient space in data memory".
7130
7131 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7132
7133         * src/mcs51/gen.c: fixed bug #771358
7134         * src/z80/gen.c: fixed bug #759087
7135
7136 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7137
7138         * src/pic16/glue.c: minor cleanup by Vangelis
7139
7140 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7141
7142         * device/include/regc515c.h: fixed #758477
7143         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7144         * device/lib/_gptrput.c: saved a few bytes
7145         * my tab spacing is 8, yours too?)
7146         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7147         * device/lib/serial.c: process RX bytes earlier than TX bytes
7148         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7149
7150 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7151
7152         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7153
7154 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7155
7156     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7157
7158 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7159
7160         * device/lib/Makefile.in: bad fix, reverted to 1.43
7161
7162 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7163
7164         * device/lib/Makefile.in: added missing z80 object files
7165
7166 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7167
7168         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7169         pic16 progress by Vangelis:
7170         * src/SDCCglobl.h:
7171         * src/SDCCmain.c:
7172         * src/pic/Makefile:
7173         * src/pic:
7174         * pic/Makefile:
7175         * pic16/device.c:
7176         * pic16/device.h:
7177         * pic16/gen.c:
7178         * pic16/gen.h:
7179         * pic16/genarith.c:
7180         * pic16/glue.c:
7181         * pic16/main.c:
7182         * pic16/pcode.c:
7183         * pic16/pcode.h:
7184         * pic16/pcodepeep.c:
7185         * pic16/peeph.def:
7186
7187 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7188
7189     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7190
7191 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7192
7193     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7194     added gbz80 build to MSVC project.
7195     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7196     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7197     from 8051 stuff and setup so it links using a .lnk file.
7198
7199 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7200
7201     * support/librarian/sdcclib.c: sdcc librarian.
7202     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7203     with sdcclib.
7204
7205 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7206
7207     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7208
7209 2003-07-02  Borut Razem <borut.razem AT siol.net>
7210
7211         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7212         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7213         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7214         src/xa51/main.c, src/z80/main.c:
7215         virtualization of glue() function: each port has it's own glue function,
7216         which is accessed by do_glue function pointer in PORT.general structure
7217
7218 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7219
7220         * DS800C400 fun, improved ROM interface and tinibios.
7221
7222 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7223
7224         * More support for DS80C400. Now includes beginning of interface to ROM.
7225
7226 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7227
7228         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7229
7230 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7231
7232         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7233
7234 2003-06-19  Borut Razem <borut.razem AT siol.net>
7235
7236         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7237
7238 2003-06-19  Borut Razem <borut.razem AT siol.net>
7239
7240         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7241         fixed Z80 port - crt0.o: cannot open.
7242
7243 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7244
7245         * support/Util/MySystem.c (merge_command): revert bad fix
7246
7247 2003-06-18  Borut Razem <borut.razem AT siol.net>
7248
7249         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7250
7251 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7252
7253         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7254         option --use-stdout sends errors to stdout instead of stderr.
7255
7256 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7257
7258         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7259
7260 2003-06-15  Borut Razem <borut.razem AT siol.net>
7261
7262         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7263         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7264         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7265         fixed width array of pointers replaced with sets;
7266         multiple include and lib paths ared transferred to preprocessor and linker
7267         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7268         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7269         fixed width array of pointers
7270         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7271         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7272         fixupPath(), getPathDifference()
7273         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7274         fixed width array of pointers
7275
7276 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7277
7278         * src/pic16/ralloc.c: fix warnings
7279         * src/pic16/pcode.c: fix warning
7280
7281 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7282
7283          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7284         know all the details, but essentially this set of changes enable
7285         the pic16 port to generate movff instructions and generate assembler
7286         directives,
7287         * src/SDCCmain.c:
7288         * src/pic16/gen.c:
7289         * src/pic16/glue.c:
7290         * src/pic16/pcode.c:
7291         * src/pic16/device.c:
7292         * src/pic16/main.c:
7293         * src/pic16/pcode.h:
7294         * src/pic16/pcoderegs.c:
7295         * src/pic16/ralloc.c:
7296         * src/pic16/ralloc.h:
7297
7298 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7299
7300         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7301         added option --vc, so sdcc errors and warnings are compatible with
7302         Microsoft Visual Studio.
7303
7304 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7305
7306         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7307           device/lib/libfloat.lib: added atof function.
7308
7309 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7310
7311         * doc/sdccman.lyx: updated to Lyx 1.3
7312         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7313         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7314         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7315
7316 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7317
7318         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7319
7320 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7321
7322         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7323           additions to the "related tools/documentation" section
7324
7325 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7326
7327         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7328
7329 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7330
7331         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7332         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7333
7334 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7335
7336         * doc/sdccman.lyx: fix double dash and other minor things
7337         * doc/Makefile: fix double dash
7338
7339 2003-05-28  Karl Bongers(patches from Martin Helmling)
7340         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7341           condition and ignore commands.
7342
7343 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7344
7345         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7346           is in parts still quite out of date, I did changes as far as I felt makes sense
7347           for a non-native english speaker.
7348           Please feel free to add to the manual or to correct my changes.
7349         * doc/Makefile: undid touching the date of intermediate tex files.
7350
7351 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7352
7353         * doc/sdccman.lyx: Manual has an index now
7354
7355 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7356
7357         Finalize muluint/mulsint and mululong/mulslong merging:
7358         * device/lib/_mulint.c
7359         * device/lib/_mullong.c
7360         * device/lib/gbz80/mul.s
7361         * device/lib/gbz80/stubs.s
7362         * device/lib/z80/mul.s
7363         * device/lib/z80/stubs.s
7364         * src/SDCCsymt.c (initCSupport)
7365
7366 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7367
7368         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7369         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7370           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7371           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7372           instead of /Zm500.
7373
7374 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7375
7376         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7377           the regression tests I'm not brave enough to enable 245.b, 245.c
7378         * doc/sdccman.lyx: added latex preamble for hyperref package.
7379           Using pdflatex this will give you a hyperlinked pdf file with
7380           bookmarks. (prepend '%' before /usepackage if this breaks something)
7381
7382 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7383
7384          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7385
7386 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7387
7388         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7389
7390 2003-05-21    <johan AT balder>
7391
7392         * src/SDCCglue.c (printIval): fixed bug #739934
7393
7394 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7395
7396         Applied patch from bug 737905 (renamed yylineo to mylineno):
7397         * src/altlex.c
7398         * src/SDCCast.c
7399         * src/SDCglobl.h
7400         * src/SDCC.lex
7401         * src/SDCCsymt.c
7402         * src/SDCCval.c
7403         * src/pic16/pcode.c: Cleaned warnings
7404         * src/pic16/pcodeflow.c: Cleaned warnings
7405         * src/pic16/pcoderegs.c: Cleaned warnings
7406
7407 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7408
7409         * src/pic16/pcode.c: Cleaned warnings
7410         * src/pic16/pcodepeep.c: Cleaned warnings
7411         * src/pic16/ralloc.c: Cleaned warnings
7412
7413 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7414
7415         * doc/sdccman.lyx: fixed bug 739745
7416         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7417
7418 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7419
7420         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7421         it can be defined with CFLAGS when running configure
7422         * src/SDCCmain.c: fixed compiling + linking with object files
7423
7424 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7425
7426         * configure.in: configure for pic16 port,
7427             added --disable-pic16-port
7428         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7429         * src/SDCCmain.c: linkOptions is changed to set *,
7430             added if/endif conditional macros to remove options help
7431             messages from optionsTable when a port is not configured, added
7432             support for the PIc16 port in the ports table, when executing
7433             the compiler with no port specified on command line, a default
7434             port is selected with the new macro DEFAULT_PORT which is
7435             defined in port.h, in setDefaultOptions() linkOptions is removed
7436             from initialization assignment, since now it is a set,
7437             parseCmdLine uses setParseWithComma for linkOptions, in
7438             linkEdit() linkOptions are accessed with new function indexSet()
7439             which returns the i'th item of a set variable. See SDCCset.c, in
7440             linkEdit() when calling buildCmdLine(), added linkOptions as
7441             last argument. Now users can pass arguments to gplink via the
7442             -Wl option, main() uses pic16glue() to glue up pic16 programs
7443         * src/SDCCpeeph.c: various changes to support pic16
7444         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7445             return the i'th item of the set
7446         * src/SDCCset.h: added function prototype for indexSet()
7447         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7448         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7449         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7450             added macro DEFAULT_PORT
7451         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7452         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7453             generated
7454         * src/pic16/glue.c: commented out some error producing lines
7455         * src/pic16/main.c: __config directives are commented out to stop
7456             gpasm complaining and test the linkage with gplink, _linkCmd and
7457             _asmCmd changed to be more gplink and gpasm friendly
7458         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7459             produced an error when parsed, peep rule 12 is added to utilize
7460             movff, but it is commented out since the pCode does not support
7461             yet a command with 2 address arguments
7462
7463 2003-05-18    <johan AT balder>
7464
7465         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7466         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7467 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7468
7469         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7470   Added feature to script commands from file.
7471
7472 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7473
7474         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7475         * src/SDCCutil.c: include ctype.h for win32
7476
7477 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7478
7479         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7480
7481 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7482
7483         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7484   Fixed so you can set breakpoints prior to run, run does not stop
7485   on entry now.  Add tbreak.  Other enhancements and fixes for use
7486   with ddd.
7487
7488 2003-05-12  Borut Razem <borut.razem AT siol.net>
7489
7490         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7491
7492 2003-05-11  Borut Razem <borut.razem AT siol.net>
7493
7494         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7495         the path of bin directory, so that PATH is the only env. variable, which has to be set
7496         in case of standard installation.
7497         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7498         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7499         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7500
7501 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7502
7503         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7504         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7505         temp files are in the port dir; clean the gen/test directory when
7506         generating new test.c
7507         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7508         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7509         * support/regression/tests/zeropad.c: added
7510
7511 2003-05-09    <johan AT balder>
7512
7513         * src/SDCCglue.c: fixed bug #597940
7514
7515 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7516
7517         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7518   cache sfr, optimize next,step, fix off by one sourceline,
7519   support ddd list function.
7520         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7521
7522 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7523
7524         * support/regression/HTMLgen.py: added compare_s2f()
7525         * support/regression/Makefile: redo 1.27
7526         * support/regression/generate-cases.py: redo 1.5
7527
7528 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7529
7530         * support/regression/tests/float.c: workaround 33 bit hex constant
7531         * support/regression/tests/simplefloat.c: fix division for host
7532
7533 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7534
7535         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7536         that tame's the PIC's over-aggressive optimizer.
7537
7538 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7539
7540          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7541          support for MSVC.
7542
7543 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7544
7545         Initial support for DS80C400. "Hello world" runs on TINIm400
7546         (with polled I/O).
7547
7548 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7549
7550          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7551          * Some notes on ddd usage added in debugger/README
7552          Martin Helmling adding more features and fixes for ddd GUI debugger.
7553          Code added for nexti, stepi, up, down, and other adjustments.
7554
7555 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7556
7557         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7558         * src/pic/peeph.def Added two rules to optimize carry manipulation
7559         * src/pic/* removed debug printfs
7560
7561 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7562
7563         * debugger/mcs51/cmd.c: added header newalloc.h
7564
7565 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7566
7567         * as/Makefile: new EXEEXT
7568         * as/z80/Makefile: remove trailing slash of BUILDIR
7569         * as/z80/clean.mk: new EXEEXT
7570         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7571         * support/cpp2/Makefile.in: new EXEEXT
7572         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7573
7574 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7575
7576         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7577         EXEEXT was introduced to fix all related problems with targets
7578         "clean", "install" and "uninstall"; a couple of further flaws
7579         especially with "clean" have been fixed too
7580         * as/mcs51/Makefile.in
7581         * as/mcs51/clean.mk
7582         * as/z80/Makefile
7583         * Makefile
7584         * clean.mk
7585         * debugger/mcs51/Makefile.in
7586         * debugger/mcs51/clean.mk
7587         * link/z80/Makefile
7588         * link/z80/Makefile.in
7589         * link/z80/clean.mk
7590         * link/Makefile
7591         * packihx/Makefile.in
7592         * packihx/clean.mk
7593         * sim/ucsim/Makefile
7594         * sim/ucsim/clean.mk
7595         * sim/ucsim/avr.src/Makefile.in
7596         * sim/ucsim/avr.src/clean.mk
7597         * sim/ucsim/s51.src/Makefile.in
7598         * sim/ucsim/s51.src/clean.mk
7599         * sim/ucsim/xa.src/Makefile.in
7600         * sim/ucsim/xa.src/clean.mk
7601         * sim/ucsim/z80.src/Makefile.in
7602         * sim/ucsim/z80.src/clean.mk
7603         * sim/ucsim/main_in.mk
7604         * sim/ucsim/packages_in.mk
7605         * sim/ucsim/gui.src/Makefile.in
7606         * sim/ucsim/gui.src/serio.src/Makefile.in
7607         * sim/ucsim/gui.src/serio.src/clean.mk
7608         * src/Makefile.in
7609         * src/clean.mk
7610         * support/cpp2/Makefile.in
7611         * support/cpp2/clean.mk
7612         * support/makebin/Makefile
7613         * support/makebin/clean.mk
7614         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7615         * doc/sdccman.lyx: --program-suffix no longer needed
7616
7617 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7618
7619          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7620          Martin Helmling added support for ddd GUI debugger.
7621          Code added to display assembly, set variables, and other commands
7622          to interface to ddd.
7623
7624 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7625
7626         * as/Makefile: fix target clean
7627         * as/clean.mk: fix target clean
7628         * as/z80/clean.mk: fix target clean
7629
7630 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7631
7632         * Makefile.common.in: added  AT EXEEXT AT
7633         * configure.in: removed all mingw32 stuff
7634         * configure: rebuilt from configure.in
7635         * doc/sdccman.lyx: updated section "installation"
7636         * support/scripts/sdcc_mingw32: adapted to configure
7637         * support/scripts/sdcc_cygwin_mingw32: added
7638
7639 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7640
7641         * src/pic Added object file support for the PIC port
7642         * src/pic Applied patch from Craig Franklin (this started the object file support)
7643         * src/regression Updated the PIC regression tests for object files
7644
7645 2003-04-20  Borut Razem <borut.razem AT siol.net>
7646
7647         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7648           lklex.c: In function `getfid':
7649           lklex.c:203: warning: array subscript has type `char'
7650         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7651           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7652         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7653           stack handling macros
7654
7655 2003-04-19  Borut Razem <borut.razem AT siol.net>
7656
7657         * "handling space characters in file path" task:
7658         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7659         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7660         * support/Util/MySystem.h: make it self-sufficient
7661         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7662           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7663           handling space characters in file path
7664         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7665           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7666         * support/Util/MySystem.c: handling space characters in executable's path
7667
7668 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7669
7670         * as/z80/Makefile: fix permanent rebuild of z80
7671         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7672         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7673
7674 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7675
7676         * src/SDCCopt.c: add special case optimization to replace modulo by
7677           a power of two with a bitwise AND.
7678
7679 2003-04-18    <johan AT balder>
7680
7681         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7682
7683 2003-04-17    <johan AT balder>
7684
7685         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7686         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7687
7688 2003-04-13  Borut Razem <borut.razem AT siol.net>
7689
7690         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7691         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7692           fixed mingw problem in adl_NORMALIZE_PATH
7693
7694 2003-04-12  Borut Razem <borut.razem AT siol.net>
7695
7696         * fixed "#pragma SAVE/RESTORE can not be nested":
7697         * src/SDCC.lex: reworked pragma handling functions
7698         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7699         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7700
7701 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7702
7703         * src/SDCCutil.c (pathEquivalent): defined but not used
7704         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7705         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7706         * configure: rebuilt from configure.in
7707         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7708         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7709         * device/include/Makefile.in: replace sdcc_datadir
7710         * device/lib/Makefile.in: replace sdcc_datadir
7711         * Makefile.common.in: add LDFLAGS from configure
7712         * packihx/Makefile.in: use LDFLAGS
7713         * src/Makefile.in: use LDFLAGS
7714         * support/cpp2/Makefile.in: add LDFLAGS from configure
7715         * support/makebin/Makefile: use LDFLAGS
7716         * .version: bumped version number to 2.3.5
7717
7718 2003-04-12  Borut Razem <borut.razem AT siol.net>
7719
7720         * completed "different paths" task:
7721         * src/SDCCmacro.c: fixed bug in handling quotes
7722         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7723         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7724
7725 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7726
7727         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7728
7729 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7730
7731         * ds390/gen.c ds390/peeph.def: fix bug 706781
7732
7733 2003-04-11  Borut Razem <borut.razem AT siol.net>
7734
7735         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7736
7737 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7738
7739         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7740         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7741          set - this bit used to not be set...).
7742         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7743           bad code in PIC Port
7744         * src/regression/and2.c added to test bug 609268
7745         * src/regression/Makefile added and2.c to regression test
7746
7747
7748 2003-04-08    <johan AT CP255758-A>
7749
7750         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7751         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7752         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7753
7754 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7755
7756         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7757         fix bug #487815
7758         * support/cpp2/Makefile.in: fix bug #487815
7759         * configure: rebuilt from configure.in
7760         * Makefile.common.in: docdir changed, new path suffixes
7761         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7762         * sdcc_vc_in.h: reflect changes from sdccconf.h
7763         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7764         * src/SDCCutil.h: remove BINDIR hack
7765         * doc/sdccman.lyx: update new path hierarchy
7766
7767 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7768
7769         * src/SDCCpeeph.c: added okToRemoveSLOC test
7770
7771 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7772
7773         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7774
7775 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7776
7777         * src/SDCCpeeph.c: added labelIsReturnOnly test
7778         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7779
7780 2003-04-05    <johan AT balder>
7781
7782         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7783         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7784         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7785         * src/SDCCast.c: fixed a warning
7786         * src/SDCCast.h: fixed a warning
7787         * src/SDCCicode.c (operandFromAst): fixed a warning
7788
7789 2003-04-04    <johan AT balder>
7790
7791         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7792         * src/SDCCast.c (decorateType): fixed bug #715076
7793         * src/SDCC.y: fixed bug #702907
7794
7795 2003-04-03    <johan AT balder>
7796
7797         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7798         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7799         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7800         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7801         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7802
7803 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7804
7805         * _decdptr.c: fix return values
7806         * _gptrget.c: fix return values
7807         * _gptrgetc.c: fix return values
7808         * _gptrput.c: fix return values
7809         * _mulint.c: fix return values
7810         * as/z80/Makefile: fix 'make -j' problem
7811
7812 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7815         * configure.in: big cleanup, updated to autoconf 2.5x
7816         * configure: rebuilt from configure.in
7817         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7818         * sdcc_vc_in.h: reflect changes from sdccconf.h
7819         * doc/Makefile: fixed a flaw in "make install"
7820
7821 2003-04-02    <johan AT balder>
7822
7823         * src/ds390/gen.c (genCmp): no comments
7824         * src/mcs51/gen.c (genCmp): no comments
7825         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7826         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7827
7828 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7829
7830         * support/regression/generate-cases.py: place generated file in given sub directory
7831         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7832         * support/regression/Makefile: improvements for 'make -j';
7833         side effect: it's simpler and faster now
7834
7835 2003-03-31  Borut Razem <borut.razem AT siol.net>
7836
7837         * src/z80/main.c: link-{port} and as-{port} defined without path
7838         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7839
7840 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7841
7842         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7843
7844 2003-03-30  Borut Razem <borut.razem AT siol.net>
7845
7846         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7847           changed type of list parameter to set
7848         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7849         * src/port.h: changed type of do_assemble() parameter to set
7850         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7851           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7852           definition of "cppoutfilename" macro with NULL value in preProcess()
7853         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7854         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7855         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7856           replaced with set *binPathSet
7857         * shash_add() deallocates the item, if allready exsists, before adding the new one
7858         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7859
7860 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7861
7862         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7863           a nested for loop bug in the PIC port
7864         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7865           for loops
7866
7867 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7868
7869         * support/Util/dbuf.h: remove C++ stuff to make it portable
7870
7871 2003-03-28  Borut Razem <borut.razem AT siol.net>
7872
7873         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7874           literal strings in stringLiteral()
7875         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7876         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7877           to the project
7878
7879 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7880
7881         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7882
7883 2003-03-26    <johan AT balder>
7884
7885         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7886         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7887         * src/SDCCast.c (decorateType): fixed " -v < 3"
7888
7889 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7890
7891         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7892         Added Lenny Story's debug infrastructure changes:
7893         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7894         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7895         * src/cdbFile.c: added
7896         * src/SDCCdebug.c: added
7897         * src/SDCCdebug.h: added
7898         * src/SDCCast.c (createFunction)
7899         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7900         * src/SDCCmain.c (parseCmdLine, main)
7901         * src/SDCCmem.c (redoStackOffsets)
7902         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7903         * src/SDCCsymt.h
7904         * src/common.h
7905         * src/avr/gen.c (genAVRCode)
7906         * src/ds390/gen.c (gen390Code)
7907         * src/mcs51/gen.c (gen51Code)
7908         * src/pic/gen.c (genpic14Code)
7909         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7910         * src/xa51/gen.c (genXA51Code)
7911         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7912
7913 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7914
7915         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7916         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7917
7918 2003-03-22    <johan AT balder>
7919
7920         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7921
7922 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7923
7924         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7925         * doc/cdbfileformat.lyx: added, written by Lenny Story
7926         * doc/Makefile: added cdbfileformat.lyx
7927         * doc/clean.mk: added cdbfileformat.lyx
7928
7929 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7930
7931         * src/mcs51/peeph.def: fix bug #705773
7932
7933 2003-03-20    <johan AT balder>
7934
7935         An sfr/sbit can have an "at #" AND an initializer
7936         * src/SDCCsymt.c (checkSClass):
7937         * src/SDCCmem.c (allocGlobal):
7938         * src/SDCCmem.c (allocLocal):
7939         * src/SDCCast.c (createBlock):
7940
7941 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7942
7943         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7944
7945 2003-03-16    <johan AT balder>
7946
7947         Undid the hackup of const and volatile, the problem is much bigger
7948         * src/SDCC.y:1.65
7949         * src/SDCCast.c:1.171
7950         * src/SDCCglue.c:1.138
7951         * src/SDCCicode.c:1.146
7952         * src/SDCCsymt.c:1.150
7953         * src/SDCCval.c:1.65
7954
7955 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7956
7957         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7958         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7959
7960 2003-03-13    <johan AT balder>
7961
7962         Hackup const and volatile modifiers in type chains a bit:
7963         * src/SDCC.y:1.63
7964         * src/SDCCast.c:1.169
7965         * src/SDCCglue.c:1.136
7966         * src/SDCCicode.c:1.143
7967         * src/SDCCsymt.c1.146
7968         * src/SDCCsymt.h1.59
7969         * src/SDCCval.c:1.63
7970
7971 2003-03-12    <johan AT balder>
7972
7973         * src/SDCCBBlock.h: more LRH debugging junk
7974         * src/SDCCcflow.h: more LRH debugging junk
7975         * src/SDCCloop.c: more LRH debugging junk
7976         * src/SDCC.y (struct_declaration): fixed bug #697590
7977         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7978         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7979         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7980
7981 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7982         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7983         test function names must now match exactly).
7984         * src/SDCCcse.c: added special case in findCheaperOp to allow
7985         extending a short integer. Makes less awful code for bug 700121 test case.
7986
7987 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7988
7989         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7990         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7991
7992 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7993
7994         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7995         actually called (operandsNotEqual() was called for all
7996         operandsNotEqualX tests).
7997
7998 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7999
8000         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8001         with shorter literals. Fixes bug 700121.
8002
8003 2003-03-11    <johan AT balder>
8004
8005         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8006
8007 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8008
8009         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8010         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8011
8012 2003-03-10  Borut Razem <borut.razem AT siol.net>
8013
8014         * src/SDCCmain.c: pipe preprocessor's output
8015         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8016         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8017         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8018         which closes all pipes in pipeSet set
8019         * src/SDCCset.c: free deleted item in function deleteSetItem()
8020         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8021         moved from z80 to src subproject
8022         * .version: increased version number to 2.3.4
8023
8024 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8025
8026         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8027         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8028         * support/regression/ports/xa51/spec.mk: fix typo
8029
8030 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8031
8032         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8033
8034 2003-03-09  Borut Razem <borut.razem AT siol.net>
8035
8036         * src/SDCCmain.c: pipe preprocessor's output
8037         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8038         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8039         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8040         which closes all pipes in pipeSet set
8041         * src/SDCCset.c: free deleted item in function deleteSetItem()
8042         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8043         moved from z80 to src subproject
8044
8045 2003-03-09  Borut Razem <borut.razem AT siol.net>
8046
8047         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8048         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8049         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8050         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8051         * src/SDCCglobl.h: unification of WIN32 native definitions
8052
8053 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8054
8055         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8056
8057 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8058
8059         * src/configure.in:   check for endianess (even while cross-compiling)
8060         * src/configure:      check for endianess (even while cross-compiling)
8061         * src/configure_in.h: check for endianess (even while cross-compiling)
8062         * src/avr/gen.c:        remove old endianess stuff
8063         * src/mcs51/gen.c:      remove old endianess stuff
8064         * src/ds390/gen.c:      remove old endianess stuff
8065         * src/pic/gen.c:        remove old endianess stuff
8066         * src/pic/genarith.c:   remove old endianess stuff
8067         * src/pic/glue.c:       fix endianess check
8068         * src/pic16/gen.c:      remove old endianess stuff
8069         * src/pic16/genarith.c: remove old endianess stuff
8070         * src/pic16/glue.c:     fix endianess check
8071         * src/xa51/gen.c:       remove old endianess stuff
8072         * src/z80/gen.c:        fix endianess check
8073         * src/SDCCglue.c:       fix endianess check
8074         * src/ds390/peeph.def: fix bug 700036
8075
8076 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8077
8078         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8079         * src/configure: find appropriate data-types on host for SDCC's int and long
8080         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8081         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8082         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8083
8084 2003-03-07    <johan AT balder>
8085
8086         Just a big NOOP:
8087                 some minor cleanups before the big shot
8088                 OP_DEFS and OP_USES now use Kevin's protection
8089                 new option --nolabelopt
8090
8091         * src/SDCCBBlock.c:
8092         * src/SDCCast.c,:
8093         * src/SDCCcflow.c:
8094         * src/SDCCcse.c:
8095         * src/SDCCicode.c:
8096         * src/SDCCicode.h:
8097         * src/SDCClabel.c:
8098         * src/SDCCloop.c:
8099         * src/SDCCmain.c:
8100         * src/ds390/ralloc.c:
8101         * src/mcs51/ralloc.c:
8102         * src/pic/ralloc.c:
8103         * src/xa51/ralloc.c:
8104         * src/z80/ralloc.c:
8105
8106 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8107
8108         * src/pic/pcode.c (get_op): fix 64 bit warnings
8109         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8110         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8111         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8112         * support/regression/tests/malloc.c: fix 64 bit warnings
8113
8114 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8115
8116         * src/mcs51/gen.c (genMinus): fixed bug 696436
8117
8118 2003-03-02  Borut Razem <borut.razem AT siol.net>
8119
8120         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8121
8122 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8123
8124         * configure.in: test for mkstemp
8125         * sdccconf_in.h: add HAVE_MKSTEMP
8126
8127 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8128
8129         * device/include/ctype.h: removed warning while using --stack-auto
8130         * device/include/malloc.h: removed warning while using --stack-auto
8131         * device/include/string.h: removed warning while using --stack-auto
8132
8133 2003-02-23  Borut Razem <borut.razem AT siol.net>
8134
8135         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8136         because NDEBUG is defined (see man assert)
8137         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8138
8139 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8140
8141         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8142         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8143
8144 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8145
8146         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8147         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8148
8149 2003-02-18    <johan AT balder>
8150
8151         * as/mcs51/asmain.c (asmbl): module can start with a digit
8152         * as/z80/asmain.c (asmbl): module can start with a digit
8153
8154 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8155
8156         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8157         * src/asm.c: fix pipe() for Mingw32
8158
8159 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8160
8161         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8162         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8163         make -V work again; --c1mode reads now from stdin
8164         * doc/sdccman.lyx: added --c1mode
8165         * support/Util/SDCCerr.c: new messages for c1 mode
8166         * support/Util/SDCCerr.h: new messages for c1 mode
8167         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8168
8169 2003-02-15    <johan AT balder>
8170
8171         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8172
8173 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8174
8175         * doc/sdccman.lyx: Environment variables, -o and other minor things
8176
8177 2003-02-14    <johan AT balder>
8178
8179         * src/xa51/main.c: before anyone really tries to use it :)
8180
8181         * Install doc's in share/sdcc/doc
8182         * removed some obsolete files
8183         * Do a proper make distclean and uninstall
8184         M Makefile.common.in
8185         R sdccbuild.sh
8186         M as/Makefile
8187         M device/include/Makefile.in
8188         M device/lib/Makefile.in
8189         M doc/sdccman.lyx
8190         M link/Makefile
8191         M sim/ucsim/doc/Makefile.in
8192         M src/clean.mk
8193         R src/avr/peeph.rul
8194         R src/xa51/peeph.rul
8195         M support/cpp2/Makefile.in
8196         M support/makebin/Makefile
8197
8198
8199 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8200
8201         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8202
8203 2003-02-10  Borut Razem <borut.razem AT siol.net>
8204
8205         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8206         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8207         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8208         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8209         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8210         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8211         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8212         src/z80/Makefile.bcc: Borland Makefile cleanup
8213         * as/z80/Makefile.bcc: Added Borland Makefile
8214         * support/cpp2/borland.h: Removed
8215
8216 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8217
8218         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8219         * src/SDCC.lex: new pragma NOIV
8220         * src/SDCCglobl.h: new pragma NOIV
8221         * src/SDCCmem.c: new pragma NOIV
8222
8223 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8224
8225         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8226
8227 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8228
8229         * src/SDCCmain.c: signal handling is switched off by --debug
8230         * doc/Makefile: small fix for install; use clean.mk again
8231         * doc/clean.mk: clean *.pdf and *.html too
8232
8233 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8234
8235         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8236         * device/lib/printfl.c: fix a ds390 bug by making it portable
8237         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8238         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8239         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8240         * debugger/mcs51/cmd.c: converted multi-line string literals
8241         * sim/ucsim/globals.cc: converted multi-line string literals
8242         * src/SDCCmain.c: introduced signal handler to remove temp files
8243         * doc/Makefile: small tweaks, implement clean
8244         * doc: removed generated files
8245
8246 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8247
8248         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8249         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8250         Address Record is not correctly generated for DS390."
8251
8252 2003-02-02  Borut Razem <borut.razem AT siol.net>
8253
8254         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8255         * as/mcs51/asm.h: fixed compilation with Borland C
8256         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8257         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8258         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8259         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8260         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8261         src/z80/Makefile.bcc: delete $(LIB) only if exist
8262         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8263
8264 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8265
8266         * device/include/malloc.h: introduced NULL
8267         * device/include/string.h: introduced NULL
8268         * device/include/stdlib.h: introduced NULL
8269         * device/lib/_memcpy.c: removed NULL
8270         * device/lib/_strcat.c: removed NULL
8271         * device/lib/_strchr.c: removed NULL
8272         * device/lib/_strcmp.c: removed NULL
8273         * device/lib/_strcpy.c: removed NULL
8274         * device/lib/_strcspn.c: removed NULL
8275         * device/lib/_strlen.c: removed NULL
8276         * device/lib/_strncat.c: removed NULL
8277         * device/lib/_strncmp.c: removed NULL
8278         * device/lib/_strncpy.c: removed NULL
8279         * device/lib/_strpbrk.c: removed NULL
8280         * device/lib/_strrchr.c: removed NULL
8281         * device/lib/_strspn.c: removed NULL
8282         * device/lib/_strstr.c: removed NULL
8283         * device/lib/_strtok.c: removed NULL
8284         * device/lib/malloc.c: removed NULL, include own header
8285
8286 2003-02-02    <johan AT balder>
8287
8288         * 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
8289         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8290         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8291         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8292         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8293         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8294
8295 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8296
8297         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8298         area 'DATA'"
8299
8300 2003-02-01    <johan AT balder>
8301
8302         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8303
8304 2003-01-31    <johan AT CP255758-A>
8305
8306         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8307
8308 2003-01-30    <johan AT balder>
8309
8310         * src/SDCCBBlock.c: automatic bug detection
8311         * src/SDCCicode.c: automatic bug detection
8312
8313 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8314
8315         * src/SDCCglobl.h:   now --xram-size 0 works
8316         * src/SDCCmain.c:    now --xram-size 0 works
8317
8318 2003-01-29    <johan AT balder>
8319
8320         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8321
8322 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8323
8324         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8325         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8326         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8327         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8328         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8329         * src/SDCCmain.c:    Added options --xram-size and --code-size
8330
8331 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8332
8333         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8334         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8335
8336 2003-01-27    <johan AT balder>
8337
8338         * src/SDCC.y: fixed bug #613764
8339
8340 2003-01-26    <johan AT balder>
8341
8342         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8343         * src/SDCCsymt.h: fixed bug #673374
8344         * src/SDCCglue.c: fixed bug #661910
8345         * src/SDCCast.c: fixed bug #458099 and 673374
8346
8347 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8348
8349         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8350         * as/mcs51/strcmpi.h: added
8351         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8352         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8353         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8354         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8355         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8356         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8357         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8358         * as/mcs51/Makefile.aslink: new module strcmpi
8359         * as/mcs51/Makefile.asx8051: new module strcmpi
8360         * as/mcs51/Makefil.bcc: new module strcmpi
8361         * as/mcs51/Makefile.in: new module strcmpi
8362         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8363
8364 2003-01-26    <johan AT balder>
8365
8366         * src/SDCCglue.c: reverted back to 1.124
8367         * src/SDCCast.c: reverted back to 1.156
8368         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8369
8370 2003-01-25    <johan AT balder>
8371
8372         * src/SDCCglue.c: A better fix for bug #661910
8373         * src/SDCCast.c: A better fix for bug #661910
8374         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8375
8376 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8377
8378         * src/Makefile.in: remove spawn.o
8379         * src/SDCCmain.c: remove spawn.h
8380         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8381         * src/spawn.c: removed
8382         * src/spawn.h: removed
8383         * support/regression/ports/ds390/spec.mk: link with -r
8384
8385 2003-01-24    <johan AT CP255758-A>
8386
8387         * src/ds390/gen.c (aopOp): fixed bug #667458
8388         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8389         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8390         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8391
8392 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8393
8394         * src/mcs51/peeph.def: better assembler identation by Frieder
8395         * src/mcs51/gen.c: better assembler identation by Frieder
8396
8397 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8398
8399         * as/z80/string.h: removed for gcc 3.2
8400         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8401         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8402
8403 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8404
8405         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8406         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8407         * support/regression/Makefile: separate temp files for ports
8408         * support/regression/generate-cases.py: separate temp files for ports
8409         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8410         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8411
8412 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8413
8414         * moved tinitalk to device/examples/ds390
8415
8416 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8417
8418         * as/mcs51/lkmem.c: rflag is for DS390
8419         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8420         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8421                          (linkEdit): move mem- and map-files the same way as ihx-files
8422         * src/z80/main.c (_setDefaultOptions): removed --generic
8423         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8424         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8425         * src/pic/glue.c (picglue): --c1mode works again
8426         * src/pic16/glue.c (pic16glue): --c1mode works again
8427         * src/asm.c (printCLine): fix #660034
8428
8429 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8430
8431         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8432         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8433         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8434         * as/mcs51/lkmem (summary): better fix for sp problem
8435         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8436         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8437         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8438                                               remove --stack-after-data
8439
8440 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8441
8442         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8443         * src/SDCCutil.c (join): ugly bug: missing '\0'
8444         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8445
8446 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8447
8448         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8449         * src/port.h: typo
8450         * src/pic/main.c (_asmCmd): gpasm supports -o
8451         * src/z80/main.c: more general macros
8452         * device/lib/Makefile.in: remove intermediate files
8453
8454 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8455
8456         * .version: Bumped version number to 2.3.3
8457         * src/SDCCBBlock.c: new option -o
8458         * src/SDCCglobl.h: new option -o
8459         * src/SDCCglue.c: new option -o
8460         * src/SDCCmain.c: new option -o
8461         * src/asm.c: new option -o
8462         * src/ds390/main.c: new option -o
8463         * src/pic/glue.c: new option -o
8464         * src/pic/pcode.c: new option -o
8465         * src/pic/ralloc.c: new option -o
8466         * src/pic16/glue.c: new option -o
8467         * src/pic16/pcode.c: new option -o
8468         * src/pic16/ralloc.c: new option -o
8469         * src/z80/main.c: new option -o
8470         * device/lib/Makefile.in: use -o
8471         * support/regression/ports/ds390/spec.mk: use -o
8472         * support/regression/ports/gbz80/spec.mk: use -o
8473         * support/regression/ports/mcs51/spec.mk: use -o
8474         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8475         * support/regression/ports/z80/spec.mk: use -o
8476         * support/regression/ports/ucz80/spec.mk: use -o
8477         * support/regression/ports/xa51/spec.mk: use -o
8478         * support/regression/fwk/lib/timeout.c: fix usage string
8479
8480 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8481         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8482
8483 2003-01-07    <johan AT balder>
8484
8485         * src/SDCCast.c (decorateType): fixed bug #600035
8486
8487 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8488         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8489         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8490         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8491         * src/pic/pcode.c: outcommented unused variable to remove warnings
8492         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8493
8494 2003-01-06    <karl AT turbobit.com>
8495         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8496    regression tests.
8497
8498 2003-01-06    <johan AT balder>
8499
8500         * src/SDCCicode.c: fixed array add
8501
8502 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8503         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8504         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8505
8506 2003-01-04    <johan AT balder>
8507
8508         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8509
8510 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8511         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8512
8513 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8514         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8515         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8516
8517 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8518         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8519
8520 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8521         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8522
8523 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8524         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8525
8526 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8527
8528     * in \sdcc\as\mcs51\ changed these files in order to create an
8529     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8530     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8531     following files to include the previous two files: aslink.dsp,
8532     Makefile.aslink, Makefile.bcc, and Makefile.in.
8533
8534     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8535     .adb instead of .cdb
8536
8537 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8538
8539         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8540         value from option --iram-size.
8541
8542 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8543
8544         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8545         dram[] array.
8546
8547 2002-09-18    <wiml AT hhhh.org>
8548
8549         * SDCClrange.h: exposed setFromRange() and setToRange()
8550         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8551           packRegsForAccUse() (bug 542397)
8552         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8553           multiple times and emitting the fetch operations more than once
8554           added aopGetUsesAcc() function to allow binary operators to
8555           fetch their operands in the correct order; made genMinus() emit
8556           compact code for X = LITERAL - Y
8557
8558 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8559         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8560         sprintf() in line 1267.
8561
8562 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8563         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8564         like ports.
8565
8566 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8567         Changes to aslink (All the changes are marked with 'JCF'):
8568
8569         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8570         summary().
8571
8572         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8573         area BSEG.  Also moves, if possible, the DATA area down into the internal
8574         ram so more space is available.
8575
8576         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8577         sflag.
8578
8579         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8580         not bytes.  Function summary() which creates a memory usage summary
8581         file with extension .mem.  Reports of overlaping stack and small stack
8582         size.  If the space for the stack is less than 16 bytes aslink trows a
8583         warning.
8584
8585         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8586         the 8051.  Option 'y' for memory summary output file.
8587
8588         Changes to sdcc (All the changes are marked with 'JCF'):
8589
8590         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8591
8592         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8593         overlaying area for it (uses RegBankUsed[4]).
8594
8595         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8596         bank zero as used by default.  By default aslink locates the stack
8597         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8598         the creation of the .mem file.  Delegates the allocation of data area
8599         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8600         the begining of the stack area to aslink.
8601
8602         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8603         glue() in SDCCglue.c creates an area for it.
8604
8605 2002-09-03  Borut Razem <borut.razem AT siol.net>
8606         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8607         sdcc/src/pic/glue.c:
8608         introduced atexit() handler for teporay files removal in case of
8609         errors, assertions, ...
8610
8611 2002-08-29  Borut Razem <borut.razem AT siol.net>
8612         * sdcc/support/cpp2/auto-host_vc_in.h:
8613         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8614         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8615         Maybe there is a similar problem with BORLANDC? It should be checked!
8616
8617         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8618         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8619         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8620         was not executed, and the compiler (cl) launched a warning:
8621         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8622
8623 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8624         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8625
8626 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8627         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8628
8629         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8630           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8631           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8632           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8633           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8634           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8635           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8636         - added Release configuration in VS projects
8637         - review of compiler an linker options
8638         - VC .exe files are generated in bin_vc directory, not to interfere
8639           with binaries generated from other projects (cygwin, mingw, bcc ...)
8640
8641         * sdcc/src/yacc.dsp: added
8642
8643         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8644         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8645         and insert the version number definitions from .version
8646
8647         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8648
8649         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8650         added - genarate auto-host.h using auto-host_vc_in.h as template
8651
8652         * sdcc/sdcc_vc.h,
8653         removed from CVS, generated automatically
8654
8655 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8656         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8657
8658 2002-08-11  Borut Razem <borut.razem AT siol.net>
8659         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8660
8661 2002-08-10  Borut Razem <borut.razem AT siol.net>
8662         * src/SDCCmain.c (main):
8663         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8664         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8665         The consequence was that some temporary files were not removed.
8666
8667         * src/SDCCglue.c:
8668         unification of code in functions tempfilename() and tempfile():
8669         function tempnam() is defined in Visual Studio 6.0 and .NET
8670
8671         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8672
8673         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8674           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8675         - removed compiler command line option /WX: Treats all warnings as errors
8676         - update a list of source files, included into the project
8677
8678         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8679           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8680         changed project type to Generic Project so that can be correcly converted to VS.NET project
8681
8682         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8683
8684         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8685
8686         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8687
8688         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8689         added return 0 statements after assert() to make compiler happy
8690
8691         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8692         added newline in the def file to keep MSC compiler satisfied
8693
8694         * sdcc/src/z80/gen.c:
8695         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8696           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8697         - solved MSC error in function aopDump()
8698
8699         * sdcc_vc.h: define PREFIX as "\\sdcc"
8700
8701 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8702         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8703
8704 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8705         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8706         - Rewrote the register banking algorithm.
8707         - Added pCode live-range analysis to registers (for now, only non-used and
8708         singly-used registers optimized away)
8709
8710         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8711
8712         * 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.
8713
8714 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8715         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8716
8717 2002-04-22  Michael Hope  <michaelh AT vroom>
8718
8719         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8720
8721         * configure.in (DD_COPT): Added include support required for gbdk.
8722
8723         * .version: Bumped version number just to increase it.
8724
8725         * src/SDCCmain.c: Added -nostdinc to the default options.
8726
8727 2002-04-15  Michael Hope  <michaelh AT vroom>
8728
8729         * device/lib/z80/printf.c (sprintf): Added.
8730
8731         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8732
8733         * src/z80/peeph.def: Added transpose redundent load rule.
8734
8735         * src/z80/main.c: Added force callee saves for jaune.
8736
8737         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8738
8739         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8740
8741 2002-03-28  Johan Knol  <johan AT balder>
8742
8743         * src/SDCCval.c: fixed bug #532436
8744
8745 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8746         * /src/port.h:
8747         Added "char *Processor" field to the port structure.
8748
8749         * /src/SDCCmain.c:
8750         Added -p option. Allows port dependent processor to be specified.
8751
8752         * all ports:
8753         Initialized the new field char *Processor field to NULL in all ports
8754
8755         * /src/pic/*:
8756         Compiler generated registers for interrupt context saving
8757         were not getting allocated.
8758
8759 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8760
8761         * /src/SDCCast.c:
8762         Fixed left shift. Will promote the left side of a left shift
8763         if a) left shifting more than size of operand or b) when assigned
8764         to something size > size of left side
8765
8766 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8767         * src/pic/*
8768         tons of changes. Register allocation has been
8769         rewritten. Added customization for the various PICs. Flow
8770         analysis is restructured. ...
8771
8772         * src/pic/device.h:
8773         Added
8774
8775         * src/pic/device.c:
8776         Added. device.c is a PIC port hack to accomodate variations
8777         in PIC devices.
8778
8779 2002-03-13  Michael Hope  <michaelh AT vroom>
8780
8781         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8782
8783 2002-03-04  johanknol  <johanknol AT manik>
8784
8785         * /src/SDCCval.c: fixed
8786
8787         const unsigned char arr[][2] = { { 0, 1 } };
8788         t18.c:1: error: Initializer element is not constant
8789
8790 2002-03-04  bela  <bela AT manik>
8791
8792         * /device/include/mcs51reg.h:
8793         ds89c420 register definition update
8794
8795 2002-03-03    <johan AT FRIJA>
8796
8797         * support/Util/SDCCerr.c: did something, but don't no why anymore
8798
8799         * support/regression/tests/bug-524691.c: made it a little less shy
8800
8801         * src/SDCCast.c (decorateType): fixed bug #524697
8802
8803         * src/SDCCast.c: made some lineno improvements
8804
8805         * src/SDCCval.c (getNelements): changed warning to error
8806
8807         * src/SDCCglue.c (printIvalArray): changed warning to error
8808
8809         * src/SDCCicode.c: fixed a warning for mingw
8810
8811         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8812
8813         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8814
8815 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8816
8817         * src/ds390/peeph.def:
8818         Added some more peephole rules
8819
8820         * src/ds390/gen.c: Various fixes & enhancements
8821
8822         * src/SDCClrange.c, src/SDCClrange.h:
8823         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8824
8825         * src/ds390/ralloc.c:
8826         various fixes & enhancements (ds390) specific
8827
8828         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8829         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8830         from rallocs.
8831
8832         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8833
8834 2002-03-02    <johan AT FRIJA>
8835
8836         * src/SDCCast.c (decorateType): fixed bug #524708
8837
8838         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8839
8840         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8841
8842 2002-03-01  Michael Hope  <michaelh AT vroom>
8843
8844         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8845
8846         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8847
8848 2002-03-01    <johan AT FRIJA>
8849
8850         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8851
8852         * src/SDCCast.c (decorateType): fixed bug #524209
8853
8854         * src/SDCCval.c (valNot): fixed bug #524195
8855
8856 2002-02-26    <johan AT balder>
8857
8858         * src/xa51/gen.c: fixed a warning
8859
8860         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8861
8862         * src/SDCCast.c (decorateType): fixed bug #522534
8863
8864 2002-02-23    <johan AT balder>
8865
8866         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8867
8868 2002-02-22    <johan AT balder>
8869
8870         * src/SDCCast.c: fixed bug #514865
8871
8872         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8873
8874 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8875
8876         * sdcc/src/SDCCloop.c:
8877         Previous fix was not good. basic blocks that have "break" or "return" are
8878         not really partof a loop , but live ranges used in these blocks should
8879         be live thru the entire loop, so set partOfLoop but don't add them to
8880         loop region
8881
8882 2002-02-21    <johan AT FRIJA>
8883
8884         * src/SDCCcse.c: fixed bug #514308
8885
8886 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8887
8888         * src/SDCCloop.c:
8889         Fixed BUG #519583. If a conditional block ended in a return/break
8890         statement inside a loop, it was not being considered part of the loop.
8891
8892         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8893
8894 2002-02-10  Karl Bongers <karl AT turbobit.com>
8895
8896         * debugger/*:
8897         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8898         with lots of comments and notes.
8899
8900         * device/examples/test2.c:
8901         Fix bug, "red" variable not being initialized(compiler complained).
8902
8903         * device/examples/Makefile, examples/test3.c:
8904         Add Makefile in device/examples folder, compiles test3.c
8905         for use as a multiple module SDCDB test case.
8906
8907         * sim/ucsim/cmd.src/cmdset.cc:
8908         Took out debug printfs in ucsim "next" command.
8909
8910         * sim/ucsim/xa.src:
8911         Karl and Johan start ucsim XA support.  Most dissassembly working,
8912         about 75% emulation done(plenty of work remaining).
8913
8914         * sim/ucsim/z80.src:
8915         Add Z80 support to ucsim, add test-ucz80 regression test,
8916         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8917         Notice z80 compiler fails on examples/test3.c/crc code.
8918
8919 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8920
8921         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8922         Added support for --parms-in-bank1
8923
8924         * src/ds390/peeph.def:
8925         added a few more peephole optimzations
8926
8927         * src/ds390/main.c:
8928         1) added __builtin_inp & __builtin_outp used to read in data of given length
8929            from a memory mapped port
8930         2) added __builtin_memcmp
8931         3) added __builtin_swapw swap bytes of a short
8932
8933         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8934         1) handle multiple send & receives from register bank1
8935         2) ralloc can now allocate DPTR1 to some liveRanges
8936
8937         * src/SDCCsymt.c, src/SDCCsymt.h:
8938         changes to handle multiple sends & receives
8939
8940         * src/SDCCptropt.h:
8941         added some pointer arithmetic optimization
8942
8943         * src/SDCCptropt.c:
8944         added some pointer arithmetic optimizations but not stable yet so not
8945         called from anywhere (will get this working shortly)
8946
8947         * src/SDCCopt.c: fixed for multiple sends & receives
8948
8949         * src/SDCCmain.c:
8950         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8951         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8952            set preprocessor defines (depending on options)
8953
8954         * src/SDCCicode.c, src/SDCCicode.h:
8955         changes made to handle multiple sends & receives
8956
8957         * src/SDCCglobl.h:
8958         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8959
8960         * src/SDCCcse.c, src/SDCCcse.h:
8961         added function findbackward def (to be used in upcoming optimization)
8962
8963         * src/SDCCcflow.c, src/SDCCcflow.h:
8964         added function returnAtEnd - to determine if a basic block terminates with
8965         a RETURN iCode
8966
8967         * src/SDCCast.c, src/SDCCast.h:
8968         added option parms-in-bank1
8969
8970         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8971         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8972         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8973         adjusted for --parms-in-bank1 option
8974
8975         * device/include/string.h:
8976         donot redefine "reentrant" keyword
8977
8978         * device/include/ds80c390.h: Added some more SFRs
8979
8980 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8981
8982         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8983
8984 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8985
8986         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8987
8988 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8989
8990         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8991
8992 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8993
8994         * Added --xram-movc option
8995
8996 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8997
8998         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8999
9000 2002-01-11  Johan Knol
9001
9002         * Added math lib of Jesus Calvino-Fraga
9003
9004 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9005
9006         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9007         * support/regression/Makefile: new target test-mcs51-stack-auto
9008         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9009
9010 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9011
9012         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9013
9014 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9015
9016         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9017
9018 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9019
9020         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9021
9022         * src/SDCCglue.h: add definition for printIvalChar()
9023
9024 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9025
9026         * src/SDCCast.c: fix #498138 by Johan
9027
9028         * src/SDCCglue.c: fix #498138 by Johan
9029
9030 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9031
9032         * support/regression/Makefile: fix clean
9033
9034         * support/regression/ports/ds390/support.c: fix transmission of last character
9035
9036 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9037
9038         * /sdcc/src/ds390/gen.c:
9039         a) improved computing address of stack variable
9040         b) took out some #if 0 code
9041         c) improved parmBytes adjustment
9042         d) improved genPlusIncr & genMinusIncr
9043         e) genCmp could generate bad code (when left assigned to DPTR)
9044         f) Fixed bug in hasInc
9045
9046         * /sdcc/src/ds390/ralloc.c:
9047         a) packRegsForSupport could mess up live information (Fixed)
9048         b) packRegsDPTRuse could be incorrect for left & right shift
9049
9050         * /sdcc/src/mcs51/ralloc.c:
9051         packRegsForSupport could mess up the live information (Fixed)
9052
9053         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9054
9055         * /sdcc/src/SDCCast.c:
9056         can reverse a loop even if function call is present as long
9057         as the loop control variable is local & is not passed as parameter
9058
9059 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9060
9061         * /sdcc/ChangeLog: *** empty log message ***
9062
9063         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9064         More builtin function additions for TININative
9065
9066         * /sdcc/src/ds390/ralloc.c:
9067         Had broken the regression testsuite
9068
9069         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9070
9071         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9072         Added funcattr hasStackParms will be set for reentrant functions when there
9073         are paramteres on the stack, this helps in minimizing frame pointer generation
9074         typeFromStr can handle function pointers now
9075
9076         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9077         *** empty log message ***
9078
9079 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9080
9081         * /src/ds390/gen.c, /src/ds390/main.c:
9082         More builtin function additions for TININative
9083
9084         * /src/ds390/ralloc.c:
9085         Had broken the regression testsuite
9086
9087         * /src/SDCCast.c: Fixed a bug in dumptree
9088
9089         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9090         Added funcattr hasStackParms will be set for reentrant functions when there
9091         are paramteres on the stack, this helps in minimizing frame pointer generation
9092         typeFromStr can handle function pointers now
9093
9094         * /doc/builtins.txt, /doc/TININative.txt:
9095         *** empty log message ***
9096
9097
9098 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9099
9100         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9101         ALPHA version for -mTININative
9102
9103         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9104         updated to reflect changes in the port structure
9105
9106         * /src/port.h:
9107         added function do_assemble (similar to do_link) if non-null this function
9108         will be called to do assembly (-mTININative) requires a multi command
9109         assembly
9110         added function genAssemblerEnd will be called to generate assembler Epilogue
9111
9112         * /src/SDCCsymt.c:
9113         added _JavaNative to debug info printing
9114
9115         * /src/SDCCmain.c: added option --tini-libid
9116         added port->do_assemble function (-mTININative) has a multi command assemble
9117
9118         * /src/SDCCglue.c: Disabled "constExpr" check
9119         added port->genAssemblerEnd function
9120
9121         * /src/SDCCglobl.h: Added option --tini-libid value
9122
9123         * /src/SDCCast.h:
9124         tookout optimizeCompare from the header (has no external references)
9125
9126         * /src/SDCCast.c: made one more function "static"
9127
9128 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9129
9130         * src/z80/mappings.i: Added z80asm support.
9131
9132         * src/z80/main.c: Added z80asm support on --asm=z80asm
9133
9134         * src/z80/gen.c: Fixed asm portability issues.
9135
9136         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9137
9138         * src/SDCCglue.c (printExterns): Added global/extern split.
9139
9140 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9141
9142         * support/regression/Makefile: added test for mcs51 model large
9143
9144         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9145
9146         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9147
9148 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9149
9150         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9151
9152 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9153
9154         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9155
9156         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9157
9158 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9159
9160         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9161
9162         * support/regression/tests/simplefloat.c: Port to mcs51.
9163
9164 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9165         * support/regression/tests/bug-485362.c: Added.
9166
9167         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9168
9169         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9170
9171         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9172
9173         * src/z80/gen.c (aopDump): Added a dump function.
9174
9175 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9176         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9177
9178         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9179
9180         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9181
9182         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9183
9184         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9185
9186         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9187
9188         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9189
9190         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9191
9192         * support/regression/ports/ds390/support.c: Use tinibios.
9193
9194         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9195
9196 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9197
9198         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9199         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9200
9201         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9202
9203         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9204
9205 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9206
9207         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9208
9209         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9210         (packRegsForIYUse): Created and optimised.
9211
9212 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9213
9214         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9215 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9216
9217         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9218
9219         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9220
9221         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9222
9223 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9224
9225         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9226
9227         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9228
9229 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9230
9231         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9232
9233         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9234
9235         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9236
9237 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9238
9239         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9240         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9241         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9242
9243         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9244
9245         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9246         (genNotFloat): Added.
9247         (genUminusFloat): Added.
9248
9249         * device/lib/z80/Makefile: Added floating pt stubs.
9250
9251         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9252
9253         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9254
9255         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9256
9257 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9258
9259         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9260
9261         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9262
9263         * sdcc/support/regression/Makefile: Add port ds390.
9264
9265         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9266
9267         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9268
9269         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9270
9271         * sdcc/support/regression/ports/ds390/support.c: Added.
9272
9273         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9274
9275         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9276
9277         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9278
9279 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9280
9281         * device/include/malloc.h: Added z80 and gbz80 support.
9282
9283         * device/lib/gbz80/heap.s: Added.
9284
9285         * device/lib/z80/heap.s: Added.
9286
9287         * device/lib/malloc.c: Added z80 and gbz80 support.
9288
9289         * support/regression/tests/malloc.c (testMalloc): Added.
9290
9291         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9292
9293         * support/regression/tests/bug-478094.c: Added.
9294
9295         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9296
9297 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9298
9299         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9300
9301         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9302
9303         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9304
9305         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9306
9307         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9308
9309 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9310
9311         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9312
9313 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9314
9315         * support/regression/tests/bug-477927.c: Added.
9316
9317         * src/z80/peeph.def: Added minor rules.
9318
9319         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9320
9321         * src/z80/peeph.def: Added jump optimisation modification.
9322
9323 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9324
9325         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9326
9327 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9328
9329         * support/regression/tests/funptrs.c: Added.
9330
9331 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9332
9333         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9334
9335 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9336
9337         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9338
9339         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9340
9341         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9342         (movLeft2ResultLong): Created.
9343
9344         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9345         (joinPushes): Added.  Joins two char pushes into a word push.
9346
9347 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9348
9349         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9350
9351         * support/makebin/Makefile (install): Added creation of dest dir.
9352
9353 2001-10-24 Karl Bongers <karl AT turbobit.com>
9354
9355         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9356
9357 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9358
9359         * src/z80/ralloc.c: Turned off faulty pack for one use.
9360
9361         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9362
9363         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9364
9365 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9366
9367         * support/regression/Makefile: Improved clean
9368
9369         * support/regression/ports/gbz80/spec.mk: Added clean
9370
9371         * support/regression/ports/host/spec.mk: Added clean
9372
9373         * support/regression/ports/z80/spec.mk: Added clean
9374
9375         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9376
9377         * support/regression/ports/mcs51/timeout.c: little improvements
9378
9379 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9380
9381         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9382
9383         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9384
9385         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9386
9387 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9388
9389         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9390
9391         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9392
9393 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9394         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9395
9396         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9397
9398         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9399
9400         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9401
9402         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9403
9404         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9405
9406         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9407
9408         * support/regression/tests/longor.c: Added.
9409
9410 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9411
9412         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9413
9414         * as/mcs51/aslink.h: define PATH_MAX
9415
9416         * as/mcs51/asm.h: define PATH_MAX
9417
9418         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9419
9420         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9421
9422         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9423
9424         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9425
9426         * src/SDCCglobl.h: define PATH_MAX
9427
9428         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9429
9430         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9431
9432 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9433
9434         * src/z80/gen.c (gencjneshort): Fixed
9435
9436         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9437
9438 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9439
9440         * support/regression/tests/bug-469671.c: Added.
9441
9442         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9443
9444 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9445
9446         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9447
9448         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9449
9450 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9451
9452         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9453
9454         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9455
9456         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9457
9458         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9459
9460         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9461
9462         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9463
9464         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9465
9466 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9467
9468         * 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.
9469
9470         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9471
9472         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9473
9474 2001-10-07    <johan AT FRIJA>
9475
9476         * device/lib/gets.c (gets): fixed the return value.
9477
9478 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9479         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9480
9481         * 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.
9482
9483         * 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.
9484
9485         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9486
9487         * src/pic/gen.c: Removed Safe_strdup.
9488
9489         * configure.in: Added option to enable libgc support.
9490
9491         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9492         (bitVectUnion): Optimised.
9493         (bitVectIntersect): Optimised.
9494         (bitVectBitsInCommon): Optimised.
9495         (bitVectCplAnd): Optimised.
9496
9497         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9498
9499 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9500
9501         * src/SDCCmain.c: distinguish between assembler debug and plain options
9502
9503         * src/avr/main.c:   remove standard assembler options
9504
9505         * src/ds390/main.c: remove standard assembler options
9506
9507         * src/mcs51/main.c: remove standard assembler options
9508
9509         * src/port.h: removed "PENDING" comment
9510
9511 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9512
9513         * src/device/lib/_mulint.c  : new, with assember functions
9514
9515         * src/device/lib/_mullong.c : new, with assember functions
9516
9517         * src/device/lib/_divuint.c : with assember functions
9518
9519         * src/device/lib/_divsint.c : with assember functions
9520
9521         * src/device/lib/_divulong.c: with assember functions
9522
9523         * src/device/lib/_divslong.c: with assember functions
9524
9525         * src/device/lib/_moduint.c : with assember functions
9526
9527         * src/device/lib/_modsint.c : with assember functions
9528
9529         * src/device/lib/_modulong.c: with assember functions
9530
9531         * src/device/lib/_modslong.c: with assember functions
9532
9533         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9534
9535         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9536
9537         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9538                                       replaced _mululong.c and _mulslong.c by _mullong.c
9539
9540 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9541
9542         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9543
9544 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9545
9546         * src/SDCCglue.c: test, if win32api is available for MINGW
9547
9548 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9549
9550         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9551         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9552         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9553         * support/regression/ports/host/spec.mk: removed GENERIC
9554         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9555         * support/regression/ports/z80/spec.mk: removed GENERIC
9556
9557 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9558
9559         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9560
9561         * support/regression/tests/bug-467035.c: Created.
9562
9563 2001-10-01    <johan AT FRIJA>
9564
9565         * src/SDCC.y: fixed bug #466586 part 1
9566
9567 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9568
9569         * SDCCicode.c: z80 has no generic pointers
9570         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9571
9572 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9573
9574         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9575
9576 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9577
9578         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9579
9580         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9581
9582 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9583
9584         * configure.in: Fixed up so that ucsim is only configured once.
9585
9586         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9587
9588         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9589         (getPathDifference): As above.
9590
9591         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9592
9593         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9594
9595 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9596         * .version: Updated to 2.3.1
9597
9598         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9599         Added copyright header.
9600
9601         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9602         (assemble): Added support for macro based assembler commands.
9603         (linkEdit): Added support for macro based linker commands.
9604         (preProcess): Changed the pre-processor to use macros.
9605         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9606         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9607
9608         * device/lib/z80/crt0.s: Added module name for debugging.
9609
9610 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9611
9612         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9613
9614         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9615
9616         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9617
9618         * src/Makefile.in: Added SDCCmacro and SDCCutil
9619
9620 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9621
9622         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9623
9624 2001-09-16    <johan AT FRIJA>
9625
9626         * 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.
9627
9628 2001-09-15    <johan AT FRIJA>
9629
9630         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9631         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9632
9633 2001-09-11    <johan AT FRIJA>
9634
9635         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9636
9637 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9638
9639         * support/regression/tests/bug-460444.c: Added test case.
9640
9641         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9642         (genCast): Added justification for all of the asserts.
9643
9644 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9645
9646         * support/regression/support.c: _xdata replaced by xdata
9647
9648         * support/regression/spec.mk: removed _generic
9649
9650 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9651
9652         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9653
9654         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9655         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9656
9657         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9658
9659         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9660
9661         * support/regression/tests/bug-460010.c: Added test case.
9662
9663         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9664
9665 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9666
9667         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9668
9669         * support/regression/testfwk.c: removed workaround for bug #436344
9670
9671         * support/regression/tests/bp.c: use less memory with mcs51
9672
9673         * support/regression/tests/bug-441448.c: use less memory
9674
9675         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9676
9677         * support/regression/collate-results.py: typo
9678
9679 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9680
9681         * support/regression/tests/fetchoverlap.c: Added new test case.
9682
9683         * support/regression/tests/bp.c: Added new test case.
9684
9685         * support/regression/tests/bug-448984.c: Added new test case.
9686
9687         * support/regression/tests/pow2shifts.c: Added new test case.
9688
9689         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9690         (genlshTwo): Fixed right shift for count > 8.
9691
9692         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9693
9694 2001-09-08    <johan AT FRIJA>
9695
9696         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9697
9698 2001-09-07    <johan AT FRIJA>
9699
9700         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9701
9702         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9703
9704 2001-09-06    <johan AT FRIJA>
9705
9706         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9707         * bernhard noted me at this: "() equals to (void)" (1.38)
9708
9709 2001-09-05    <johan AT FRIJA>
9710
9711         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9712
9713 2001-09-04    <johan AT FRIJA>
9714
9715         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9716
9717
9718 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9719
9720         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9721
9722 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9723
9724         * link/z80/aslink.h: Fixed path for PATH_MAX
9725
9726 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9727
9728         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9729
9730         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9731
9732         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9733
9734         * 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.
9735
9736 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9737
9738         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9739         (genCmp): Fixed up genCmp for the GB with longs.
9740
9741         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9742
9743         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9744
9745         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9746
9747         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9748
9749 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9750
9751         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9752
9753 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9754
9755         * 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.
9756
9757         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9758
9759 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9760
9761         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9762
9763         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9764
9765 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9766
9767   * sim/ucsim/configure:    little improvement of Cygwin-detection
9768   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9769   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9770   * support/regression/tests/bug-221100.c: small changes for mcs51
9771   * support/regression/tests/bug-221168.c: small changes for mcs51
9772   * support/regression/tests/bug-227710.c: small changes for mcs51
9773   * support/regression/tests/staticinit.c: small changes for mcs51
9774   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9775   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9776   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9777
9778 $Revision$