* src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
[fw/sdcc] / ChangeLog
1 2006-04-24 Raphael Neider <rneider AT web.de>
2
3         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
4             registers that have not been assigned proper liveranges,
5             fixes #1469504 and #1474602,
6           (pCodeRegOptimizeRegUsage): fixed typo in comment
7
8 2006-04-24 Borut Razem <borut.razem AT siol.net>
9
10         * device/examples/main8051.c: deleted - it was removed from CVS
11           24.mar.2000 and after that modified 18.feb.2001, so it reappered
12           after the transition to Subversion 
13         * src/SDCCalloc.h: deleted - it was removed  from CVS
14           3.feb.2001 and after that modified 18.feb.2001, so it reappered
15           after the transition to Subversion 
16         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif, 
17           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
18           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
19           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
20
21 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
22
23         * as/asx8051.dsp: added mcs51/strcmpi.h
24         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
25         * as/hc08/aslink.h: updated lnksect prototype
26         * as/hc08/asm.h,
27         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
28         * as/hc08/asmain.c,
29         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
30           (newdot): handle A_ABS
31         * as/hc08/asout.c,
32         * as/mcs51/asout.c (outarea): output address
33         * as/hc08/lkaomf51.c,
34         * as/mcs51/lkaomf51.c: disabled unused array UsageType
35         * as/hc08/m08pst.c,
36         * as/mcs51/i51pst.c,
37         * as/z80/z80pst.c: "ABS" is not A_OVR
38         * as/hc08/lkarea.c (newarea): read a_addr,
39           (lnkarea): added codemap array, sort absolute areas to the front,
40            combine all GSINITx/GSFINAL,
41           (find_empty_space, allocate_space): new functions,
42           (lnksect): return next address, handle absolute sections
43         * as/mcs51/lkarea.c (newarea): read a_addr,
44           lnksect2 prototype changed,
45           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
46           (find_empty_space, allocate_space): new, factored out of lnksect2,
47           (lnksect2): return next address, handle absolute sections
48         * as/hc08/lkhead.c,
49         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
50         * as/hc08/lklibr.c (addfile, fndsym),
51         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
52           index out of range and detect both '\' and '/'
53         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
54         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
55           regression tests (ds390 cannot return bool yet)
56         * doc/sdccman.lyx: changed version number, document changed --no-peep,
57           document critical interrupts on z80, document changed SDCC define
58         * src/asm.c (_asxxxx_mapping): fixed .org directive,
59           (_a390_mapping): added .org directive
60         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
61           (genMultOneByte): fixed warnings
62         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
63           ones
64         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
65         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
66           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
67         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
68         * src/pic16/main.c: removed newReg prototype
69         * src/pic16/pcode.c,
70         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
71           warnings
72         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
73           ones
74         * src/pic16/ralloc.c
75         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
76           to fix warnings
77         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
78           from short to PIC_OPTYPE
79         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
80         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
81           optype from short to PIC_OPTYPE
82         * src/port.h: made int_size unsigned to fix warnings
83         * src/SDCC.y: fixed warning on MSVC
84         * src/SDCCicode.c (getArraySizePtr): return unsigned int
85         * src/SDCCopt.c (convertToFcall): fixed warnings
86         * src/SDCCsymt.h: removed double prototype for genSymName
87         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
88           offset int to fix warnings
89
90 2006-04-22 Borut Razem <borut.razem AT siol.net>
91
92         * doc/sdccman.lyx, */Makefile, */Makefile.in:
93           references to CVS replaced with Subversion
94
95 2006-04-21 Borut Razem <borut.razem AT siol.net>
96
97         * doc/sdccman.lyx, */Makefile, */Makefile.in:
98           references to CVS replaced with Subversion
99
100 2006-04-19 Borut Razem <borut.razem AT siol.net>
101
102         * src/version.awk: adapted for svn
103         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
104           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
105           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
106           /binutils-avr/etc/*.vi, *.jin: removed all properties
107           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
108
109 2006-04-19 Borut Razem <borut.razem AT siol.net>
110
111         * CVS to Subversion migration completed
112
113 2006-04-18 Borut Razem <borut.razem AT siol.net>
114
115         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
116           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
117
118 2006-04-17 Borut Razem <borut.razem AT siol.net>
119
120         * device/include/Makefile.in: added pic/*.inc to the installation
121
122 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
123
124         * support/regression/collate-results.py: fixed output in case of
125         a valdiag error
126         * support/regression/generate-cases.py: fixed splitting of pathnames
127         with dots
128         * as/hc08/lklibr.c (addfile),
129         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
130
131 2006-04-11 Raphael Neider <rneider AT web.de>
132
133         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
134         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
135         * src/pic16/pcode.c (assignValnums): fixed #1460578
136
137 2006-04-11 Raphael Neider <rneider AT web.de>
138
139         * device/lib/pic/libdev/*.c,
140         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
141           fixes #1468739, enables compilation in --std-c99 mode
142         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
143
144 2006-04-11 Raphael Neider <rneider AT web.de>
145
146         * src/pic/device.c (find_device): removed debug output
147           (list_valid_pics): enabled verbose listing of supported devices
148         * device/include/stdbool.h: define bool as char for pic14/16 as well
149
150 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
151
152         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
153
154 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
155
156         * .version: bumped version to 2.5.6
157         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
158
159 2006-04-06 Raphael Neider <rneider AT web.de>
160
161         * .version: bumped version to 2.5.6 (pic14 ABI changed)
162         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
163         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
164           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
165             pic14_constructAbsMap
166           (pic14printPublics): declare absolute global symbols as global
167           (pic14createInterruptVect),
168         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
169           (newReg): assume new registers unused, use correct name in
170             hashtable (reg->name instead of name), more debugLog output
171         * src/pic/device.h (PIC_device): added fields for verbose output
172         * src/pic/device.c: moved device definition to pic14devices.txt,
173             added routines for runtime parsing of pic14devices.txt,
174             added support for second config word
175         * src/pic/main.c (_process_pragma): removed #pragma maxram,
176           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
177           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
178           (_pic14_parseOptions): moved pCodeInitRegisters here
179           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
180         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
181           (pCodeInitRegisters): rewrapped comments, perpared new approach to
182             handling the pseudo stack
183         * device/lib/Makefile.in: ignore failures in objects-pic16,
184         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
185         * device/lib/pic/NEWS: document new dependency on picXXX.lib
186         * device/lib/pic/Makefile.subdir,
187         * device/lib/pic16/Makefile.subdir: improved clean rules
188         * device/lib/pic/libdev/: NEW, pic14 device libraries
189         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
190         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
191         * device/include/Makefile.in: create subdir and install pic14 headers
192         * device/include/pic/p16f_common.inc: removed unused declarations
193         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
194             PICs from inc2h.pl v1.6,
195             replaced BIT_AT macros with struct declarations
196         * device/include/pic/pic14devices.txt: definition of supported devices,
197             all above improvements contributed by Zik Saleeba, thanks
198         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
199         * support/scripts/sdcc.nsi: also install pic14 device libraries and
200             headers
201
202 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
203
204         * device/include/mcs51/c8051f410.h: added interrupt numbers,
205         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
206           thanks to Charles Olds
207
208 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
209
210         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
211
212 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
213
214         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
215         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
216         * support/regression/bug1464657.c: added, new test
217
218 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
219
220         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
221           version number
222
223 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
224
225         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
226           --no-peep and --peep-file <file> are used don't use default rules but
227           do use the <file>
228
229 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
230
231         * src/mcs51/gen.c (genCall): fixed bug 1457608
232
233 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
234
235         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
236         changes seem to cause (trigger?) problems with the build system.
237
238 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
239
240         * src/SDCCpeeph.c (operandsLiteral): new, added,
241           (callFuncByName): inserted operandsLiteral
242         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
243
244 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
245
246         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
247         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
248
249 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
250
251         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
252           implemented patch 1120823 Thanks to Willy De la Court (normal
253           interrupts need an interrupt number now if they are made critical),
254           and enabled nesting of critical functions though not for gbz80
255           (genCritical, genEndCritical): added functions
256           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
257         * src/z80/mappings.i: added "ei" to all mappings
258
259 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
260
261         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
262         submitted by the Debian SDCC maintainer Aurelien Jarno:
263         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
264         archive with gcc 4.1 on mips and wrote the patch"
265
266 2006-03-16 Raphael Neider <rneider AT web.de>
267
268         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
269           the left operand is shorter than the result (c* = lit-c* + int),
270           fixes bug #1450796
271         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
272           OP_SYMBOL
273
274 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
275
276         * src/.version: increased version number to 2.5.5
277         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
278         linking is done manually in pic16 port's _linkEdit,
279         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
280         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
281         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
282         allocate asmop as AOP_ACC,
283         (aopForRemat): added parameter 'bool result' in function declaration,
284         (pic16_aopGet): return AOP_ACC when accessing WREG,
285         (pic16_popGetTempReg): minor modification,
286         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
287         'pic16_allocWithIdx',
288         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
289         calling function in absolute addresses,
290         (genAssign): take into account AOP_ACC asmop,
291         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
292         * src/pic16/pcoderegs.c: some debug functions and lines added,
293         * src/pic16/ralloc.c (decodeRegType): added but commented out,
294         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
295         register too,
296         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
297         call to allocReg, not by manually allocating a new one,
298         (pic16_assignRegisters): now before going through the register
299         allocating functions mark all registers as free. This eliminates some
300         side effects resulting from peephole parser done earlier in the backbone
301
302 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
303
304         * src/SDCCicode.c (geniCodeLogic),
305         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
306
307 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
308
309         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
310           (genSend): bugfix, do not allocate and free twice,
311           (shiftRLong): handle partially overlapping aops
312         * support/regression/tests/bitopcse.c: fixed warning redefined idata
313
314 2006-03-08 Borut Razem <borut.razem AT siol.net>
315
316         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
317           for pic16
318
319 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
320
321         * support/regression/tests/bug1409955.c: new, added
322         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
323         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
324           (aopForSym, aopOp): increment asmop.allocated if reused,
325           (freeAsmop): decrement asmop.allocated and check for zero instead of
326           using asmop.freed,
327           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
328           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
329            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
330            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
331            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
332            genSignedRightShift, genRightShift, genDataPointerGet,
333            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
334            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
335             in reverse order from allocation,
336           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
337             added swappedLR to keep track
338         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
339           pdata & code for GCC, z80, gbz80 & hc08
340         * support/regression/tests/zeropad.c: moved defines to testfwk.h
341
342 2006-03-08 Raphael Neider <rneider AT web.de>
343
344         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
345
346 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
347
348         * device/include/mcs51/c8051f410.h: new SiLabs mcu
349         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
350         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
351
352 2006-03-06 Borut Razem <borut.razem AT siol.net>
353
354         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
355           made the linker quiet
356
357 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
358
359         * src/pic16/gen.c (genPcall): fixed bug #1443644
360         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
361         which dumps before the function entry point a data byte which represents
362         the number of the local variables used by the specified function, added
363         'xinst' for initial support for Extended Instruction Support,
364         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
365         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
366         port->fun_prefix anymore (may change later),
367         (genFunction, genEndFunction): do not store/restore local registers for
368         _main (this should take care the --main-return command line option in
369         the future),
370         (genOr): removed some legacy pic-port instructions,
371         * src/pic16/genarith.c (genAddLit): re-enabled old code because
372         performing operations with SFR's causes data to be written more than
373         once to each SFR. Perhaps SFRs should be handled in special cases...
374         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
375         pcode.h
376         * src/pic16/main.c (_process_pragma): stack bound checking did not take
377         into account for stack starting position,
378         (struct OPTIONS pic16_optionsTable): added command line argument
379         --extended or -y for Extended Instruction Support,
380         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
381         (deassignLRs): *** perhaps the most important change, old 'for' code
382         (commented out for reference), didn't account for some registers which
383         were left marked 'not free' after a pointer operation. The change
384         reduces register usage a lot in some cases
385
386 2006-03-04 Borut Razem <borut.razem AT siol.net>
387
388         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
389           _clean
390         * support/regression/tests/bug-524697.c: decreased array size for
391           mcs51 to fit into the internal RAM
392         * support/regression/Makefile.in: a little bit more verbose
393
394 2006-03-03 Borut Razem <borut.razem AT siol.net>
395
396         * support/regression/fwk/lib/testfwk.c,
397           support/regression/fwk/include/testfwk.h: introduced function
398           _prints(), nonrecursive _printn(), call _initEmu() from main()
399         * support/regression/ports/gbz80/support.asm,
400           support/regression/ports/ucz80/support.asm,
401           support/regression/ports/z80/support.asm,
402           support/regression/ports/ds390/support.c,
403           support/regression/ports/hc08/support.c,
404           support/regression/ports/host/support.c,
405           support/regression/ports/mcs51/support.c,
406           support/regression/ports/xa51/support.c: added empty _initEmu()
407           function
408         * support/regression/ports/pic16/gpsim.cmd,
409           support/regression/ports/pic16/spec.mk,
410           support/regression/ports/pic16/support.c,
411           support/regression/Makefile.in: added pic16 regression test
412
413 2006-03-01 Raphael Neider <rneider AT web.de>
414
415         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
416           genConstPointerGet): use safe way of generating MOVFF to cover
417             literals as well as registers, fixes bug #1440527
418         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
419             dereference
420           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
421             more correctly, fixes bug #1232186
422           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
423         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
424             gplink guess the correct processor in more cases, applied patch
425             from Till Riedel attached to and fixing bug #1436552
426
427 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
428
429         * support/regression/tests/array.c: added, contains check for #1434401
430         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
431
432 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
433
434         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
435         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
436         * device/include/mcs51/c8051f326.h,
437         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
438         * device/include/mcs51/c8051f000.h,
439         * device/include/mcs51/c8051f018.h,
440         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
441           PCON_IDLE,PCON_STOP and added sfr16 definitions
442
443 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
444
445         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
446           genGetWord): fixed bug 1409955
447
448 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
449
450         * device/include/hc08/mc68hc908gp32.h,
451         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
452
453 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
454
455         * src/SDCCast.c (constExprValue): return NULL if not a value
456         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
457         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
458         * support/regression/tests/bitfields.c: enabled signed bitfield for all
459
460 2006-02-13 Borut Razem <borut.razem AT siol.net>
461
462         * src/regression/ptrarg.c: added, fails due to bug #1430967
463         * src/regression/Makefile: ptrarg.c added, ...
464
465 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
466
467         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
468         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
469
470 2006-02-11 Borut Razem <borut.razem AT siol.net>
471
472         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
473           print "Processor: xxx" message to stdout only if --verbose
474
475 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
476
477         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
478         * support/regression/tests/bug1426356.c: added
479         * support/regression/tests/bitfields.c: removed 2 tests
480
481 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
482
483         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
484         * device/include/mcs51/c8051f330.h,
485         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
486           PCON_IDLE,PCON_STOP and added sfr16 definitions
487         * device/lib/_divsint.c,
488         * device/lib/_divuint.c,
489         * device/lib/_divulong.c,
490         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
491           register bank bug for small stackauto
492
493 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
494
495         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
496
497 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
498
499         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
500         * all.dsp: corrected several bin paths
501         * device/include/mcs51/c8051f120.h,
502         * device/include/mcs51/c8051f300.h,
503         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
504           to PCON_IDLE,PCON_STOP
505         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
506         * device/lib/printf_large.c (output_float): fixed bug 1388703
507         * support/regression/tests/bug1057979.c: added test for bug 1388703
508
509 2006-02-08 Raphael Neider <rneider AT web.de>
510
511         * src/pic/pcode.c (pciTRIS): fixed typo,
512           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
513           (LinkFlow): fixed handling of flows that end in a call,
514           (ReuseReg): perform safety check earlier
515         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
516             to work with flows at the beginning of a pBlock,
517             fixes #1426557 (Symbol not previously defined),
518           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
519             usage information
520           (RemoveUnusedRegisters): update register usage info
521         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
522             created, reuse existing ones instead
523         * src/pic/gen.c (genPcall): fixed #1424719
524
525 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
526
527         * link/z80/lkmain.c,
528         * link/z80/lklex.c,
529         * link/z80/lkdata.c,
530         * link/z80/aslink.h: fixed build on current cygwin:
531         replaced getline() by lk_getline()
532
533 2006-02-01 Borut Razem <borut.razem AT siol.net>
534
535         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
536           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
537           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
538           src/regression/bool1.c, src/regression/bool2.c,
539           src/regression/bool3.c, src/regression/call1.c,
540           src/regression/compare.c, src/regression/compare10.c,
541           src/regression/compare2.c, src/regression/compare3.c,
542           src/regression/compare4.c, src/regression/compare5.c,
543           src/regression/compare6.c, src/regression/compare7.c,
544           src/regression/compare8.c, src/regression/compare9.c,
545           src/regression/configword.c, src/regression/for.c,
546           src/regression/inline.c, src/regression/mult1.c,
547           src/regression/nestfor.c, src/regression/or1.c,
548           src/regression/pointer1.c, src/regression/ptrfunc.c,
549           src/regression/rotate1.c, src/regression/rotate2.c,
550           src/regression/rotate3.c, src/regression/rotate4.c,
551           src/regression/rotate5.c, src/regression/rotate6.c,
552           src/regression/rotate7.c, src/regression/string1.c,
553           src/regression/struct1.c, src/regression/sub.c,
554           src/regression/sub2.c, src/regression/switch1.c,
555           src/regression/while.c, src/regression/xor.c,
556           src/regression/create_stc, src/regression/simulate,
557           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
558           regression tests
559         * src/regression/gpsim_assert.h: added
560
561 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
562
563         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
564         ((void (code *) (void)) 0) ();
565         * as/hc08/aslex.c,
566         * as/hc08/aslink.h,
567         * as/hc08/asm.h,
568         * as/hc08/asmain.c,
569         * as/hc08/lkdata.c,
570         * as/hc08/lklex.c,
571         * as/hc08/lkmain.c,
572         * as/mcs51/aslex.c,
573         * as/mcs51/aslink.h,
574         * as/mcs51/asm.h,
575         * as/mcs51/asmain.c,
576         * as/mcs51/lkdata.c,
577         * as/mcs51/lklex.c,
578         * as/mcs51/lkmain.c,
579         * as/z80/aslex.c,
580         * as/z80/asm.h,
581         * as/z80/asmain.c: fixed build on current cygwin:
582         replaced getline() by as_getline()
583
584 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
585
586         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
587         declarator in the symbol chain
588         * src/SDCCsymt.h,
589         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
590         parameter list for function pointers
591         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
592         * support/regression/tests/bug-716242.c: added
593
594 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
595
596         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
597         offset if possible
598         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
599
600 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
601
602         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
603         inifinitely recurseable, added static
604         * support/regression/tests/bug-1408066.c: added
605
606 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
607
608         * src/SDCCicode.h,
609         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
610         renamed, added possibility to create "postLoopLbl"-labels
611         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
612         newiTempLoopHeaderLabel
613         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
614         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
615         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
616         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
617         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
618         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
619         (basicInduction): fixed bug #136564, made static,
620         (loopInduction): changed parameter of basicInduction, made static,
621         (addPostLoopBlock): added
622         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
623         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
624         findLoopEndSeq
625         * support/regression/tests/bug-136564.c: added
626         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
627         --std-sdcc99 to LIBSDCCFLAGS
628
629 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
630
631         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
632         while loop
633         * support/regression/tests/bug-1406131.c: added
634
635 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
636
637         * src/SDCCast.c (decorateType): fix promotion of unary minus
638         * src/SDCCsymt.c (computeType): beautified
639         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
640         (valUnaryPM, valComplement): fix sign and promotion,
641         (valNot): ANSI: result type is int (SDCC: unsigned char)
642         * support/regression/tests/uminus.c: speedup by removing superflous
643         test case 'int'
644         * support/regression/tests/onebyte.c: added promotion and signedness
645         tests for unary minus
646         * support/regressions/tests/bug-477927.c: disable warning about
647         uninitialized variables
648         * support/regression/tests/not.c: added
649
650 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
651
652         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
653         * src/mcs51/gen.c (gen51Code): show final register usage after
654         fillGaps in asm with --i-code-in-asm
655         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
656         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
657         incUsed, rliveClear, adjustIChain): made static,
658         (setFromRange): excluded because it's unused,
659         (findPrevUseSym, markWholeLoop): added,
660         (findPrevUse): rewritten; fixes bug 895992; now a complete search
661         through all branches of predecessors enables sdcc to emit the warning
662         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
663         (rlivePoint): made static, added parameter emitWarnings which is only
664         true during the first run out of two,
665         (findRecursiveSucc, findRecursivePred): removed,
666         (computeLiveRanges): made static, added parameter emitWarnings,
667         (dumpIcRlive): added for debugging only
668         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
669         removed prototype of setFromRange()
670         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
671         in call of computeLiveRanges()
672         * support/regression/tests/bug-895992.c: added
673         * support/regression/tests/bug-971834.c: added
674         * support/valdiag/tests/bug-895992.c: added
675         * support/valdiag/tests/bug-971834.c: added
676
677 2005-12-18 Raphael Neider <rneider AT web.de>
678
679         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
680           (genUnpackBits): improved code for direct operands,
681           (genPackBits): improved code for literal assignment to bitfields
682             and for direct destination operands (no FSR indirection),
683             prevented redundant AND, fixes #1362800,
684           (AccLsh): added parameter to disable masking of the result
685         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
686           skip instructions with side-effects (like incfsz),
687           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
688         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
689         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
690           fixes #1375263
691
692 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
693
694         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
695         volatile variables as spill location
696
697 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
698
699         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
700         replacing literals
701         * support/regression/tests/bug-1376320.c: added
702
703 2005-12-08 Raphael Neider <rneider AT web.de>
704
705         * src/pic/device.c: renamed is_shared to pic14_is_shared
706         * src/pic/gen.c (genIfx): re-enabled handling of sbits
707         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
708           (is_valid_identifier): added for above workaround
709
710 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
711
712         * device/lib/Makefile.in: fixed to enable port-specific-objects
713         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
714           char, thanks Hubert Sack
715         * doc/sdccman.lyx: documented --xstack-loc,
716           elaborated a bit more on interrupts and pitfalls,
717           removed "setjmp/longjmp unsupported",
718           documented some unsupported C99 features
719         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
720         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
721           if, thanks Hubert Sack
722         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
723         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
724           make make_library
725         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
726           regression tests can report resource usage (rfe 700441)
727         * support/regression/collate-results.py: report resource usage
728         * support/regression/ports/ds390/spec.mk,
729         * support/regression/ports/hc08/spec.mk,
730         * support/regression/ports/mcs51/spec.mk,
731         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
732         * support/regression/ports/ds390/uCsim.cmd,
733         * support/regression/ports/hc08/uCsim.cmd,
734         * support/regression/ports/mcs51/uCsim.cmd,
735         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
736         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
737           library, use the default one
738         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
739           building the library
740
741 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
742
743         * config.dsp: added dependency on .version and configure_vc.awk
744         * device/include/setjmp.h: updated for --stack-auto and --xstack
745         * device/include/mcs51/at89c51snd1c.h: corrected line endings
746         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
747         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
748         * device/lib/libsdcc.lib: added _setjmp
749         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
750           (decorateType): fixed bug 1372851,
751           (optimizeGetHbit): fixed warning
752         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
753           array initialisation
754         * support/regression/tests/bug1057979.c: added test for bug 1358192
755         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
756
757 2005-12-03 Borut Razem <borut.razem AT siol.net>
758
759         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
760           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
761
762 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
763
764         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
765         createIval): implement symbol independant "flexible array member",
766         (createIvalCharPtr): implemented flexible array initialisation with a
767         string
768         * src/SDCCsymt.c (copyStruct): removed,
769         (getSize): fixed misleading comment,
770         (getAllocSize): removed, the additional allocation size is now in
771         sym->flexArrayLength,
772         (checkStructFlexArray): new, syntax checks for flexible array members,
773         (compStructSize): added syntax checks for "flexible array members"
774         (copyStruct): removed,
775         (copyLinkChain): removed inefficient fix for bug 770487
776         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
777         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
778         symbol->flexArrayLength
779         * src/SDCCerr.c,
780         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
781         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
782         * support/regression/tests/structflexarray.c: added
783         * support/valdiag/tests/structflexiblearray.c: added
784
785 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
786
787         * src/SDCCast.c (decorateType): fixed bug 1368489
788         * support/Util/SDCCerr.c,
789         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
790
791 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
792
793         * device/include/mcs51/at89c51snd1c.h: added file submitted by
794           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
795
796 2005-11-27 Borut Razem <borut.razem AT siol.net>
797
798         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
799           support/cpp2/mkdeps.h: added command line option
800           -obj-ext=<extension> to SDCPP to define object file externion, used
801           for generation of make dependencies (-M)
802         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
803
804 2005-11-26 Borut Razem <borut.razem AT siol.net>
805
806         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
807           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
808           added pic and pic16 libraries
809
810 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
811
812         * device/include/float.h: Corrected typo in prototype of __fsgt
813
814 2005-11-25 Borut Razem <borut.razem AT siol.net>
815
816         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
817           added creation of model-mcs51-stack-auto libraries
818
819 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
820
821         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
822         and fields-list too
823         * src/SDCCast.c (createIvalArray): removed obsolete comment
824
825 2005-11-24 Borut Razem <borut.razem AT siol.net>
826
827         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
828           added missing device/lib/mcs51/crt*.asm sources
829
830 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
831
832         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
833
834 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
835
836         * device/lib/_fs2schar.c,
837         * device/lib/_fs2sint.c,
838         * device/lib/_fs2slong.c: optimized inline asm
839
840 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
841
842         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
843           Better handling of floats between -1.0 and 0.0.
844
845 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
846
847         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
848           (the missing "if"s prohibited removal of redundant labels)
849
850 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
851
852         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
853           Properly convert floats between -1.0 and 0.0 to long, int, and char
854           types (max integer value of negative floats tends to zero).
855         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
856           Removed changes made so to work properly with floats between
857           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
858           and _fs2char.c
859
860 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
861
862         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
863         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
864         (genCast) cosmetic change
865         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
866         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
867         from mcs51
868         * support/regression/tests/bitfields (testSignedBitfields): added
869
870 2005-11-18 Borut Razem <borut.razem AT siol.net>
871
872         * sdcc/device/lib/Makefile.in: remove all unnecessary files
873         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
874           introduced SILENT option to make building of pic16 libraries less
875
876 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
877
878         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
879           Now they work properly with floats between -1.0 and 0.0
880         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
881
882 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
883
884         * src/SDCCicode.c (printOperand): added missing else
885
886 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
887
888         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
889         reformatted for better readability
890         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
891         signed bitfields
892
893 2005-11-17 Borut Razem <borut.razem AT siol.net>
894
895         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
896           introduced SILENT option to make building of pic16 libraries less
897           verbose - used for nightly snapshot build
898         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
899           available on Win32 platforms.
900         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
901           medium, large, pic and pic16
902
903 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
904
905         * device/lib/printf_large.c: Temporary patch for bug 1358192:
906           printf("%f"...) sets fraction to zero.
907
908 2005-11-16 Raphael Neider <rneider AT web.de>
909
910         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
911           fixes #1357221
912         * src/pic/gen.c (genIfx): implemented for CARRY bit
913         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
914           to generic pointers, fixes #1357332,
915           (pic16_movLit2f): NEW,
916           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
917
918 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
919
920         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
921
922 2005-11-11 Raphael Neider <rneider AT web.de>
923
924         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
925         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
926           compute pointer's type from operand,
927           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
928           improved single bit reads, fixes bug #1353379
929
930 2005-11-09 Borut Razem <borut.razem AT siol.net>
931
932         * support/scripts/sdcc.nsi: added lib/pic to the package
933
934 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
935
936         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
937
938 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
939
940         * support/regression/tests/bug1348008.c: added
941         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
942         * support/regression/tests/bug1337835.c: updated comment
943
944 2005-11-06 Borut Razem <borut.razem AT siol.net>
945
946         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
947           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
948           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
949           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
950           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
951           dynamic construction of cl_error_class and derivates - 2.nd try
952
953 2005-11-05 Borut Razem <borut.razem AT siol.net>
954
955         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
956           bug, which caused Bus Errors on sparc solaris
957
958 2005-11-04 Borut Razem <borut.razem AT siol.net>
959
960         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
961           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
962           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
963           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
964           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
965           and derivates to resolve the initialization problem on OSX
966
967 2005-11-02 Borut Razem <borut.razem AT siol.net>
968
969         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
970           corrected typo - #include <winsock2.h>
971
972 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
973
974         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
975           (_asxxxx_mapping): added org directive for future enhancements
976
977 2005-11-01 Borut Razem <borut.razem AT siol.net>
978
979         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
980           enabled sockets on WIN32
981         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
982
983 2005-10-31 Borut Razem <borut.razem AT siol.net>
984
985         * support/regression/generate-cases.py: escape backslashes in {testcase}:
986           WIN32 backslash path delimiters should be escaped when used in C strings
987         * support/regression/tests/bitfields.c: exclude failing assertions for
988           __CYGWIN32__ and __MINGW32__ hosts
989
990 2005-10-30 Borut Razem <borut.razem AT siol.net>
991
992         * src/SDCCutil.c: corrected double comparison typo
993
994 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
995
996         * device/lib/medium/Makefile: added for new memory model medium
997         * device/include/asm/mcs51/features.h: updated for medium/pdata
998         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
999           added Multiply & Accumulate sbit's and MAC0_PAGE define
1000         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1001         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1002         * device/lib/_mullong.c: update for medium model
1003         * device/lib/incl.mk: added medium model
1004         * doc/sdccman.lyx: documented medium model
1005         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1006         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1007         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1008         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1009           (allocParms): set SCLS and OCLS to pdata for medium model
1010         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1011           for pdata,
1012           (powof2): return <0 if not power of 2
1013         * src/avr/gen.c (genBitWise): use updated powof2
1014         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1015           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1016           (shiftLLeftOrResult): use B if necessary
1017         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1018         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1019         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1020         * support/regression/Makefile.in: added test-mcs51-medium
1021         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1022
1023 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1024
1025         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1026         specifier unsigned
1027         * device/lib/time.c (mktime): fixed bug 1334315
1028
1029 2005-10-28 Raphael Neider <rneider AT web.de>
1030
1031         * device/include/pic/p16f_common.inc: added common declarations
1032         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1033
1034 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1035
1036         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1037           (aopPutUsesAcc): added to predict accumulator use,
1038           (assignResultValue): save acc if necessary,
1039           (genMinusDec): store result if indirectly addressed,
1040           (genDivOneByte):  save acc if necessary,
1041           (movLeft2Result): bugfix if left already in acc,
1042           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1043             attention to accumulator use (esp. pdata),
1044           (genReceive): receive pdata correctly
1045         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1046         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1047
1048 2005-10-27 Raphael Neider <rneider AT web.de>
1049
1050         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1051
1052 2005-10-27 Raphael Neider <rneider AT web.de>
1053
1054         * .version: changed version to 2.5.4
1055         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1056         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1057           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1058             arithmetics support routines
1059         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1060         * device/lib/Makefile.in: also create installdir for pic
1061
1062         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1063           pic14 port as well
1064         * src/pic/device.c (dump_sfr): rewritten to delegate register
1065           placement to the linker (use `extern sym' rather than sym EQU addr),
1066           (validAddress): fixed to check last specified address
1067         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1068           (popGetLit): truncate literal value to 8 bit,
1069           (popGet): moved assert to more appropriate place
1070           (popGetExternal): create pCode operand from and mark the according
1071             symbol as being `extern'
1072           (popGetAddr): added sanity check on immediate's offset, provide
1073             GPOINTER tag on demand
1074           (aopPut): fixed for immediates,
1075           (mov2w_op): move operand's address or contents to WREG (depending on
1076             operand type), safer variant of mov2w,
1077           (movwf,call_libraryfunc): NEW, handy abbreviations,
1078           (get_argument_pcop,get_return_val_pcop,pass_argument,
1079           get_returnvalue): interface for accessing function parameters and
1080             return values,
1081           (assignResultValuei,genRet): use new parameter/return value interface
1082           (pic14_getDataSize): back to old version handling generic pointers,
1083           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1084             provided implementation and/or fixed old one,
1085           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1086             calls, removed legacy 8051 reference code
1087           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1088           (loadSignToC): NEW, move the operands sign bit to CARRY,
1089           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1090             genRightShiftSigned, accepts negative shift counts,
1091           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1092           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1093             generic pointers, __data pointers and __code pointers,
1094           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1095             and signed bitfields, limit bitfields to 8 bit,
1096           (genDataPointerGet): fixed number of bytes read,
1097           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1098           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1099             pointers to constant data are no longer assumed to point to __code
1100             space, removed invalid pointer types,
1101           (bitpatternFromVal): retrieve the PICs representation of an integer
1102             or float literal,
1103           (genDataPointerSet): fixed assigning to po_immediate operands,
1104           (genGenPointerSet): implemented as library call,
1105           (genIfx): fixed incorrect condition,
1106           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1107             provide GPOINTER tag according to destination's storage class,
1108           (genCast): added code to handle casting to generic pointers, added
1109             sign-/zero extension of the result
1110           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1111         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1112         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1113           extend the result
1114         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1115           address/register resides in the shared banks
1116           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1117             put all variables into separate sections (have the linker arrange
1118             them)
1119           (picglue): put init code and interrupt handlers in separate sections
1120         * src/pic/main.c: added port specific options table, modified to PORT
1121           structure to make GPOINTERs 3 byte, added pic14_options
1122           (_pic14_do_link): private linking routine (update paths to libraries,
1123             add libsdcc.lib by default)
1124         * src/pic/main.h: declare pic14_options
1125         * src/pic/pcode.c: fixed instructions i/o relations,
1126           (RegCond): reverted to correct version,
1127           (newpCodeOpLit): truncate literals to 8 bit,
1128           (genericPrint): added debug output,
1129           (getRegFromInstruction): fixed for various operand types, simplified
1130           (BuildFlow): fixed broken handling of isntructions with labels
1131           (LinkFlow): start at last instruction in flow (skip trailing comments),
1132             pass the flow on to the next instruction after CALL
1133           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1134           (insertPCodeInstruction): fixed inserting after a skip instruction,
1135           (DoBankSelect): fixed for labeled instructions
1136           (OptimizepBlock): honor --nopeep switch
1137           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1138         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1139         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1140           (pCodeOptime2pCodes): allow disabling this optimization via
1141             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1142             but is still buggy), started implementation of a dataflow based
1143             pCode optimization (CSE + dead code elimination)
1144           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1145         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1146           names are independant of the stack location and therefore portable across
1147           devices
1148
1149 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1150
1151         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1152           (selectSpil): fixed bug 1337835 by not spilling bit variables
1153         * support/regression/tests/bug1337835.c: added test for this bug
1154         * src/mcs51/peeph.def: restart after rule 3.c,
1155           addded rules 263.x to optimize loading constants
1156
1157 2005-10-26 Raphael Neider <rneider AT web.de>
1158
1159         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1160         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1161           (genAssign): emit warning when casting literals to generic pointer
1162             type, also applies when taking the address of a fixed variable,
1163           (genCast): improved casting to generic pointers
1164         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1165           extern variables, added verbose error message
1166         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1167
1168 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1169
1170         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1171         carry must be complemented too
1172         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1173         could be emitted by genMinus
1174         * src/SDCCval.c (constVal): fixed bug 1305065
1175
1176 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1177
1178         * src/SDCCast.c (addCast): added promotion for bit variables
1179         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1180         promotion casts + optimisation
1181         (optimizeGetWord): fix warning 'i' might be used uninitialized
1182         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1183         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1184
1185 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1186
1187         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1188         all chars are promoted to int; promotion should be handled in SDCCast.c
1189
1190 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1191
1192         * device/lib/_strcmp.c: Fixed bug 1326457
1193
1194 2005-10-11 Raphael Neider <rneider AT web.de>
1195
1196         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1197         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1198
1199 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1200
1201         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1202         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1203
1204 2005-10-04 Raphael Neider <rneider AT web.de>
1205
1206         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1207           device/lib/pic16/pics.all: added pic18f1320
1208         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1209
1210 2005-09-30 Raphael Neider <rneider AT web.de>
1211
1212         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1213         * src/pic16/devices.inc: NEW, provides device descriptions
1214         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1215
1216 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1217
1218         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1219           GETHBIT
1220
1221 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1222
1223         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1224           documented Any Order Bit, Higher Order Byte and Higher Order Word
1225         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1226         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1227           (optimizeGetAbit): new, to get any bit, not only the high bit,
1228           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1229           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1230           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1231           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1232             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1233             GETABIT, GETBYTE, GETWORD: decorate them,
1234           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1235           (ast_print): added GETABIT, GETBYTE, GETWORD
1236         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1237         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1238           (geniCodeBinary): new generic binary icode,
1239           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1240         * src/port.h: updated comment for PORT.hasExtBitOp
1241         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1242           (genGetByte): new, to get a single byte,
1243           (genGetWord): new, to get a word from a long,
1244           (gen51Code): added GETABIT, GETBYTE, GETWORD
1245         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1246
1247 2005-09-23 Raphael Neider <rneider AT web.de>
1248
1249         * configure.in, configure: have device/lib/pic configured
1250         * device/lib/Makefile.in: added model-pic14
1251         * device/lib/clean.mk: added pic/ to clean rule
1252         * device/lib/pic: added rudimentary pic14 library providing support
1253           functions for multiplication/division/generic pointer access
1254         * src/SDCCopt.c (convilong): mark support functions as extern
1255           for pic14 port as well
1256         * src/pic/gen.c (genMult): added assertions,
1257           (genpic14Code): emit warning on unhandled iCodes
1258         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1259         * src/pic/pcode.c (pCodeOpCopy),
1260         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1261           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1262           SFR_REGISTER}), made safe for future extensions
1263         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1264           instructions even if preceeded by SKIP instructions (also remove
1265           them); removed unused code
1266         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1267           prevents leaving parts of the structure uninitialized after copying
1268
1269 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1270
1271         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1272           ago by me
1273         * support/regression/tests/addsub.c: added test for the bug
1274
1275 2005-09-21 Raphael Neider <rneider AT web.de>
1276
1277         * device/include/pic16/pic18f1220.h,
1278           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1279         * device/lib/pic16/Makefile.rules: added missing opening paren
1280         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1281           are provided in genutils.c,
1282           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1283           operand/result sizes,
1284           (genCmp): assert on NULL pointers first, then check deref'ed values
1285         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1286           result size
1287
1288 2005-09-18 Raphael Neider <rneider AT web.de>
1289
1290         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1291           as these are now unused,
1292           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1293         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1294           local, avoids uninitialized pointer dereference on r->name
1295         * src/pic16/ralloc.c (newReg): fixed indentation
1296
1297 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1298
1299         * src/SDCCval.c (constVal): fixed bug 730366
1300         * support/Util/SDCCerr.c,
1301         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1302
1303 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1304
1305         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1306
1307 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1308
1309         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1310
1311 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1312
1313         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1314           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1315         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1316           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1317         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1318         * packihx/packihx.c (hexDigit): made c unsigned char
1319         * as/mcs51/lklibr.c (fndsym),
1320         * link/z80/lkgb.c (gb),
1321         * link/z80/lklibr.c (fndsym),
1322         * link/z80/lkrloc.c (relr),
1323         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1324         * src/SDCC.lex (checkCurrFile, process_pragma),
1325         * src/SDCCglue.c (spacesToUnderscores),
1326         * src/SDCCmain.c (setParseWithComma, processFile),
1327         * src/asm.c (tvsprintf, printCLine),
1328         * src/avr/gen.c (emitcode, aopPut),
1329         * src/ds390/gen.c (emitcode),
1330         * src/hc08/gen.c (emitcode, emitinline),
1331         * src/mcs51/gen.c (emitcode, genInline),
1332         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1333           tokenizeLineNode),
1334         * src/pic/ralloc.c (debugLog),
1335         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1336           tokenizeLineNode),
1337         * src/pic16/ralloc.c (debugLog),
1338         * src/z80/main.c (_process_pragma):
1339            made all ctype.h function calls safe
1340         * src/SDCCopt.c: include math.h for fabs
1341         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1342           and used them throughout the code to make ctype.h function calls safe
1343         * src/ds390/main.c (asmLineNodeFromLineNode),
1344         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1345         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1346            unsigned char*
1347         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1348           (newpCodeAsmDir): made ctype.h function calls safe
1349         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1350           pic16_emitcode):  made lbp unsigned char*
1351         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1352           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1353         * src/xa51/gen.c (emitcode),
1354         * src/z80/gen.c (_emit2): made lbp unsigned char*
1355         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1356            char*
1357
1358 2005-09-05 Raphael Neider <rneider AT web.de>
1359
1360         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1361           access bank splitpoint
1362
1363 2005-09-05 Raphael Neider <rneider AT web.de>
1364
1365         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1366
1367 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1368
1369         * .version: changed to version 2.5.3
1370         * doc/sdccman.lyx: changed version to 2.5.3,
1371           documented --codeseg and --constseg and pragma codeseg and constseg,
1372           documented bit parameters (reentrant) and bit returning
1373         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1374            currFunc->recvSize, but is this ok for all ports?
1375           (ast2iCode): result of ~ on unsigned char must be cast to int for
1376            bool to work
1377         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1378           function pointers in bit space
1379         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1380           (processFuncArgs): call port.reg_parm() with reentrancy info
1381         * src/port.h,
1382         * src/avr/main.c,
1383         * src/ds390/main.c,
1384         * src/hc08/main.c,
1385         * src/pic/main.c,
1386         * src/pic16/main.c,
1387         * src/xa51/main.c,
1388         * src/z80/main.c: port.reg_parm prototype extended with
1389           "bool reentrant" parameter
1390         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1391           options.stackAuto for allocating bit register parameters
1392         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1393           (genSend): set BitBankUsed if it is,
1394           (selectRegBank): factored out of genCall for use in genPcall,
1395           (genCall): removed redundant dtype assignmen, use selectRegBank,
1396           (genPcall): handle returning in Carry properly, save in F0 if needed,
1397           (genReceive): handle bit register parameters
1398         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1399           (mcs51_assignRegisters): enable bit registers for all reentrant
1400            functions and don't set BitBankUsed unconditionally
1401         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1402         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1403         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1404
1405 2005-08-27 Borut Razem <borut.razem AT siol.net>
1406
1407         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1408         ppc-osx (Darwin) does not support -u option. It seems that it is
1409         supported only on Linux - GNU cp
1410
1411 2005-08-25 Borut Razem <borut.razem AT siol.net>
1412
1413         * sim/ucsim/gui.src/serio.src/Makefile.in,
1414           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1415           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1416           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1417           install and strip, since the strip at /usr/ccs/bin should be used
1418           on solaris
1419
1420 2005-08-24 Borut Razem <borut.razem AT siol.net>
1421
1422         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1423
1424 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1425
1426         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1427         ffffffffu
1428
1429 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1430
1431         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1432         * as/mcs51/lkmain.c (link_main): fixed warning
1433         * device/include/stdbool.h: ds390 has no advanced bit support yet
1434         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1435         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1436         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1437           and updated their macros
1438         * src/SDCCval.c (constVal): updated comment for renamed b_long
1439
1440 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1441
1442         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1443         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1444           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1445           (oprio): set priority for '['
1446         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1447            and adb_24_bit
1448         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1449         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1450         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1451         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1452           added overlayable BIT_BANK area
1453         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1454           (summary2): explain 'T' in legenda
1455         * as/mcs51/lkrloc.c: replaced old K&R style,
1456           (relr): added R_BIT processing,
1457           (errmsg): added "Bit-addressable relocation error",
1458           (adb_bit): added for converting from byte- to bit-addressable space,
1459           (adb_24_bit): added for converting from byte- to bit-addressable space
1460         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1461            used in reentrant functions now even as return value
1462         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1463         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1464           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1465         * src/SDCCglobl.h: added indicator BitBankUsed
1466         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1467            the bit registers b0-b7
1468         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1469           (geniCodeCast): fixed bug 1263853,
1470           (geniCodeLogicAndOr): put result in bool or char,
1471           (geniCodeReceive): added parameter func for accessing the return type,
1472           (geniCodeFunctionBody): pass func to geniCodeReceive
1473         * src/SDCCmain.c: added indicator BitBankUsed
1474         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1475         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1476           (checkSClass): don't put automatic bool/bit on stack,
1477           (checkFunction): removed check on function cannot return bit
1478         * src/SDCCsymt.h: added newBoolLink prototype
1479         * src/mcs51/gen.c (rb1regs): added bit registers,
1480           (movc): created for assigning to carry,
1481           (pushReg, popReg): created for pushing registers,
1482           (sameRegs): check both AOP_REG and AOP_CRY types,
1483           (aopOp): handle bit registers,
1484           (aopPut): optimization no self-assign,
1485           (saveRegisters): push reg->base (bits) only once for bit registers,
1486            and use pushReg,
1487           (unsaveRegisters): pop reg->base only once and use popReg,
1488           (assignResultValue): added parameter func and return in carry for bits,
1489           (genIpush): optimization no reload in A if not changed,
1490           (genSend): bit parameters in reentrant functions are passed in bit
1491            registers by first assigning to bits in B, then save registers and
1492            copy B to bits,
1493           (genCall): handle returning in Carry properly, save it in F0 if needed,
1494           (genPcall): updated assignResultValue call, this is not safe yet for bit
1495            returning function !!!
1496           (genFunction): don't generate equ's for bit registers and use pushReg,
1497           (genEndFunction): take care of bit returning functions and use popReg,
1498           (genRet): return bit in Carry,
1499           (genIfx): optimize bit registers and other directly addressable bits,
1500           (genReceive): updated assignResultValue call
1501         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1502           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1503            registers when using stack-auto
1504         * src/mcs51/ralloc.c (_G): added allBitregs,
1505           (regs8051): added the bit registers,
1506           (createStackSpil): use macro IS_BIT,
1507           (getRegBit): added to allocate a bit register, else spill,
1508           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1509           (updateRegUsage): factored out to ease stepping while debugging,
1510           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1511            also allocate bit registers,
1512           (fillGaps): handle bit registers,
1513           (findAllBitregs): added to create bit vector with all bit registers,
1514           (mcs51_allBitregs): returns this bit vector,
1515           (mcs51_assignRegisters): when using stack-auto use bit registers for
1516            passing parameters and creating local variables
1517         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1518
1519 2005-08-22 Borut Razem <borut.razem AT siol.net>
1520
1521         * device/lib/Makefile.in: replaced find option -or with -o
1522           to make it run on solaris
1523
1524 2005-08-22 Raphael Neider <rneider AT web.de>
1525
1526         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1527           fixes #1265442 (crash on Solaris)
1528
1529 2005-08-20 Borut Razem <borut.razem AT siol.net>
1530
1531         * configure, configure.in: added tests for libsocket and libnsl libraries,
1532           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1533           from support/regression/Makefile.in
1534         * support/regression/Makefile.in: added
1535         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1536         * sim/ucsim/libtool: regenerated on sparc-solaris
1537         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1538           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1539           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1540           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1541           sparc-solaris, which doesn't use GNU ld linker
1542         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1543         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1544
1545 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1546
1547         * src/mcs51/peeph.def: updated comments
1548
1549 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1550
1551         * device/lib/_gptrget.c,
1552         * device/lib/_gptrput.c: slightly shorter
1553         * doc/sdccman.lyx: incremented version
1554         * src/mcs51/peeph.def: moved peephole comments to the line of first
1555           change to better keep line correlation, reanimated 186.e
1556         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1557
1558 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1559
1560         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1561           David Saxton with quotes around file name.
1562
1563 2005-08-15 Borut Razem <borut.razem AT siol.net>
1564
1565         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1566           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1567           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1568           make tests run on x86_64 platform
1569
1570 2005-08-13 Raphael Neider <rneider AT web.de>
1571
1572         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1573           as it might be executed DURING a build (parallel make is wonderful)
1574
1575 2005-08-13 Raphael Neider <rneider AT web.de>
1576
1577         * device/lib/Makefile.in (port-specific-objects-pic16):
1578           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1579         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1580           dependency
1581         * device/lib/pic16/Makefile.rules: build subdirs before creating
1582           the library, removed builddir rule, create $(builddir) early in
1583           recurse rule, use empty recurse rule for leaf directories
1584         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1585           mkdir errors (race condition), removed duplicate suffix "hex"
1586           from clean rules
1587         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1588         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1589           prevents mkdir -p from aborting on Alpha
1590
1591 2005-08-12 Raphael Neider <rneider AT web.de>
1592
1593         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1594           db-statements in order to allow for arrays of pointers in code
1595           sections to be placed without interspersed 0-padding, fixes
1596           bug #1256215
1597         * (emitStatistics): fixed division by zero for pic18f1220
1598         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1599           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1600         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1601         * (pic16_pCodeConstString): keep track of already emitted string
1602           literals to prevent "duplicate definitions of symbol _str_NR"
1603         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1604           debug message
1605         * device/lib/Makefile.in: ignore failing PIC16 library builds
1606         * device/lib/pic16/Makefile: do not build if gputils are missing
1607         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1608
1609 2005-08-10 Raphael Neider <rneider AT web.de>
1610
1611         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1612           my last commit)
1613
1614 2005-08-10 Raphael Neider <rneider AT web.de>
1615
1616         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1617           Rokas' patch to add the new fixed point type "__fixed16x16"
1618         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1619           functions for __fixed16x16 arithmetics
1620         * device/lib/pic16: reimplemented the build system to support
1621           a separate build directory, better handling of libio (create
1622           the library in a separate subdir for each architecture) and
1623           easier configuration (centralized in Makefile.common)
1624
1625 2005-08-07 Raphael Neider <rneider AT web.de>
1626
1627         * src/pic16/gen.c (genrshTwo): fixed sign extension
1628         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1629         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1630           added T0CONbits
1631         * device/include/pic16/pic18f4220.h: NEW, header for
1632           pic18f4220 and pic18f4320
1633         * device/include/pic16/pic18fregs.h: added new devices,
1634           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1635         * device/include/pic16/signal.h: resolved name clashes
1636           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1637           to also allow testing for interrupt enable bits, added
1638           comments on how to use the macros
1639         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1640         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1641           register definitions for the devices
1642         * device/lib/pic16/pics.all: added new devices
1643         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1644           allocated memory
1645         * device/lib/pic16/libc/stdlib/memfree: do not count
1646           the block header as free memory
1647         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1648           simplified and added missing end-of-blocklist-marker
1649           (reported by Peter Onion, fixes #1252814)
1650         * (_mergeHeapBlock): fixed loop condition
1651         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1652           len==0, restructured code
1653         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1654           up a bit, reduced bitfield accesses, prevent endless loops
1655           in case of heap corruption
1656         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1657           "unreferenced arguments/must return a value" warnings
1658         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1659           replaced BAUDREG with SPBRG
1660         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1661           device/lib/pic16/debug/gstack/gstack.c: replaced
1662           _naked, _asm, _endasm with __naked, __asm, __endasm
1663
1664 2005-08-05 Raphael Neider <rneider AT web.de>
1665
1666         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1667           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1668
1669 2005-08-05 Borut Razem <borut.razem AT siol.net>
1670
1671         * device/lib/Makefile.in: added missing ';'
1672         * configure: removed ^M characters
1673
1674 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1675
1676         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1677           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1678           License
1679
1680 2005-08-04 Borut Razem <borut.razem AT siol.net>
1681
1682         * configure.in: pic16 libraries build 2nd try - enable running
1683           configure in device/lib/pic16
1684         * configure: regenerated from configure.in
1685         * device/lib/Makefile.in: create $(PORT)/bin directory
1686
1687 2005-08-03 Raphael Neider <rneider AT web.de>
1688
1689         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1690           to get/set values via pointers
1691         * (genUnpackBits,genPackBits): changed detection of
1692           ptr->bitfield vs. sym.bitfield, fixed access via generic
1693           pointers, removed dead (wrong) code for multibyte bitfields
1694         * (genNearPointerGet, genGenPointerGet): removed useless code,
1695           fixed bitfield detection, fixes #1250594
1696         * (genNearPointerSet): removed useless code
1697         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1698           and introduced macro pic16_emitpcode that conditionally emits
1699           the origin of the following pCode (useful for debugging SDCC)
1700         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1701         * (createDefmap): fixed handling of LFSR for --optimize-df
1702
1703 2005-08-02 Borut Razem <borut.razem AT siol.net>
1704
1705         * device/lib/Makefile.in: pic16 libraries build enabled since
1706           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1707
1708 2005-08-02 Raphael Neider <rneider AT web.de>
1709
1710         * src/pic16/gen.c (genPackBits): removed deprecated warning
1711         * (genGenPointerSet): fixed bitfield detection
1712
1713 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1714
1715         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1716
1717 2005-07-31 Raphael Neider <rneider AT web.de>
1718
1719         * device/lib/pic16/libdev/pic18f458.c,
1720           device/include/pic16/pic18f458.h: added missing T0CONbits
1721
1722 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1723
1724         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1725
1726 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1727
1728         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1729
1730 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1731
1732         * device/include/mcs51/at89c51ed2.h: added.
1733
1734 2005-07-23 Raphael Neider <rneider AT web.de>
1735
1736         * src/pic/gen.h: added emitpcode macro for debugging
1737         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1738           and replace by macro adding debug information on demand
1739         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1740         * (gencjne): tried to fix; replaced with correct (slower) code
1741         * (gen{Unp,P}ackBits): fixed single bit access
1742         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1743         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1744           previous instruction
1745         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1746           register has to be handled with care (forbidding movement
1747           of assignments/uses, removing assignments completely, ...)
1748         * (pCodeOptime2pCodes): make use of regIsSpecial
1749         * added lots of debugging output (commented out)
1750         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1751           from being reused as result UNLESS it is known to work
1752
1753 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1754
1755         * support/Util/dbuf.h: include <stddef.h> for size_t
1756         * .version: changed to version 2.5.2
1757
1758 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1759
1760         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1761
1762 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1763
1764         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1765           (genModOneByte): removed needless psha/pula
1766
1767 2005-07-22 Raphael Neider <rneider AT web.de>
1768
1769         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1770           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1771         * src/pic/gen.c (resolveIfx): do not "invent" labels
1772         * (genSkipc): changed to positive logic
1773         * (genSkipCond): removed as no longer needed
1774         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1775           backport from PIC16
1776         * (genLeftShift): check operands are in different registers
1777         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1778           INCF does not update CARRY...
1779         * src/pic/main.c: fixed _linkCmd
1780         * src/pic/pcode.c (unlinkpCode): added inactive code
1781         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1782           alive (do not assign result and operand overlapping registers)
1783
1784 2005-07-22 Raphael Neider <rneider AT web.de>
1785
1786         * src/pic/device.c (dump_sfr): replaced register declaration with
1787           call to emitSymbolToFile() to avoid duplicate symbols
1788         * (assignRelocatableRegisters): do not declare external symbols
1789         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1790           right (take size of type, not etype)
1791         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1792         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1793         * (packRegsForAccUse): disabled assignment of WREG as
1794           the result reg to prevent occurence of just fixed #1235003,
1795           fixes #1242954
1796         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1797           symbols (avoids duplicate symbols in .asm file)
1798         * (pic14emitRegularMap): use emitSymbolToFile()
1799         * src/pic/gen.c (aopOp): fixed spillLocation handling
1800         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1801         * (genDataPointerSet): removed unneccessary variables/output
1802
1803 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1804
1805         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1806         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1807
1808 2005-07-21 Raphael Neider <rneider AT web.de>
1809
1810         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1811           architecture cannot handle them efficiently, fixes bug #1235003
1812         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1813           check for empty sets before using them (fixes bug #1232190)
1814
1815 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1816
1817         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1818           (lnksect2): generate warnings for memory overlap
1819         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1820           constseg to set the name of these segments so you can instruct the linker
1821           to place them in banks
1822         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1823         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1824           added code_seg and const_seg to options
1825         * src/SDCCglue.c (emitMaps): use options.const_seg,
1826           (createInterruptVect): put interrupt vectors in segment HOME,
1827           (glue): put HOME before static segment and put the main glue in HOME,
1828           (glue): use options.code_seg
1829         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1830         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1831           these segments so you can instruct the linker to place them in banks
1832           (linkEdit): use code_loc for HOME segment which should be the first
1833           segment in code memory now
1834         * src/SDCCmem.c: fixed more stuff like bug 1238386
1835         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1836           (changePointer): don't change function pointers to code pointers for
1837           banked functions,
1838           (compareType): added exceptional check for banked function pointers
1839         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1840         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1841           after static in code memory
1842         * src/mcs51/gen.c: added aopLiteralLong prototype,
1843           (aopForSym): use getSize for functions,
1844           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1845           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1846           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1847           the segment,
1848           (genPcall): use call for literal function pointers and generate banked
1849           calls over the one trampoline so there's only one place for the user to
1850           modify according to his/hers hardware,
1851           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1852           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1853         * src/mcs51/main.c: added keyword banked,
1854           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1855         * support/Util/SDCCerr.c,
1856         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1857           needed for passing the bank and address to the trampoline
1858         * device/lib/mcs51/crtbank.asm: added for bankswitching
1859         * device/lib/mcs51/Makefile: added crtbank
1860
1861 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1862
1863         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1864           for fields at offset 0 of a struct or union as reported
1865           on 2005-07-07 in the developer mailing list.
1866
1867 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1868
1869         * src/SDCCmem.c: fixed bug 1238386
1870
1871 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1872
1873         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1874           (patch #1144962), added peephole 300, enabled 259.x
1875         * doc/sdccman.lyx: removed screenshot and provided link instead
1876
1877 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1878
1879         * doc/sdccman.lyx: added section about debugging with ddd
1880         * doc/figures/ddd_example.eps: screenshot of debugging session
1881
1882 2005-07-04 Raphael Neider <rneider AT web.de>
1883
1884         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1885           like CODE pointers, fixes #1115683
1886         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1887           call, fixes bugs #1232211, #1228110,
1888           fixed wrong casts to pCodeFlow from pCodeInstructions
1889
1890 2005-07-04 Raphael Neider <rneider AT web.de>
1891
1892         * src/pic/gen.c (popGet): changed assert to allow for
1893           bit operands
1894         * (popGetAddr): changed signature to provide
1895           an additional index, patched all call sites
1896         * (genCmpEq): handle literal-like operands correctly
1897         * (genAddrOf): added sanity checks on __code/__data pointers
1898         * (genAssign): added handling of symbols from __code section
1899         * (gencjne): do not generate code for comparisons whose result
1900           is neither stored nor used, fixes bug #1171114
1901         * (AccLsh, AccRsh): operate on operand instead of WREG
1902         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1903           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1904           by known count
1905         * rewrote complete shift-by-literal logic, commented unused
1906           functions out
1907         * (genConstPointerGet): get multiple bytes (if result size > 1),
1908           fixed handling of non-immediate addresses
1909         * (genPointerGet): handle CODE pointers like CONST pointers
1910         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1911         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1912           operand is to be treated as a literal or not
1913         * (mov2w,genPcall,genCmpEq),
1914           src/pic/genarith.c: use aop_isLitLike() to decide between
1915           literal/register contents
1916         * (addSign): added missing offset
1917         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1918           only emit comment in debug-mode,
1919           use {aop,op}_isLitLike throughout the file
1920         * src/pic/glue.c: fix initializers for pointers (work in progress)
1921         * src/pic/pcode.c (get_op): honor index on _const symbols
1922         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1923         * (dumppBlock): added pCode size estimation
1924         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1925           check for IS_SYMOP before OP_SYMBOL'ing
1926         * fixed indentation, compacted switch-statements
1927         * (allocReg): find free register and allocate it instead of
1928           allocating new registers all the time
1929         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1930           registers as its operands (necessary only for multibyte GETs)
1931
1932 2005-07-01 Raphael Neider <rneider AT web.de>
1933
1934         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1935           debugging .asm-output macros FENTRY + FEXIT
1936         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1937           way... I wonder...
1938         * (emitpComment): NEW, printf to pCode
1939         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1940           offset handling
1941         * (popGetAddr): NEW, variant of popGet to access an immediates
1942           high(er) bytes instead of the n'th byte of memory they reference,
1943           replaced popGet with popGetAddr where neccessary
1944         * (genDataPointerGet): reactivated and fixed implementation
1945         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1946           accesses
1947         * (genDataPointerSet): fixed multibyte assignments
1948         * (genpic14Code): fixed --i-code-in-asm handling
1949         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1950         * (genPlus): fixed index-out-of-bounds error
1951         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1952         * src/pic/ralloc.c: added debugging output macro FENTRY2
1953         * (spillThis): fixed indentation, enbraced for-body for clarity
1954         * (rematStr): commented out as now unused
1955         * (regTypeNum): commented out special spill case (overwrites
1956           arbitrary values)
1957         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1958
1959 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1960
1961         * doc/sdccman.lyx: documented sfr16/sfr32,
1962           added example for using storage class with function pointers
1963         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1964
1965 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1966
1967         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1968         * device/lib/_itoa.c,
1969         * device/lib/_ltoa.c: optimized codesize
1970         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1971           but don't know how to suppress the double warning.
1972         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1973         * support/Util/SDCCerr.c,
1974         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1975
1976 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1977
1978         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1979           fixed old K&R prototypes
1980         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1981         * device/lib/_gptrget.c,
1982         * device/lib/_gptrgetc.c,
1983         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1984           also new versions for small generic pointers and banked generic pointers
1985         * src/port.h: added const_name
1986         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1987         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1988         * src/SDCCcse.c (findPrevIc): check all associative operators
1989         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1990         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1991         * src/SDCCmem.c: updated comments,
1992           set far-space to 0 for pdata, results in optimized code
1993         * src/SDCCmem.h: added macro CONST_NAME
1994         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1995           moving the info into the highest bits, see also gptrget/gptrput
1996         * src/src.dsp: added sdcc.ico to project files
1997         * src/avr/gen.c (genCast): fixed bug 0x%d
1998         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1999         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2000           relation between ptr_type and DCL_TYPE,
2001           (genCast): fixed bug 0x%d
2002         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2003           (CODE)" for const_name
2004         * src/hc08/gen.c (genCast): fixed bug 0x%d
2005         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2006           (hc08_port): added "CONST (CODE)" for const_name
2007         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2008           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2009           between ptr_type and DCL_TYPE,
2010           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2011           operand* and took AOP() inside function so sfr-ness can be checked,
2012           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2013           new prototype,
2014           (genFunction, genEndFunction): optimized stack setup,
2015           (genMinus): optimized for literals with ending zeroes (in bytes),
2016           (genCast): fixed bug 0x%d
2017         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2018           (mcs51_port): added "CONST (CODE)" for const_name
2019         * src/mcs51/peeph.def: made rule 226 more generic
2020         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2021         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2022         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2023         * src/z80/main.c (z80_port): added NULL for const_name,
2024           (gbz80_port): added NULL for const_name
2025         * support/regression/tests/bug663539.c,
2026         * support/regression/tests/sfr16.c: new tests
2027
2028 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2029
2030         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2031
2032 2005-06-24 Raphael Neider <rneider AT web.de>
2033
2034         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2035           corrected typos...
2036         * device/include/pic16/signal.h: added USBIF
2037           and SIG_USB
2038
2039 2005-06-24 Raphael Neider <rneider AT web.de>
2040
2041         * device/lib/pic16/libdev/pic18f2455.c,
2042           device/include/pic16/pic18f2455.h: NEW
2043         * device/include/pic16/pic18fregs.h,
2044           device/lib/pic16/pics.all,
2045           src/pic16/device.c: added 18f2455
2046         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2047           device/include/pic16/{pic18f[68][567].h,usart.h}:
2048           replaced MULTIPLE_USARTS define with more relaible
2049           compatibility sfrs (for USART access)
2050
2051 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2052
2053         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2054           and the output asm file line is printed on two lines.
2055
2056 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2057
2058         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2059           BGT, BLE, BHI, and BLS instructions
2060         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2061           genCmpEq): removed
2062         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2063           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2064           fixes bug #1216342
2065         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2066
2067 2005-06-15 Raphael Neider <rneider AT web.de>
2068
2069         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2070         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2071         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2072           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2073           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2074
2075 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2076
2077         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2078           Marcel Telka in bug #1215704
2079
2080 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2081
2082         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2083           located in shared memory bank.
2084
2085 2005-05-31 Raphael Neider <rneider AT web.de>
2086
2087         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2088           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2089           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2090
2091 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2092
2093         * device/lib/_strncpy.c: fixed the fix
2094
2095 2005-05-26 Raphael Neider <rneider AT web.de>
2096
2097         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2098           initializers with \0, bug #1208187
2099         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2100           intializers with \0, bug #1208187
2101
2102 2005-05-26 Raphael Neider <rneider AT web.de>
2103
2104         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2105           initializers with \0, bug #1208187
2106         * src/pic16/main.c (_process_pragma): added sanity checks
2107           for stack position and size, emit warnings when appropriate
2108
2109 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2110
2111         * device/lib/_strncpy.c: fixed not filling with \0
2112
2113 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2114
2115         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2116           createFunction),
2117         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2118           compound_statement),
2119         * src/SDCCsymt.h,
2120         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2121
2122 2005-05-24 Raphael Neider <rneider AT web.de>
2123
2124         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2125
2126 2005-05-24 Raphael Neider <rneider AT web.de>
2127
2128         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2129           TRISE definitions, closes bug #1162453
2130
2131 2005-05-22 Raphael Neider <rneider AT web.de>
2132
2133         * src/pic16/main.c (_process_pragma): check for missing
2134           arguments to pragmas code and udata
2135         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2136           consistency fixes to match other headers (thanks to Jim Paris)
2137         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2138
2139 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2140
2141         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2142
2143 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2144
2145         * support/regression/tests/bug1198642.c: new test
2146         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2147         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2148         * support/scripts/resource.h,
2149         * support/scripts/resource.rc,
2150         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2151         * support/scripts/sdcc.ico: added 32x32 icon
2152
2153 2005-05-18 Raphael Neider <rneider AT web.de>
2154
2155         * device/lib/pic16/libdev/pic18f*.c,
2156         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2157           keywords to "__sfr" and "__at (X)"
2158         * device/include/pic16/pic18fregs.h: added pic18f4520
2159         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2160           #1203088 (MPLAB compatibility)
2161
2162 2005-05-17 Raphael Neider <rneider AT web.de>
2163
2164         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2165         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2166         * device/lib/pic16/pics.all: added new devices
2167         * src/pic16/device.c: added support for pic18f4520
2168
2169 2005-05-16 Raphael Neider <rneider AT web.de>
2170         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2171         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2172         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2173           convenience function for bit access
2174
2175 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2176
2177         * device/lib/printf_large.c: fixed bug 1193299
2178         * support/regression/tests/bug1057979.c: added test %3.3s
2179
2180 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2181
2182         * device/include/mcs51/8051.h,
2183         * device/include/mcs51/8052.h: made parseable with lint
2184         * device/include/mcs51/lint.h: added include file for (sp)lint
2185         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2186         * doc/cdbfileformat.lyx,
2187         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2188
2189 2005-05-14 Raphael Neider <rneider AT web.de>
2190
2191         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2192         * device/lib/pic16/libc/stdlib/itoa.c (new)
2193         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2194         * device/lib/pic16/libio/Makefile: exclude subdir according to
2195           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2196         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2197         * src/pic16/gen.c (genFunction): prevent annoying warning
2198         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2199           nameclashes on BeOS
2200         * support/cpp2/cppmain.c (cpp_output_string): new
2201         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2202           fixes bug 1116802
2203
2204 2005-05-13 Borut Razem <borut.razem AT siol.net>
2205
2206         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2207
2208 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2209
2210         * .version: changed to version 2.5.1; back to bleeding edge development
2211
2212 2005-05-11 Borut Razem <borut.razem AT siol.net>
2213
2214         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2215           generate PDF version 1.3 documents
2216
2217 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2218
2219         * .version: changed to version 2.5.0
2220
2221 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2222
2223         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2224
2225 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2226
2227         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2228         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2229         well as many smaller updates.
2230         * .version: changed to version 2.5.0-pre1
2231
2232 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2233
2234         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2235
2236 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2237
2238         * support/regression/tests/bug1185672.c: added
2239         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2240           bug 1185672
2241         * src/mcs51/gen.c (genCall): added comments, made it look safer
2242         * src/mcs51/gen.c (genEndFunction): simplified
2243
2244 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2245
2246         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2247
2248 2005-04-14 Borut Razem <borut.razem AT siol.net>
2249
2250         * fixed bug 1045046 - SIGSEGV with really simple code?:
2251           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2252           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2253
2254 2005-04-14 Borut Razem <borut.razem AT siol.net>
2255
2256         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2257           src/pic16/device.h: temporarily disabled experimental #inline pragma
2258           for 2.5.0 release
2259
2260 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2261
2262         * device/include/z80/stdio.h,
2263         * device/include/z80/string.h: removed these highly incomplete files so
2264           SDCC can use the default ones in device/include/
2265
2266 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2267
2268         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2269         gcc warning.
2270         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2271         fix sdcpp warnings.
2272
2273 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2274
2275         * device/include/malloc.h: removed redundant __reentrant prototypes
2276         * device/lib/_mullong.c: added working xstack variant in asm (C version
2277           doesn't pass regression tests)
2278         * device/lib/bpx.c: used __data and made bpx char for mcs51
2279         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2280           (createFunction): fixed bug with xstackPtr
2281         * src/SDCCcse.c: corrected comments
2282         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2283           (killDeadCode, eBBlockFromiCode): removed unused code
2284         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2285           corrected comments
2286         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2287           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2288           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2289           (genModOneByte): fixed warning in MSVC
2290         * src/mcs51/main.c (): added comments
2291         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2292
2293 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2294
2295         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2296
2297 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2298
2299         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2300
2301 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2302
2303         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2304         characters arrays of larger size than the declared one.
2305
2306 2005-04-10 Borut Razem <borut.razem AT siol.net>
2307
2308         * src/pic/gen.c (genInline),
2309           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2310           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2311           (findNextInstruction), (findPrevInstruction),
2312           (findInstructionUsingLabel),
2313           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2314         * src/pic/pcode.c (findLabel): added missing '\n'
2315         * src/src.dsp: added SDCCdwarf2.c to the project
2316
2317 2005-04-09 Borut Razem <borut.razem AT siol.net>
2318
2319         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2320
2321 2005-04-08 Raphael Neider <rneider AT web.de>
2322
2323         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2324           into the chain after a given one) and mergeDefmapSymbols (combine
2325           defmap entries for each symbol per pcode)
2326         * (createDefmap): have defmap entries merged in the end
2327         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2328           a symbol before replacing one access type's symbol, merge symbols in
2329           the end (replacement symbol might already have an entry)
2330         * (assignValnums): keep reference to written WREG intact
2331
2332 2005-04-08 Raphael Neider <rneider AT web.de>
2333
2334         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2335           Alpha)
2336
2337 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2338
2339         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2340         bytes
2341
2342 2005-04-07 Raphael Neider <rneider AT web.de>
2343
2344         * device/include/pic16/usart.h: added compatibility defines for
2345           devices with more than one USART
2346         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2347
2348 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2349
2350         * device/lib/Makefile.in: updated for port specific include
2351
2352 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2353
2354         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2355
2356 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2357
2358         * device/include/8051.h,
2359         * device/include/8052.h,
2360         * device/include/at89S8252.h,
2361         * device/include/at89c55.h,
2362         * device/include/at89x051.h,
2363         * device/include/at89x51.h,
2364         * device/include/at89x52.h,
2365         * device/include/mcs51reg.h,
2366         * device/include/reg51.h,
2367         * device/include/reg764.h,
2368         * device/include/regc515c.h,
2369         * device/include/sab80515.h: (re)moved these 12 files
2370         * device/include/mcs51/8051.h,
2371         * device/include/mcs51/8052.h,
2372         * device/include/mcs51/at89S8252.h,
2373         * device/include/mcs51/at89c55.h,
2374         * device/include/mcs51/at89x051.h,
2375         * device/include/mcs51/at89x51.h,
2376         * device/include/mcs51/at89x52.h,
2377         * device/include/mcs51/mcs51reg.h,
2378         * device/include/mcs51/reg51.h,
2379         * device/include/mcs51/reg764.h,
2380         * device/include/mcs51/regc515c.h,
2381         * device/include/mcs51/sab80515.h: and added them here
2382
2383 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2384
2385         * device/include/stdarg.h: changed SDCC specific keywords to double
2386           underlined form.
2387         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2388           mcs51 and ds390.
2389         * device/include/hc08/mc68hc908gp32.h,
2390         * device/include/hc08/mc68hc908jb8.h,
2391         * device/include/hc08/mc68hc908jkjl.h,
2392         * device/include/hc08/mc68hc908qy.h: fixed comments
2393         * device/include/mcs51/README: updated
2394         * device/include/mcs51/c8051f120.h: added PINRSF
2395         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2396         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2397           amidst code. Also inline is not supported.
2398
2399 2005-04-06 Raphael Neider <rneider AT web.de>
2400
2401         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2402         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2403           callers stack/frame pointers
2404
2405 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2406
2407         * device/include/pic16/usart.h: added, missing in previous commit,
2408         * device/include/pic16/adc.h: fixed typo,
2409         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2410         commit,
2411         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2412         <p18fxxx.inc>
2413         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2414         uninitialized because a bug appears with gplink
2415         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2416         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2417         complains for unrecognised option
2418
2419 2005-04-05 Raphael Neider <rneider AT web.de>
2420
2421         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2422           structs as well (using memcpy)
2423         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2424           on ISRs (GOTO has no label)
2425         * src/pic16/device.h: added OF_OPTIMIZE_DF
2426         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2427           new data flow analysis/optimization
2428         * src/pic16/pcode.c: added (prototypes for and implementation of)
2429           dataflow analysis functions, fixed pCodeInstructions' inCond and
2430           outCond values, made RCALL a branch instruction
2431         * (pic16_unlinkpCode): keep C line if possible
2432         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2433           C line moved if possible
2434         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2435         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2436           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2437         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2438           new flow)
2439         * (pic16_getJumptabpCode): NEW, needed in...
2440         * (LinkFlow): fixed handling of jumptables, calls and conditional
2441           branches
2442         * (pic16_InsertCommentAfter): NEW
2443         * (pic16_pCodeReplace): made verbose and flow preserving
2444         * (AnalyzeFlow): added call to data flow analysis
2445         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2446         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2447         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2448
2449 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2450
2451         * src/SDCCast.c (decorateType): fixed bug #1105626
2452
2453 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2454
2455         * device/include/asm/pic16/features.h,
2456         * pic18f*.h headers,
2457         * device/include/pic16/adc.h,
2458         * device/include/pic16/delay.h,
2459         * device/include/pic16/i2c.h,
2460         * device/include/pic16/malloc.h,
2461         * device/include/pic16/stdio.h,
2462         * device/include/pic16/stdlib.h,
2463         * device/include/pic16/string.h,
2464         * device/lib/pic16/libc/stdio/printf_tiny.c,
2465         * device/lib/pic16/libc/stdio/printf_small.c,
2466         * device/lib/pic16/libc/stdio/strmgpsim.c,
2467         * device/lib/pic16/libc/stdio/strmmssp.c,
2468         * device/lib/pic16/libc/stdio/strmusart.c,
2469         * device/lib/pic16/libc/stdio/vfprintf.c,
2470         * device/lib/pic16/libc/stdlib/ltoa.c,
2471         * device/lib/pic16/libc/stdlib/putchar.c,
2472         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2473         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2474         * device/lib/pic16/libc/stdlib/memchrram.c,
2475         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2476         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2477         * device/lib/pic16/libio/adc/adcbusy.c,
2478         * device/lib/pic16/libio/adc/adcread.c,
2479         * device/lib/pic16/libio/adc/adcsetch.c,
2480         * device/lib/pic16/libio/usart/ubaud.c,
2481         * device/lib/pic16/libio/usart/ubusy.c,
2482         * device/lib/pic16/libio/usart/udrdy.c,
2483         * device/lib/pic16/libio/usart/uopen.c,
2484         * device/lib/pic16/libio/usart/uputc.c,
2485         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2486         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2487         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2488         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2489         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2490         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2491         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2492         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2493         specific keywords to double underlined form,
2494         * device/lib/pic16/libc/Makefile.rules,
2495         * device/lib/pic16/libsdcc/Makefile.rules,
2496         * device/lib/pic16/libm/Makefile,
2497         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2498         to compile with C standard set in Makefile.common
2499         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2500         rand.c and crc.c in compilation process,
2501         * device/lib/pic16/libsdcc/int/divuint.c,
2502         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2503         `c' from signed to unsigned,
2504         * device/lib/pic16/startup/crt0.c,
2505         * device/lib/pic16/startup/crt0i.c,
2506         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2507         keywords to double underlined form, bug fixes in _do_cinit function
2508         which prevented the correct initialization of the .idata segment,
2509         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2510         core to enter a infinite loop
2511         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2512
2513 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2514
2515         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2516
2517 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2518
2519         * device/include/Makefile.in: add support for hc08 subdirectory
2520         * device/include/hc08/: new subdirectory
2521         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2522         Lucas Loizaga, thanks!
2523         * device/include/hc08/mc68hc908qy.h,
2524         * device/include/hc08/mc68hc908gp32.h,
2525         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2526         their own directory. Changed internal macro names to use the compiler
2527         reserved namespace. Changed SDCC specific keywords to double
2528         underlined form.
2529         * device/include/math.h,
2530         * device/include/malloc.h,
2531         * device/include/stdarg.h,
2532         * device/include/stdbool.h
2533         * device/include/string.h,
2534         * device/include/tinibios.h,
2535         * device/include/ds400rom.h,
2536         * device/include/8051.h,
2537         * device/include/8052.h,
2538         * device/include/80c51xa.h,
2539         * device/include/at89c55.h,
2540         * device/include/at89S8252.h,
2541         * device/include/at89x51.h,
2542         * device/include/at89x52.h,
2543         * device/include/ds80c390.h,
2544         * device/include/reg764.h,
2545         * device/include/regc515c.h,
2546         * device/include/sab80515.h,
2547         * device/include/mcs51/c8051f000.h,
2548         * device/include/mcs51/c8051f018.h,
2549         * device/include/mcs51/c8051f020.h,
2550         * device/include/mcs51/c8051f040.h,
2551         * device/include/mcs51/c8051f060.h,
2552         * device/include/mcs51/c8051f120.h,
2553         * device/include/mcs51/c8051f300.h,
2554         * device/include/mcs51/c8051f310.h,
2555         * device/include/mcs51/c8051f320.h,
2556         * device/include/mcs51/c8051f330.h,
2557         * device/include/mcs51/c8051f350.h,
2558         * device/include/z180.h: Changed SDCC specific keywords to double
2559         underlined form.
2560
2561 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2562
2563         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2564         18F4455,
2565         * (pic16_assignConfigWordValue): disable testing of configuration
2566         register value with config mask,
2567         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2568         function with port->fun_prefix,
2569         * (genFunction): when generating a naked interrupt function never
2570         create an absolute segment placed in interrupt vector address, place
2571         the actual interrupt function at IVA instead, when an interrupt
2572         function is generated with unspecified interrupt then do not create
2573         the absolute section,
2574         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2575         code for generating a call to generic pointer get/put function with
2576         a call to function pic16_callGenericPointer(),
2577         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2578         the call to the generic pointer get/put functions with prefixing the
2579         function name with port->fun_prefix,
2580         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2581         * src/pic16/main.c (_process_pragma): prefix function with
2582         port->fun_prefix,
2583         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2584         calling assembler, old 18Fxxxx macro is deprecated,
2585         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2586         PC_ASMDIR in while condition,
2587         * (findInstruction): add PC_ASMDIR in while condition,
2588         * (buildCallTree): prefix main with port->fun_prefix,
2589         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2590         identifier for variable with banked access in instructions BTFSS,
2591         BTFSC, BCF, BSF, BTG
2592         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2593         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2594         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2595         perform optimization when enviroment variable NO_REG_OPT is set,
2596         * (insideLRBlock): NEW, return 1 if register is inside an
2597         INF_LOCALREGS block,
2598         * (RemoveRegFromLRBlock): remove a register that is completely
2599         eliminated by register optimization, but it is still left in local
2600         register store/restore in/from stack block,
2601         * (Remove2pcodes): after removing register, check to see if it
2602         should be removed from local register store/restore in/from stack
2603         block,
2604         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2605         DUMMY_READ_VOLATILE,
2606
2607         * device/include/pic16/adc.h: minor prototype modifications and
2608         update,
2609         * device/include/pic16/malloc.h: added GPL notice various
2610         modifications,
2611         * device/include/pic16/stdint.h: NEW, standard header for ints
2612         * device/include/pic16/delay.h: NEW, header for delay functions,
2613         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2614         delay1mtcy,
2615         * device/include/pic16/signal.h: NEW, header providing helper macros
2616         for implementing signal handlers,
2617         * device/include/pic16/stdio.h: added prototypes for functions,
2618         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2619         prototypes for stdin and stdout, added macro PUTCHAR to
2620         automatically implement putchar function prototype,
2621         * device/include/pic16/usart.h: modified and updated USART library,
2622         * device/lib/pic16/libio/adc/,
2623         * device/lib/pic16/libio/i2c: some modifications to improve library
2624         performance,
2625         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2626         family of functions,
2627         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2628         family of functions and other sources,
2629         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2630         of the PIC18Fxx[28] devices,
2631         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2632         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2633         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2634         _do_cinit function, because the previous failed when local variables
2635         where not placed in the same memory bank,
2636         * device/lib/pic16/libsdcc/char/: various modifications to improve
2637         library performance,
2638         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2639         information on the new functions of the c library and more...
2640
2641 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2642
2643         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2644
2645 2005-03-26 Raphael Neider <rneider AT web.de>
2646
2647         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2648           if condition == CARRY)
2649         * (genCmp): adapted to new genSkipc semantics
2650         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2651           on rIfx (genCmp was broken)
2652
2653 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2654
2655         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2656         * src/z80/main.c (_keywords[]),
2657         * src/SDCCglobal.h (struct options),
2658         * src/SDCC.y,
2659         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2660         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2661         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2662         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2663         always available in leading double underscore form. The C99 support is
2664         mostly missing, but it's a start.
2665         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2666         reserved identifier "__data".
2667
2668 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2669
2670         * src/mcs51/peeph.def: fixed bug 1170013
2671
2672 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2673
2674         * device/include/mcs51reg.h: fixed bug 842007
2675
2676 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2677
2678         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2679         last time.
2680
2681 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2682
2683         * src/port.h (struct PORT),
2684         * src/avr/ralloc.c (avr_assignRegisters),
2685         * src/avr/main.c,
2686         * src/ds390/ralloc.c (ds390_assignRegisters),
2687         * src/ds390/main.c,
2688         * src/hc08/ralloc.c (hc08_assignRegisters),
2689         * src/hc08/main.c,
2690         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2691         * src/mcs51/main.c,
2692         * src/pic/ralloc.c (pic14_assignRegisters),
2693         * src/pic/main.c,
2694         * src/pic16/ralloc.c (pic16_assignRegisters),
2695         * src/pic16/main.c,
2696         * src/xa51/ralloc.c (xa51_assignRegisters),
2697         * src/xa51/main.c,
2698         * src/z80/ralloc.c (z80_assignRegisters),
2699         * src/z80/ralloc.h,
2700         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2701         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2702         * src/SDCCcse.h,
2703         * src/SDCCdflow.c (computeDataFlow),
2704         * src/SDCCdflow.h,
2705         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2706         * src/SDCCloop.h,
2707         * src/SDCCcflow.c (*),
2708         * src/SDCCcflow.h,
2709         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2710         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2711         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2712         immedDom() returning wrong block; probably fixes bug #1160833)
2713
2714 2005-03-20 Borut Razem <borut.razem AT siol.net>
2715
2716         * support/scripts/inc2h.pl: WIN32 port
2717
2718 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2719
2720         * device/lib/makefile.in: added abs.c and labs.c
2721
2722 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2723
2724         * device/include/stdint.h: added
2725         * device/lib/abs.c: added
2726         * device/lib/labs.c: added
2727         * device/include/stdlib.h: added abs() and labs() prototypes
2728         * device/lib/libsdcc.lib: added abs and labs
2729         * device/include/float.h,
2730         * device/lib/_fsmul.c,
2731         * device/lib/printf_fast.c,
2732         * device/lib/printf_tiny.c: updated comments
2733
2734 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2735
2736         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2737         bug #1164313
2738
2739 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2740
2741         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2742         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2743
2744 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2745
2746         * device/lib/printf_large.c: removed inline assembly for portability and
2747           readability. Use printf_fast if speed or size are more important.
2748         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2749         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2750
2751 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2752
2753         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2754         prevent compiler warning
2755
2756 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2757
2758         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2759         moved to level 0 and declared as static. Also they are explicit
2760         placed in access bank. This was necessery because some times they
2761         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2762         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2763         optimizations. Currently only compare to unsigned char is implemented,
2764         * src/pic16/gen.c: added fReturnIdx array,
2765         * (struct resolvedIfx) is moved to gen.h and made public,
2766         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2767         * (aopForSym): added an optimization to directly store in stack of
2768         the operand of a SEND iCode,
2769         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2770         but as registers instead (AOP_REG) using the fReturnIdx array,
2771         * (pic16_freeAsmop): remove the freed register from the
2772         _G.sregsAlloc field,
2773         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2774         a compare of 'WREG',
2775         * (pic16_popGetTempRegCond): changed function prototype, now
2776         function takes also a bitVector argument v which holds the current
2777         set of registers that are allocated for stack access by aopForSym,
2778         registers allocated in aopForSym for accessing stack symbols are not
2779         any more part of the functions usedRegs field,
2780         * (genCall): some times aopOp is called for a stack variable to be
2781         send, aopForSym might perform the push, if this is true make sure
2782         that genCall doesn't push the variable twice by testing _G.resDirect,
2783         * (genFunction): changed testing for unspecified interrupt number
2784         from 256 to INTNO_UNSPEC,
2785         * modified selection scheme of frame pointer generation. Previously
2786         if function did use local registers a frame pointer was generated,
2787         now a frame pointer is generated only if function has arguments
2788         (that need PLUSW2 register access), or has stack arguments, or the
2789         compiler is not instructed to omit the frame pointer,
2790         * (genEndFunction): before restoring local registers that were saved
2791         in the function preamble, also restore the registers that *might*
2792         have been allocated for stack access,
2793         * (genRet): removed some old comments,
2794         * (genCmp, the active (RN's) version): added a call to the
2795         pic16_genCmp_special function to perform the compare with a more
2796         robust and optimized way,
2797         * (genInline): a feature has been added in inline code generation,
2798         which allows a wildcard variable substitution when writing inline
2799         assembly. Code is incomplete and experimental therefore undocumented,
2800         * (genCast): changed order of aopOp for result and right to allow
2801         aopForSym to directly load the result if possible,
2802         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2803         perform an optimized compare on some selected special occasions,
2804         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2805         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2806         generate an IVT any more,
2807         * src/pic16/main.c (pic16_optionsTable): added command line option
2808         --optimize-cmp,
2809         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2810         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2811         macros,
2812         * src/pic16/NOTES: Raphael Neider added in list of active developers
2813         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2814         jumptable_end to prevent bug #,
2815         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2816         inCond and outCond fields,
2817         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2818         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2819         turn off register spilling,
2820         * (packRegsForOneUse): synced with other ports' versions although it
2821         is not used currently,
2822         * (pic16_packRegisters): added an optimization while reading
2823         structure bitfields, some registers may be saved (malloc code is
2824         decreased by 80 bytes)
2825
2826 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2827
2828         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2829         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2830         this can be optimized more?
2831
2832 2005-03-10 Raphael Neider <rneider AT web.de>
2833
2834         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2835           genNearPointerGet): (hopefully) fixed access to bitfields via
2836           pointers (p->bitN = x; and x = p->bitN; failed)
2837
2838 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2839
2840         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2841
2842 2005-03-09 Raphael Neider <rneider AT web.de>
2843
2844         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2845
2846 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2847
2848         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2849         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2850           (regTypeNum): set REG_BIT type if necessary
2851         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2852         * support/regression/tests/critical.c: check bug 1144613
2853
2854 2005-03-02 Raphael Neider <rneider AT web.de>
2855
2856         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2857
2858 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2859
2860         * src/avr/ralloc.c (serialRegAssign),
2861         * src/ds390/ralloc.c (serialRegAssign),
2862         * src/hc08/ralloc.c (serialRegAssign),
2863         * src/mcs51/ralloc.c (serialRegAssign),
2864         * src/pic/ralloc.c (serialRegAssign),
2865         * src/pic16/ralloc.c (serialRegAssign),
2866         * src/xa51/ralloc.c (serialRegAssign),
2867         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2868
2869 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2870
2871         * src/SDCCast.c (decorateType): fixed bug 1124787
2872
2873 2005-02-20 Hubert Sack <sack AT digiplan.de>
2874         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2875
2876         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2877         patch #1121755
2878
2879 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2880
2881         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2882         to keep the correct label reference count when adding/removing references
2883         to labels. A peephole file using this is appended to patch #1144962.
2884
2885 2005-02-14 Raphael Neider <rneider AT web.de>
2886
2887         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2888         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2889         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2890           retrievals of result operand's value on assignment
2891
2892 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2893
2894         * device/include/pic16/string.h: modified prototype for memccpy()
2895         to memccpy(void *, void *, char, size_t)
2896         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2897         check whether to omit frame pointer or not,
2898         * (genInline): convert all occurences of "\n" to LF in inline
2899         assembler blocks, this helps formatting the inline text,
2900         * (pic16_loadFSR0): modified prototype,
2901         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2902         removed some 8051 legacy code,
2903         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2904         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2905         before allocating temporary registers in functions,
2906
2907 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2908
2909         * support/regression/tests/bitvars.c: corrected the "fix"
2910
2911 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2912
2913         * support/regression/tests/bitvars.c,
2914         * support/regression/tests/bitwise.c,
2915         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2916
2917 2005-02-10 Raphael Neider <rneider AT web.de>
2918
2919         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2920           different size for Alpha
2921         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2922
2923 2005-02-09 Raphael Neider <rneider AT web.de>
2924
2925         * src/SDCC.lex(doPragma) : save and restore warning options as well
2926           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2927         * have #pragma less_pedantic set the errorlevel to WARNING
2928           (fixes #1117001)
2929         * (cloneOptimize) : fixed wrong malloc's size
2930         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2931           facilitate correct handling of #pragma (save|restore)
2932
2933 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2934
2935         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2936
2937 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2938
2939         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2940
2941 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2942
2943         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2944
2945 2005-02-02 Raphael Neider <rneider AT web.de>
2946
2947         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2948         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2949         * (pic16_storeForReturn): fixed to allow returning function pointers
2950         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2951         * device/include/pic16/{stddef.h,stdbool.h}: added
2952
2953 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2954
2955         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2956
2957 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2958
2959         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2960         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2961          appeared to be required
2962
2963 2005-01-31 Borut Razem <borut.razem AT siol.net>
2964
2965         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2966           include/mcs51 and include/z80 directories to the package
2967
2968 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2969
2970         * src/hc08/gen.c (genFunction): fixed bug #1112752
2971
2972 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2973
2974         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2975
2976 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2977
2978         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2979
2980 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2981
2982         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2983
2984 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2985
2986         * device/include/c8051fxxx.h: removed these 6 files
2987         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2988
2989 2005-01-26 Raphael Neider <rneider AT web.de>
2990
2991         * src/pic16/gen.c (genAssign): fixed assignment from longs
2992           in codespace (were cut to three bytes)
2993         * (genDummyRead): implemented (except for CODESPACE...),
2994           fixed bug #1108575
2995         * src/pic16/glue.c (emitStatistics): beautified
2996         * device/lib/pic16/libm/Makefile: added include path
2997
2998 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2999
3000         * src/z80/gen.c (aopPut): fixed bug #1103902
3001
3002 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3003
3004         * device/lib/expf.c: fixed bug #1095792
3005
3006 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3007
3008         * device/lib/pic16/libm: added Math library sources
3009
3010 2005-01-24 Raphael Neider <rneider AT web.de>
3011
3012         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3013           to enable upcast to pCodeOpReg2 (there is no type tag to
3014           differenciate the two and pic16_popGet2p cast into PCOR2)
3015         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3016           (sizeof(sectNames) changed to sizeof(sectName))
3017           Both patches fix segfaults under MinGW.
3018
3019 2005-01-23 Raphael Neider <rneider AT web.de>
3020
3021         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3022           Safe_[mc]?alloc()'ed variables
3023         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3024           of (byte sized) temporaries (assign them to WREG for now)
3025         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3026           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3027           this might fix SIGSEGVs on MinGW...
3028         * src/SDCCopt.c (killDeadCode): restored original behaviour
3029           (volatile operands might get thrown away though)
3030
3031 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3032
3033         * src/pic16/gen.c: fixed bug #1106975,
3034         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3035         pointer update, INTCON is saved, global interrupts are disabled and
3036         restored after updateing TOS.
3037         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3038         * added function attribute 'shadowregs' to take advantage of shadow
3039         registers,
3040         * added function attribute 'wparam' as an alternative to the wparam
3041         pragma,
3042         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3043         user declares a non-ISR function as 'shadowregs',
3044         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3045
3046 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3047
3048         * .version: bumped version number to 2.4.8
3049         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3050         pic16 port,
3051         * device/lib/pic16/libio/i2c/: I2C module support library,
3052         * device/include/pic16/i2c.h: I2C support library header,
3053         * device/lib/pic16/libc/stdio/: standard IO support sources,
3054         * (printf_small.c): printf_small() source, supports float print,
3055         * (printf_tiny.c): printf_tiny() source, does not support floats,
3056         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3057         enable global optimizations for entire library source, other
3058         Makefiles in the source tree are also modified to reflect this,
3059         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3060         function,
3061         * doc/sdccman.lyx: updated to reflect new changes,
3062         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3063         sym->onStack if-case,
3064         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3065         sbit, idata, _idata, xdata, _xdata,
3066         * added pragma library, to link an external library, (see doc),
3067         * removed command line options, --pomit-config-words, --pomit-ivt,
3068         --pleave-reset-vector,
3069         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3070         when calling assembler to reflect memory model used, also define
3071         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3072         reflect stack model used,
3073         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3074         on stack return NULL,
3075
3076 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3077
3078         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3079           of the operands is volatile. Fixes #1020220
3080
3081 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3082
3083         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3084         * (OptimizeRegUsage): make sure that there is really no other flow where
3085           the first pCode is used
3086
3087 2005-01-22 Raphael Neider <rneider AT web.de>
3088
3089         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3090           to fix #1106967 (pCode->seq are not set up correctly)
3091
3092 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3093
3094         * src/SDCCglue.c (glue): make sure code area is declared before the
3095         static initialization area.
3096
3097 2005-01-21 Raphael Neider <rneider AT web.de>
3098
3099         * device/lib/Makefile.in: fixed test for pic16 install dir
3100         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3101           optimizations
3102         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3103           added --optimize-goto compiler switch and pragma wparam documentation
3104         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3105         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3106           and PRODH closing bug #1071770 (peephole optimizer)
3107
3108 2005-01-19 Raphael Neider <rneider AT web.de>
3109
3110         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3111           cmdLine buffers (used when calling sdcpp...) are large enough
3112           (MAX_PATH=256 truncates arguments leading to system halts when
3113           used in MinGW...)
3114         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3115         * (genUminus): rewritten to for efficiency
3116         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3117           used uninitialized in some cases)
3118         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3119           copy the third byte from the int -- now assumes 0x80 (data memory)
3120         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3121           operands (genAddLit expects the iCode's operands to swapped as
3122           well), fixed leftover bytes (crashed for short left operands)
3123         * (pic16_genMinusDec): performance improvements, removed false
3124           PIC14 emitSKPNCs
3125         * (pic16_genMinus): fixed to cope with differently sized operands
3126         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3127           for --obanksel > 1
3128         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3129         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3130           new banksel optimization
3131         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3132           analysis for temporary registers (segfaults...)
3133         * src/pic16/peeph.def: added rule
3134
3135 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3136
3137         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3138         which converts a float number to its ASCII representation
3139         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3140         functions to convert the fractional and integer part of a float to ASCII,
3141         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3142         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3143         ram
3144         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3145         _STATMEM macros,
3146         * device/include/pic16/adc.h: added GPL info,
3147         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3148         a pCodeOp as tested operand,
3149         * (genNearPointerGet): optimized bit testing, does not use
3150         intermediate register for bit value, test directly instead with
3151         BTFSS, BTFSC, works only for single bits,
3152         * (genpic16Code): dump the name of the iCode in the asm,
3153         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3154         renamed to pic16_decodeOp,
3155         * (serialRegAssign): do not allocate a temporary register for iCode
3156         sequences that test a single bit for 1/0
3157
3158 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3159
3160         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3161         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3162         access stack and frame pointers. They are initially assigned to
3163         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3164         accessing SFRs. Updated all occurences of modification of stack or
3165         frame pointer in gen.c and pcode.c,
3166         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3167         assigning of a literal value to pointers,
3168         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3169         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3170         selected
3171
3172 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3173
3174         * doc/sdccman.lyx: update documentation about stack pragma, added
3175         some info for stack memory models
3176
3177 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3178
3179         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3180
3181 2005-01-08 Raphael Neider <rneider AT web.de>
3182
3183         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3184           udata sections to fix bug #1097823
3185
3186 2005-01-05 Raphael Neider <rneider AT web.de>
3187
3188         * src/pic16/gen.c (genGenericShift): added handling of differently
3189           sized left operand and result
3190
3191 2005-01-04 Raphael Neider <rneider AT web.de>
3192
3193         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3194         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3195           to hold the condition bit)
3196         * added new version of genCmp (old code available via #define)
3197         * added new version of genShiftLeft/genShiftRight in a generic
3198           way, now supports shifting by negative values
3199         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3200           shiftCount (expected by genGenericShift)
3201         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3202         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3203           dump
3204         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3205           is an invalid literal too...)
3206
3207 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3208
3209         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3210         from Raphael Neider,
3211         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3212         for 8-bit literals. This fixes some literal operands which are sign
3213         extended to 16-bits ints when instruction needs only 8-bits.
3214
3215 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3216
3217         * device/lib/logf.c: added mcs51 assembly version
3218         * device/lib/expf.c: added mcs51 assembly version
3219         * device/lib/_logexpf.c: new shared asm code for expf and logf
3220         * device/include/math.h: add defines for assembly math library
3221         * device/lib/Makefile.in: build new _logexpf.c
3222         * device/lib/libfloat.lib: use new _logexpf.c
3223
3224 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3225
3226         * src/pic/device.c
3227         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3228           device types which have less than 0x7f registers.
3229
3230 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3231
3232         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3233
3234 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3235
3236         * device/lib/printf_fast.c: only build on supported arch.
3237         * device/lib/printf_tiny.c: only build on supported arch.
3238         * device/lib/printf_fast_f.c: only build if asm float lib
3239         * device/lib/_fsget1arg.c: only build if asm float lib
3240         * device/lib/_fsget2args.c: only build if asm float lib
3241         * device/lib/_fsnormalize.c: only build if asm float lib
3242         * device/lib/_fsreturnval.c: only build if asm float lib
3243         * device/lib/_fsrshift.c: only build if asm float lib
3244         * device/lib/_fsswapargs.c: only build if asm float lib
3245         * device/include/stdio.h: don't provide print_fast,
3246           print_fast_f, print_tiny prototypes if --xstack used
3247
3248 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3249
3250         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3251         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3252           to the SOURCES
3253
3254 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3255
3256         * device/lib/printf_fast_f.c: same as printf_fast, but
3257           with floating point enabled
3258         * device/lib/printf_fast.c: minor tweaks
3259         * device/include/stdio.h: add printf_fast_f
3260
3261 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3262
3263         * src/SDCCmain.c: make --float-reent default for mcs51
3264         * device/lib/_fsadd.c: added mcs51 assembly version
3265         * device/lib/_fssub.c: added mcs51 assembly version
3266         * device/lib/_fsmul.c: added mcs51 assembly version
3267         * device/lib/_fsdiv.c: added mcs51 assembly version
3268         * device/lib/_fseq.c: added mcs51 assembly version
3269         * device/lib/_fsneq.c: added mcs51 assembly version
3270         * device/lib/_fsgt.c: added mcs51 assembly version
3271         * device/lib/_fslt.c: added mcs51 assembly version
3272         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3273         * device/lib/Makefile.in: add _fscmp to build
3274         * device/lib/libfloat.lib: add _fscmp to build
3275
3276 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3277
3278         * device/lib/_fs2slong.c: added mcs51 assembly version
3279         * device/lib/_fs2sint.c: added mcs51 assembly version
3280         * device/lib/_fs2schar.c: added mcs51 assembly version
3281         * device/lib/_fs2ulong.c: added mcs51 assembly version
3282         * device/lib/_fs2uint.c: added mcs51 assembly version
3283         * device/lib/_fs2uchar.c: added mcs51 assembly version
3284         * device/lib/_slong2fs.c: added mcs51 assembly version
3285         * device/lib/_sint2fs.c: added mcs51 assembly version
3286         * device/lib/_schar2fs.c: added mcs51 assembly version
3287         * device/lib/_ulong2fs.c: added mcs51 assembly version
3288         * device/lib/_uint2fs.c: added mcs51 assembly version
3289         * device/lib/_uchar2fs.c: added mcs51 assembly version
3290         * device/include/float.h: added #define to select asm vs c
3291
3292 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3293
3294         * device/lib/printf_fast.c: improvements to float output
3295         * device/include/float.h: add defines for assembly float library
3296         * device/lib/_fsget1arg.c: receive 1 float arg
3297         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3298         * device/lib/_fsnormalize.c: normalize a float
3299         * device/lib/_fsreturnval.c: return float, various helper routines
3300         * device/lib/_fsrshift.c: right shift a float's mantissa
3301         * device/lib/_fsswapargs.c: swap 2 floats
3302         * device/lib/Makefile.in: build these 6 new files for mcs51
3303         * device/lib/libfloat.lib: add these 6 files to the library
3304
3305 2004-12-26 Borut Razem <borut.razem AT siol.net>
3306
3307         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3308           built by gcc 3.4.2
3309
3310 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3311
3312         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3313           and fully reentrant and register bank neutral.
3314         * device/lib/printf_fast.c: added float (not enabled by default),
3315           added compact/slower integer (also not enabled by default),
3316           improved size/speed of fast integer code, other minor changes
3317         * device/include/stdio.h, device/lib/Makefile.in,
3318           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3319
3320 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3321
3322         * src/pic16/pcode.c: declaring variables other than at the start of a
3323           block is not supported in C by VC6.
3324
3325 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3326
3327         * applied a previous patch from Raphael Neider that wasn't included
3328         in the previous commits, which fixes infinite loops within jumptable
3329         improvements,
3330         * made some fixes that previous patches introduced
3331
3332 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3333
3334         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3335         that fixes an issue with AOP_PCODE asmop's offset,
3336         * (pic16_popCopyReg): update instance field too,
3337         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3338         function of pic port,
3339         * (genCmp, genAnd, genAssign),
3340         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3341
3342 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3343
3344         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3345         variables initial values to idata section,
3346         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3347         variables in some functions. This utilizes parmBytes field of iCode
3348         structure to hold the offset of the variable in stack. (might be
3349         able to use the stack field too?)
3350         * applied patch from Raphael Neider # ### , # ###
3351         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3352         variable initial values in idata section,
3353         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3354         for static variables with initial value
3355         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3356         applied fix in while loop from Raphael Neider.
3357
3358 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3359
3360         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3361         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3362         * src/ds390/ralloc.c (serialRegAssign): spill bits
3363         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3364         * support/Util/SDCCerr.c,
3365         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3366         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3367         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3368
3369 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3370
3371         * device/include/sdcc-lib.h: inserted LGPL, added includes
3372           asm/ds390/features.h and asm/mcs51/features.h
3373         * device/include/asm/default/features.h,
3374         * device/include/asm/gbz80/features.h,
3375         * device/include/asm/z80/features.h: added empty _AUTOMEM
3376           and _STATMEM
3377         * device/include/asm/ds390/features.h,
3378         * device/include/asm/mcs51/features.h: added files with defines for
3379           _AUTOMEM and _STATMEM indicating automatic and static storage class
3380         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3381         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3382         * src/SDCCicode.c (geniCodeCast),
3383         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3384         * src/SDCCloop.c (loopInduction): removed unused variable lr
3385         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3386           to convertToFcall to include char modulo (RFE 1065037), added check
3387           if left operand is unsigned and use abs of literal value
3388         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3389           as it doesn't work after conversion from peephole.def to peephole.rul
3390         * src/mcs51/gen.c (toBoolean): added check for size,
3391           (genModOneByte): optimized code for signed char modulo a literal
3392           power of 2 (thanks to Hubert Sack),
3393           (genRRC): removed unnecessary "clr c",
3394           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3395         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3396           jump optimization,
3397           swapped rules 256.c and 256.d,
3398           extended 256.d by using new multiple checks (thanks Erik),
3399           added rules 256.e and 256.f,
3400           updated rule 261.a and 261.b to new generated code
3401         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3402
3403 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3404
3405         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3406           induction related bugs, including first part of bug #1074377
3407
3408 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3409
3410         * applied patch from bug-report #1076292,
3411         * applied patches for genAnd and Goto-optimizations for Raphael
3412         Neider,
3413         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3414         dump a less iCode information,
3415         * src/pic16/device.h (pic16_options_t): added field debgen,
3416         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3417         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3418         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3419         puclic,
3420         * (various functions): added macros FENTRY and FENTRY2 to functions,
3421         to emit function prologue,
3422         * (various functions): fixed indentation,
3423         * (genNearPointerGet): fixed loading of FSR0,
3424         * (genPackBits): applied patch from Raphael Neider to fix updating
3425         of FSR0 and touching only the modified bits,
3426         * src/pic16/genarith.c (various functions): added macros FENTRY to
3427         emit function prologue in comments,
3428         * src/pic16/pcode.h: added functions debugf2, debugf3,
3429         * src/pic16/ralloc.c: partial fix for packForPush caused
3430         segmentation fault,
3431
3432 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3433
3434         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3435           <stsp AT users.sourceforge.net> with reversed byte order
3436         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3437
3438 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3439
3440         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3441           bug #1074377
3442         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3443         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3444
3445 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3446
3447         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3448
3449 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3450
3451         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3452           conditions,
3453           (setFromConditionArgs): friendly operand parser for peephole rules,
3454           (operandBaseName, operandsNotRelated): new peephole condition
3455           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3456           architecture specific register naming into account, handles n-way
3457           comparisons, and supports quoted literals
3458         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3459
3460 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3461
3462         * src/mcs51/peeph.def: fixed bug #1076940
3463
3464 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3465
3466         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3467
3468 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3469
3470         Adding support for replacing ljmps with sjmps in jumptables
3471         generated for switch statements. For now you need to set the
3472         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3473         Now 4 algorithms for mcs51 jumptable generation are used:
3474         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3475         addresses loaded pc-relative for up to 112 cases and stack-pushing
3476         target addresses loaded with offset from dptr for up to 256 cases.
3477
3478         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3479         * src/mcs51/main.c: adapted constants for switch table generation
3480         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3481
3482 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3483
3484         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3485         * support/regression/tests/bug1057979.c: added test for bug 1073386
3486
3487 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3488
3489         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3490         compilers
3491
3492 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3493
3494         * src/pic16/device.h,
3495         * src/pic16/genarith.c,
3496         * src/pic16/glue.c,
3497         * src/pic16/main.c,
3498         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3499
3500 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3501
3502         Large cummulative patch for pic16 port.
3503         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3504         to call when a stack overflow occurs,
3505         * (malloc.h): added CVS Id tag,
3506         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3507         variable,
3508         * added libc directory. The current version of LibC contains string
3509         functions, ctype functions and macros and some functions of the
3510         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3511         be extensively tested in the future. Standard disclaimer here.
3512         Library is not automatically build yet. But one can build it by
3513         invoking 'make' inside the libc directory.
3514         * added ADC library under libio. Preliminary version yet.
3515
3516         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3517         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3518         aopForRemat() now and not by pic16_aopOp(),
3519         * (pic16_popGetTempReg): removed warning messgae when allocating
3520         temporary registers, its a buggy feature and will be removed,
3521         * (pic16_popGet): set register instance field in AOP_CRY,
3522         * (pic16_outBitC): fixed for results in size greater than 1,
3523         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3524         * (pic16_storeForReturn): optimized return of 0,
3525         * (genCmp): experimental code for new genCmp which uses PIC18's
3526         special compare&skip instructions. Initial tests fail some times
3527         with variables grater than 1 byte in size, so new code is disabled,
3528         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3529         a single bit,
3530         * (genCast): began a fix to optimize the casting of a bit to another
3531         bit, now assigning a bitfield to another bitfield will fail, sorry,
3532         * src/pic16/main.c: disabled the use of lr-support feature,
3533         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3534         * added some function prototypes, added function _debugf prototype,
3535         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3536         bits with offset (case PO_GPR_BIT),
3537         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3538         command line,
3539         * (isBankInstruction): modified to return 0 for no banking instruction,
3540         and 1 for banking instruction,
3541         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3542         caused stop processing pCodes after a inline assembly block,
3543         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3544         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3545         registers when it shouldn't,
3546         * src/pic16/ralloc.c (allocReg): add preliminary support for
3547         supporting a limited set of temporary registers,
3548
3549 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3550
3551         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3552           genDataPointerSet): ensure assignments always copy in MSB to LSB
3553           order,
3554           (loadRegFromAop): recognize CLRH optimization,
3555           (genFunction): optimize RECEIVE iCodes in reentrant functions
3556
3557 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3558
3559         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3560           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3561           selected.
3562         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3563         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3564           contiguous with data
3565
3566 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3567
3568         * device/lib/_gptrget.c (_gptrget),
3569         * device/lib/_gptrgetc.c (_gptrgetc),
3570         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3571           instead of sjmp to ret
3572         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3573           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3574
3575 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3576
3577         * .version: bumped version to 2.4.7
3578         * device/lib/_gptrget.c (_gptrget): is now _naked
3579         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3580         * device/lib/_gptrput.c (_gptrput): is now _naked
3581         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3582           (createFunction): fixed xstack
3583         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3584         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3585           or bit either,
3586           (geniCodeCritical): store original interrupt state in an iTemp bit
3587           var unless stack-auto
3588         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3589         * src/SDCCmain.c (setIncludePath): added include/target to search path
3590         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3591         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3592           prototype,
3593           (processFuncArgs): put bit vars in bit area
3594         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3595           unsaveRBank): fixed xstack,
3596           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3597           (genFunction, genEndFunction): fixed xstack,
3598           (genAssign): optimization don't walk backwards through mem
3599         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3600         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3601         * support/regression/Makefile: also make library (for stack-auto) when
3602           making "all" and added "test-mcs51-xstack-auto"
3603         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3604         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3605         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3606         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3607         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3608           make-library by MAKE_LIBRARY
3609         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3610           regression tests for xstack
3611         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3612         * support/regression/tests/critical.c: test for critical on mcs51
3613
3614 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3615
3616         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3617           built version of sdcc instead of installed version
3618
3619 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3620
3621         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3622         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3623           vprintf.c now
3624         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3625         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3626           WARNING: remove device/lib/build/z80/printf.o by hand when
3627           updating from previous build!
3628         * device/lib/z80/printf.c: updated comment
3629         * support/regression/tests/bug1057979.c: test all ports now
3630         * support/regression/tests/bug1065458.c: file added
3631
3632 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3633
3634         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3635           *_start and *_end symbols for static functions
3636
3637 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3638
3639         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3640           and search crt0.o in all library paths,
3641           (setIncludePath): proper handling of --nostdinc,
3642           (setLibPath): proper handling of --nostdlib
3643         * support/regression/Makefile,
3644         * support/regression/ports/ds390/spec.mk,
3645         * support/regression/ports/gbz80/spec.mk,
3646         * support/regression/ports/hc08/spec.mk,
3647         * support/regression/ports/mcs51/spec.mk,
3648         * support/regression/ports/mcs51-large/spec.mk,
3649         * support/regression/ports/mcs51-stack-auto/spec.mk,
3650         * support/regression/ports/z80/spec.mk: use include and lib files from
3651           built version of sdcc instead of installed version
3652         * doc/sdccman.lyx: fixed typo in --nostdinc
3653
3654 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3655
3656         * src/pic/pcode.c,
3657         * src/pic/device.c,
3658         * src/pic/ralloc.c,
3659         * src/pic/gen.c : added support to generate code for struct bit fields.
3660
3661 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3662
3663         * as/xa51/xa_version.h,
3664         * device/include/errno.h,
3665         * device/include/regc515c.h,
3666         * device/lib/_itoa.c,
3667         * device/lib/_ltoa.c,
3668         * device/lib/ser_ir_cts_rts.c,
3669         * sim/ucsim/xa.src/glob.cc,
3670         * sim/ucsim/xa.src/inst_gen.cc,
3671         * sim/ucsim/xa.src/xa_bit.cc,
3672         * sim/ucsim/xa.src/xa_sfr.cc,
3673         * sim/ucsim/z80.src/inst_dd.cc,
3674         * sim/ucsim/z80.src/inst_fdcb.cc,
3675         * support/scripts/keil2sdcc.pl,
3676         * src/pic16/pic16.dsp,
3677         * src/pic16/pic16a.dsp: corrected cvs line endings
3678         * device/lib/printf_large.c: fixed bug 1057979
3679         * src/pic16/gen.c: fixed non-C standard code
3680         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3681         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3682         * support/regression/ports/mcs51/support.c: reload T1 asap
3683         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3684           pdata use and clear idata startup behaviour
3685         * support/regression/tests/bug1057979.c: added
3686
3687 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3688
3689         * device/examples/ds390/ow390/ad26.h,
3690         * device/examples/ds390/ow390/cnt1d.h,
3691         * device/examples/ds390/ow390/crcutil.c,
3692         * device/examples/ds390/ow390/ownet.h,
3693         * device/examples/ds390/ow390/owsesu.c,
3694         * device/examples/ds390/ow390/swt12.h,
3695         * device/examples/ds390/ow390/swtoper.c,
3696         * device/examples/ds390/ow390/temp10.h,
3697         * device/examples/ds390/ow390/thermodl.c,
3698         * device/examples/ds390/tinitalk/tinitalk.dsp,
3699         * device/examples/ds390/tinitalk/tinitalk.dsw,
3700         * device/examples/mcs51/clock/hw.h,
3701         * device/examples/mcs51/simple2/go.bat,
3702         * device/examples/serialcomm/windows/serial.h,
3703         * device/examples/xa51/dummy.c,
3704         * device/examples/xa51/hello.c,
3705         * device/include/80c51xa.h,
3706         * device/include/at89x051.h: corrected cvs line endings
3707
3708 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3709
3710         * src/pic16/main.c (options): added command line --gstack, to trace
3711         stack over/under flows,
3712         * added pragma 'wparam' to allow passing first byte of function
3713         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3714         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3715         call to __gstack_test function and sets up the symbol as extern,
3716         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3717         * popaop): added call to pic16_testStackOverflow,
3718         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3719         wparamList list,
3720         * (genCall, genPcall): now all parameters are passed via stack
3721         except in functions that are pass to wparam pragma in which WREG is
3722         used too,
3723         * (genPcall): REENTRANT flag is checked to see if variable prototype
3724         contains reentrant keyword, don't call a non-reentrant function, via
3725         a reentrant function pointer or vice versa, functions are never
3726         passed via WREG,
3727         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3728         D.Winkler,
3729         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3730         SIGSEGV when accessing a NULL register stucture,
3731         * (pic16_printGPointerType): modified to handle UPPER modifier for
3732         function initializers, changed prototype of function to simpler one,
3733         * (pic16_printIvalFuncPtr): check to see if function is already
3734         added in externs list,
3735         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3736         optimized a move from W to SFR with a move to the same register
3737         later after a CALL,
3738         * device/lib/pic16/debug: NEW directory, contains debug features
3739         which are enabled when linking with libdebug.lib, currently command
3740         line option --gstack enables stack pointer tracing for over/under
3741         flow, corresponding sources are in debug/gstack
3742
3743 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3744
3745         * doc/sdccman.lyx: updated SDCC version,
3746         * (PIC16 port): update list of command line options,
3747         * src/pic16/device.h (structure pic16_options_t): added field gstack
3748         to enable stack overflow tracing on push/pops,
3749         * src/pic16/device.c (statistics structure): added statistics
3750         structure,
3751         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3752         pic16_dump_int_registers): increase statistics counters for each
3753         * variable which is encountered
3754         * (pic16_dump_usection): emit each .udata variable to its own udata
3755         section,
3756         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3757         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3758         parameters via stack, otherwise use old scheme,
3759         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3760         assembler output file,
3761         * src/pic16/main.c: added command line options --gstack to enable
3762         push/pop tracing for stack overflow,
3763         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3764         instructions): added size of each instruction,
3765         * (pic16_countInstruction): estimate size of instructions in
3766         the_pFile list, inline assembly blocks are not counted,
3767         * (pic16_FixRegisterBanking): trace previous register usage, when
3768         banksel optimizations is greater than 0, don't emit a redudant
3769         banksel directive,
3770
3771 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3772
3773         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3774         * src/pic16/ralloc.c : applied same fix for pic16.
3775         * src/pic/gen.c : tidied it up a little.
3776
3777 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3778
3779         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3780         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3781
3782 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3783
3784         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3785
3786 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3787
3788         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3789         non-reentrant function __modsint in the interrupt function (thus
3790         corrupting math operations during serial I/O)
3791         * device/lib/ser_ir.c: as above, changed buffersize
3792         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3793         256.c,d for zeroing
3794         * doc/Makefile: added option -t for rsync
3795
3796 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3797
3798         * src/SDCCast.h (struct ast),
3799         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3800
3801 2004-10-20 Borut Razem <borut.razem AT siol.net>
3802
3803         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3804         package
3805
3806 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3807
3808         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3809         makefile targets,
3810         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3811         support functions to replace long sequences of MOVFF's from access
3812         bank registers to stack and vice versa,
3813         * src/pic16/device.h: added new field opt_flags, where optimization
3814         flags can be set to enable certain features,
3815         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3816         * pBlock, (genFunction, genEndFunction): surroung loop for
3817         saving/loading used registers in stack with PC_INFO pCodes,
3818         INF_LREGS. Code in between can then be optimized by pCode optimizer
3819         to support function calls,
3820         * (genDataPointerSet): fixed bug which loaded float fields in
3821         structures with corrupt data,
3822         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3823         in a standard way debug info on stderr. Feature used for developing
3824         and debugging only,
3825         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3826         obsolete chunks of code,
3827         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3828         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3829         * pic16/src/pcode.c (pic16_newpCodeInfo,
3830         * (pic16_newpCodeOpLocalRegs),
3831         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3832         feature,
3833         * (pic16_pCodeConstString): printing of the initial value of a
3834         symbol as a comment is inhibited since parsing was already done by
3835         copyStr and output is corrupt,
3836         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3837
3838 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3839
3840         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3841
3842 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3843
3844         * as/mcs51/lkarea.c: removed old K&R style,
3845           (lnksect): changed check on boundary error,
3846           (lnksect2): changed check on boundary error,
3847           (lnksect2): extend XSTK to end of page if size = 1
3848         * as/mcs51/lkmain.c: removed old K&R style,
3849           (Areas51): create l_IRAM symbol
3850         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3851         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3852           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3853         * device/lib/_mullong.c: added version to be compiled with xstack
3854         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3855         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3856         * device/lib/mcs51/crtxstack.asm: fixed comment
3857         * src/SDCCglue.c: maxInterrupts defaults to 0,
3858           (emitMaps): added pdata,
3859           (createInterruptVect): (re)moved default,
3860           (glue): added pdata,
3861           (glue): moved __start__xstack to XSTK with default size 1
3862         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3863           and options.float_rent when options.stackAuto is set,
3864           (linkEdit): only write XDATA_NAME if provided on command line
3865         * src/SDCCmem.h,
3866         * src/SDCCmem.c: added pdata
3867         * src/port.h: added pdata_name to PORT
3868         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3869           (saveRegisters, unsaveRegisters): removed usage of B,
3870           (genMinus): fixed accumulator clash,
3871           (genJumpTab): added comment, this needs another look
3872         * src/mcs51/gen.c: added check for "B in use" paranoia,
3873           added pushB() and popB()
3874         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3875           chance
3876         * src/avr/main.c,
3877         * src/ds390/main.c,
3878         * src/hc08/main.c,
3879         * src/mcs51/main.c,
3880         * src/pic/main.c,
3881         * src/pic16/main.c,
3882         * src/xa51/main.c,
3883         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3884           added PSEG (PAG,XDATA) or NULL to port specifier
3885         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3886         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3887           (_mcs51_genInitStartup): removed __start__xstack equ,
3888           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3889         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3890         * src/z80/gen.c (_rleAppend): fixed warnings
3891         * support/regression/tests/zeropad.c: added pdata test
3892         * .version: bumped to 2.4.6
3893
3894 2004-10-17 Borut Razem <borut.razem AT siol.net>
3895
3896         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3897         as a part of nightly build
3898
3899 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3900
3901         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3902         WREG holds the first byte function parameters,
3903         * (aopForSym): take special case for symbols which are in FARSPACE
3904         but in CODESPACE too,
3905         * (assignResultValue): modified to take into account _G.useWreg,
3906         * (genCall): don't use wreg for parameter passing when function is
3907         declared as reentrant, too, added optimization INCF to stack
3908         pointer when stack parameter count is 1,
3909         * (genFunction, genEndFunction): refurnished and fixed to not using
3910         wreg for passing parameters when function has varargs or is
3911         reentrant, fixed bug with symbol name compare for generating
3912         functions in absolute address,
3913         * (pic16_storeForReturn): refurnished,
3914         * (genCmp): began writing a new version of the function, not ready
3915         yet, therefore it is disabled,
3916         * (genAssign): do not read code memory when assigning a function to
3917         a pointer function,
3918         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3919         array of characters, not pointer,
3920         * (pic16initialComments): in debug mode emit an .ident directive for
3921         the assembler,
3922         * (_process_pragma): emit a new warning type (internal to pic16)
3923         when setting stack to default length, emit a similar warning when
3924         placing a function at absolute address and address is not word aligned
3925         * (_pic16_parseOptions): added 'return TRUE' statement,
3926         * (_pic16_linkEdit): if compiling a source, then add the source's
3927         file object, first in the list of objects to link,
3928
3929 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3930
3931         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3932         * src/pic/main.c : removed VC warning.
3933         * src/pic/gen.c : changed comment.
3934
3935 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3936
3937         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3938         reference to a deprecated symbol _GPTRREG was causing failure to
3939         link. Thanks G. M. Gallant for the info.
3940
3941 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3942
3943         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3944         comments for Bugs item #954788.
3945
3946 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3947
3948         * src/pic16/device.c (pic16_dump_gsection,
3949         * pic16_groupRegistersInSection): handle symbols declared to be in
3950         access bank differently,
3951         * src/pic16/gen.c (struct _G): added field resDirect,
3952         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3953         send values read from stack directly to result and don't allocate
3954         temporary values,
3955         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3956         same registers,
3957         * (pic16_sameRegsOfs): NEW,
3958         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3959         free because they were not allocated from temporary pool,
3960         * pic16_popRegFromString): workaround to fix a problem with
3961         allocating variables twice or never,
3962         * (genGenPointerGet): using PRODL instead of FSR0H,
3963         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3964         instead of FSR0H,
3965         * (genAssign): take advantage of the _G.resDirect flag,
3966         * (genCast): around line 11844, use mov2f instead of directly
3967         MOVFF'ing between operands to account for literal values,
3968         * src/pic16/genutils.c: some new debug functions for gpsim have been
3969         added,
3970         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3971         float with integer part only,
3972         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3973         place variables in access bank
3974         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3975         updated sources to reflect recent changes in gen.c
3976
3977 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3978
3979         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3980         sources that searched for headers in installation path, now the
3981         device/include/pic16 is used,
3982         * src/pic16/glue.c (pic16glue),
3983         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3984         .line directives if not in debug mode, this suppresses assembler's
3985         warnings for ignored directives
3986
3987 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3988
3989         * src/port.h: made reset_regparms prototype void parameter explicit.
3990         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3991         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3992         * doc/sdccman.lyx: documented warning disabling and how to use
3993           printf_large to make it print floats.
3994         * device/include/stdbool.h: NEW
3995         * device/lib/_atof.c,
3996         * device/lib/_divuint.c,
3997         * device/lib/_divulong.c,
3998         * device/lib/expf.c,
3999         * device/lib/printf_large.c,
4000         * device/lib/sincosf.c,
4001         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4002         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4003           a completely reentrant lib.
4004
4005 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4006
4007         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4008         * device/include/pic16/stdio.h: fixed bug with colon
4009
4010 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4011
4012         * device/include/pic16/stdio.h,
4013         * device/include/pic16/stdlib.h,
4014         * device/include/pic16/math.h: NEW
4015         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4016         declared as _naked to reduce overhead
4017         * device/lib/Makefile.in (target port-specific-objects-pic16):
4018         changed * to *.* so to ignore the CVS directory,
4019         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4020         stacked variables back in stack,
4021         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4022         corruption
4023
4024 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4025
4026         * .version: bumped version number to 2.4.5
4027         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4028         * support/Util/SDCCerr.c (messages structure): added entry for
4029         W_POSSBUG2
4030
4031         Large cumulative patch for pic16 port and libraries.
4032         * device/include/pic16/sdcc-lib.h,
4033         * device/include/pic16/stdarg.h,
4034         * device/include/asm/pic16/features.h,
4035         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4036         * device/include/pic16/float.h: changes reentrant keyword with
4037         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4038         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4039         updated target build-libraries to include objects from gptr,
4040         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4041         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4042         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4043         all function headings,
4044         * src/SDCCmain.c: added global parameter userIncDirsSet,
4045         * (parseCmdLine): when option -I is encountered add directory to
4046         userIncDirsSet too,
4047         * src/version.awk: added space between control and long,
4048         * src/pic16/NOTES: added some notes for the port,
4049         * src/pic16/gen.c: added prototype for mov2fp function,
4050         * (fReturnpic16[]): properly named return value registers,
4051         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4052         * (aopForSym): added code to handle symbols with onStack flag set,
4053         symbols onStack are allocated PTRSIZE bytes,
4054         * (aopFreeAsmop): handles special case where asmops are stack objects,
4055         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4056         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4057         added argument lock to trace flaws in allocating temporary registers
4058         when developing port,
4059         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4060         * (pic16_popRegFromString): reenabled allocating a direct register
4061         from string,
4062         * (assignResultValue): various beautifications,
4063         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4064         referenced function argument,
4065         * (genIpush): reenabled to allow stacked arguments, handles only
4066         ic->parmPush iCodes,
4067         * (genCall, genPcall): major changes to allow for variable argument
4068         functions, fixed a bug with falsely restoring stack pointer after
4069         returning from call,
4070         * (genFunction): pending code for critical function,
4071         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4072         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4073         * (genNearPointerGet): fixed bug with indirect reading, was always
4074         reading from INDF0
4075         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4076         pointers,
4077         * (genAddrOf): rewrote code to take address of a stacked function parameter
4078         * (genCast): fixed casting to generic pointer type,
4079         * src/pic16/gen.h: added AOP_STA,
4080         * (struct asmop): added field stk,
4081         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4082         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4083         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4084         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4085         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4086         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4087         generic pointers,
4088         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4089         and library paths,
4090         * (pic16_port structure): generic pointer size is set to 3,
4091         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4092         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4093         compiler warning,
4094         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4095         operand is an iTemp,
4096
4097 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4098
4099         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4100         * debugger/mcs51/simi.c: addapt new syntax of s51
4101
4102 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4103
4104         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4105         * src/pic16/pcode.c: commented out some calls to free() in order to
4106         fix bug #989576,
4107
4108 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4109
4110         * src/SDCCicode.h,
4111         * src/SDCCicode.c (isiCodeInFunctionCall),
4112         * src/avr/ralloc.c (selectSpil),
4113         * src/pic/ralloc.c (selectSpil),
4114         * src/pic16/ralloc.c (selectSpil),
4115         * src/ds390/ralloc.c (selectSpil),
4116         * src/hc08/ralloc.c (selectSpil),
4117         * src/xa51/ralloc.c (selectSpil),
4118         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4119         stack in the middle of a function call sequence (fixes bug #1020268)
4120         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4121         costs associated with the minimum switch case.
4122
4123 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4124
4125         * src/SDCC.lex: fixed bug #1030549
4126
4127 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4128
4129         * src/SDCCcse.h (struct cseDef),
4130         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4131         over a function call if the CSE is derived from a symbol whose
4132         address has been taken (fixes bug #1029883)
4133         * support/regression/tests/bug-1029883: a new regression test for
4134         this bug
4135
4136 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4137
4138         * src/hc08/gen.c (emitinline): fixed bug #1029778
4139         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4140         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4141         and starts toward RFE #905167)
4142
4143 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4144
4145         * src/pic16/gen.c (mov2f): New function to move an operand to
4146         another without considering if it is a literal or a register,
4147         * (pic16_sameRegs): don't check if they are both AOP_REG,
4148         * (AccRsh): removed andmask=0 lines,
4149         * (genLeftShift): duplicated to be improved in future versions,
4150         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4151         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4152         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4153         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4154         * (insertBankSwitch): fixed inserting banksel directives algorithm
4155         for instructions that follow a skip instruction, this fixes a report
4156         for broken subtraction code generation,
4157         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4158         iCode is a left op, just in case result and right share the same
4159         registers
4160
4161 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4162
4163         * src/hc08/main.c,
4164         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4165         preservation of HX
4166         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4167         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4168         on 2004-09-12; it was buggy
4169
4170 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4171
4172         * src/SDCCsymt.h: removed RESULT_CHECK
4173         * src/SDCCast.c,
4174         * src/SDCCglue.c,
4175         * src/SDCCval.c,
4176         * src/pic/glue.c,
4177         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4178
4179 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4180
4181         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4182         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4183         configuration values no more rejected by compiler, they are assigned
4184         to configuration registers with a warning message instead,
4185         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4186         the for-loop so last conf register is emitted too,
4187         * (_pic16_initPaths): link library libsdcc.lib by default,
4188         * (_hasNativeMulFor): modified test for multiplication according to
4189         Raphael Neider's remarks. Integer multiplication is also done with
4190         support functions,
4191         * device/include/pic16/pic18fregs.h: corrected type error in while
4192         testing and including 18f6720 header file
4193
4194 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4195
4196         * src/pic16/device.h (pic16_options): removed field use_crt,
4197         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4198         until an optimization to handle single bits is added,
4199         * (pic16_loadFSR0): moved before genUnpackBits,
4200         * (genAnd): some white lines removed,
4201         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4202         leave_reset flags in pic16_options when using crt modules,
4203
4204 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4205
4206         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4207           for bugs 898889 & 979599. Also used some safer print instructions.
4208
4209 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4210
4211         * src/pic16/device.h (pic16_options_t): added field use_crt,
4212         crt_name, no_crt,
4213         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4214         catch a probable future bug,
4215         * src/pic16/gen.c: aopIdx function commented out,
4216         * (genAssign): commented out old code which used aopIdx,
4217         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4218         code, added if conditionals to take into account the --use-crt
4219         command line options,
4220         * src/pic16/main.c (pic16_optionsTable): added new command line
4221         options, --use-crt= and --no-crt,
4222         * (_pic16_linkEdit): now the proper crt object is added in the
4223         linker command line except than when --no-crt is specified,
4224         * src/pic16/pcode.c,
4225         * src/pic16/pcode.h: added some structures and functions for a new
4226         optimization scheme to compansate for instruction overhead between
4227         same iCodes, this scheme is currently under development and is not
4228         working in any way,
4229         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4230         to && operator,
4231         * device/lib/pic16/startup/crt0i.c,
4232         * device/lib/pic16/startup/crt0iz.c: added global char variable
4233         __uflags to force the generation of an idata section
4234
4235 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4236
4237         * doc/Makefile,
4238         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4239         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4240
4241 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4242
4243         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4244         Frieder) and clarified the default code optimization mode
4245
4246 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4247
4248         * src/SDCC.lex (doPragma, process_pragma),
4249         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4250         "opt_code_size", and "opt_code_balanced"
4251         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4252         regrouped options by category, added support for category headers
4253         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4254         and "--opt-code-size"
4255         * doc/sdccman.lyx: documented these new options and pragmas
4256         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4257         preference into account
4258
4259 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4260
4261         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4262           geniCodePreDec): Fixed bug 904237 by generating a warning
4263         * src/SDCCerr.h,
4264         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4265
4266 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4267
4268         * src/pic/device.c : When no max ram set validate full memory range.
4269         * src/pic/pcode.c,
4270         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4271
4272 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4273
4274         * device/lib/_gptrget.c,
4275         * device/lib/_gptrput.c: updated comment
4276         * device/lib/calloc.c,
4277         * device/lib/free.c,
4278         * device/lib/malloc.c,
4279         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4280         * src/SDCCcse.c (cseBBlock),
4281         * src/SDCCicode.c (printOperand, geniCodeArray),
4282         * src/SDCCicode.h (struct operand): fixed bug 868103
4283         * support/regression/tests/bug-868103.c: added
4284         * src/SDCCast.c (searchLitOp),
4285         * src/SDCCcse.h (struct cseDef),
4286         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4287         * src/SDCCicode.h (struct operand),
4288         * src/SDCCsymt.h (struct sym_link),
4289         * src/avr/gen.c (hasInc),
4290         * src/ds390/gen.c (hasInc),
4291         * src/hc08/gen.c (genPlusIncr, hasInc),
4292         * src/mcs51/gen.c (hasInc),
4293         * src/pic16/glue.c (pic16_printIvalChar),
4294         * src/pic16/ralloc.c (regWithIdx),
4295         * src/xa51/gen.c (hasInc) : removed warnings
4296         * src/SDCCast.c (createBlock): added comment ???
4297         * src/hc08/ralloc.c: updated comments
4298
4299 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4300
4301         * doc/sdccman.lyx: updated section on switch statements, added
4302         section about semaphore locking
4303         * doc/Makefile: added option -info for latex2html
4304         * device/lib/_gptrget.c,
4305         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4306
4307 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4308
4309         * src/pic/device.h,
4310         * src/pic/device.c,
4311         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4312          maxram is less than 0x100.
4313
4314 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4315
4316         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4317
4318 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/port.h,
4321         * src/mcs51/main.c,
4322         * src/ds390/main.c,
4323         * src/z80/main.c,
4324         * src/hc08/main.c,
4325         * src/pic/main.c,
4326         * src/pic16/main.c,
4327         * src/avr/main.c,
4328         * src/xa51/main.c
4329         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4330         a jump table is the best form for a switch statement, including
4331         automatic insertion of missing cases to make the case range
4332         continuous. Developed in collaboration with Frieder Ferlemann.
4333
4334 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4335
4336         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4337         accumulator result if it needs sign extension
4338
4339 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4340
4341         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4342
4343 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4344
4345         * device/lib/gbz80/printf.c,
4346         * device/lib/z80/printf.c: removed define for NULL
4347
4348 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4349
4350         * as/xa51/xa_link.c,
4351         * device/examples/ds390/ow390/ad26.c,
4352         * device/examples/ds390/ow390/cnt1d.c,
4353         * device/examples/ds390/ow390/counter.c,
4354         * device/examples/ds390/ow390/ds2480.h,
4355         * device/examples/ds390/ow390/ds2480ut.c,
4356         * device/examples/ds390/ow390/findtype.c,
4357         * device/examples/ds390/ow390/gethumd.c,
4358         * device/examples/ds390/ow390/owllu.c,
4359         * device/examples/ds390/ow390/ownetu.c,
4360         * device/examples/ds390/ow390/swt12.c,
4361         * device/examples/ds390/ow390/swtloop.c,
4362         * device/examples/ds390/ow390/temp.c,
4363         * device/examples/ds390/ow390/temp10.c,
4364         * device/examples/ds390/ow390/thermo21.c,
4365         * device/examples/ds390/ow390/tinilnk.c,
4366         * device/examples/ds390/ow390/tstfind.c,
4367         * device/examples/serialcomm/windows/serial.cpp,
4368         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4369         * device/include/reg51.h: fixed line endings for cvs
4370
4371 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4372
4373         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4374         packRegsForAccUse, packRegisters): new accumulator register
4375         packing algorithm
4376         * support/regression/ports/hc08/support.c (_putchar): suppress
4377         warning of unused variable
4378         * src/SDCCicode.c: added SWAP entry to codeTable
4379
4380 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4381
4382         * device/lib/sprintf.c: forgot to add this file before previous commit
4383
4384 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4385
4386         * src/pic16/gen.c (genPackBits): added operand right in function
4387         parameters, load result directly if p_type is POINTER (that is
4388         called by genNearPointerSet)
4389         * (genUnPackBits): added operand left in function parameters,
4390         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4391         FSR0 if accessing bitfields,
4392
4393 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4394
4395         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4396           _print_format; updated printf, sprintf, vsprintf
4397         * device/include/asm/default/features.h: corrected comment/define
4398         * device/lib/Makefile.in: added sprintf.c
4399         * device/lib/libsdcc.lib: added sprintf module
4400         * device/lib/printf_large.c,
4401         * device/lib/vprintf.c,
4402         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4403           into these 3 files
4404         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4405         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4406         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4407           hc08 test
4408         * support/regression/tests/zeropad.c: define idata as data for hc08
4409
4410 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4411
4412         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4413         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4414         labels are referenced at least once (even if a reference is not found)
4415         * src/hc08/gen.c (emitcode): set isComment flag for comments
4416         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4417         loads), rules 6a..6b (optimize jumps to return)
4418
4419 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4420
4421         * device/lib/acosf.c (acosf),
4422         * device/lib/asinf.c (asinf),
4423         * device/lib/atanf.c (atanf),
4424         * device/lib/ceilf.c (ceilf),
4425         * device/lib/cosf.c (cosf),
4426         * device/lib/coshf.c (coshf),
4427         * device/lib/cotf.c (cotf),
4428         * device/lib/fabsf.c (fabsf),
4429         * device/lib/floorf.c (floorf),
4430         * device/lib/log10f.c (log10f),
4431         * device/lib/logf.c (logf),
4432         * device/lib/sinf.c (sinf),
4433         * device/lib/sinhf.c (sinhf),
4434         * device/lib/sqrtf.c (sqrtf),
4435         * device/lib/tanf.c (tanf),
4436         * device/lib/tanhf.c (tanhf),
4437         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4438         replaced all instances of "reentrant" in the library functions
4439         defined in math.h with this macro.
4440         * support/regression/tests/float_trans.c: reenabled test for hc08
4441
4442 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4443
4444         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4445         erroneously deleted
4446
4447 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4448
4449         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4450         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4451         multi-byte volatile operands are used
4452         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4453         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4454         initialization to area GSINIT0 so that it would always precede
4455         any static initializers in GSINIT
4456         * support/regression/tests/zeropad.c: fixed idata define for hc08
4457         * support/regression/tests/bug-927659.c,
4458         * support/regression/tests/float_trans.c: disabled tests for hc08
4459         pending missing library routines
4460         * .version: increased version number to 2.4.4 - hc08 port now passes
4461         regression tests
4462
4463
4464 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4465
4466         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4467         * Makefile.common.in,
4468         * as/Makefile,
4469         * as/hc08/Makefile.in,
4470         * as/mcs51/Makefile.in,
4471         * as/z80/Makefile.in,
4472         * debugger/mcs51/Makefile.in,
4473         * device/include/Makefile.in,
4474         * device/lib/Makefile.in,
4475         * doc/Makefile,
4476         * link/Makefile,
4477         * link/z80/Makefile.in,
4478         * packihx/Makefile.in,
4479         * sim/ucsim/main_in.mk,
4480         * sim/ucsim/avr.src/Makefile.in,
4481         * sim/ucsim/doc/Makefile.in,
4482         * sim/ucsim/gui.src/serio.src/Makefile.in,
4483         * sim/ucsim/hc08.src/Makefile.in,
4484         * sim/ucsim/s51.src/Makefile.in,
4485         * sim/ucsim/xa.src/Makefile.in,
4486         * sim/ucsim/z80.src/Makefile.in,
4487         * src/Makefile.in,
4488         * support/cpp2/Makefile.in,
4489         * support/librarian/Makefile,
4490         * support/makebin/Makefile: added DESTDIR to the install path proposed
4491         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4492         * doc/sdccman.lyx: added DESTDIR documentation
4493
4494 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4495
4496         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4497         instruction for interrupt handlers, use fast returns when returning
4498         from high priority interrupts
4499
4500 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4501
4502         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4503         code generation
4504         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4505         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4506         bugs, ported much of Bernhard's code from mcs51
4507         * src/mcs51/gen.c (genSend),
4508         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4509         than one when calling a reentrant function
4510         * device/lib/_mullong.c: defined an alternate struct layout for big
4511         endian ports (hc08)
4512
4513 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4514
4515         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4516         test
4517
4518 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4519
4520         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4521         are sane and complete before asking the port its prefered parameter
4522         passing method (fixes bug #1017633)
4523         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4524         and _ret3
4525
4526 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4527
4528         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4529         problem in bitfields >= 8 bits.
4530
4531 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4532
4533         * src/SDCCsymt.c: undid changes that were not meant to be committed
4534
4535 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4536
4537         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4538
4539 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4540
4541         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4542           copied and wrong bit got inverted
4543
4544 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4545
4546         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4547         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4548         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4549         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4550         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4551         assignments to bitfields at known addresses
4552         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4553         reads from bitfields at known addresses
4554         * src/hc08/ralloc.c (packRegisters),
4555         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4556         genhc08Code): optimize pointer get values used as conditionals
4557         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4558         and branch
4559
4560 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4561
4562         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4563         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4564         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4565         as conditionals
4566
4567 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4568
4569         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4570
4571 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4572
4573         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4574         related problems
4575
4576 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4577
4578         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4579
4580 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4581
4582         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4583         mcs51 port
4584
4585 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4586
4587         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4588
4589 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4590
4591         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4592         cases use more compact code.
4593
4594 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4595
4596         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4597
4598 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4599
4600         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4601
4602 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4603
4604         * src/SDCCsymt.h,
4605         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4606         parameter of changePointer() from symbol* to sym_link*
4607         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4608         * src/SDCCsymt.c (compareType): void* type is castable to other
4609         pointers, but not necesarily an exact match.
4610         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4611         is no longer blindly treated as an exact match.
4612         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4613
4614 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4615
4616         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4617
4618 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4619
4620         * src/pic/gen.c,
4621         * src/pic/pcode.c,
4622         * src/pic/ralloc.h,
4623         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4624
4625 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4626
4627         * src/pic/device.c,
4628         * src/pic/device.h,
4629         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4630
4631 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4632
4633         * src/mcs51/gen.c (emitcode): fixed bug #992819
4634
4635 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4636
4637         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4638           there's no need to make it worse
4639
4640 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4641
4642         * src/mcs51/ralloc.c (deassignLR),
4643         * src/ds390/ralloc.c (deassignLR),
4644         * src/hc08/ralloc.c (deassignLR),
4645         * src/z80/ralloc.c (deassignLR),
4646         * src/pic/ralloc.c (deassignLR),
4647         * src/pic16/ralloc.c (deassignLR),
4648         * src/avr/ralloc.c (deassignLR),
4649         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4650         rlivePoint): fixed another part of bug #971834
4651
4652 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4653
4654         * src/z80/main.c: enabled "critical" keyword
4655         * src/z80/mappings.i,
4656         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4657         functions (fixes bug #979646)
4658         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4659
4660 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4661
4662         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4663           such as c:\mydir.
4664
4665 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4666
4667         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4668           doesn't disable too much optimizations
4669
4670 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4671
4672         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4673
4674 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4675
4676         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4677
4678 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4679
4680         * src/pic/gen.c tidied up tabs
4681         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4682         * src/pic/main.c tidied up tabs
4683         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4684         * src/pic/pcoderegs.c tidied up tabs
4685         * src/pic/ralloc.c tidied up tabs
4686
4687 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4688
4689         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4690         to S_FIXED for pic16 port and when symbol is not in level 0,
4691         allocate for S_REGISTER storage class and pic16 port, too,
4692         * src/pic16/device.h: prototype for checkSym,
4693         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4694         * (pic16_assignConfigWordValue): test the value and the mask to
4695         validate that the value is suitable for the configuration word,
4696         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4697         collect extern declared symbols, don't emit symbol twice, check
4698         first if symbol is in publics set first,
4699         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4700         * added command line '--fstack' which enables an experimental
4701         feature for stack access, too buggy to be used yet...
4702         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4703         * (pic16_allocDirReg): when register has storage class S_REGISTER
4704         allocate in pic16_dynAccessRegs,
4705         * device/include/pic16/pic18f????.h: modified configuration word
4706         naming convention, words started as CONFIG0H but should be CONFIG1H
4707
4708 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4709
4710         * device/include/mcs51reg.h: fixed bug 970993
4711
4712 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4713
4714         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4715         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4716         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4717         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4718         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4719         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4720           error/warning numbers,
4721           added function setWarningDisabled()
4722         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4723         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4724           _memcmp.c _memmove.c calloc.c realloc.c free.c
4725         * support/regression/tests/malloc.c: added tests for new functionality
4726         * support/regression/tests/zeropad.c: added tests for truncated initializers
4727           and initialized char arrays starting with '\x0'
4728         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4729
4730 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4731
4732         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4733
4734 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4735
4736         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4737         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4738         peephole 177.e. Thanks to anonymous
4739
4740 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4741
4742         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4743         function isn't used in the source but referenced as a
4744         variable initializer then declare it as extern in .asm file
4745
4746 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4747
4748         * .version: increased version number to 2.4.3
4749
4750         Adding version extension according to ChangeLog CVS revision
4751         * src/Makefile.in (target all): added dependency 'version.h'
4752         * (rule version.h): added rule to create version.h from ChangeLog,
4753         * (rule dep): added dependency version.h,
4754         * src/version.awk: AWK script to create version.h
4755         * src/SDCCdwarf2.c (dwWriteModule),
4756         * src/SDCCglue.c (initialComments),
4757         * src/SDCCmain.c (printVersionInfo): modified to write after
4758         version string the version extension number,
4759         * src/SDCCutil.c: included "version.h"
4760         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4761         number,
4762         * src/SDCCutil.h: added prototype for getBuildNumber
4763
4764         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4765         includeDirsSet, too,
4766         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4767         const char [] is found in function prototype...
4768
4769         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4770         moving to WREG with source is already in WREG,
4771         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4772         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4773         * (aopForSym): stack'ed symbols are partially supported, added
4774         if-clause to support symbols in FARSPACE,
4775         * (sameRegs): added test for AOP_ACC to see if registers are same,
4776         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4777         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4778         * (pic16_popRegFromString): will not allocate a new register if it
4779         doesn't find one by name, bug may have introduced...
4780         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4781         * (genIpush): revived to use pic16 port's stack,
4782         * (genAddrOf): added incomplete case for stack'ed operand,
4783         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4784         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4785         can handle multibyte operands,
4786         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4787         * (pic16initialComments): added message for MPLAB compatibility
4788         mode enabled,
4789         * src/pic16/main.h: prototype for pic16_mplab_comp,
4790         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4791         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4792         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4793         because of increased complexity of procedure,
4794         * (_process_pragma): stack pragma changed to format 'stack pos len',
4795         emit symbol '_stack_end' to conform with gplink,
4796         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4797         to search for register,
4798         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4799         PO_GPR_REGISTER,
4800         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4801         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4802         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4803         case for PO_GPR_REGISTER,
4804         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4805         dies, the new era is ahead !...
4806         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4807         pic16_dynInternalRegs,
4808         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4809         * (pic16_allocDirReg): minor optimizations and bug fixes,
4810         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4811
4812         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4813         load stack and frame pointer with address of 'stack_end' symbol
4814
4815 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4816
4817         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4818         without source code but only variable initializers
4819
4820 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4821
4822         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4823         external are not declared as extern to reduce overhead while linking
4824
4825 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4826
4827         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4828
4829 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4830
4831         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4832           Yee Keat for the patch
4833         * src/SDCCast.c (decorateType): fixed bug #979599
4834         * src/ds390/gen.h: removed local fReturnSizeDS390
4835         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4836         * src/ds390/gen.c (genAnd, genOr, genXor),
4837         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4838
4839 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4840
4841         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4842         add relFilesSet to $3, manipulate $2 to handle linking of object
4843         files without source files in command line,
4844         * device/include/pic16 (all headers): added ID location macros,
4845         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4846         entries for ID location bytes,
4847         * (pic16_assignIdByteValue): NEW,
4848         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4849         added field dumpcalltree to pic16_options_t,
4850         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4851         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4852         emitting rFalseIfx label after check_carry label,
4853         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4854         pic16_emitDIRegs), NEW
4855         * (pic16glue): dump .calltree file when option --calltree found,
4856         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4857         * (_pic16_genAssemblerPreamble): emit ID locations after
4858         configuration registers,
4859         * (pic16_linkCmd): modifications of the link command,
4860         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4861         * (pic16_pCodeInitRegisters): don't init stack registers,
4862         * (pic16_findPrevInstruction): fixed bug,
4863         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4864         bug with immediate registers,
4865         * (buildCallTree): traces stack push and pop,
4866         * (pct2): dump also stack usage for each function,
4867         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4868         * (pic16_allocDirReg): various modifications,
4869         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4870         fixed to 1,
4871
4872 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4873
4874         * src/pic16/pcode.c: removed buggy double colon
4875
4876 2004-07-01 Borut Razem <borut.razem AT siol.net>
4877
4878         * support/scripts/sdcc.nsi: added include/pic16 to setup
4879
4880 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4881
4882         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4883         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4884         target 'clean',
4885         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4886         specific command line arguments. Also added sample lkr script
4887         for placing a variable at a specific memory bank.
4888         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4889         at a specific memory bank,
4890         * (pic16_dump_isection): fixed bug which caused string literals to
4891         be omitted when dumping idata section,
4892         * (pic16_groupRegistersInSection): added code to handle registers
4893         in specific memory banks,
4894         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4895         public, all references are renamed too,
4896         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4897         AOP_DPTR2,
4898         * (pic16_storeForReturn): added case to handle when dest is WREG,
4899         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4900         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4901         pic16_rel_udata, check to see if that register is marked as being
4902         a member of a specific memory bank,
4903         * (pic16_printIvalCharPtr): added code to add string literals either
4904         to code or the idata sections,
4905         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4906         also accept the 'udata' pragma,
4907         * src/pic16/main.h: new structure types sectName and sectSym
4908         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4909         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4910         * (pic16_findPrevInstruction): fixed, it returned nothing,
4911         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4912         instruction combinations,
4913         * (pic16_FixRegisterBanking): heavily reorganised,
4914         * (pic16_AnalyzeBanking): if generating banksel directives is
4915         disabled, then don't call FixRegisterBanking at all,
4916         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4917         completely removed,
4918         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4919
4920 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4921
4922         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4923         Phuah Yee Keat <yk.phuah AT nestac.com>
4924
4925 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4926
4927         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4928         correctly the IVT even if it is relocated to some other location
4929
4930 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4931
4932         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4933         * device/include/pic16/pic18f2220.h: NEW,
4934         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4935         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4936         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4937         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4938         nodefaultlibs, ivt_loc is the location of the interrupt vector
4939         table, and nodefaultlibs signs that default libraries should not be
4940         linked in link stage,
4941         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4942         according to --ivt-loc argument,
4943         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4944         when pragma stack is found,
4945
4946 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4947
4948         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4949         256 (range check), 257 (do while), 258.a-f (bit banging
4950         f.e. on 3-wire SPI bus)
4951
4952 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4953
4954         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4955         variables used exclusively within a loop
4956
4957 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4958
4959         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4960
4961 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4962
4963         * src/SDCClrange.c (computeClash): fixed bug #971834
4964
4965 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4966
4967         * src/mcs51/gen.c (genCmp): fixed bug #975903
4968         * src/hc08/gen.c (operandsEqu),
4969         * src/ds390/gen.c (operandsEqu),
4970         * src/z80/gen.c (operandsEqu),
4971         * src/pic/gen.c (operandsEqu),
4972         * src/pic16/gen.c (operandsEqu),
4973         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4974         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4975
4976 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4977
4978         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4979
4980 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4981
4982         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4983         default case in switch statement,
4984         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4985         to eliminate problem with initialisation of pointers, but problem
4986         still exists,
4987         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4988         * (emitStaticSegment): removed various lines emitting debug info,
4989         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4990         added processor registers for utilizing EEPROM,
4991         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4992         configurable and set 8
4993
4994 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4995
4996         * .version: increased version number to 2.4.2,
4997
4998         Cumulative patch for pic16 port
4999         * src/pic16/device.c: changed scheme to dump initial values for
5000         variables in idata segment, all print_idata* functions were removed,
5001         now the pic16_printIval* will be called,
5002         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5003         * _pic16_printPointerType, pic16_printPointerType,
5004         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5005         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5006         NEW, similar to the respective functions in SDCCglue.c,
5007         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5008         way, emitting hex bytes,
5009         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5010
5011 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5012
5013         * src/avr/ralloc.c (serialRegAssign),
5014         * src/xa51/ralloc.c (serialRegAssign),
5015         * src/pic/ralloc.c (serialRegAssign),
5016         * src/pic16/ralloc.c (serialRegAssign),
5017         * src/hc08/ralloc.c (serialRegAssign),
5018         * src/z80/ralloc.c (serialRegAssign),
5019         * src/ds390/ralloc.c (serialRegAssign),
5020         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5021
5022 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5023
5024         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5025         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5026
5027 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5028
5029         Cumulative patch for pic16 port:
5030         * src/pic16/device.h (typedef PIC16_device) modified fields for
5031         defining microcontrollers,
5032         * src/pic16/device.c: added new info for all devices in Pics16 array,
5033         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5034         to be optimised out by the pCode optimiser,
5035         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5036         specially, bug reported by G.M. Gallant,
5037         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5038         as force'd so that cannot be optimised out by pCode optimiser,
5039         * src/pic16/pcode.c,
5040         * src/pic16/pcodepeeph.c,
5041         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5042         they are disabled by default, but can be enabled explicit with
5043         command argument --denable-peeps, for testing,
5044         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5045         --pomit-ivt in COMPILE_FLAGS
5046
5047 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5048
5049         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5050           compilation on MSVC
5051
5052 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5053
5054         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5055
5056 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5057
5058         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5059         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5060
5061 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5062
5063         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5064         would only assign 0x300001 register.
5065
5066 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5067
5068         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5069         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5070
5071 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5072
5073         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5074         for ds80c400
5075         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5076         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5077         added peephole 254 (left shift), 255 (jump table)
5078
5079 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5080
5081         * device/lib/Makefile.in: removed comment line with model-pic16,
5082         * (target port-specific-objects-pic16): the libraries and objects
5083         are copied to the build directory form the device/lib/pic16/bin
5084         directory
5085
5086         Cumulative patch concerning pic16 port:
5087         * library directory has been re-organized,
5088         * added support for PIC18F1220,
5089         * added headers and library sources for chips 18f1220,18f6520,
5090         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5091
5092         * configuration registers setting has changed, now each supported
5093         device has a complete description of the registers it uses,
5094         * all initialisations are moved to idata sections, these section
5095         can be absolute or relocatable,
5096         * fixed initialisation of codespace variables,
5097         * fixed warning about PCLATU and gpsim,
5098         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5099         * (genAssign): use table reads when assigning from variables in codespace,
5100         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5101         char/int variables placed in codespace,
5102         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5103         registers set in .asm file, no need for --pomit-config-words anymore,
5104         * (pic16glue): some 8051 legacy segments are commented out
5105         (to be removed completely),
5106         * added support for alternative assembler and linker with --asm=
5107         and --link= command line arguments,
5108         * peepholes are disabled automatically in the port, no need to
5109         specify on command line,
5110         * port supports natively char/int/long multiplication, but converts
5111         all divisions to support functions,
5112         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5113         to the file set in variable $2,
5114         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5115         strings in ASCII format and not in hex,
5116         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5117         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5118         allocate proper register if iCodes aren't temporary,
5119
5120 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5121
5122         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5123
5124 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5125
5126         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5127         is commented out
5128
5129 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5130
5131         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5132         computed address is reused
5133         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5134         multi-byte bitfields
5135
5136 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5137
5138         * src/z80/gen.c: (genArrayInit): must check for pointers too
5139
5140 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5141
5142         * support/regression/tests/zeropad.c: never meant to commit the
5143           nestedstruct test: removed, added check for GCC version
5144
5145 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5146
5147         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5148         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5149         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5150           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5151           bugs 928906 and 954082 half-empty initializers
5152         * src/SDCCsymt.h,
5153         * src/SDCCsymt.c (getAllocSize): added for above fix
5154         * src/z80/gen.c (genArrayInit): fixed bug 741044
5155         * support/regression/tests/zeropad.c: added tests
5156
5157 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5158
5159         * src/pic16/device.c (pic16_dump_section): corrected bug which
5160         caused some symbols of the libraries to be misplaced
5161
5162 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5163
5164         * src/pic16/glue.c,
5165         * src/pic16/ralloc.h,
5166         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5167         to fix conflict with pic port
5168
5169 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5170
5171         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5172         externs configuration variables,
5173         * src/pic16/ralloc.h,
5174         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5175         prototype in header, commented out some debug messages
5176
5177 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5178
5179         * src/pic16/glue.c,
5180         * src/pic16/main.c,
5181         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5182         for gpasm COFF object generation. Thanks to D. Hawkins for
5183         his patch info
5184
5185 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5186
5187         * src/ds390/main.c,
5188         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5189         Brock for spotting this)
5190         * src/ds390/gen.c (genEndFunction),
5191         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5192         interrupt handler and critical. Disable push/pop optimizations when
5193         peephole optimizations disabled.
5194
5195 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5196
5197         Updated pic16 library sources and headers.
5198         * device/lib/pic16/pic18f*/ ,
5199         * device/include/pic16/*.h: modified to handle structured SFR
5200         definitions
5201
5202 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5203
5204         * src/port.h (PORT structure): added hook initPaths, now each
5205         port can declare its own default search paths,
5206         which can been seen with the --print-search-dirs option,
5207         see pic16 port for example,
5208         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5209         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5210         * (doPrintSearchDirs): NEW, replaces in a central manner the
5211         printing of search dirs which was split in set*Paths functions,
5212         * (main): added call to port->initPaths and doPrintSearchDirs,
5213         * src/avr/main.c,
5214         * src/ds390/main.c,
5215         * src/hc08/main.c,
5216         * src/izt/i186.c,
5217         * src/izt/tlcs900h.c,
5218         * src/mcs51/main.c,
5219         * src/pic/main.c,
5220         * src/pic16/main.c: modified port structures to reflect addition of
5221         initPaths hook,
5222
5223         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5224         * (pic16_dump_section): for registers in same address reserve memory once,
5225         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5226         to no_banksel,
5227         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5228         result is greater in size than right or left,
5229         * (pic16_genUMult8X8_8): there are some cases where the result can
5230         be 16 bits size, so handle these,
5231         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5232         * (pic16_outBitC): modified to emit pcodes,
5233         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5234         or not,
5235         * (genDivOneByte): implemented algorithm to divide 8-bits,
5236         * (genCmp): uncommented goto, but issues still exist,
5237         * (genAnd): fixed a bug with variables >8bits,
5238         * (genPackBits): optimization added that uses BCF/BSF to change a
5239         single bit,
5240         * (genAssign): fixed bug when assigning floating point literals,
5241         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5242         __sdcc_gsinit_startup label,
5243         * src/pic16/main.c (_pic16_init): removed search directory
5244         initialisations,
5245         * (_pic16_initPaths): NEW, used to initialise search directories,
5246         * (_hasNativeMulFor): support functions for all except char/int
5247         multiplication, and char division,
5248         * (PIC16_port struct): modified entry for native mul support,
5249         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5250         no_banksel option,
5251         * (buildCallTree): call to register_usage is ifdef'ed out,
5252
5253 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5254
5255         * device/include/string.h: applied Stas Sergeev's patch to make this
5256         header file compatible with the preprocessor -Wundef option
5257         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5258         failure (fixes bug #941458)
5259
5260 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5261
5262         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5263         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5264         that the variable, not the function, should be static
5265         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5266         to be consistent with non-literal case
5267
5268 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5269
5270         * src/SDCCast.c (isConformingBody): fixed bug #949967
5271         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5272         convilong): fixed bug #952086
5273
5274 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5275
5276         * src/SDCCmem.c (allocVariables): fixed bug #955321
5277
5278 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5279
5280         * src/hc08/main.c (_hc08_genAssemblerEnd),
5281         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5282         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5283         completely eliminated the use of a temporary file
5284         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5285         when more than one file linked
5286         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5287
5288 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5289
5290         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5291         which fixes bug #543481
5292         * support/regression/tests/bug-751703.c: fixed comments left from a
5293         cut and paste error
5294         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5295         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5296         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5297         scopes
5298         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5299         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5300         are now changed to underscores in moduleName
5301
5302 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5303
5304         * as/mcs51/lkmem.c: better fix for bug #954173
5305
5306 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5307         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5308
5309         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5310         * device/include/c8051f000.h,
5311         * device/include/c8051f120.h,
5312         * device/include/c8051f300.h,
5313         * device/include/c8051f310.h,
5314         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5315         PWM16) and detab'ed
5316
5317 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5318
5319         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5320         and mailing lists, doc'ed --no-peep-comments, removed reference
5321         to knoppix (newest version has no LyX/LaTeX), other minor changes
5322         * src/SDCCglue.c (glue): save 2 bytes stack space with
5323         option --main-return. The ljmp could probably be avoided too
5324
5325 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5326
5327         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5328
5329 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5330
5331         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5332         * src/SDCCopt.c (isLocalWithoutDef),
5333         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5334         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5335         (credit to Maarten Brock for patch #949363, on which this is based)
5336         * support/regression/tests/bug-751703.c: some test cases of extern used
5337         within inner scopes.
5338
5339 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5342         SPEC_STRUCT
5343         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5344         struct definitions
5345         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5346         dwWriteLabel): fix to create valid debugger symbols even when
5347         the module name has non-alphanumeric symbols in it
5348         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5349         when a variable's allocation has been optimized away
5350
5351
5352 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5353
5354         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5355         * src/hc08/main.c,
5356         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5357         * src/mcs51/main.c,
5358         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5359         * src/ds390/main.c,
5360         * src/z80/gen.c (z80_emitDebuggerSymbol),
5361         * src/z80/main.c,
5362         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5363         * src/pic/main.c,
5364         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5365         * src/pic16/main.c,
5366         * src/avr/gen.c (avr_emitDebuggerSymbol),
5367         * src/avr/main.c,
5368         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5369         * src/xa51/main.c,
5370         * src/SDCCdebug.c (emitDebuggerSymbol),
5371         * src/SDCCdebug.h,
5372         * src/port.h: added a debugger struct to the port struct. Added a
5373         callback for defining debugger symbols
5374
5375         * src/SDCCast.c (createLabel),
5376         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5377         with isitmp = 1
5378         * src/SDCCicode.h,
5379         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5380         iCode back to the ast for the function
5381
5382         * src/hc08/ralloc.c (hc08_assignRegisters),
5383         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5384         unneeded fields from the regs struct.
5385         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5386         pushReg() & pullReg() functions instead of emitcode()
5387
5388         * src/hc08/gen.c (genLabel, genhc08Code),
5389         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5390
5391         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5392         debugger hooks
5393
5394         * src/hc08/gen.c (genEndFunction, genhc08Code),
5395         * src/hc08/gen.h,
5396         * src/mcs51/gen.c (genEndFunction, gen51Code),
5397         * src/mcs51/gen.h,
5398         * src/ds390/gen.c (genEndFunction, gen390Code),
5399         * src/ds390/gen.h,
5400         * src/z80/gen.c (genEndFunction, genZ80Code),
5401         * src/z80/gen.h,
5402         * src/z80/z80.h,
5403         * src/pic/gen.c (genEndFunction, genpic14Code),
5404         * src/pic/gen.h,
5405         * src/pic16/gen.c (genEndFunction, genpic16Code),
5406         * src/pic16/gen.h,
5407         * src/avr/gen.c (genEndFunction, genAVRCode),
5408         * src/avr/gen.h,
5409         * src/xa51/gen.c (genEndFunction, genXA51Code),
5410         * src/xa51/gen.h,
5411         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5412         specific code to cdbFile.c and out of the backend code generators
5413
5414         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5415         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5416         starting address is now 0
5417
5418         * as/hc08/asm.h,
5419         * as/hc08/m08pst.c,
5420         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5421         assembler directive for DWARF support
5422         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5423
5424         * src/src.dsp,
5425         * src/Makefile.in,
5426         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5427
5428 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5429
5430         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5431         and inappropriate peephole optimization in jump tables
5432
5433 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5434
5435         * as/hc08/m08pst.c,
5436         * src/SDCCglue.c: sdccopt works for the hc08 port now
5437
5438 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5439
5440         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5441
5442 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5443
5444         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5445
5446 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5447
5448         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5449         rules
5450         * src/SDCCmain.c,
5451         * src/SDCCglobl.h,
5452         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5453         comments from the peephole optimizer replacement rules
5454         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5455         symbols
5456         * src/SDCCcse.c (updateSpillLocation),
5457         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5458         equivalents
5459         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5460         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5461         objects far pointers
5462
5463 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * src/SDCCsymt.h: a missing part of my last change
5466         * src/pic/ralloc.c (regTypeNum),
5467         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5468
5469 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5470
5471         * src/SDCCicode.h,
5472         * src/SDCCicode.c (aggrToPtrDclType),
5473         * src/SDCCptropt.h,
5474         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5475         ptrPseudoSymConvert),
5476         * src/pic/ralloc.c (regTypeNum),
5477         * src/pic16/ralloc.c (regTypeNum),
5478         * src/hc08/ralloc.c (regTypeNum),
5479         * src/ds390/ralloc.c (regTypeNum),
5480         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5481         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5482
5483 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5484
5485         * link/z80/lkmain.c (afile),
5486         * as/hc08/lkmain.c (afile),
5487         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5488         prevent a pointer problem when a filename has no directory and
5489         no extension specified.
5490
5491 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5492
5493         * link/z80/lkmain.c (afile): allow periods in directory names
5494         * link/z80/lkmain.c (afile),
5495         * as/mcs51/lkmain.c (afile),
5496         * as/hc08/lkmain.c (afile): allow linker script file to have an
5497         extension other than ".lnk"
5498         * link/z80/lklex.c (getfid),
5499         * link/z80/lkmain.c (parse),
5500         * as/mcs51/lklex.c (getfid),
5501         * as/mcs51/lkmain.c (parse),
5502         * as/hc08/lklex.c (getfid),
5503         * as/hc08/lkmain.c (parse): Support comments in the linker script
5504         file on lines by themselves and after filenames
5505
5506 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5507
5508         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5509
5510 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5511
5512         * src/z80/peeph-z80.def: removed some peephole rules that don't
5513         work with multibyte arithmetic (fixed bug #937126)
5514         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5515         to registers and not global variables
5516         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5517         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5518         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5519         checking for assignments not internally generated (fixed bug #931895)
5520         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5521         structure member (fixed bug #930072)
5522
5523 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5524
5525         * src/SDCCmain.c (linkEdit),
5526         * src/hc08/main.c (_hc08_parseOptions),
5527         * as/hc08/Makefile.in,
5528         * as/hc08/aslink.h,
5529         * as/hc08/asm.h,
5530         * as/hc08/m08pst.c,
5531         * as/hc08/lkrloc.c (relr, rele),
5532         * as/hc08/lkarea.c (lnkarea)
5533         * as/hc08/lkmain.c (afile, parse),
5534         * as/hc08/lkelf.c: support for ELF output
5535         * as/hc08/lks19.c (s19),
5536         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5537
5538 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5539
5540         * as/mcs51/lkihx.c: Fixed bug #899105.
5541
5542 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5543
5544         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5545         .dsp files from Unix to DOS.
5546
5547 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5548
5549         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5550         function pointers; we have been compliant for several months now.
5551         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5552         change that was accidently commented out
5553         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5554         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5555         bug #922319
5556
5557 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5558
5559         * src/hc08/gen.c: output of all of the internal debugging information
5560         is now controlled by the D() macro; it is disabled by default
5561
5562 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5563
5564         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5565         harder to keep the same registers during a CAST iCode
5566         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5567         long via int can be done in a single cast, if the signedness is
5568         correct.
5569         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5570         putchar() in tinibios.c in ds390's library
5571
5572 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         * src/SDCCast.c (decorateType): fixed bug #898889,
5575         cast result of a literal complement too
5576         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5577         fixed check for bitfields
5578
5579 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5580
5581         * src/SDCCicode.c (geniCodeLogic): made it static,
5582         (geniCodeLogicAndOr): added in order to fix bug #905492,
5583         (ast2iCode): fixed bug #905492
5584         * support/regression/tests/bug-905492.c: added
5585         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5586         (processParms): fixed bug #927659: don't copy parms, this will clear
5587         decorated flag
5588         * support/regression/tests/bug-927659.c: added
5589
5590 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5591
5592         * src/SDCCast.c (addCast): don't cast float to char
5593         * device/lib/libsdcc.lib: added _memmove
5594
5595 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5596
5597         * device/lib/large/Makefile: fixed parallel execution by
5598         replacing `make` by `$(MAKE)`
5599
5600 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5601
5602         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5603         offsets (fixes bug #923936)
5604
5605 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5606
5607         * device/lib/small/Makefile: fixed parallel execution by
5608         replacing `make` by `$(MAKE)`
5609
5610 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5611
5612         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5613
5614 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5615
5616         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5617         * src/regression/Makefile: Regression test was not running.
5618
5619 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5620
5621         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5622         complement if possible
5623         * src/SDCCval.c (valComplement),
5624         * src/SDCCicode.c (operandOperation): fixed complement of literal
5625         * support/regression/tests/onebyte.c (testComplement): added
5626
5627 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5628
5629         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5630         return an optimized tree; actually replace actParm with the new tree
5631         * src/SDCCast.h: added some parantheses to remove side effects
5632         * support/regression/tests/bug-920866.c
5633
5634 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5635         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5636         Bit operands were not being handled properly in the pic14 port.
5637         (now src/regression/add.c passes again).
5638
5639 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5640
5641         * src/SDCC.y (labeled_statement): case and default no longer require
5642         a following statement (RFE #893037)
5643
5644 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5645
5646         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5647         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5648         disabled (fixes bug #916294)
5649         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5650         "mov a,acc"; patch provided by Lenny Story
5651         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5652
5653 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5654
5655         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5656         functions
5657         * src/ds390/gen.c (genFunction, genEndFunction),
5658         * src/ds390/ralloc.c (ds390_assignRegisters),
5659         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5660         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5661         pushed if there are parameters passed on the stack. Also, a cleaner
5662         way to decide if r0/r1 should be pushed/popped. (Together they fix
5663         bug #918693)
5664
5665 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5666
5667         * doc/sdccman.lyx,
5668         * device/lib/mcs51/crtpagesfr.asm,
5669         * device/lib/mcs51/crtxinit.asm,
5670         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5671         to avoid confusion with Si Lab's SFRPAGE register.
5672
5673 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5674
5675         * src/SDCCglue.c (emitMaps): allow public sfr variables
5676         * src/SDCCglue.c (initialComments): include compiler build date
5677         with compiler version and put the timestamp of the generated
5678         assembly file on a serperate line to be less confusing.
5679         * src/port.h: added genInitStartup hook
5680         * src/avr/main.c,
5681         * src/ds390/main.c,
5682         * src/hc08/main.c,
5683         * src/pic/main.c,
5684         * src/pic16/main.c,
5685         * src/xa51/main.c,
5686         * src/z80/main.c: genInitStartup initialize as NULL (default to
5687         historical behaviour)
5688         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5689         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5690         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5691         library instead of hard coding it into the compiler.
5692         * support/regression/ports/mcs51-stack-auto/spec.mk,
5693         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5694         * device/lib/mcs51/Makefile,
5695         * device/lib/small/Makefile,
5696         * device/lib/large/Makefile,
5697         * device/lib/mcs51/crtpagesfr.asm,
5698         * device/lib/mcs51/crtstart.asm,
5699         * device/lib/mcs51/crtxclear.asm,
5700         * device/lib/mcs51/crtxinit.asm,
5701         * device/lib/mcs51/crtclear.asm,
5702         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5703         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5704         and into user configurable files.
5705         * device/lib/clean.mk: clean mcs51 directory too
5706         * support/regression/tests/longlit.c: added static to T1 declaration
5707         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5708         accesses in the initialization code
5709
5710 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5711
5712         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5713         OSCTRIMVAL as noted in bug #916008
5714
5715 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5716
5717         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5718         in loops with multiple exits (reported as incorrect registers
5719         used by Martin Helmling in Sdcc-user list)
5720
5721 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5722
5723         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5724         made ds390 register extensions look less like error messages
5725
5726 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5727
5728         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5729         reported by Adam Wozniak in Sdcc-user list
5730
5731 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5732
5733         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5734         arithmetic optimizations, added debug output
5735
5736 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5737
5738         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5739         * sdcc.spec: updated and split sdcc into 3 rpms
5740         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5741         needed for literals of LEFT_OP and '+'
5742         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5743         introduced RESULT_TYPE_NOPROM
5744         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5745         left shift
5746         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5747         limited promotion to int only for '*'
5748         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5749
5750 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5751
5752         * src/pic16/gen.c (genSkip),
5753         (genc16bit2lit), (gencjneshort): commented out
5754         (is_LitOp): new helper function, checks operand type
5755         (genCmpEq): rewritten
5756
5757 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5758
5759         * support/regression/tests/bug-908454.c: added
5760
5761 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5762
5763         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5764         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5765         (geniCodeCast): cosmetic, don't preserve bit storage class
5766         (geniCodeLeftShift): added promotion
5767         (geniCodeLogic): fixed regression
5768         * src/SDCCsymt.c (computeTypeOr): accept bits too
5769         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5770
5771 2004-03-07  Borut Razem <borut.razem AT siol.net>
5772
5773         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5774
5775 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5776
5777         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5778         version of pic16_genPackRegisters which does not check if ic is a
5779         CAST operator,
5780         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5781         function cause string1.c regression test fails
5782
5783 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5784
5785         * sim/ucsim/configure.in,
5786         * sim/ucsim/configure,
5787         * sim/ucsim/doc/Makefile.in: use docdir
5788         * src/SDCC.y: fixed sbit atrributes
5789         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5790         * src/SDCCast.c (decorateType): |^& need special promotion handling
5791         * src/SDCCast.h,
5792         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5793         * src/SDCCsymt.h (computeType),
5794         * src/SDCCicode.c: computeType() needs op
5795         * src/SDCCsymt.c (checkTypeSanity),
5796         * doc/sddman.lyx: "plain" bitfields are unsigned
5797         * src/SDCCsymt.c (computeTypeOr): added
5798         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5799         |^& ops
5800         * src/SDCCval.c (val*): computeType() needs op
5801         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5802         * support/regression/tests/onebyte.c: added tests for |^&
5803
5804 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5805
5806         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5807         for writing icode into asm output.
5808
5809 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5810
5811         * src/pic16/device.c: added some debug lines enabled
5812         with macro DEBUG_CHECK,
5813         * src/pic16/genarith.c: more debug in genPlus,
5814         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5815         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5816         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5817         * (aopForSym): onStack symbols are re-placed in data memspace,
5818         and onStack flag is cleared,
5819         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5820         copy temporary pcodeop,
5821         * (genPcall): added warning for not updating PCLATU,
5822         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5823         always true for pic16 port,
5824         * (genMultOneWord): NEW, supports integer multiplication,
5825         * (genMult): modified to call genMultOneWord,
5826         * (ifxForOp): added warning when return NULL,
5827         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5828         flag is set before call to operandFromSymbol for implicit
5829         added structures,
5830         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5831         options.intlong_rent are set by default,
5832         * (_hasNativeMulFor): modified to allow port generation of integer
5833         multiplication,
5834         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5835         set regtype to REG_SFR for all registers, restricting seting the
5836         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5837
5838 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5839
5840         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5841         more than 500 times in the regression tests
5842
5843 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5844
5845         * support/Util/SDCCerr.h,
5846         * support/Util/SDCCerr.c,
5847         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5848         enumerator_list),
5849         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5850         for symbol conflicts.
5851         * support/valdiags/tests/enum.c,
5852         * support/valdiags/tests/tentdecl.c,
5853         * support/valdiags/tests/struct.c: expect possible error messages
5854         referring to original symbol definitions.
5855         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5856         * src/SDCCsymt.h,
5857         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5858
5859 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5860
5861         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5862
5863 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5864
5865         * src/pic16/ralloc.c (newReg): fixed bug #908929
5866
5867 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5868
5869         * src/ds390/gen.c: added missing #include "main.h"
5870
5871 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5872
5873         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5874         checking if symbol is already in set,
5875         * src/pic16/device.h: prototype for checkAddSym,
5876         * src/pic16/gen.c: (_G): added entry interruptvector,
5877         * (assignResultValue): removed some commented out lines,
5878         * (genFunction): check for ISR via sym->type, absolute section for
5879         interrupt code is created via a new pBlock, the goto instruction is
5880         placed now correctly at the interrupt vector position, changed all
5881         references from ivec to _G.interruptvector,
5882         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5883         is the interrupt is a high priority one, same for return from ISR,
5884         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5885         externs to calls of checkAddSym,
5886         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5887         pic16_pcode_verbose flag is set,
5888         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5889         * src/pic16/pcoderegs.c: message about how many registers are saved
5890         will only be emitted if pic16_pcode_verbose flag is set,
5891
5892 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5893
5894         * src/ds390/ralloc.h,
5895         * src/ds390/ralloc.c (ds390_regWithIdx),
5896         * src/ds390/gen.c (emitcode),
5897         * src/ds390/main.h,
5898         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5899         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5900         ds390operandCompare, getRegsRead, getRegsWritten,
5901         initializeAsmLineNode): customized instruction size calculation for
5902         ds390, started basis for some register optimizations
5903         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5904         corresponding assembly output
5905         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5906         missing push/pop of r0/r1. Optimized push/pops
5907
5908 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5909
5910         * src/mcs51/main.c (instructionSize): fixed ACALL size
5911         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5912
5913 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5914
5915         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5916         the sorting of rlist with NULL elements
5917         * (print_idataType, print_idata): NEW to create idata sections
5918         * src/pic16/device.h: idataSymSet new variable
5919         * src/pic16/gen.c (genFunction): fixed some bugs in string
5920         comparing, improved the absolute section creation for ISRs,
5921         added FSR0L/FSR0H in registers that are saved in an ISR,
5922         * (genInline): fixed the processing of inline snippets,
5923         now they undergo no process by the peephole optimizer
5924         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5925         are placed in idataSymSet,
5926         * (pic16emitStaticSeg): extern symbols are added in externs,
5927         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5928         switching when aboslute variables are placed in access bank memory
5929         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5930         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5931         commented out with #if,
5932         * (pic16_packRegisters): reintroduce the check for CAST because some
5933         symbols are not correctly handled,
5934         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5935         pCodeInstruction instead of pCode,
5936         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5937         pCodeAsmDir definition,
5938         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5939         directive, then the argument directive is emitted without the leading
5940         tab, hack for inline labels which must be in the first column,
5941         * (compareLabel,pic16_findNextInstruction),
5942         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5943         * (insertBankSwitch): modified for the new pCodeAsmDir,
5944
5945 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5946         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5947
5948         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5949         instance,
5950         * (pushSide): commented out with #if,
5951         * (assignResultValue): fixed some typos in saving
5952         registers,
5953         * (genPcall): FIXED and sync'ed with genCall,
5954         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5955         * (genNearPointerGet): fixed to handle some more cases,
5956         implementation scheme via table reads,
5957         * (genConstPointerGet): modified to access code memory correct,
5958         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5959         and improved to handle some cases
5960         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5961         instead of "RETLW" for init data
5962         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5963         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5964         variables are placed in access bank memory (<0x80 and >=0xf80),
5965         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5966         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5967         TBLWT_POSTDEC,TBLWT_PREINC
5968         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5969         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5970         directives
5971         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5972         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5973         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5974         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5975
5976 2004-02-29  Borut Razem <borut.razem AT siol.net>
5977
5978         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5979         support/Util/findme.h, support/Util/system.h: enhance binary relative
5980         search for lib and include by using findProgramPath()
5981
5982 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5983
5984         * src/SDCCpeeph.h,
5985         * src/SDCCpeeph.c (pcDistance),
5986         * src/port.h,
5987         * src/mcs51/ralloc.h,
5988         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5989         * src/mcs51/main.h,
5990         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5991         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5992         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5993         size calculation port specific, started basis for some register
5994         optimizations
5995         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5996         missing push/pop of r0/r1. Optimized push/pops
5997         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5998         * device/lib/_modsint.c (_modsint),
5999         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6000         and stack version so regression tests pass
6001
6002 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6003
6004         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6005         * src/SDCCast.c (decorateType): catch another small optimization
6006         with '?' operator
6007         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6008         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6009         modified to finally use computeType() all over SDCC,
6010         see Feature Request #877103
6011         * src/SDCCval.h: cosmetic
6012         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6013         valCompare(); regression tested in muldiv.c
6014         * support/regression/tests/muldiv.c (testMod): mod sign follows
6015         dividend only
6016
6017 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6018
6019         * src/SDCCast.c (decorateType): fixed bug #902362
6020         * doc/INSTALL.txt: fixed install instructions for win32
6021
6022 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6023
6024         * device/include/Makefile.in (install): fixed by replacing spaces
6025         by tabs
6026         * doc/README.txt,
6027         * doc/INSTALL.txt: updated for release
6028         * doc/sdccman.lyx: added warning for --xstack being buggy
6029
6030 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6031
6032         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6033         to eliminate build warnings.
6034         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6035
6036 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6037            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6038
6039         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6040         removed -penable-stack, added comment for stack pragma, added
6041         warning for not initializing the stack/frame registers, removed
6042         comment at interrupts section
6043
6044         Stack is made permanent, there is no ability to disable stack usage.
6045         * src/pic16/device.h,
6046         * src/pic16/device.c: removed all references to USE_STACK macro,
6047         * src/pic16/device.c (pic16_dump_section): when no elements in
6048         rlist, free rlist before return,
6049         * (pic16_dump_int_registers): NEW, internal registers are a new set
6050         of general purpose registers reused by each function,
6051         * (checkAddReg): returns 1 if registers is added to set,
6052         * (pic16_groupRegistersInSection): when a registers is of type
6053         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6054         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6055         SRCASECMP macro is moved here from device.c
6056         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6057         PO_PCLATU, PO_PRODL, PO_PRODH,
6058         * (pic16_pCodeOpType, genMinus,
6059         changed compares to "a" register, with AOP_ACC,
6060         * (pic16_genPlus): fixed some bugs and indented properly,
6061         * (pic16_addSign): changed size to size+offset in the MOVWF
6062         instruction,
6063         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6064         multiply 8-bit operand by literal, result is 8-bit,
6065         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6066         multiply 2 8-bit operand, result is 8-bit,
6067         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6068         genUMult8X*_16,
6069         * src/pic16/gen.c: changed accUse to contain WREG only,
6070         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6071         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6072         true, do not use immediate addressing any more unless sym is a
6073         pointer in codespace,
6074         * (aopForRemat): do not use immediate addressing when symbol not in
6075         codespace and when symbol's address is requested,
6076         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6077         accUse size (= 1),
6078         * (aopGet): added case for AOP_ACC and don't return "accumulator
6079         bug" but WREG instead,
6080         * (popGetTempReg): pushes contents of temporary register in stack,
6081         * (popReleaseTempReg): pops contents of temporary register from
6082         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6083         * (pic16_popGet): separated case AOP_ACC to return register WREG
6084         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6085         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6086         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6087         the use of immediate pointers to certain cases only.
6088
6089         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6090         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6091         * (assignResultValue, genCall, genRet): modified to use the new
6092         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6093         genPcall is still broken,
6094         * (genFunction): added code to create 'A' type pBlocks when
6095         interrupt functions are generated, code not extensively tested yet,
6096         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6097         * (genEndFunction): modified so ISRs pop stored registers from stack,
6098         * (genMultOneByte): cleanup,
6099         * (AccRsh): added flag andmask, to and result with appropriate mask,
6100         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6101         * (genDataPointerGet): fixed and reenabled its use,
6102         * (genNearDataPointerGet): bugs fixed,
6103         * (genDataPointerSet): bugs fixed,
6104         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6105         pic16_DumpSymbol, pic16_DumpOp,
6106         * src/pic16/genutils.h: function prototypes for the above functions,
6107         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6108         pointers,
6109         * (pic16emitRegularMap): many many many improvements, but needs a
6110         major cleanup,
6111         * src/pic16/main.c: enable_stack in pic16_options is removed,
6112         * (_pic16_parseOptions): removed command line options -penable-stack,
6113         * (_process_pragma): emit stack symbol only when stack pragma is
6114         processed,
6115         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6116         redirected to FSR0L/FSR0H pair,
6117         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6118         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6119         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6120         for immediates,
6121         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6122         * (dumpPicOptype): NEW,
6123         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6124         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6125         with movff instruction,
6126         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6127         added pic16_int_regs, some packRegsFor* functions are commented out,
6128         because produce errors,
6129         * src/pic16/NOTES: minor modifications
6130
6131 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6132
6133         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6134         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6135         --pack-iram.
6136         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6137         * as/mcs51/lkaomf51.c: fixed bug #895763
6138
6139 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6140
6141         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6142
6143 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6144
6145         * doc/sdccman.lyx: added details about the HC08 storage classes and
6146         interrupts, fixed the register usage info for z80 & gbz80
6147
6148 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6149
6150         * doc/sdccman.lyx: added more pic16 port documentation
6151         * device/include/pic16/: added header pic18fregs.h
6152
6153 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6154
6155         * doc/sdccman.lyx: added Vangelis' contribution
6156
6157 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6158
6159         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6160         extend to the next CALL or PCALL, not just to the next CALL.
6161
6162 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6163
6164         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6165
6166 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6167
6168         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6169         bug #895752 and a better fix for bug #716790
6170
6171 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6172
6173         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6174
6175 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6176
6177         * doc/sdccman.lyx: minor changes, minor changed
6178
6179 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6180
6181         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6182         which can't handle SDCC_NEWONEBYTEOPS,
6183         (geniCodeMultiply): removed conversion from mult to shift for pic14
6184         and pic16
6185
6186 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6187
6188         * src/hc08/gen.h,
6189         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6190         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6191         thus fixing bug #895406
6192
6193 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6194
6195         * device/lib/_modsint.c,
6196         * device/lib/_modslong.c: sign follows divisor only
6197         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6198         signs or signedness can be ignored
6199         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6200         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6201         added optimization for IFX,
6202         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6203         arguments;
6204         reenabled optimization for IFX, which was removed on 2004-01-11
6205         * src/SDCCast.h: added return type IFX
6206         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6207         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6208         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6209         SDCC_OLDONEBYTEOPS selects the old behaviour
6210         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6211         changed again and commented promotion rule
6212         * src/SDCCval.c (valDiv): promotion no longer necessary
6213         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6214         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6215         rewritten
6216         * support/regression/tests/onebyte.c: added
6217
6218 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6219
6220         * gen.c (genInline): reverted to old code for assemnling inline
6221         code because of bug reported James Chadd
6222
6223 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6224
6225         * ralloc.h: missing declarations from previous patch,
6226         seems that patch for ralloc.h was never applied, fixed
6227
6228 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6229            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6230
6231         * pcode.c,
6232         * pcode.h,
6233         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6234         indirect addressing. Marked FSR0 as deprecated
6235         * gen.c (pointerCode): commented out, not needed now
6236         (pic16_popGet2p): new MOVFF helper function
6237         (genGenPointerGet),
6238         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6239         (shiftRLong): removed duplicate debugging info
6240
6241 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6242
6243         * src/ds390/gen.c (genNearPointerGet),
6244         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6245         optimization with bits, but not bitfields.
6246         * src/ds390/ralloc.c (packRegisters),
6247         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6248
6249 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6250
6251         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6252
6253 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6254
6255         * src/SDCCsymt.h,
6256         * src/SDCCicode.c (operandFromSymbol),
6257         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6258         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6259         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6260         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6261         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6262         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6263         bug #892038
6264         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6265         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6266         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6267         * src/SDCCsymt.c (newSymbol),
6268         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6269         enumerator_list),
6270         * src/SDCCval.h,
6271         * src/SDCCval.c (newiList): fixed bug #885705
6272
6273 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6274
6275         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6276         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6277
6278 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6279
6280         * device/include/c8051f120.h,
6281         * device/include/c8051f300.h,
6282         * device/include/c8051f310.h: added/updated header files for Silicon
6283         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6284         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6285         in new section Submitting patches
6286
6287 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6288
6289         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6290         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6291         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6292         genGenPointerSet),
6293         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6294         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6295         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6296         genGenPointerSet),
6297         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6298         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6299         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6300         genGenPointerSet),
6301         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6302         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6303         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6304         genGenPointerSet): fixed bug #892400
6305         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6306         to eliminate build warnings.
6307         * src/SDCCast.c (processParms),
6308         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6309         fixed bug 751859
6310         * support/valdiag/valdiag.py: added GCC to the list of defines active
6311         when compiling with gcc
6312
6313 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6314
6315         * support/Util/SDCCerr.h,
6316         * support/Util/SDCCerr.c,
6317         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6318         with an incomplete type (fixed bug #883734)
6319         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6320
6321 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6322
6323         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6324
6325 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6326
6327         * src/SDCCast.c (decorateType),
6328         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6329         function pointer implementation
6330         * support/regression/tests/funptrs.c: added tests to verify both forms
6331         of function pointers work correctly. Added tests to verify parameters
6332         are passed in the correct order.
6333
6334 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6335
6336         * device.c (regCompare): registers are sorted by ascending
6337         address and increasing size,
6338         * main.c (_pic16_finaliseOptions): removed the declaration
6339         of compiler macro MCU. Now a macro of the format pic18fxxxx
6340         will be defined from the command line
6341
6342 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6343             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6344
6345         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6346         PCOP_RLCF was overwritten!
6347         * gen.c (genSkip): commented out calls to pic16_emitcode,
6348         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6349         * (genlshTwo),
6350         * (genRRC): added debugging info,
6351         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6352         overwritten while shifting,
6353         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6354         overwritten while shifting,
6355         * (AccLsh),
6356         * (AccRsh),
6357         * (shiftLLeftOrResult),
6358         * (shiftRLeftOrResult),
6359         * (shiftRLong),
6360         * (shiftLLong): Implemented with pic16_emitpcode
6361         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6362         * (genLeftShift): Fixed bug, operand for shift by variable always
6363         was "and"ed with 0x0f,
6364         * (genLeftShiftLiteral),
6365         * (genrshTwo),
6366         * (genRightShiftLiteral): added debugging info,
6367         * (genrshFour): added comment,
6368         * (genRightShift): determined signedness from operand "left"
6369         instead of "result"
6370
6371 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6372
6373         * src/SDCCicode.c (geniCodeParms),
6374         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6375         function pointers, fixed function pointer bugs #861242 and #861896
6376
6377 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6378
6379         * device/include/c8051f000.h,
6380         * device/include/c8051f120.h,
6381         * device/include/c8051f300.h: added header files for Silicon
6382         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6383
6384 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6385
6386         * src/SDCCast.c (processParams): added new type flow and restructured
6387         (gatherAutoInit): added new type flow
6388         (addCast): cosmetic changes
6389         (getLeftResultType): added new type flow for array indices, patch
6390         provided by Stas, see FR #877103
6391         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6392         array index patch by Stas
6393         * src/SDCCast.h: added prototype getResultTypeFromType()
6394         * src/SDCCval.h,
6395         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6396         * src/pic/glue.c (pic14emitStaticSeg),
6397         * src/pic16/glue.c (pic16emitStaticSeg),
6398         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6399         for initialization of symbols
6400         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6401         * support/Util/SDCCerr.h:
6402         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6403         * .version: bumped version number to 2.3.8
6404         * device/include/Makefile.in (install),
6405         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6406         avoid warnings
6407
6408 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6409
6410         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6411         Slade Rich fixed an optimization bug
6412         * src/pic/pcodepeep.c,
6413         * src/pic/pcoderegs.c
6414         * doc/Makefile (install): added test for directory
6415
6416 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6417
6418         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6419         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6420         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6421         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6422         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6423         * as/mcs51/asexpr.c (term),
6424         * as/hc08/asexpr.c (term): fixed bug #887146
6425
6426 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6427
6428         * src/z80/gen.c (genMult): handle single byte result product
6429         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6430         DUMMY_READ_VOLATILE (fixed bug #886367)
6431
6432 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6433
6434         * support/regression/tests/libmullong.c: fixed logic, on little endian
6435         hosts we ended without a mullong_wrapper()
6436
6437 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6438
6439         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6440         virus/worm forged address usage.
6441
6442 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6443
6444         Fixed promotion, it should be done on AST level:
6445         * src/SDCCast.c (addCast): added promotion to int
6446         (decorateType): updated call to upCast()
6447         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6448         usualUnaryConversions()
6449
6450 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6451
6452         * support/regression/tests/literalop.c (mulWrapper): Added a
6453         wrapper to remove integer overflow warnings.
6454
6455         * support/regression/tests/float_trans.c: Made work on host.
6456
6457         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6458         location of sz80.
6459
6460         * support/regression/generate-cases.py (main): Changed from inline
6461         to a main method.
6462
6463         * doc/Makefile (install): Changed to depth first to get rid of
6464         missing directory install warning.
6465
6466         * as/Makefile (install-doc): Made work on Mac.
6467
6468 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6469
6470         * src/SDCCast.c: added an additional type flow in decorateType() of
6471         opposite direction, see feature request #860006; it's enabled at runtime
6472         by setting the environment variable SDCC_NEWTYPEFLOW
6473         * src/SDCCast.h: changed prototype of decorateType()
6474         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6475         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6476         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6477         see feature request #877103
6478         * src/SDCCval.c: updated call of decorateType()
6479         (valBitwise): fixed bug #882876
6480         (valMinus): added promotion
6481         (valLogicAndOr): result is unsigned
6482         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6483         * src/SDCCsymt.c (computeType),
6484         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6485         must not cause an unsigned operation
6486         * src/pic/glue (pic14emitRegularMap),
6487         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6488
6489 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6490
6491         * src/pic/pcode.c (PCodeID): commented out left over debug code
6492
6493 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6494
6495         * support/valdiag/tests/overflow.c: added shift tests
6496         * src/pic/device.c,
6497         * src/pic/gen.c,
6498         * src/pic/gen.h,
6499         * src/pic/glue.c,
6500         * src/pic/main.c,
6501         * src/pic/pcode.c,
6502         * src/pic/pcode.h,
6503         * src/pic/pcodepeep.c,
6504         * src/pic/pcoderegs.c,
6505         * src/pic/ralloc.c,
6506         * src/pic/ralloc.h: applied patch from Slade Rich;
6507         added support for multiple code pages and multiple RAM banks on the
6508         PIC 14 port. The ASM files now no longer simply assume all the
6509         code / RAM are in the same page / bank. This means the linker can
6510         safely allocate code/RAM of separate ASM files to different pages/banks.
6511         * doc/sdccman.lyx: added Slade's tips
6512         * src/mcs51/peeph.def: fixed bug #880768
6513
6514 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6515
6516         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6517         * src/SDCCast.c (decorateType): fixed bug #880197
6518
6519 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6520
6521         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6522         getopt.h.
6523
6524         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6525         strtof is not part of C89 and isn't included with Mac OS X.
6526
6527 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6528
6529         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6530         shiftL2Left2Result): fixed bug #879326
6531         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6532         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6533         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6534         address fetch for clr instruction
6535         * device/lib/hc08/_mulint.c: created optimized assembly version
6536         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6537
6538 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6539
6540         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6541         proposed in FR #877103
6542
6543 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6544
6545         * src/SDCCval.c (cheapestVal): added missing checks
6546         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6547         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6548
6549 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6550
6551         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6552         equal operands
6553
6554 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6555
6556         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6557         loaded with the linker search paths (-L arguments) and the libraries
6558         to be linked with the current source (-l arguments). Changes
6559         currently will affect only the pic16 port.
6560         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6561         include path the port specific paths and port specific libraries,
6562         * gplink command now contains the $3 argument,
6563         * src/pic16/device.h,
6564         * src/pic16/device.c,: structure PIC_device is made public and
6565         renamed to PIC16_device, the same for variable Pics which is renamed
6566         to Pics16. Updated all references to them.
6567         * src/pic16/glue.c (pic16glue): corrected bug with code
6568         initialization which bypassed the variable initializations block.
6569
6570         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6571         COMPILE_FLAGS and added the --nostdinc option
6572
6573 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6574
6575         * device/include/mc68hc908jb8.h: Register defs for another member
6576         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6577
6578 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6579
6580         Documenting changes from previous commits.
6581         * configure.in (version 1.56),
6582         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6583         when generating output files to configure the pic16 library,
6584         but now I've commented it out, since gputils aren't installed in the
6585         SF compile farm, so library won't compile
6586
6587         * device/lib/Makefile.in (version 1.56): initially I've added in
6588         target 'all' the prerequestive 'model-pic16' so it compiled the
6589         pic16 library, but now I've commented it out for the same reasons
6590         above,
6591         * added targets 'model-pic16' and 'objects-pic16' to compile the
6592         library
6593         * added target 'port-specific-objects-pic16' to handle the
6594         generated libraries and copy them into the build/ directory
6595         * added target 'clean-intermediate-pic16' to clean intermediate
6596         files into pic16 directory
6597         * in target 'installdirs' added line to create directory pic16 in
6598         the installation path
6599
6600         * device/include/Makefile.in (version 1.11): in target 'install'
6601         added lines to copy all header files to installation path,
6602         * in target 'installdirs' added line create directory for pic16
6603         headers in the installation path
6604
6605 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6606
6607         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6608          a function call
6609
6610 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6611
6612         * configure,
6613         * device/lib/configure.in,
6614         * device/lib/configure: fixed for autoconf 2.57
6615
6616 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6617
6618         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6619         option so that it actually works. Made it specific to the z80, since
6620         the gbz80 doesn't have these kinds of I/O ports.
6621
6622 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6623
6624         * device/include/z180.h,
6625         * device/lib/_memcpy.c,
6626         * device/lib/_memmove.c,
6627         * device/lib/_mulint.c,
6628         * device/lib/ser_ir.c,
6629         * device/lib/ser_ir_cts_rts.c,
6630         * device/lib/_strcmp.c,
6631         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6632         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6633         portmode; added deprecation warning for bank= and protmode= forms.
6634         Also, guard against buffer overflow.
6635         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6636
6637 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6638
6639         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6640         changed interrupt vector table generation to only emit declared vectors.
6641         * device/include/Makefile.in: added missing backslash
6642         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6643
6644 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6645
6646         Mainly changes to support compilation of the device libraries
6647         * src/pic16/device.c: stack is allocated via symbol and not
6648         via literal number. The symbol is placed in the corresponding
6649         position of the data ram
6650         * (pic16_dump_section): relocatable and absolute uninitialized
6651         data are now emitted in sorted order to reduce section naming,
6652         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6653         weren't marked as being in the access bank,
6654
6655 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6656
6657         Added portion of GNU PIC Library under the directory
6658         device/include/pic16 and device/lib/pic16. These files
6659         contain the declarations of SFRs for the PIC18Fxx2 devices.
6660         The directory is initialized via configure from toplevel.
6661
6662 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6663
6664         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6665         the spilllocations to be compared correctly
6666
6667 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6668
6669         * src/SDCCast.c (decorateType): fixed bug introduced today
6670
6671 2004-01-12  Borut Razem <borut.razem AT siol.net>
6672
6673         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6674         doc/sdccman.lyx: upper case pragmas are deprecated
6675
6676 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6677
6678         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6679         in simpler and even better code
6680
6681 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6682
6683         * src/SDCCicode.c (operandOperation): fixed bug #874819
6684         * src/SDCCast.c (decorateType): fixed
6685         char foo (unsigned long ul) { return ul > 0; }
6686
6687 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6688
6689         * doc/sdccman.lyx: Moved and added some sections, small changes
6690         all over. Telling LaTeX to be less strict with word spacing
6691         to better keep the right margin. Changed some notes about
6692         maintainance of the ports in section 3.2.1 - is it OK like this?
6693
6694 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6695
6696         SDCC source changes:
6697         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6698         convilong): modified to inform the pic16 port that builtin functions
6699         are external
6700
6701         PIC16 PORT specific changes:
6702         * src/pic16/device.c pic16_dump_equates() added,
6703         processor registers declared internally by the port are emitted in
6704         the translation as equates,
6705         * src/pic16/gen.c: inline code is passed unprocessed to the
6706         translation,
6707         * (pic16_popGetLit2): fnuction modified to take second operand as
6708         pCodeOp pointer and not as literal,
6709         * (popRegFromIdx): prefixed with pic16_,
6710         * (pic16_popCombine2): modified to receive already allocated pCode
6711         operands,
6712         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6713         * (genFunction): initializes local stack frame and pushes on stack
6714         all the registers used by this function,
6715         * (genEndFunction): restores all registers from stack and restores
6716         stack frame,
6717         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6718         improvements,
6719         * (pic16glue): changed the program startup sequence,
6720         * added new dbName code 'A' for functions placed in absolute section
6721         * src/pic16/main.c: added function attribute _naked,
6722         * added pragma 'code' to place a fnuction at an absolute address,
6723         * added command line arguments --debug-ralloc and --pcode-verbose,
6724         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6725         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6726         * (pic16_newpCodeOpLit2): modified to take the second operand as
6727         pCodeOp pointer,
6728         * (pic16_printpBlock): modified to emit each function in a separate
6729         section,
6730         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6731         UPPER for immediate operands,
6732         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6733         instruction,
6734         * src/pic16/peeph.def: all peepholes with movff are commented out,
6735         because there is a problem in the pcode peep optimizer,
6736         * src/pic16/ralloc.c: the register allocator can now reuse local
6737         function symbols for another function. This saves register usage.
6738         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6739
6740         Added file src/pic16/NOTES with information about program writing on
6741         the current port version.
6742
6743 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6744
6745         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6746         and peephole 252 (array access)
6747
6748 2004-01-09  Borut Razem <borut.razem AT siol.net>
6749
6750         * src/SDCCmain.c : fixed #872250: -l command line defined library
6751           files are scanned before standard library files
6752
6753 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6754
6755         * src/SDCCast.c (decorateType): fixed bug #874046
6756
6757 2004-01-09  Borut Razem <borut.razem AT siol.net>
6758
6759         * support/scripts/sdcc.nsi: remove previous installation
6760
6761 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6762
6763         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6764         bytes for last interrupt vector (mcs51)
6765         * sdcc.spec: fixed typo
6766
6767 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6768
6769         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6770         gen51Code): more efficient parameter receive for --model-large
6771         ("bug" #845294)
6772
6773 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6774
6775         * src/ds390/main.c,
6776         * src/z80/main.c: added missed needLinkerScript flags (more than
6777         one port structure defined in these file)
6778         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6779         bug #795325
6780
6781 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6782
6783         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6784         * src/port.h: added flag needLinkerScript in port->linker
6785         structure to inform whether to create a .lnk file or not,
6786         * src/avr/main.c,
6787         * src/ds390/main.c,
6788         * src/hc08/main.c,
6789         * src/mcs51/main.c,
6790         * src/pic/main.c,
6791         * src/pic16/main.c,
6792         * src/xa51/main.c,
6793         * src/z80/main.c: changed appropriately to configure
6794         needLinkerScript flag
6795         * src/pic/gen.c,
6796         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6797         * src/pic/glue.c: added variable udata_section_name to
6798         override default uninitialized data segment definition for
6799         devices only with SHAREBANK memory (reported from Erik Epetrich)
6800         * (pic14emitOverlay): modified to emit a commented overlay segment
6801         directive when no overlay data exist
6802         * (picglue): modified to emit uninitialized data segment
6803         according to udata_section_name
6804         * src/pic/main.c (_pic14_parseOptions): added command line
6805         options --udata-section-name=[name] to override default
6806         udata definition name
6807         * modified _linkCmd and _asmCmd to include compiler passed
6808         arguments via -W option
6809         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6810         object file from '.rel' to '.o' in port->linker structure,
6811         changed size of fptr from 2 to 3 in port structure
6812
6813 2004-01-07  Borut Razem <borut.razem AT siol.net>
6814
6815         * support/scripts/sdcc.nsi: update PATH
6816         * support/scripts/sdcc.ico: craeted
6817
6818 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6819
6820         * device/include/Makefile.in: fix install
6821         * doc/Makefile: fix install
6822
6823 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6824
6825         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6826         in bug #860505
6827         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6828         how the function variable allocation summary is displayed; also
6829         include information about variables allocated to the overlay
6830         segment
6831
6832 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6833
6834         * as/mcs51/lkmain.c: Help about -Y option
6835         * as/mcs51/lkarea.c: Fixed gcc warnings
6836
6837 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6838
6839         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6840         fixed warning
6841         * support/valdiag/tests/overflow.c: added
6842         * src/SDCCast.c (decorateType),
6843         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6844         LEFT_OP (left shift)
6845
6846 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6847
6848         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6849         (default behaviour).
6850
6851 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6852
6853         A python script to validate compiler diagnostic messages. It can be
6854         used to verify that sdcc complains about bad c source code and
6855         gives a good location of the error.
6856         * support/valdiag/Makefile,
6857         * support/valdiag/valdiag.py,
6858         * support/valdiag/tests/*
6859
6860 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6861
6862         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6863         * src/SDCCsymt.c (newEnumType),
6864         * src/SDCCsymt.h
6865         * support/Util/SDCCerr.c,
6866         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6867         enum related bugs.
6868         * support/regression/tests/enum.c: added test for enum values that
6869         require at least 2 bytes of storage.
6870
6871 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6872
6873         * src/common.h: added ifndef/define/endif macros
6874         around the header file.
6875         Bug reported from Jesus Calvino-Fraga
6876
6877 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6878
6879         * sdcc.spec: updated
6880         * device/include/Makefile.in: don't install CVS directories
6881         * device/lib/Makefile.in: added removal of CVS directories after install
6882         * doc/Makefile: fixed install, added local_icons
6883         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6884         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6885         * src/ds390/gen.c (genRightShift): fixed bug #870788
6886         * src/SDCCast.c (decorateType): fixed bug #870781
6887
6888 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6889
6890         PIC16 port related changes:
6891         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6892         added variable stackPos,
6893
6894         * gen.c: genCall, assignResultValue: added support for
6895         pushing/retrieving function parameters to/from stack,
6896         genFunction,genEndFunction: setup stack frame for the
6897         generated function,
6898         genAddrOf: will be changed according to bug 863624
6899
6900         * added files genutils.c and genutils.h which contain gen*
6901         debugged and optimised functions extracted from gen.c
6902
6903         * glue.c: added variable 'externs' which holds extern symbols,
6904         pic16emitRegularMap: is modified to properly handle relocatable
6905          symbols under the new scheme,
6906         pic16createInterruptVect: is modified
6907         pic16printPublics: is modified to emit 'global' assembler directives,
6908         added pic16_printExterns to print extern symbols,
6909         pic16glue: initializes stack/frame pointer in the beginning of
6910         the assembly output. Temporary hack, will be corrected later,
6911         because gplink yet does not support stack and SDCC does not
6912         yet support a type of crt0.o object to create the final binary.
6913
6914         * Removed many lines that contain 8051 legacy code.
6915         * The code is finally placed under a 'code' directive.
6916         * Added port specific options.
6917
6918         * _process_pragma: simplified since now we do not need *special*
6919         include file to define SFR registers. But a separate header
6920         will be needed. This will be developed later.
6921         * _pic16_parseOptions: added, parses port specific options:
6922         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6923         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6924         --preplace-udata-with=
6925
6926         * _pic16_setDefaultOptions: modified to initialize section names,
6927         but hack is temporarly out of order since it needs improvement.
6928         * _pic16_genAssemblerPreamble: configuration words are emitted by
6929         their address instead of their name. This part is incomplete and
6930         supports only the 18Fxx2 devices. Other devices will emit an error
6931         during assembly since they do not contain the same set of config
6932         registers
6933         * _pic16_genIVT: is modified,
6934
6935         * pcode.c: added definitions for some hardware registers that are needed
6936         for stack support
6937         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6938         All PCI entries are updated. Now LFSR is supported.
6939         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6940         * added pic16_newpCodeOpLit2 to support instructions with
6941         two literal arguments
6942         * pic16_pCode2str: corrected code that emits assembler instructions
6943         with two literal operands and those that have an access bit modifier
6944         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6945         this fixes a bug which caused some labels to be lost, when an
6946         assembler directive was added, i.e. banksel,
6947         * pic16_FixRegisterBanking: improved logic that causes the insertion
6948         of bank switching,
6949         * InlineFunction: functions that are called once, are not any more
6950         inlined. This can be a port option in the future,
6951
6952         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6953
6954         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6955         hold the corresponding uninitialized symbols,
6956         * pic16_allocProcessorRegister: registers have explicit marked the
6957         accessBank field,
6958         * pic16_allocInternalRegister: registers are explicit marked as
6959         not used,
6960         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6961         processing list, so bit registers were lost,
6962         *
6963
6964         * ralloc.h: added field 'accessBank' and original symbol operand
6965         in register definition,
6966         * removed the field isMapped from register definition,
6967
6968         ** Several functions have been removed from various sources:
6969         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6970         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6971         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6972         pic16_assignRelocatableRegisters
6973
6974         ** others have been introduced:
6975         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6976         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6977
6978 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6979
6980         * support/scripts/inc2h.pl: changed definition of BIT_AT
6981         to emit 'sbit at' instead of 'bit at'. This was a request.
6982
6983         PIC16 port related preliminary changes:
6984         * gen.c: prefixed function popRegFromString with
6985         pic16_ and all references to it corrected
6986         * pcode.c: all pic16_pc_* hardware registers prefixed
6987         with underscore (_),
6988         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6989         * ralloc.c: newReg(): when register is REG_SFR then
6990         set address to rIdx,
6991         pic16_allocProcessorRegister(): marks register wasUsed=0
6992         pic16_writeUsedRegs(): added a call to assign processor
6993         registers via pic16_assignFixedRegisters
6994
6995 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6996
6997         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6998         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6999         variables in unused register banks.  Also the SSEG is placed
7000         wherever there is enough space for it, and IDATA can be anywhere
7001         in internal RAM.  For now compile using -Wl-Y[stack_size].
7002         The mem file is different for this option as well, since it
7003         makes no sense of talking about DSEG lenght.
7004
7005 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7006
7007         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7008         in certain cases, e.g. when ROM assignment, patch provided
7009         from Albert den Haan.
7010
7011 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7012
7013         Many signedness and type propagation fixes:
7014         * src/SDCCicode.c: made geniCodeCast() static
7015         replaced SPEC_ by IS_ (cosmetic)
7016         (operandOperation): fixed div and mod operation
7017         (usualBinaryConversions): added support for promotion of char
7018         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7019         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7020         (geniCodeAdd): an array index will stay unsigned, even if promoted
7021         from char to int
7022         (geniCodeArray): ditto
7023         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7024         * src/SDCCsymt.c (computeType): added more support for char;
7025         promotion of char is selectable by promoteCharToInt, fixed signedness
7026         for all cases
7027         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7028         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7029         * src/SDCCval (val*): replaced signedness calculation by
7030         computeType()
7031         rearranged if-branches (cosmetic)
7032         (valShift): added warning W_SHIFT_CHANGED
7033         (valCompare): fixed problem with different types
7034         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7035         * support/regression/tests/literalop.c: added many cases
7036         * support/regression/tests/ast_constant_folding.c: changed finally to
7037         'unsigned int'
7038         * .version: new year, new version: 2.3.7
7039         * src/SDCCmain.c (main): applied patch #866468
7040         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7041         provided by Scott Bronson
7042         * doc/sdccman.lyx: updated documentation for sdcdb
7043         updated and added chapter tips
7044
7045 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7046
7047         * src/SDCCsymt.h: missing from yesterday's commits
7048
7049 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7050
7051         * src/SDCC.y (struct_or_union_specifier),
7052         * support/Util/SDCCerr.c,
7053         * support/Util/SDCCerr.h: verify that struct & union tags are used
7054         as declared.
7055
7056 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7057
7058         * src/SDCCglobl.h: missing from yesterday's commits
7059
7060 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7061
7062         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7063         sft_attributes, struct_declaration, parameter_declaration,
7064         type_name, start_block, declaration_list),
7065         * src/SDCC.lex (check_type): support redefinition of typedef names
7066
7067 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7068
7069         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7070         aligned xdata arrays. Erik helped me with the if clause.
7071
7072 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7073
7074         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7075         warning
7076
7077 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7078
7079         * src/SDCCast.h,
7080         * src/SDCCast.c (newAst_),
7081         * src/SDCCicode.h,
7082         * src/SDCCicode.c (ast2iCode, newiCode),
7083         * src/SDCCglobl.h,
7084         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7085         expr, statement, expression_statement, selection_statement,
7086         iteration_statement, expr_opt, jump_statement): foundation for tracking
7087         sequence points
7088         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7089         point code too)
7090
7091 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7092
7093         * support/Util/SDCCerr.c,
7094         * src/SDCCast.h,
7095         * src/SDCCast.c (createCase, createDefault, decorateType),
7096         * src/SDCClabel.c (labelUnreach),
7097         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7098         to error messages.
7099         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7100         (with thanks to Stas Sergeev)
7101         * device/include/time.h,
7102         * device/lib/time.c (CheckTime): suppress unreachable code warning
7103
7104 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7105
7106         * src/SDCCast.c (createIvalCharPtr),
7107         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7108         bug #753752)
7109         * support/regression/tests/nullstring.c: tests for these two bugs
7110
7111 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7112
7113         * support/Util/SDCCerr.h,
7114         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7115         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7116         about storage class and 'at' used inside struct or union
7117         * src/SDCCBBlock.c (iCodeFromeBBlock),
7118         * src/SDCCcse.c (ifxOptimize),
7119         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7120         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7121         printIval, emitStaticSeg, emitOverlay),
7122         * src/SDCClabel.c (deleteIfx),
7123         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7124         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7125         gatherAutoInit, processParms),
7126         * support/Util/SDCCerr.h,
7127         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7128         reporting for post-parse errors.
7129
7130 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7131
7132         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7133         implicit casts via union; they don't work on big endian systems
7134         (possible fix for bug #861138)
7135
7136 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7137
7138         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7139         * src/mcs51/main.c: fixed the fix for bug #737001
7140
7141 2003-12-15  Borut Razem <borut.razem AT siol.net>
7142
7143         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7144
7145 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7146
7147         * support/makebin/makebin.c: put output in binary mode
7148
7149 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7150
7151         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7152         xdata and data memory on startup. Set the environment variable
7153         SDCC_NOGENRAMCLEAR to disable this.
7154         * src/mcs51/peephole.def,
7155         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7156         (allows non-interrupt and interrupt code to safely compete for a resource
7157         without the non-interrupt code having to disable interrupts)
7158
7159 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7160
7161         * src/SDCCicode.c (geniCodeAdd),
7162         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7163         with valFromType if type might be a pointer and host is big endian).
7164         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7165         types, not just integer types.
7166         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7167         multiply defined with mismatching "at" address.
7168
7169 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7170
7171         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7172         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7173         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7174         with embedded nulls (fixed bug #753752)
7175
7176 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7177
7178         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7179         Apparently this did not see much testing (endless loop)
7180
7181 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7182
7183         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7184
7185 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7186
7187         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7188         gracefully handle NULL memmap pointers
7189
7190 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7191
7192         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7193         instead of deleting the iCode when an operand is volatile
7194         * src/z80/gen.c (genDummyRead),
7195         * src/mcs51/gen.c (genDummyRead),
7196         * src/ds390/gen.c (genDummyRead),
7197         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7198         not just IC_RIGHT
7199         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7200         * src/SDCC.y: fixed bug #850420
7201
7202 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7203
7204         Applied z80 i/o port patch from Peter Townson and fixed some operators
7205         to better handle operands in A register.
7206         * device/include/z180.h
7207         * src/SDCC.y
7208         * src/SDCCglue.c
7209         * src/z80/gen.c
7210         * src/z80/gen.h
7211         * src/z80/main.c
7212         * src/z80/peeph-z80.def
7213         * src/z80/peeph.def
7214         * src/z80/z80.h
7215
7216 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7217
7218         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7219
7220 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7221
7222         * device/lib/hc08/_mullong.c: Removed extra #endif
7223
7224 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7225
7226         * sim/ucsim/hc08.src/inst.cc,
7227         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7228         carries from x to h
7229         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7230         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7231         * device/include/stdarg.h: fixed varargs for hc08
7232         * device/lib/Makefile.in,
7233         * device/lib/hc08/Makefile,
7234         * device/lib/hc08/_mulint.c,
7235         * device/lib/hc08/_mullong.c: fixed some endian problems
7236
7237 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7238
7239         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7240         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7241         * device/lib/_gptrget.c,
7242         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7243
7244 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7245
7246         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7247         * src/SDCCast.c (astErrors): fixed bug #846007
7248         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7249
7250 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7251
7252         * src/SDCCast.c (decorateType): disabled a transformation I added in
7253         revision 1.188 (access to fields of a structure at an absolute address);
7254         it breaks with bitfields, extern declarations, and gcse analysis.
7255         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7256         could be assigned through a pointer, so don't complain.
7257         * src/SDCCast.c (astErrors),
7258         * src/SDCCast.h,
7259         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7260
7261 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7262
7263         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7264         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7265         output of __config directives, since gpasm now supports them
7266         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7267         pre-processor macro, i.e. -DMCU=p18f452
7268         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7269         and modified to handle 'cast' icode similarly to '=' icode
7270         * src/pic16/device.h (typedef struct PIC_device): added field
7271         'extMIface' to indicate that chip has external memory interface
7272         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7273         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7274         18F8720
7275
7276 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7277
7278         * src/SDCC.y (pointer): fixed bug #846006
7279         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7280         * src/SDCCast.c (decorateType): fixed bug #846009
7281         * src/ds390/peeph.def,
7282         * src/ds390/gen.c (genAnd, genOr),
7283         * src/mcs51/peeph.def,
7284         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7285
7286 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7287
7288         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7289         * src/SDCCdflow.c
7290         * src/SDCCcse.c
7291         * src/SDCCcse.h
7292         * src/SDCCBBlock.h
7293         * src/SDCCBBlock.c
7294
7295 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7296
7297         fixed bug #845089
7298         * src/SDCCbitv.h,
7299         * src/SDCCbitv.c: added function to free a bitvector
7300         * src/SDCClrange.h,
7301         * src/SDCClrange.c: added function to recompute the liveranges
7302         * src/avr/ralloc.c,
7303         * src/ds390/ralloc.c,
7304         * src/hc08/ralloc.c,
7305         * src/mcs51/ralloc.c,
7306         * src/pic/ralloc.c,
7307         * src/pic16/ralloc.c,
7308         * src/xa51/ralloc.c,
7309         * src/z80/ralloc.c: recompute the liveranges after register packing
7310
7311 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7312
7313         * src/SDCCloop.c (newInduction): fixed bug #845630
7314
7315 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7316
7317         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7318         inadvertantly left behind from my 2003-11-12 change
7319
7320 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7321
7322         Updated headers I neglected to commit yesterday.
7323         * src/SDCClrange.h,
7324         * src/SDCCicode.h
7325
7326 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7327
7328         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7329         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7330         * src/SDCCopt.c (eBBlockFromiCode),
7331         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7332         the creation of the key hash table from the sequencing so it can be used
7333         earlier (for some GCSE bug fixes still pending)
7334
7335 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7336
7337         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7338         * support/regression/tests/addsub.c: testing genPlus shortcut
7339
7340 2003-11-15  Borut Razem <borut.razem AT siol.net>
7341
7342         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7343
7344 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7345
7346         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7347         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7348         ordering is immaterial.
7349         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7350
7351 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7352
7353         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7354         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7355         (SIGSEV) of bug #840381
7356         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7357         unlink new file before rename if new and old filenames are the same)
7358
7359 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7360
7361         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7362         uninitialized variables) for the mcs51. Set environment variable
7363         SDCC_GENRAMCLEAR to test.
7364         xdata initialization slightly shorter
7365
7366 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7367
7368         * src/SDCCsymt.h,
7369         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7370         #838241 & 780691 (basicly the same bug)
7371         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7372         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7373
7374 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7375
7376         * src/SDCCmain.c (linkEdit): "fix" #834252
7377
7378 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7379
7380         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7381         * src/SDCCast.h,
7382         * src/SDCC.y: fixed bug #819403
7383
7384 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7385
7386         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7387         the reentrant attribute.
7388         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7389         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7390         simulation
7391         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7392         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7393         erroneously reduced to a literal.
7394         * src/hc08/ralloc.c (packRegisters, rematStr),
7395         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7396         some cases
7397
7398 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7399
7400         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7401         * doc/sdccman.lyx: changed from 'article' to 'book'
7402         * doc/Makefile: readded test_suite_spec and cdbfileformat
7403
7404 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7405
7406         * device/include/stdlib.h: include malloc.h to comply with ANSI
7407         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7408
7409 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7410
7411         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7412         * doc/clean.mk: also remove *.out files
7413         * doc/sdccman.lyx: some additions, larger top/bottom margins
7414
7415 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7416
7417         * src/SDCC.y: fixed bug #837365
7418         * support/regression/tests/bitopcse.c
7419         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7420         a symbol (might be valop instead)
7421         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7422         * device/lib/clean.mk: added hc08 to the cleaning list
7423
7424 2003-11-04  Borut Razem <borut.razem AT siol.net>
7425
7426         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7427           made 2003-11-04
7428         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7429           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7430           malloc is declared in standard stdlib.h
7431
7432 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7433
7434         * device/lib/hc08/Makefile: need to clean .rel not .o files
7435         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7436
7437 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7438
7439         * src/port.h,
7440         * src/hc08/main.c,
7441         * src/mcs51/main.c,
7442         * src/ds390/main.c,
7443         * src/z80/main.c,
7444         * src/avr/main.c,
7445         * src/pic/main.c,
7446         * src/pic16/main.c,
7447         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7448         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7449         tests (which uses the port's oclsExpense function)
7450         * src/SDCC.y,
7451         * src/SDCCast.c,
7452         * src/SDCCicode.c,
7453         * src/hc08/gen.c,
7454         * src/ds390/gen.c,
7455         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7456
7457 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7458
7459         * src/SDCCcse.c (ifxOptimize),
7460         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7461         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7462         deleting the IFX iCode.
7463         * src/hc08/ralloc.c: reduced unneeded slocs
7464         * src/hc08/gen.c: fixed bug in asmopToBoolean
7465
7466 2003-11-04  Borut Razem <borut.razem AT siol.net>
7467
7468         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7469           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7470           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7471           transferred to configure
7472
7473 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7474
7475         Use headers defined in the C[++] standards:
7476         * sim/ucsim/gui.src/serio.src/fileio.cc
7477         * sim/ucsim/gui.src/serio.src/frontend.cc
7478         * sim/ucsim/gui.src/serio.src/main.cc
7479         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7480         * support/Util/NewAlloc.c
7481         * as/hc08/lklibr.c
7482         * as/mcs51/lklibr.c
7483         * as/z80/aslist.c
7484         * as/z80/assym.c
7485
7486 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7487
7488         * Added MSVC projects for hc08 assembler and linker:
7489         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7490         /as/hc08/link_hc08.dsp
7491
7492 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7493
7494         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7495
7496 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7497
7498         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7499
7500 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7501
7502         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7503
7504 2003-10-31  Borut Razem <borut.razem AT siol.net>
7505
7506         * support/cpp2/cpplib.h,
7507           support/cpp2/cpplib.c,
7508           support/cpp2/cpplex.c,
7509           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7510           to switch _asm block preprocessing on / off. Default is
7511           #pragma preproc_asm +
7512
7513 2003-10-31  Borut Razem <borut.razem AT siol.net>
7514
7515         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7516           when outputting comment blocks (when executed with -C option) and
7517           _asm (SDCPP specific) blocks
7518
7519 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7520
7521         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7522
7523 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7524
7525         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7526
7527 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7528
7529         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7530         * src/SDCCast.c (decorateType): fixed bug #832664
7531
7532 2003-10-31  Borut Razem <borut.razem AT siol.net>
7533
7534         * support\cpp2\cpplex.c: fixed for SDCPP:
7535           comments(when executed with -C option) and _asm blocks
7536           were included even if they where in skipped #if block.
7537           Applied solution from GCC cpp 3.3.2
7538
7539 2003-10-31  Borut Razem <borut.razem AT siol.net>
7540
7541         * src/SDCC.lex: sdcc now understands both formats:
7542           '# <line_number> <file_name>' and
7543           '#line <line_number> <file_name>'
7544         * support/cpp2/cppmain.c: sdcpp now generates the standard
7545           '# <line_number> <file_name>' instead of former
7546           '#line <line_number> <file_name>'
7547
7548 2003-10-30  Borut Razem <borut.razem AT siol.net>
7549
7550         * support/cpp2/cpphash.h,
7551         * support/cpp2/cpplib.h
7552         * support/cpp2/cpplex.c,
7553         * support/cpp2/cppmain.c,
7554         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7555
7556 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7557
7558         Fixed a number of problems revealed by bug #827883.
7559         * src/SDCCloop.c (loopInvariants): Spill location of the
7560         result operand should be recomputed if extracted from
7561         a loop. Also, don't extract assignments of an iTemp
7562         from a literal.
7563         * src/SDCCast.c (isConformingBody): loop reversal should
7564         not occur if the control variable is involved with a
7565         relational operator.
7566
7567 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7568
7569         * .version: bumped to 2.3.6 to reflect the big improvements
7570         made by Erik and Klaus. Thanks!
7571
7572 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7573
7574         Replaced the livrange code.
7575         * src/SDCClrange.c: added new LR code
7576         * src/SDCCloop.c,
7577         * src/SDCCBBlock.h: removed remainig parts from old LR code
7578         * src/ds390/ralloc.c,
7579         * src/ds390/gen.c: minor fixes to make it work with new code
7580
7581 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7582
7583         * as/hc08/asm.h,
7584         * as/hc08/lkrloc.c,
7585         * src/hc08/gen.c,
7586         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7587         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7588         (tweaked fix for bug #818696)
7589
7590 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7591
7592         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7593
7594 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7595
7596         * src/SDCCmain.c,
7597         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7598         * src/mcs51/gen.c (gencjneshort),
7599         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7600         more efficient (per Scott Bronson's suggestion)
7601
7602 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7603
7604         Extended the semantics of the critical keyword to include
7605         individual statements. See RFE #827755 and #799831
7606         * src/SDCC.y
7607         * src/SDCCicode.c
7608         * src/SDCCopt.c
7609         * src/SDCCast.c
7610         * support/Util/SDCCerr.c
7611         * support/Util/SDCCerr.h
7612         * src/mcs51/gen.c
7613         * src/ds390/gen.c
7614         * src/hc08/gen.c
7615
7616 2003-10-19  Borut Razem <borut.razem AT siol.net>
7617
7618         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7619
7620 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7621
7622         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7623         Fixed bug #818696
7624         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7625         and predecrement operand is displayed
7626
7627 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7628
7629         * src/SDCCval.c (valMinus): fixed bug #826041
7630
7631 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7632
7633         Some hc08 related updates that I missed earlier
7634         * sim/ucsim/stypes.h
7635         * support/regression/ports/hc08/spec.mk
7636
7637 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7638
7639         New target "hc08" for the Motorola 68hc08 family of micros
7640
7641         * configure
7642         * configure.in
7643         * Makefile
7644         * src/hc08/*
7645         * src/SDCCmain.c
7646         * src/port.h
7647         * sim/ucsim/hc08.src/*
7648         * sim/ucsim/configure.in
7649         * src/ucsim/configure
7650         * sim/ucsim/packages_in.mk
7651         * as/hc08/*
7652         * as/Makefile
7653         * device/include/mc68hc908qy.h
7654         * device/lib/hc08/*
7655         * device/lib/Makefile.in
7656         * support/regression/ports/hc08/*
7657         * support/regression/Makefile
7658
7659 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7660
7661         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7662         regression test
7663         * src/ds390/gen.c (genCast): fixed bug #821957
7664
7665 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7666
7667         * device/lib/logf.c: "fixed" overlay bug
7668         * support/regression/ports/host/spec.mk: added m library
7669         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7670         * support/regression/tests/float_trans: added (for Eric)
7671
7672 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7673
7674         * src/mcs51/gen.c (genCpl): fixed bug
7675         http://sf.net/mailarchive/message.php?msg_id=6263915
7676
7677 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7678
7679         * src/SDCCast.c (decorateType): added extended constant folding
7680         * src/SDCCsymt.c (computeType): cleanup
7681         * src/SDCCval.c (valShift): minor optimization
7682         * support/regression/tests/ast_constant_folding.c: added
7683
7684 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7685
7686         * src/SDCCmain.c: removed some unintended changes
7687
7688 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7689
7690         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7691         * src/z80/gen.c: fixed part of bug #817589
7692         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7693
7694 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7695
7696         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7697         * src/SDCCcflow.c
7698         * src/SDCCcse.c
7699         * src/SDCCdflow.c
7700         * src/SDCClabel.c
7701         * src/SDCClrange.c
7702         * src/SDCCmem.c
7703         * src/SDCCopt.c
7704         * src/SDCCpeeph.c
7705         * src/SDCCset.c
7706         * src/avr/ralloc.c
7707         * src/ds390/ralloc.c
7708         * src/izt/ralloc.c
7709         * src/mcs51/ralloc.c
7710         * src/pic/ralloc.c
7711         * src/pic16/ralloc.c
7712         * src/xa51/ralloc.c
7713         * src/z80/ralloc.c
7714         * src/z80/gen.c: removed unused label "release:"
7715
7716 2003-10-06  Borut Razem <borut.razem AT siol.net>
7717
7718         * src/SDCC.lex: removed definition of unused variables
7719           save_optimize and save_options
7720
7721 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7722
7723         * clean.mk: removed '=' in "-maxdepth=1"
7724         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7725         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7726
7727 2003-10-06  Borut Razem <borut.razem AT siol.net>
7728
7729         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7730           my_unput() replaced by unput()
7731
7732 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7733
7734         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7735         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7736         type-punned pointer will break strict-aliasing rules"
7737         Old LR behaviour is again default; Klaus' LR can be choosen by
7738         defining the environment variable LRKLAUS
7739         * src/SDCCBBlock.h
7740         * src/SDCCloop.c
7741         * src/SDCClrange.c
7742         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7743         * clean.mk: fixed removal of files in bin/CVS/
7744         * device/lib/clean.mk: fixed removal of directories small and large
7745         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7746         * src/SDCCicode.c,
7747         * src/SDCCval.c: removed superflous test for pedantic
7748
7749 2003-10-05  Borut Razem <borut.razem AT siol.net>
7750
7751         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7752           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7753           message "unmatched #pragma SAVE and #pragma RESTORE"
7754
7755 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7756
7757         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7758           assembly, critical functions, atomic, nojtbound)
7759
7760 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7761
7762         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7763         * src/SDCCBBlock.h
7764         * src/SDCCloop.c
7765         * src/SDCCloop.h
7766         * src/SDCClrange.c
7767
7768 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7769
7770         * src/z80/gen.h,
7771         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7772         * src/mcs51/gen.h
7773         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7774         * src/ds390/gen.h
7775         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7776         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7777         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7778
7779 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7780
7781         * src/z80/gen.c (genRet): fixed bug #524753
7782         * src/z80/gen.c (genCast): fixed internal error on cast from
7783         pointer to long
7784         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7785         fix for bug #477835 to the z80
7786         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7787         for tracking iCodes in the peephole optimizer for z80
7788
7789 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7790
7791         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7792         the other part of bug #814548
7793         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7794
7795 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7796
7797         * src/SDCCcse.c: fixed part of bug #814548
7798
7799 2003-09-28  Borut Razem <borut.razem AT siol.net>
7800
7801         * src/asm.c: rewrite of printILine() to use temporary file instead
7802           a pipe
7803         * src/xa51/main.c: commented out declaration of int rewinds
7804
7805 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7806
7807         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7808
7809 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7810
7811         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7812         * src/asm.c (printILine): Fixed bug #811015
7813
7814 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7815
7816         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7817         freeing.
7818
7819 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7820
7821         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7822         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7823         to correctly handle general case of AOP_PAIRPTR
7824         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7825
7826 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7827
7828         * src/mcs51/ralloc.c (fillGaps),
7829         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7830         register positioning bug)
7831
7832 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7835
7836 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7837
7838         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7839         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7840         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7841         (ralloc doesn't intentionally do this now, but perhaps later)
7842         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7843         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7844         register positioning bugs (Fixed bug #762602 and #795325)
7845         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7846         (Fixed bug #808779)
7847         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7848         lines that --i-code-in-asm generates
7849
7850 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7851
7852         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7853         trying to fclose a FILE* that was already closed.
7854
7855 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7856
7857         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7858         of const struct should be treated as if const themselves)
7859
7860 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7861
7862         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7863
7864 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7865
7866         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7867         Unix (/n) and DOS (/r/n) line terminations.
7868
7869 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7870
7871         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7872         bug #613775
7873
7874 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7875
7876         * src/mcs51/gen.c (genFunction, genEndFunction),
7877         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7878         and restore of EA so that stack offsets to parameters are
7879         correct when using both critical and reentrant/stack-auto.
7880         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7881         size (can be triggered in error if sloc is shared between
7882         different sized objects)
7883         * device/include/float.h: fixed macros to explicitly use
7884         unsigned long where needed
7885
7886 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7887
7888         Feature req. 799831: added code to allow nesting of critical functions
7889         * src/mcs51/gen.c (genFunction, genEndFunction)
7890         * src/ds390/gen.c (genFunction, genEndFunction)
7891
7892 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7893
7894         * src/SDCCsymt.c (sclsFromPtr),
7895         * src/SDCCsymt.h,
7896         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7897         support for standard C idiom of memory mapped variables; for
7898         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7899         to xdata int at 0x1234 tempvar = 1.
7900         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7901         provided by Akiya ISHIDA
7902
7903 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7904
7905         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7906         * src/SDCCval.c (constVal): added reduction from int to char
7907         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7908         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7909         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7910         to ignore the sign
7911         * support/regression/tests/shifts.c: fixed
7912
7913 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7914
7915         * src/z80/gen.c (genXor): Fixed bug #805445
7916
7917 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7918
7919         Fixed bug #621531 (const & volatile confusion in the type chain).
7920         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7921         refer to the const or volatile state of the pointer itself.
7922
7923         * src/SDCCast.c
7924         * src/SDCCglue.c
7925         * src/SDCCicode.c
7926         * src/SDCCsymt.c
7927         * src/SDCCval.c
7928         * src/SDCC.y
7929         * src/SDCCsymt.h
7930         * src/pic/gen.c
7931         * src/pic/ralloc.c
7932         * src/pic16/gen.c
7933         * src/pic16/ralloc.c
7934         * support/regression/tests/const.c
7935
7936 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7937
7938         When checking for duplicated modules, use absolute paths
7939         instead of relative paths.  Files changed:
7940
7941         * as/mcs51/lklib.c
7942         * link/z80/lklib.c
7943
7944 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7945
7946         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7947
7948 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7949
7950         * device/include/string.h: added size_t typedef, changed
7951         prototypes to use size_t, eliminated separate reentrant and
7952         non-reentrant declarations, added _memmove declaration
7953         * device/lib/_memcpy.c: changed to use size_t instead of int,
7954         changed /4 to >>2 to avoid division library call
7955         * device/lib/_memcmp.c,
7956         * device/lib/_memset.c,
7957         * device/lib/_strncat.c,
7958         * device/lib/_strncpy.c,
7959         * device/lib/_strncmp.c: changed to use size_t instead of int
7960         * device/lib/_memmove.c: new file (fixed bug #772294)
7961         * device/lib/Makefile.in: added _memmove.c
7962         * device/lib/z80/asm_strings.s: fixed bug #772290
7963         * support/regression/tests/bitfields.c: attempt to fix host assertion
7964         failure on amd64-unknown-linux2.2
7965
7966 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7967
7968         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7969         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7970         * as/z80/asmain.c (main): fixed bug #801766
7971
7972 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7973
7974         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7975         compilers
7976
7977 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7978
7979         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7980         reported in bug #800609
7981
7982 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7983
7984         * Top header beautifications in src/pic16 directory:
7985           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7986           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7987           pcoderegs.h, ralloc.c, ralloc.h
7988         * main.c: added top header and GPL license notice
7989         * pcode.c: fixed the if-conditional warning
7990
7991 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7992
7993         * device/lib/_mullong.c: replaced int by short for gcc
7994
7995 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7996
7997         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7998         and JUMPTABLE iCodes properly now (worked by accident before)
7999         * src/mcs51/gen.c (leftRightUseAcc),
8000         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8001         iCode properly now. Use getSize instead of nRegs since a & b
8002         aren't part of the nRegs tally.
8003
8004 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8005
8006         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8007         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8008           before instructions that use the _STATUS register
8009
8010 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8011
8012         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8013         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8014         fetching of the pointer
8015         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8016         copied from genNearPointerSet()
8017         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8018         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8019         If they pop r0/r1 they must be called in the opposite order than aopOp().
8020         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8021         (resp. --stack-auto), prepared for --xstack
8022
8023 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8024
8025         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8026
8027 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8028
8029         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8030         these ports have their own __sdcc_external_start()
8031
8032 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8033
8034         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8035         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8036         type for bits was changed. It resulted in bit variables becoming
8037         global, which is not permitted in PIC 14 assembly output.
8038
8039 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8040
8041         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8042
8043 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8044
8045         Z80 and MCS51 linkers complaint if a public symbol is defined
8046         in more than one library module:
8047
8048         * as/mcs51/lklib.c
8049         * link/z80/lklib.c
8050         * as/mcs51/Makefile.in
8051
8052 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8053
8054         A few small changes that speed up the peephole optimizer.
8055
8056         * src/SDCCpeeph.c
8057
8058 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8059
8060         Try to make the peephole optimizer smarter by maintaining
8061         an association between the assembly source code and the
8062         iCodes that originated them. Put this information to use
8063         with a new peephole rule condition "notVolatile" so that
8064         the rules can be aggressive yet still safe.
8065
8066         * src/SDCCpeeph.c
8067         * src/SDCCpeeph.h
8068         * src/mcs51/gen.c
8069         * src/mcs51/peeph.def
8070
8071 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8072
8073         Fixed bug #741761
8074
8075         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8076         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8077         if the left or right operand symbols have the accuse flag set.
8078
8079 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8080
8081         Changed the type of the result of the ! (NOT) operator to char;
8082         previously it returned the same type as the source. This allows
8083         us to eliminate all the genFloatNot functions (all of its target
8084         implementations were very buggy) since !float can use the same
8085         code as !long now.
8086
8087         * src/SDCCicode.c (ast2iCode): ! returns char
8088         * src/mcs51/gen.c (genNot, genNotFloat),
8089         * src/ds390/gen.c (genNot, genNotFloat),
8090         * src/z80/gen.c (genNot, genNotFloat),
8091         * src/pic/gen.c (genNot, genNotFloat),
8092         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8093
8094 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8095
8096         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8097         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8098            during interrupts. Ensure WSAVE is located at a shared bank address.
8099         2. Fixed page selection in some places
8100         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8101            the registers name strings.
8102         4. Fixed "signed / unsigned compare" compiler warnings.
8103         5. The PIC port manages its own allocation of the general purpose
8104            registers, but makes no attempt to reuse them. As a result when
8105            compiling it soon runs out of general purpose registers. Some
8106            additional code was added to the files pcode.c and device.c to walk
8107            through the function call tree and rename the registers so that they
8108            get reused.
8109
8110         * src/pic/device.c
8111         * src/pic/gen.c
8112         * src/pic/glue.c
8113         * src/pic/pcode.c
8114         * src/pic/pcode.h
8115         * src/pic/ralloc.c
8116         * src/pic/ralloc.h
8117         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8118         genPlus() & genMinus() when the result is the same as left or right
8119
8120 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8121
8122         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8123
8124 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8125
8126         Made bitfield a distinct type from bit so that bitfields
8127         convert as per ANSI C and bits retain their traditional
8128         boolean style behaviour. Implemented bitfield support in
8129         the z80 port.
8130
8131         * src/SDCCsymt.h,
8132         * src/SDCCsymt.c,
8133         * src/SDCCast.c,
8134         * src/cdbFile.c,
8135         * src/mcs51/gen.c,
8136         * src/ds390/gen.c: bit v bitfield split
8137         * src/z80/gen.c: New support for bitfields
8138         * support/regression/tests/bitfields.c: reenabled z80,
8139         added more tests
8140
8141 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8142
8143         Rules 246.x, 247.x relate to bitfields, the others speed up
8144         access to xdata mapped I/O devices.
8145
8146         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8147
8148 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8149
8150         Cleaned up genPackBits and genUnpackBits and added two helper
8151         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8152         for literal assignments in genPackBits (thanks to Frieder for
8153         reminding me).
8154
8155         * src/mcs51/gen.c
8156         * src/ds390/gen.c
8157
8158 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8159
8160         Fixed bug #748310 (pointer to function type mishandled when the
8161         function name is omitted). Also fixed a SIGSEGV when a function
8162         attribute (reentrant, etc) is used on a non-function or on a
8163         function but misplaced before the parameter list.
8164
8165         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8166         bug #748310
8167         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8168         * support/Util/SDCCerr.h,
8169         * support/Util/SDCCerr.c: Added func attr misuse error msg
8170
8171 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8172
8173         Fixed bug #787649 by anonymous
8174         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8175         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8176
8177 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8178
8179         Fixed numerous bitfield problems.
8180
8181         * src/SDCC.y: More bitfield related error checking
8182         * src/SDCCsymt.h,
8183         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8184         * support/Util/SDCCerr.h,
8185         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8186         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8187         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8188         * support/regression/tests/bitfields.c: tests added
8189
8190 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8191
8192         Made the constant following the "interrupt" keyword optional. If
8193         omitted, the function will not automatically be given an entry
8194         in the interrupt vector table (similar to #pragma NOIV, but
8195         less syntacticly kludgy). The interrupt number is also now
8196         range checked. Also fixed a bug in the high order bit example
8197         in the manual.
8198
8199         * src/SDCC.y
8200         * src/SDCCmem.c
8201         * src/SDCCglue.c
8202         * src/SDCCsymt.h
8203         * support/Util/SDCCerr.c
8204         * support/Util/SDCCerr.h
8205         * doc/sdccman.lyx
8206
8207 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8208
8209         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8210         * src/SDCCicode.c (operandOperation): rewritten some ops
8211         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8212         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8213         other type
8214         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8215         be re-activated by defining REDUCE_LITERALS)
8216         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8217         unsigned, but are signed by default
8218         * src/SDCCval.c (constVal): rearranged
8219         * src/SDCCval.c (valMod): preliminary fix
8220         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8221         * support/regression/literalop.c: added, work in progress
8222
8223 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8224
8225         Generate warnings for useless declarations like "char data;"
8226         that don't do what new users expect.
8227
8228         * src/SDCC.y
8229         * support/Util/SDCCerr.h
8230         * support/Util/SDCCerr.c
8231
8232 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8233
8234         * src/SDCCval.c (valMult): fix overflow detection of negative int
8235
8236 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8237
8238         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8239
8240         Changes to support big endian targets:
8241
8242         * src/ports.h
8243         * src/SDCCglue.c
8244         * src/avr/main.c
8245         * src/ds390/main.c
8246         * src/izt/i186.c
8247         * src/mcs51/main.c
8248         * src/pic/main.c
8249         * src/pic16/main.c
8250         * src/xa51/main.c
8251         * src/z80/main.c
8252
8253 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8254
8255         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8256         * device/lib/time.c: fixed warning "integer overflow in expression"
8257
8258 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8259
8260         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8261         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8262         constants are unsigned; added recognition of "u" flag for unsigned
8263         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8264         * src/SDCCval.c (valDiv, valMod): fixed signdness
8265         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8266         signedness of modulo, left and right shift
8267         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8268         * support/Util/SDCCerr.h: added warning W_INT_OVL
8269         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8270         * src/SDCCast.c (ast_print): improved output of constants
8271
8272 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8273
8274         Fixed some warnings when building with MSVC:
8275
8276         * as\mcs51\asdata.c
8277         * as\z80\asdata.c
8278         * as\mcs51\asm.h
8279         * as\z80\asm.h
8280         * link\z80\aslink.h
8281         * link\z80\lkdata.c
8282         * link\z80\lkeval.c
8283         * link\z80\lkgb.c
8284         * link\z80\lkihx.c
8285         * link\z80\lks19.c
8286         * link\z80\lksym.c
8287         * support\cpp2\cpplib.c
8288         * src\ds390\gen.c
8289         * src\mcs51\gen.c
8290
8291 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8292
8293         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8294
8295 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8296
8297         * support\librarian\clean.mk: Do not remove Makefile.
8298         * support\librarian\Makefile: added.
8299
8300 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8301
8302         Added librarian to MSVC build:
8303         * all.dsp
8304         * sdcc.dsw
8305         * support\librarian\librarian.dsp
8306
8307         'configure' not needed for librarian, removed:
8308         * support\librarian\configure
8309         * support\librarian\configure.in
8310         * support\librarian\config_in.h
8311         * support\librarian\Makefile.in
8312
8313         Hopefully these ones built the librarian and the rest of sdcc properly:
8314         * Makefile
8315         * Makefile.common.in
8316
8317         Messed up 'configure', so revert to previous version:
8318         * configure
8319         * configure.in
8320
8321 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8322
8323         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8324         there, while the mantissa of a double is "only" 53 bits wide.
8325
8326 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8327
8328         Adding sdcclib to the build.  MSVC project coming soon.
8329         Files added/changed:
8330
8331         * support\librarian\clean.mk
8332         * support\librarian\configure
8333         * support\librarian\configure.in
8334         * support\librarian\config_in.h
8335         * support\librarian\Makefile.bcc
8336         * support\librarian\Makefile.in
8337         * support\librarian\sdcclib.c
8338         * Makefile.bcc
8339         * Makefile
8340         * Makefile.common.in
8341         * configure
8342         * configure.in
8343
8344 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8345
8346         Linker now complaints if linked modules have conflicting options, for
8347         example, one compiled using --model-large and another one compiled with
8348         --model-small.  The following files were modified:
8349
8350         * as\mcs51\asdata.c
8351         * as\mcs51\aslink.h
8352         * as\mcs51\asm.h
8353         * as\mcs51\asmain.c
8354         * as\mcs51\asout.c
8355         * as\mcs51\i51pst.c
8356         * as\mcs51\lkdata.c
8357         * as\mcs51\lklibr.c
8358         * as\mcs51\lkmain.c
8359         * as\z80\asdata.c
8360         * as\z80\asm.h
8361         * as\z80\asmain.c
8362         * as\z80\asout.c
8363         * as\z80\z80pst.c
8364         * link\z80\aslink.h
8365         * link\z80\lkdata.c
8366         * link\z80\lklibr.c
8367         * link\z80\lkmain.c
8368         * src\SDCCglue.c
8369
8370 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8371
8372         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8373         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8374
8375 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8376
8377         * src/z80/mappings.i: fix _mul[us][int,long] entries
8378
8379 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8380
8381         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8382
8383 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8384
8385         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8386         * support/regression/tests/bitopcse.c: added
8387         fixed warning:
8388         * src/avr/gen.c:
8389         * src/pic/gen.c:
8390         * src/pic16/gen.c:
8391         * src/z80/gen.c:
8392         * src/xa51/gen.c:
8393
8394 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8395
8396         added support for new library format to z80, gbz80 linkers:
8397         *link/z80/aslink.h
8398         *link/z80/lklex.c
8399         *link/z80/lklib.c
8400         *link/z80/lklist.c
8401
8402 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8403
8404         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8405         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8406
8407 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8408
8409         added DUMMY_READ_VOLATILE:
8410         * src/SDCC.y:
8411         * src/avr/gen.c:
8412         * src/xa51/gen.c:
8413         * src/z80/gen.c:
8414         * src/pic/gen.c:
8415         * src/pic16/gen.c:
8416         * src/mcs51/gen.c:
8417         * src/ds390/gen.c:
8418         * src/SDCCcse.c (algebraicOpts): many improvements
8419         * src/SDCCcse.h: removed algebraicOpts()
8420         * src/SDCCicode.c (picDummyRead): added
8421
8422 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8423
8424         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8425         "Insufficient space in data memory".
8426
8427 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8428
8429         * src/mcs51/gen.c: fixed bug #771358
8430         * src/z80/gen.c: fixed bug #759087
8431
8432 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8433
8434         * src/pic16/glue.c: minor cleanup by Vangelis
8435
8436 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8437
8438         * device/include/regc515c.h: fixed #758477
8439         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8440         * device/lib/_gptrput.c: saved a few bytes
8441         * my tab spacing is 8, yours too?)
8442         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8443         * device/lib/serial.c: process RX bytes earlier than TX bytes
8444         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8445
8446 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8447
8448         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8449
8450 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8451
8452     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8453
8454 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8455
8456         * device/lib/Makefile.in: bad fix, reverted to 1.43
8457
8458 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8459
8460         * device/lib/Makefile.in: added missing z80 object files
8461
8462 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8463
8464         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8465         pic16 progress by Vangelis:
8466         * src/SDCCglobl.h:
8467         * src/SDCCmain.c:
8468         * src/pic/Makefile:
8469         * src/pic:
8470         * pic/Makefile:
8471         * pic16/device.c:
8472         * pic16/device.h:
8473         * pic16/gen.c:
8474         * pic16/gen.h:
8475         * pic16/genarith.c:
8476         * pic16/glue.c:
8477         * pic16/main.c:
8478         * pic16/pcode.c:
8479         * pic16/pcode.h:
8480         * pic16/pcodepeep.c:
8481         * pic16/peeph.def:
8482
8483 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8484
8485     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8486
8487 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8488
8489     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8490     added gbz80 build to MSVC project.
8491     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8492     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8493     from 8051 stuff and setup so it links using a .lnk file.
8494
8495 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8496
8497     * support/librarian/sdcclib.c: sdcc librarian.
8498     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8499     with sdcclib.
8500
8501 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8502
8503     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8504
8505 2003-07-02  Borut Razem <borut.razem AT siol.net>
8506
8507         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8508         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8509         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8510         src/xa51/main.c, src/z80/main.c:
8511         virtualization of glue() function: each port has it's own glue function,
8512         which is accessed by do_glue function pointer in PORT.general structure
8513
8514 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8515
8516         * DS800C400 fun, improved ROM interface and tinibios.
8517
8518 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8519
8520         * More support for DS80C400. Now includes beginning of interface to ROM.
8521
8522 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8523
8524         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8525
8526 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8527
8528         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8529
8530 2003-06-19  Borut Razem <borut.razem AT siol.net>
8531
8532         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8533
8534 2003-06-19  Borut Razem <borut.razem AT siol.net>
8535
8536         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8537         fixed Z80 port - crt0.o: cannot open.
8538
8539 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8540
8541         * support/Util/MySystem.c (merge_command): revert bad fix
8542
8543 2003-06-18  Borut Razem <borut.razem AT siol.net>
8544
8545         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8546
8547 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8548
8549         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8550         option --use-stdout sends errors to stdout instead of stderr.
8551
8552 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8553
8554         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8555
8556 2003-06-15  Borut Razem <borut.razem AT siol.net>
8557
8558         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8559         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8560         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8561         fixed width array of pointers replaced with sets;
8562         multiple include and lib paths ared transferred to preprocessor and linker
8563         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8564         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8565         fixed width array of pointers
8566         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8567         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8568         fixupPath(), getPathDifference()
8569         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8570         fixed width array of pointers
8571
8572 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8573
8574         * src/pic16/ralloc.c: fix warnings
8575         * src/pic16/pcode.c: fix warning
8576
8577 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8578
8579          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8580         know all the details, but essentially this set of changes enable
8581         the pic16 port to generate movff instructions and generate assembler
8582         directives,
8583         * src/SDCCmain.c:
8584         * src/pic16/gen.c:
8585         * src/pic16/glue.c:
8586         * src/pic16/pcode.c:
8587         * src/pic16/device.c:
8588         * src/pic16/main.c:
8589         * src/pic16/pcode.h:
8590         * src/pic16/pcoderegs.c:
8591         * src/pic16/ralloc.c:
8592         * src/pic16/ralloc.h:
8593
8594 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8595
8596         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8597         added option --vc, so sdcc errors and warnings are compatible with
8598         Microsoft Visual Studio.
8599
8600 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8601
8602         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8603           device/lib/libfloat.lib: added atof function.
8604
8605 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8606
8607         * doc/sdccman.lyx: updated to Lyx 1.3
8608         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8609         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8610         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8611
8612 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8613
8614         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8615
8616 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8617
8618         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8619           additions to the "related tools/documentation" section
8620
8621 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8622
8623         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8624
8625 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8626
8627         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8628         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8629
8630 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8631
8632         * doc/sdccman.lyx: fix double dash and other minor things
8633         * doc/Makefile: fix double dash
8634
8635 2003-05-28  Karl Bongers(patches from Martin Helmling)
8636         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8637           condition and ignore commands.
8638
8639 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8640
8641         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8642           is in parts still quite out of date, I did changes as far as I felt makes sense
8643           for a non-native english speaker.
8644           Please feel free to add to the manual or to correct my changes.
8645         * doc/Makefile: undid touching the date of intermediate tex files.
8646
8647 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8648
8649         * doc/sdccman.lyx: Manual has an index now
8650
8651 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8652
8653         Finalize muluint/mulsint and mululong/mulslong merging:
8654         * device/lib/_mulint.c
8655         * device/lib/_mullong.c
8656         * device/lib/gbz80/mul.s
8657         * device/lib/gbz80/stubs.s
8658         * device/lib/z80/mul.s
8659         * device/lib/z80/stubs.s
8660         * src/SDCCsymt.c (initCSupport)
8661
8662 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8663
8664         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8665         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8666           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8667           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8668           instead of /Zm500.
8669
8670 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8671
8672         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8673           the regression tests I'm not brave enough to enable 245.b, 245.c
8674         * doc/sdccman.lyx: added latex preamble for hyperref package.
8675           Using pdflatex this will give you a hyperlinked pdf file with
8676           bookmarks. (prepend '%' before /usepackage if this breaks something)
8677
8678 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8679
8680          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8681
8682 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8683
8684         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8685
8686 2003-05-21    <johan AT balder>
8687
8688         * src/SDCCglue.c (printIval): fixed bug #739934
8689
8690 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8691
8692         Applied patch from bug 737905 (renamed yylineo to mylineno):
8693         * src/altlex.c
8694         * src/SDCCast.c
8695         * src/SDCglobl.h
8696         * src/SDCC.lex
8697         * src/SDCCsymt.c
8698         * src/SDCCval.c
8699         * src/pic16/pcode.c: Cleaned warnings
8700         * src/pic16/pcodeflow.c: Cleaned warnings
8701         * src/pic16/pcoderegs.c: Cleaned warnings
8702
8703 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8704
8705         * src/pic16/pcode.c: Cleaned warnings
8706         * src/pic16/pcodepeep.c: Cleaned warnings
8707         * src/pic16/ralloc.c: Cleaned warnings
8708
8709 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8710
8711         * doc/sdccman.lyx: fixed bug 739745
8712         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8713
8714 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8715
8716         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8717         it can be defined with CFLAGS when running configure
8718         * src/SDCCmain.c: fixed compiling + linking with object files
8719
8720 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8721
8722         * configure.in: configure for pic16 port,
8723             added --disable-pic16-port
8724         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8725         * src/SDCCmain.c: linkOptions is changed to set *,
8726             added if/endif conditional macros to remove options help
8727             messages from optionsTable when a port is not configured, added
8728             support for the PIc16 port in the ports table, when executing
8729             the compiler with no port specified on command line, a default
8730             port is selected with the new macro DEFAULT_PORT which is
8731             defined in port.h, in setDefaultOptions() linkOptions is removed
8732             from initialization assignment, since now it is a set,
8733             parseCmdLine uses setParseWithComma for linkOptions, in
8734             linkEdit() linkOptions are accessed with new function indexSet()
8735             which returns the i'th item of a set variable. See SDCCset.c, in
8736             linkEdit() when calling buildCmdLine(), added linkOptions as
8737             last argument. Now users can pass arguments to gplink via the
8738             -Wl option, main() uses pic16glue() to glue up pic16 programs
8739         * src/SDCCpeeph.c: various changes to support pic16
8740         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8741             return the i'th item of the set
8742         * src/SDCCset.h: added function prototype for indexSet()
8743         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8744         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8745         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8746             added macro DEFAULT_PORT
8747         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8748         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8749             generated
8750         * src/pic16/glue.c: commented out some error producing lines
8751         * src/pic16/main.c: __config directives are commented out to stop
8752             gpasm complaining and test the linkage with gplink, _linkCmd and
8753             _asmCmd changed to be more gplink and gpasm friendly
8754         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8755             produced an error when parsed, peep rule 12 is added to utilize
8756             movff, but it is commented out since the pCode does not support
8757             yet a command with 2 address arguments
8758
8759 2003-05-18    <johan AT balder>
8760
8761         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8762         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8763 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8764
8765         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8766   Added feature to script commands from file.
8767
8768 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8769
8770         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8771         * src/SDCCutil.c: include ctype.h for win32
8772
8773 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8774
8775         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8776
8777 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8778
8779         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8780   Fixed so you can set breakpoints prior to run, run does not stop
8781   on entry now.  Add tbreak.  Other enhancements and fixes for use
8782   with ddd.
8783
8784 2003-05-12  Borut Razem <borut.razem AT siol.net>
8785
8786         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8787
8788 2003-05-11  Borut Razem <borut.razem AT siol.net>
8789
8790         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8791         the path of bin directory, so that PATH is the only env. variable, which has to be set
8792         in case of standard installation.
8793         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8794         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8795         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8796
8797 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8798
8799         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8800         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8801         temp files are in the port dir; clean the gen/test directory when
8802         generating new test.c
8803         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8804         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8805         * support/regression/tests/zeropad.c: added
8806
8807 2003-05-09    <johan AT balder>
8808
8809         * src/SDCCglue.c: fixed bug #597940
8810
8811 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8812
8813         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8814   cache sfr, optimize next,step, fix off by one sourceline,
8815   support ddd list function.
8816         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8817
8818 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8819
8820         * support/regression/HTMLgen.py: added compare_s2f()
8821         * support/regression/Makefile: redo 1.27
8822         * support/regression/generate-cases.py: redo 1.5
8823
8824 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8825
8826         * support/regression/tests/float.c: workaround 33 bit hex constant
8827         * support/regression/tests/simplefloat.c: fix division for host
8828
8829 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8830
8831         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8832         that tame's the PIC's over-aggressive optimizer.
8833
8834 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8835
8836          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8837          support for MSVC.
8838
8839 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8840
8841         Initial support for DS80C400. "Hello world" runs on TINIm400
8842         (with polled I/O).
8843
8844 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8845
8846          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8847          * Some notes on ddd usage added in debugger/README
8848          Martin Helmling adding more features and fixes for ddd GUI debugger.
8849          Code added for nexti, stepi, up, down, and other adjustments.
8850
8851 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8852
8853         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8854         * src/pic/peeph.def Added two rules to optimize carry manipulation
8855         * src/pic/* removed debug printfs
8856
8857 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8858
8859         * debugger/mcs51/cmd.c: added header newalloc.h
8860
8861 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8862
8863         * as/Makefile: new EXEEXT
8864         * as/z80/Makefile: remove trailing slash of BUILDIR
8865         * as/z80/clean.mk: new EXEEXT
8866         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8867         * support/cpp2/Makefile.in: new EXEEXT
8868         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8869
8870 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8871
8872         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8873         EXEEXT was introduced to fix all related problems with targets
8874         "clean", "install" and "uninstall"; a couple of further flaws
8875         especially with "clean" have been fixed too
8876         * as/mcs51/Makefile.in
8877         * as/mcs51/clean.mk
8878         * as/z80/Makefile
8879         * Makefile
8880         * clean.mk
8881         * debugger/mcs51/Makefile.in
8882         * debugger/mcs51/clean.mk
8883         * link/z80/Makefile
8884         * link/z80/Makefile.in
8885         * link/z80/clean.mk
8886         * link/Makefile
8887         * packihx/Makefile.in
8888         * packihx/clean.mk
8889         * sim/ucsim/Makefile
8890         * sim/ucsim/clean.mk
8891         * sim/ucsim/avr.src/Makefile.in
8892         * sim/ucsim/avr.src/clean.mk
8893         * sim/ucsim/s51.src/Makefile.in
8894         * sim/ucsim/s51.src/clean.mk
8895         * sim/ucsim/xa.src/Makefile.in
8896         * sim/ucsim/xa.src/clean.mk
8897         * sim/ucsim/z80.src/Makefile.in
8898         * sim/ucsim/z80.src/clean.mk
8899         * sim/ucsim/main_in.mk
8900         * sim/ucsim/packages_in.mk
8901         * sim/ucsim/gui.src/Makefile.in
8902         * sim/ucsim/gui.src/serio.src/Makefile.in
8903         * sim/ucsim/gui.src/serio.src/clean.mk
8904         * src/Makefile.in
8905         * src/clean.mk
8906         * support/cpp2/Makefile.in
8907         * support/cpp2/clean.mk
8908         * support/makebin/Makefile
8909         * support/makebin/clean.mk
8910         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8911         * doc/sdccman.lyx: --program-suffix no longer needed
8912
8913 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8914
8915          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8916          Martin Helmling added support for ddd GUI debugger.
8917          Code added to display assembly, set variables, and other commands
8918          to interface to ddd.
8919
8920 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8921
8922         * as/Makefile: fix target clean
8923         * as/clean.mk: fix target clean
8924         * as/z80/clean.mk: fix target clean
8925
8926 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8927
8928         * Makefile.common.in: added  AT EXEEXT AT
8929         * configure.in: removed all mingw32 stuff
8930         * configure: rebuilt from configure.in
8931         * doc/sdccman.lyx: updated section "installation"
8932         * support/scripts/sdcc_mingw32: adapted to configure
8933         * support/scripts/sdcc_cygwin_mingw32: added
8934
8935 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8936
8937         * src/pic Added object file support for the PIC port
8938         * src/pic Applied patch from Craig Franklin (this started the object file support)
8939         * src/regression Updated the PIC regression tests for object files
8940
8941 2003-04-20  Borut Razem <borut.razem AT siol.net>
8942
8943         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8944           lklex.c: In function `getfid':
8945           lklex.c:203: warning: array subscript has type `char'
8946         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8947           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8948         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8949           stack handling macros
8950
8951 2003-04-19  Borut Razem <borut.razem AT siol.net>
8952
8953         * "handling space characters in file path" task:
8954         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8955         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8956         * support/Util/MySystem.h: make it self-sufficient
8957         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8958           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8959           handling space characters in file path
8960         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8961           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8962         * support/Util/MySystem.c: handling space characters in executable's path
8963
8964 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8965
8966         * as/z80/Makefile: fix permanent rebuild of z80
8967         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8968         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8969
8970 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8971
8972         * src/SDCCopt.c: add special case optimization to replace modulo by
8973           a power of two with a bitwise AND.
8974
8975 2003-04-18    <johan AT balder>
8976
8977         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8978
8979 2003-04-17    <johan AT balder>
8980
8981         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8982         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8983
8984 2003-04-13  Borut Razem <borut.razem AT siol.net>
8985
8986         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8987         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8988           fixed mingw problem in adl_NORMALIZE_PATH
8989
8990 2003-04-12  Borut Razem <borut.razem AT siol.net>
8991
8992         * fixed "#pragma SAVE/RESTORE can not be nested":
8993         * src/SDCC.lex: reworked pragma handling functions
8994         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8995         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8996
8997 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8998
8999         * src/SDCCutil.c (pathEquivalent): defined but not used
9000         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9001         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9002         * configure: rebuilt from configure.in
9003         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9004         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9005         * device/include/Makefile.in: replace sdcc_datadir
9006         * device/lib/Makefile.in: replace sdcc_datadir
9007         * Makefile.common.in: add LDFLAGS from configure
9008         * packihx/Makefile.in: use LDFLAGS
9009         * src/Makefile.in: use LDFLAGS
9010         * support/cpp2/Makefile.in: add LDFLAGS from configure
9011         * support/makebin/Makefile: use LDFLAGS
9012         * .version: bumped version number to 2.3.5
9013
9014 2003-04-12  Borut Razem <borut.razem AT siol.net>
9015
9016         * completed "different paths" task:
9017         * src/SDCCmacro.c: fixed bug in handling quotes
9018         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9019         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9020
9021 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9022
9023         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9024
9025 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9026
9027         * ds390/gen.c ds390/peeph.def: fix bug 706781
9028
9029 2003-04-11  Borut Razem <borut.razem AT siol.net>
9030
9031         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9032
9033 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9034
9035         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9036         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9037          set - this bit used to not be set...).
9038         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9039           bad code in PIC Port
9040         * src/regression/and2.c added to test bug 609268
9041         * src/regression/Makefile added and2.c to regression test
9042
9043
9044 2003-04-08    <johan AT CP255758-A>
9045
9046         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9047         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9048         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9049
9050 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9051
9052         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9053         fix bug #487815
9054         * support/cpp2/Makefile.in: fix bug #487815
9055         * configure: rebuilt from configure.in
9056         * Makefile.common.in: docdir changed, new path suffixes
9057         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9058         * sdcc_vc_in.h: reflect changes from sdccconf.h
9059         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9060         * src/SDCCutil.h: remove BINDIR hack
9061         * doc/sdccman.lyx: update new path hierarchy
9062
9063 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9064
9065         * src/SDCCpeeph.c: added okToRemoveSLOC test
9066
9067 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9068
9069         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9070
9071 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9072
9073         * src/SDCCpeeph.c: added labelIsReturnOnly test
9074         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9075
9076 2003-04-05    <johan AT balder>
9077
9078         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9079         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9080         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9081         * src/SDCCast.c: fixed a warning
9082         * src/SDCCast.h: fixed a warning
9083         * src/SDCCicode.c (operandFromAst): fixed a warning
9084
9085 2003-04-04    <johan AT balder>
9086
9087         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9088         * src/SDCCast.c (decorateType): fixed bug #715076
9089         * src/SDCC.y: fixed bug #702907
9090
9091 2003-04-03    <johan AT balder>
9092
9093         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9094         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9095         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9096         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9097         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9098
9099 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9100
9101         * _decdptr.c: fix return values
9102         * _gptrget.c: fix return values
9103         * _gptrgetc.c: fix return values
9104         * _gptrput.c: fix return values
9105         * _mulint.c: fix return values
9106         * as/z80/Makefile: fix 'make -j' problem
9107
9108 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9109
9110         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9111         * configure.in: big cleanup, updated to autoconf 2.5x
9112         * configure: rebuilt from configure.in
9113         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9114         * sdcc_vc_in.h: reflect changes from sdccconf.h
9115         * doc/Makefile: fixed a flaw in "make install"
9116
9117 2003-04-02    <johan AT balder>
9118
9119         * src/ds390/gen.c (genCmp): no comments
9120         * src/mcs51/gen.c (genCmp): no comments
9121         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9122         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9123
9124 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9125
9126         * support/regression/generate-cases.py: place generated file in given sub directory
9127         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9128         * support/regression/Makefile: improvements for 'make -j';
9129         side effect: it's simpler and faster now
9130
9131 2003-03-31  Borut Razem <borut.razem AT siol.net>
9132
9133         * src/z80/main.c: link-{port} and as-{port} defined without path
9134         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9135
9136 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9137
9138         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9139
9140 2003-03-30  Borut Razem <borut.razem AT siol.net>
9141
9142         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9143           changed type of list parameter to set
9144         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9145         * src/port.h: changed type of do_assemble() parameter to set
9146         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9147           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9148           definition of "cppoutfilename" macro with NULL value in preProcess()
9149         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9150         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9151         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9152           replaced with set *binPathSet
9153         * shash_add() deallocates the item, if allready exsists, before adding the new one
9154         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9155
9156 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9157
9158         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9159           a nested for loop bug in the PIC port
9160         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9161           for loops
9162
9163 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9164
9165         * support/Util/dbuf.h: remove C++ stuff to make it portable
9166
9167 2003-03-28  Borut Razem <borut.razem AT siol.net>
9168
9169         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9170           literal strings in stringLiteral()
9171         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9172         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9173           to the project
9174
9175 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9176
9177         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9178
9179 2003-03-26    <johan AT balder>
9180
9181         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9182         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9183         * src/SDCCast.c (decorateType): fixed " -v < 3"
9184
9185 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9186
9187         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9188         Added Lenny Story's debug infrastructure changes:
9189         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9190         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9191         * src/cdbFile.c: added
9192         * src/SDCCdebug.c: added
9193         * src/SDCCdebug.h: added
9194         * src/SDCCast.c (createFunction)
9195         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9196         * src/SDCCmain.c (parseCmdLine, main)
9197         * src/SDCCmem.c (redoStackOffsets)
9198         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9199         * src/SDCCsymt.h
9200         * src/common.h
9201         * src/avr/gen.c (genAVRCode)
9202         * src/ds390/gen.c (gen390Code)
9203         * src/mcs51/gen.c (gen51Code)
9204         * src/pic/gen.c (genpic14Code)
9205         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9206         * src/xa51/gen.c (genXA51Code)
9207         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9208
9209 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9210
9211         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9212         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9213
9214 2003-03-22    <johan AT balder>
9215
9216         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9217
9218 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9219
9220         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9221         * doc/cdbfileformat.lyx: added, written by Lenny Story
9222         * doc/Makefile: added cdbfileformat.lyx
9223         * doc/clean.mk: added cdbfileformat.lyx
9224
9225 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9226
9227         * src/mcs51/peeph.def: fix bug #705773
9228
9229 2003-03-20    <johan AT balder>
9230
9231         An sfr/sbit can have an "at #" AND an initializer
9232         * src/SDCCsymt.c (checkSClass):
9233         * src/SDCCmem.c (allocGlobal):
9234         * src/SDCCmem.c (allocLocal):
9235         * src/SDCCast.c (createBlock):
9236
9237 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9238
9239         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9240
9241 2003-03-16    <johan AT balder>
9242
9243         Undid the hackup of const and volatile, the problem is much bigger
9244         * src/SDCC.y:1.65
9245         * src/SDCCast.c:1.171
9246         * src/SDCCglue.c:1.138
9247         * src/SDCCicode.c:1.146
9248         * src/SDCCsymt.c:1.150
9249         * src/SDCCval.c:1.65
9250
9251 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9252
9253         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9254         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9255
9256 2003-03-13    <johan AT balder>
9257
9258         Hackup const and volatile modifiers in type chains a bit:
9259         * src/SDCC.y:1.63
9260         * src/SDCCast.c:1.169
9261         * src/SDCCglue.c:1.136
9262         * src/SDCCicode.c:1.143
9263         * src/SDCCsymt.c1.146
9264         * src/SDCCsymt.h1.59
9265         * src/SDCCval.c:1.63
9266
9267 2003-03-12    <johan AT balder>
9268
9269         * src/SDCCBBlock.h: more LRH debugging junk
9270         * src/SDCCcflow.h: more LRH debugging junk
9271         * src/SDCCloop.c: more LRH debugging junk
9272         * src/SDCC.y (struct_declaration): fixed bug #697590
9273         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9274         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9275         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9276
9277 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9278         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9279         test function names must now match exactly).
9280         * src/SDCCcse.c: added special case in findCheaperOp to allow
9281         extending a short integer. Makes less awful code for bug 700121 test case.
9282
9283 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9284
9285         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9286         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9287
9288 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9289
9290         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9291         actually called (operandsNotEqual() was called for all
9292         operandsNotEqualX tests).
9293
9294 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9295
9296         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9297         with shorter literals. Fixes bug 700121.
9298
9299 2003-03-11    <johan AT balder>
9300
9301         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9302
9303 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9304
9305         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9306         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9307
9308 2003-03-10  Borut Razem <borut.razem AT siol.net>
9309
9310         * src/SDCCmain.c: pipe preprocessor's output
9311         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9312         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9313         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9314         which closes all pipes in pipeSet set
9315         * src/SDCCset.c: free deleted item in function deleteSetItem()
9316         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9317         moved from z80 to src subproject
9318         * .version: increased version number to 2.3.4
9319
9320 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9321
9322         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9323         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9324         * support/regression/ports/xa51/spec.mk: fix typo
9325
9326 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9327
9328         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9329
9330 2003-03-09  Borut Razem <borut.razem AT siol.net>
9331
9332         * src/SDCCmain.c: pipe preprocessor's output
9333         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9334         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9335         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9336         which closes all pipes in pipeSet set
9337         * src/SDCCset.c: free deleted item in function deleteSetItem()
9338         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9339         moved from z80 to src subproject
9340
9341 2003-03-09  Borut Razem <borut.razem AT siol.net>
9342
9343         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9344         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9345         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9346         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9347         * src/SDCCglobl.h: unification of WIN32 native definitions
9348
9349 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9350
9351         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9352
9353 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9354
9355         * src/configure.in:   check for endianess (even while cross-compiling)
9356         * src/configure:      check for endianess (even while cross-compiling)
9357         * src/configure_in.h: check for endianess (even while cross-compiling)
9358         * src/avr/gen.c:        remove old endianess stuff
9359         * src/mcs51/gen.c:      remove old endianess stuff
9360         * src/ds390/gen.c:      remove old endianess stuff
9361         * src/pic/gen.c:        remove old endianess stuff
9362         * src/pic/genarith.c:   remove old endianess stuff
9363         * src/pic/glue.c:       fix endianess check
9364         * src/pic16/gen.c:      remove old endianess stuff
9365         * src/pic16/genarith.c: remove old endianess stuff
9366         * src/pic16/glue.c:     fix endianess check
9367         * src/xa51/gen.c:       remove old endianess stuff
9368         * src/z80/gen.c:        fix endianess check
9369         * src/SDCCglue.c:       fix endianess check
9370         * src/ds390/peeph.def: fix bug 700036
9371
9372 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9373
9374         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9375         * src/configure: find appropriate data-types on host for SDCC's int and long
9376         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9377         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9378         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9379
9380 2003-03-07    <johan AT balder>
9381
9382         Just a big NOOP:
9383                 some minor cleanups before the big shot
9384                 OP_DEFS and OP_USES now use Kevin's protection
9385                 new option --nolabelopt
9386
9387         * src/SDCCBBlock.c:
9388         * src/SDCCast.c,:
9389         * src/SDCCcflow.c:
9390         * src/SDCCcse.c:
9391         * src/SDCCicode.c:
9392         * src/SDCCicode.h:
9393         * src/SDCClabel.c:
9394         * src/SDCCloop.c:
9395         * src/SDCCmain.c:
9396         * src/ds390/ralloc.c:
9397         * src/mcs51/ralloc.c:
9398         * src/pic/ralloc.c:
9399         * src/xa51/ralloc.c:
9400         * src/z80/ralloc.c:
9401
9402 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9403
9404         * src/pic/pcode.c (get_op): fix 64 bit warnings
9405         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9406         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9407         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9408         * support/regression/tests/malloc.c: fix 64 bit warnings
9409
9410 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9411
9412         * src/mcs51/gen.c (genMinus): fixed bug 696436
9413
9414 2003-03-02  Borut Razem <borut.razem AT siol.net>
9415
9416         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9417
9418 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9419
9420         * configure.in: test for mkstemp
9421         * sdccconf_in.h: add HAVE_MKSTEMP
9422
9423 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9424
9425         * device/include/ctype.h: removed warning while using --stack-auto
9426         * device/include/malloc.h: removed warning while using --stack-auto
9427         * device/include/string.h: removed warning while using --stack-auto
9428
9429 2003-02-23  Borut Razem <borut.razem AT siol.net>
9430
9431         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9432         because NDEBUG is defined (see man assert)
9433         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9434
9435 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9436
9437         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9438         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9439
9440 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9441
9442         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9443         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9444
9445 2003-02-18    <johan AT balder>
9446
9447         * as/mcs51/asmain.c (asmbl): module can start with a digit
9448         * as/z80/asmain.c (asmbl): module can start with a digit
9449
9450 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9451
9452         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9453         * src/asm.c: fix pipe() for Mingw32
9454
9455 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9456
9457         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9458         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9459         make -V work again; --c1mode reads now from stdin
9460         * doc/sdccman.lyx: added --c1mode
9461         * support/Util/SDCCerr.c: new messages for c1 mode
9462         * support/Util/SDCCerr.h: new messages for c1 mode
9463         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9464
9465 2003-02-15    <johan AT balder>
9466
9467         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9468
9469 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9470
9471         * doc/sdccman.lyx: Environment variables, -o and other minor things
9472
9473 2003-02-14    <johan AT balder>
9474
9475         * src/xa51/main.c: before anyone really tries to use it :)
9476
9477         * Install doc's in share/sdcc/doc
9478         * removed some obsolete files
9479         * Do a proper make distclean and uninstall
9480         M Makefile.common.in
9481         R sdccbuild.sh
9482         M as/Makefile
9483         M device/include/Makefile.in
9484         M device/lib/Makefile.in
9485         M doc/sdccman.lyx
9486         M link/Makefile
9487         M sim/ucsim/doc/Makefile.in
9488         M src/clean.mk
9489         R src/avr/peeph.rul
9490         R src/xa51/peeph.rul
9491         M support/cpp2/Makefile.in
9492         M support/makebin/Makefile
9493
9494
9495 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9496
9497         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9498
9499 2003-02-10  Borut Razem <borut.razem AT siol.net>
9500
9501         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9502         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9503         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9504         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9505         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9506         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9507         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9508         src/z80/Makefile.bcc: Borland Makefile cleanup
9509         * as/z80/Makefile.bcc: Added Borland Makefile
9510         * support/cpp2/borland.h: Removed
9511
9512 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9513
9514         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9515         * src/SDCC.lex: new pragma NOIV
9516         * src/SDCCglobl.h: new pragma NOIV
9517         * src/SDCCmem.c: new pragma NOIV
9518
9519 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9520
9521         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9522
9523 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9524
9525         * src/SDCCmain.c: signal handling is switched off by --debug
9526         * doc/Makefile: small fix for install; use clean.mk again
9527         * doc/clean.mk: clean *.pdf and *.html too
9528
9529 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9530
9531         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9532         * device/lib/printfl.c: fix a ds390 bug by making it portable
9533         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9534         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9535         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9536         * debugger/mcs51/cmd.c: converted multi-line string literals
9537         * sim/ucsim/globals.cc: converted multi-line string literals
9538         * src/SDCCmain.c: introduced signal handler to remove temp files
9539         * doc/Makefile: small tweaks, implement clean
9540         * doc: removed generated files
9541
9542 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9543
9544         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9545         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9546         Address Record is not correctly generated for DS390."
9547
9548 2003-02-02  Borut Razem <borut.razem AT siol.net>
9549
9550         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9551         * as/mcs51/asm.h: fixed compilation with Borland C
9552         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9553         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9554         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9555         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9556         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9557         src/z80/Makefile.bcc: delete $(LIB) only if exist
9558         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9559
9560 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9561
9562         * device/include/malloc.h: introduced NULL
9563         * device/include/string.h: introduced NULL
9564         * device/include/stdlib.h: introduced NULL
9565         * device/lib/_memcpy.c: removed NULL
9566         * device/lib/_strcat.c: removed NULL
9567         * device/lib/_strchr.c: removed NULL
9568         * device/lib/_strcmp.c: removed NULL
9569         * device/lib/_strcpy.c: removed NULL
9570         * device/lib/_strcspn.c: removed NULL
9571         * device/lib/_strlen.c: removed NULL
9572         * device/lib/_strncat.c: removed NULL
9573         * device/lib/_strncmp.c: removed NULL
9574         * device/lib/_strncpy.c: removed NULL
9575         * device/lib/_strpbrk.c: removed NULL
9576         * device/lib/_strrchr.c: removed NULL
9577         * device/lib/_strspn.c: removed NULL
9578         * device/lib/_strstr.c: removed NULL
9579         * device/lib/_strtok.c: removed NULL
9580         * device/lib/malloc.c: removed NULL, include own header
9581
9582 2003-02-02    <johan AT balder>
9583
9584         * 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
9585         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9586         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9587         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9588         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9589         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9590
9591 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9592
9593         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9594         area 'DATA'"
9595
9596 2003-02-01    <johan AT balder>
9597
9598         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9599
9600 2003-01-31    <johan AT CP255758-A>
9601
9602         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9603
9604 2003-01-30    <johan AT balder>
9605
9606         * src/SDCCBBlock.c: automatic bug detection
9607         * src/SDCCicode.c: automatic bug detection
9608
9609 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9610
9611         * src/SDCCglobl.h:   now --xram-size 0 works
9612         * src/SDCCmain.c:    now --xram-size 0 works
9613
9614 2003-01-29    <johan AT balder>
9615
9616         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9617
9618 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9619
9620         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9621         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9622         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9623         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9624         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9625         * src/SDCCmain.c:    Added options --xram-size and --code-size
9626
9627 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9628
9629         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9630         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9631
9632 2003-01-27    <johan AT balder>
9633
9634         * src/SDCC.y: fixed bug #613764
9635
9636 2003-01-26    <johan AT balder>
9637
9638         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9639         * src/SDCCsymt.h: fixed bug #673374
9640         * src/SDCCglue.c: fixed bug #661910
9641         * src/SDCCast.c: fixed bug #458099 and 673374
9642
9643 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9644
9645         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9646         * as/mcs51/strcmpi.h: added
9647         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9648         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9649         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9650         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9651         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9652         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9653         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9654         * as/mcs51/Makefile.aslink: new module strcmpi
9655         * as/mcs51/Makefile.asx8051: new module strcmpi
9656         * as/mcs51/Makefil.bcc: new module strcmpi
9657         * as/mcs51/Makefile.in: new module strcmpi
9658         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9659
9660 2003-01-26    <johan AT balder>
9661
9662         * src/SDCCglue.c: reverted back to 1.124
9663         * src/SDCCast.c: reverted back to 1.156
9664         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9665
9666 2003-01-25    <johan AT balder>
9667
9668         * src/SDCCglue.c: A better fix for bug #661910
9669         * src/SDCCast.c: A better fix for bug #661910
9670         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9671
9672 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9673
9674         * src/Makefile.in: remove spawn.o
9675         * src/SDCCmain.c: remove spawn.h
9676         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9677         * src/spawn.c: removed
9678         * src/spawn.h: removed
9679         * support/regression/ports/ds390/spec.mk: link with -r
9680
9681 2003-01-24    <johan AT CP255758-A>
9682
9683         * src/ds390/gen.c (aopOp): fixed bug #667458
9684         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9685         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9686         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9687
9688 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9689
9690         * src/mcs51/peeph.def: better assembler identation by Frieder
9691         * src/mcs51/gen.c: better assembler identation by Frieder
9692
9693 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9694
9695         * as/z80/string.h: removed for gcc 3.2
9696         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9697         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9698
9699 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9700
9701         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9702         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9703         * support/regression/Makefile: separate temp files for ports
9704         * support/regression/generate-cases.py: separate temp files for ports
9705         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9706         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9707
9708 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9709
9710         * moved tinitalk to device/examples/ds390
9711
9712 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9713
9714         * as/mcs51/lkmem.c: rflag is for DS390
9715         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9716         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9717                          (linkEdit): move mem- and map-files the same way as ihx-files
9718         * src/z80/main.c (_setDefaultOptions): removed --generic
9719         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9720         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9721         * src/pic/glue.c (picglue): --c1mode works again
9722         * src/pic16/glue.c (pic16glue): --c1mode works again
9723         * src/asm.c (printCLine): fix #660034
9724
9725 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9726
9727         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9728         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9729         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9730         * as/mcs51/lkmem (summary): better fix for sp problem
9731         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9732         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9733         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9734                                               remove --stack-after-data
9735
9736 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9737
9738         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9739         * src/SDCCutil.c (join): ugly bug: missing '\0'
9740         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9741
9742 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9743
9744         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9745         * src/port.h: typo
9746         * src/pic/main.c (_asmCmd): gpasm supports -o
9747         * src/z80/main.c: more general macros
9748         * device/lib/Makefile.in: remove intermediate files
9749
9750 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9751
9752         * .version: Bumped version number to 2.3.3
9753         * src/SDCCBBlock.c: new option -o
9754         * src/SDCCglobl.h: new option -o
9755         * src/SDCCglue.c: new option -o
9756         * src/SDCCmain.c: new option -o
9757         * src/asm.c: new option -o
9758         * src/ds390/main.c: new option -o
9759         * src/pic/glue.c: new option -o
9760         * src/pic/pcode.c: new option -o
9761         * src/pic/ralloc.c: new option -o
9762         * src/pic16/glue.c: new option -o
9763         * src/pic16/pcode.c: new option -o
9764         * src/pic16/ralloc.c: new option -o
9765         * src/z80/main.c: new option -o
9766         * device/lib/Makefile.in: use -o
9767         * support/regression/ports/ds390/spec.mk: use -o
9768         * support/regression/ports/gbz80/spec.mk: use -o
9769         * support/regression/ports/mcs51/spec.mk: use -o
9770         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9771         * support/regression/ports/z80/spec.mk: use -o
9772         * support/regression/ports/ucz80/spec.mk: use -o
9773         * support/regression/ports/xa51/spec.mk: use -o
9774         * support/regression/fwk/lib/timeout.c: fix usage string
9775
9776 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9777         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9778
9779 2003-01-07    <johan AT balder>
9780
9781         * src/SDCCast.c (decorateType): fixed bug #600035
9782
9783 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9784         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9785         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9786         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9787         * src/pic/pcode.c: outcommented unused variable to remove warnings
9788         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9789
9790 2003-01-06    <karl AT turbobit.com>
9791         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9792    regression tests.
9793
9794 2003-01-06    <johan AT balder>
9795
9796         * src/SDCCicode.c: fixed array add
9797
9798 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9799         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9800         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9801
9802 2003-01-04    <johan AT balder>
9803
9804         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9805
9806 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9807         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9808
9809 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9810         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9811         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9812
9813 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9814         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9815
9816 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9817         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9818
9819 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9820         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9821
9822 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9823
9824     * in \sdcc\as\mcs51\ changed these files in order to create an
9825     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9826     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9827     following files to include the previous two files: aslink.dsp,
9828     Makefile.aslink, Makefile.bcc, and Makefile.in.
9829
9830     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9831     .adb instead of .cdb
9832
9833 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9834
9835         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9836         value from option --iram-size.
9837
9838 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9839
9840         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9841         dram[] array.
9842
9843 2002-09-18    <wiml AT hhhh.org>
9844
9845         * SDCClrange.h: exposed setFromRange() and setToRange()
9846         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9847           packRegsForAccUse() (bug 542397)
9848         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9849           multiple times and emitting the fetch operations more than once
9850           added aopGetUsesAcc() function to allow binary operators to
9851           fetch their operands in the correct order; made genMinus() emit
9852           compact code for X = LITERAL - Y
9853
9854 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9855         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9856         sprintf() in line 1267.
9857
9858 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9859         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9860         like ports.
9861
9862 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9863         Changes to aslink (All the changes are marked with 'JCF'):
9864
9865         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9866         summary().
9867
9868         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9869         area BSEG.  Also moves, if possible, the DATA area down into the internal
9870         ram so more space is available.
9871
9872         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9873         sflag.
9874
9875         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9876         not bytes.  Function summary() which creates a memory usage summary
9877         file with extension .mem.  Reports of overlaping stack and small stack
9878         size.  If the space for the stack is less than 16 bytes aslink trows a
9879         warning.
9880
9881         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9882         the 8051.  Option 'y' for memory summary output file.
9883
9884         Changes to sdcc (All the changes are marked with 'JCF'):
9885
9886         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9887
9888         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9889         overlaying area for it (uses RegBankUsed[4]).
9890
9891         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9892         bank zero as used by default.  By default aslink locates the stack
9893         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9894         the creation of the .mem file.  Delegates the allocation of data area
9895         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9896         the begining of the stack area to aslink.
9897
9898         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9899         glue() in SDCCglue.c creates an area for it.
9900
9901 2002-09-03  Borut Razem <borut.razem AT siol.net>
9902         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9903         sdcc/src/pic/glue.c:
9904         introduced atexit() handler for teporay files removal in case of
9905         errors, assertions, ...
9906
9907 2002-08-29  Borut Razem <borut.razem AT siol.net>
9908         * sdcc/support/cpp2/auto-host_vc_in.h:
9909         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9910         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9911         Maybe there is a similar problem with BORLANDC? It should be checked!
9912
9913         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9914         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9915         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9916         was not executed, and the compiler (cl) launched a warning:
9917         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9918
9919 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9920         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9921
9922 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9923         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9924
9925         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9926           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9927           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9928           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9929           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9930           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9931           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9932         - added Release configuration in VS projects
9933         - review of compiler an linker options
9934         - VC .exe files are generated in bin_vc directory, not to interfere
9935           with binaries generated from other projects (cygwin, mingw, bcc ...)
9936
9937         * sdcc/src/yacc.dsp: added
9938
9939         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9940         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9941         and insert the version number definitions from .version
9942
9943         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9944
9945         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9946         added - genarate auto-host.h using auto-host_vc_in.h as template
9947
9948         * sdcc/sdcc_vc.h,
9949         removed from CVS, generated automatically
9950
9951 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9952         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9953
9954 2002-08-11  Borut Razem <borut.razem AT siol.net>
9955         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9956
9957 2002-08-10  Borut Razem <borut.razem AT siol.net>
9958         * src/SDCCmain.c (main):
9959         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9960         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9961         The consequence was that some temporary files were not removed.
9962
9963         * src/SDCCglue.c:
9964         unification of code in functions tempfilename() and tempfile():
9965         function tempnam() is defined in Visual Studio 6.0 and .NET
9966
9967         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9968
9969         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9970           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9971         - removed compiler command line option /WX: Treats all warnings as errors
9972         - update a list of source files, included into the project
9973
9974         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9975           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9976         changed project type to Generic Project so that can be correcly converted to VS.NET project
9977
9978         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9979
9980         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9981
9982         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9983
9984         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9985         added return 0 statements after assert() to make compiler happy
9986
9987         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9988         added newline in the def file to keep MSC compiler satisfied
9989
9990         * sdcc/src/z80/gen.c:
9991         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9992           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9993         - solved MSC error in function aopDump()
9994
9995         * sdcc_vc.h: define PREFIX as "\\sdcc"
9996
9997 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9998         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9999
10000 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10001         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10002         - Rewrote the register banking algorithm.
10003         - Added pCode live-range analysis to registers (for now, only non-used and
10004         singly-used registers optimized away)
10005
10006         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10007
10008         * 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.
10009
10010 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10011         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10012
10013 2002-04-22  Michael Hope  <michaelh AT vroom>
10014
10015         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10016
10017         * configure.in (DD_COPT): Added include support required for gbdk.
10018
10019         * .version: Bumped version number just to increase it.
10020
10021         * src/SDCCmain.c: Added -nostdinc to the default options.
10022
10023 2002-04-15  Michael Hope  <michaelh AT vroom>
10024
10025         * device/lib/z80/printf.c (sprintf): Added.
10026
10027         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10028
10029         * src/z80/peeph.def: Added transpose redundent load rule.
10030
10031         * src/z80/main.c: Added force callee saves for jaune.
10032
10033         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10034
10035         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10036
10037 2002-03-28  Johan Knol  <johan AT balder>
10038
10039         * src/SDCCval.c: fixed bug #532436
10040
10041 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10042         * /src/port.h:
10043         Added "char *Processor" field to the port structure.
10044
10045         * /src/SDCCmain.c:
10046         Added -p option. Allows port dependent processor to be specified.
10047
10048         * all ports:
10049         Initialized the new field char *Processor field to NULL in all ports
10050
10051         * /src/pic/*:
10052         Compiler generated registers for interrupt context saving
10053         were not getting allocated.
10054
10055 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10056
10057         * /src/SDCCast.c:
10058         Fixed left shift. Will promote the left side of a left shift
10059         if a) left shifting more than size of operand or b) when assigned
10060         to something size > size of left side
10061
10062 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10063         * src/pic/*
10064         tons of changes. Register allocation has been
10065         rewritten. Added customization for the various PICs. Flow
10066         analysis is restructured. ...
10067
10068         * src/pic/device.h:
10069         Added
10070
10071         * src/pic/device.c:
10072         Added. device.c is a PIC port hack to accomodate variations
10073         in PIC devices.
10074
10075 2002-03-13  Michael Hope  <michaelh AT vroom>
10076
10077         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10078
10079 2002-03-04  johanknol  <johanknol AT manik>
10080
10081         * /src/SDCCval.c: fixed
10082
10083         const unsigned char arr[][2] = { { 0, 1 } };
10084         t18.c:1: error: Initializer element is not constant
10085
10086 2002-03-04  bela  <bela AT manik>
10087
10088         * /device/include/mcs51reg.h:
10089         ds89c420 register definition update
10090
10091 2002-03-03    <johan AT FRIJA>
10092
10093         * support/Util/SDCCerr.c: did something, but don't no why anymore
10094
10095         * support/regression/tests/bug-524691.c: made it a little less shy
10096
10097         * src/SDCCast.c (decorateType): fixed bug #524697
10098
10099         * src/SDCCast.c: made some lineno improvements
10100
10101         * src/SDCCval.c (getNelements): changed warning to error
10102
10103         * src/SDCCglue.c (printIvalArray): changed warning to error
10104
10105         * src/SDCCicode.c: fixed a warning for mingw
10106
10107         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10108
10109         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10110
10111 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10112
10113         * src/ds390/peeph.def:
10114         Added some more peephole rules
10115
10116         * src/ds390/gen.c: Various fixes & enhancements
10117
10118         * src/SDCClrange.c, src/SDCClrange.h:
10119         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10120
10121         * src/ds390/ralloc.c:
10122         various fixes & enhancements (ds390) specific
10123
10124         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10125         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10126         from rallocs.
10127
10128         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10129
10130 2002-03-02    <johan AT FRIJA>
10131
10132         * src/SDCCast.c (decorateType): fixed bug #524708
10133
10134         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10135
10136         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10137
10138 2002-03-01  Michael Hope  <michaelh AT vroom>
10139
10140         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10141
10142         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10143
10144 2002-03-01    <johan AT FRIJA>
10145
10146         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10147
10148         * src/SDCCast.c (decorateType): fixed bug #524209
10149
10150         * src/SDCCval.c (valNot): fixed bug #524195
10151
10152 2002-02-26    <johan AT balder>
10153
10154         * src/xa51/gen.c: fixed a warning
10155
10156         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10157
10158         * src/SDCCast.c (decorateType): fixed bug #522534
10159
10160 2002-02-23    <johan AT balder>
10161
10162         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10163
10164 2002-02-22    <johan AT balder>
10165
10166         * src/SDCCast.c: fixed bug #514865
10167
10168         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10169
10170 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10171
10172         * sdcc/src/SDCCloop.c:
10173         Previous fix was not good. basic blocks that have "break" or "return" are
10174         not really partof a loop , but live ranges used in these blocks should
10175         be live thru the entire loop, so set partOfLoop but don't add them to
10176         loop region
10177
10178 2002-02-21    <johan AT FRIJA>
10179
10180         * src/SDCCcse.c: fixed bug #514308
10181
10182 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10183
10184         * src/SDCCloop.c:
10185         Fixed BUG #519583. If a conditional block ended in a return/break
10186         statement inside a loop, it was not being considered part of the loop.
10187
10188         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10189
10190 2002-02-10  Karl Bongers <karl AT turbobit.com>
10191
10192         * debugger/*:
10193         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10194         with lots of comments and notes.
10195
10196         * device/examples/test2.c:
10197         Fix bug, "red" variable not being initialized(compiler complained).
10198
10199         * device/examples/Makefile, examples/test3.c:
10200         Add Makefile in device/examples folder, compiles test3.c
10201         for use as a multiple module SDCDB test case.
10202
10203         * sim/ucsim/cmd.src/cmdset.cc:
10204         Took out debug printfs in ucsim "next" command.
10205
10206         * sim/ucsim/xa.src:
10207         Karl and Johan start ucsim XA support.  Most dissassembly working,
10208         about 75% emulation done(plenty of work remaining).
10209
10210         * sim/ucsim/z80.src:
10211         Add Z80 support to ucsim, add test-ucz80 regression test,
10212         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10213         Notice z80 compiler fails on examples/test3.c/crc code.
10214
10215 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10216
10217         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10218         Added support for --parms-in-bank1
10219
10220         * src/ds390/peeph.def:
10221         added a few more peephole optimzations
10222
10223         * src/ds390/main.c:
10224         1) added __builtin_inp & __builtin_outp used to read in data of given length
10225            from a memory mapped port
10226         2) added __builtin_memcmp
10227         3) added __builtin_swapw swap bytes of a short
10228
10229         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10230         1) handle multiple send & receives from register bank1
10231         2) ralloc can now allocate DPTR1 to some liveRanges
10232
10233         * src/SDCCsymt.c, src/SDCCsymt.h:
10234         changes to handle multiple sends & receives
10235
10236         * src/SDCCptropt.h:
10237         added some pointer arithmetic optimization
10238
10239         * src/SDCCptropt.c:
10240         added some pointer arithmetic optimizations but not stable yet so not
10241         called from anywhere (will get this working shortly)
10242
10243         * src/SDCCopt.c: fixed for multiple sends & receives
10244
10245         * src/SDCCmain.c:
10246         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10247         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10248            set preprocessor defines (depending on options)
10249
10250         * src/SDCCicode.c, src/SDCCicode.h:
10251         changes made to handle multiple sends & receives
10252
10253         * src/SDCCglobl.h:
10254         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10255
10256         * src/SDCCcse.c, src/SDCCcse.h:
10257         added function findbackward def (to be used in upcoming optimization)
10258
10259         * src/SDCCcflow.c, src/SDCCcflow.h:
10260         added function returnAtEnd - to determine if a basic block terminates with
10261         a RETURN iCode
10262
10263         * src/SDCCast.c, src/SDCCast.h:
10264         added option parms-in-bank1
10265
10266         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10267         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10268         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10269         adjusted for --parms-in-bank1 option
10270
10271         * device/include/string.h:
10272         donot redefine "reentrant" keyword
10273
10274         * device/include/ds80c390.h: Added some more SFRs
10275
10276 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10277
10278         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10279
10280 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10281
10282         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10283
10284 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10285
10286         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10287
10288 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10289
10290         * Added --xram-movc option
10291
10292 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10293
10294         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10295
10296 2002-01-11  Johan Knol
10297
10298         * Added math lib of Jesus Calvino-Fraga
10299
10300 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10301
10302         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10303         * support/regression/Makefile: new target test-mcs51-stack-auto
10304         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10305
10306 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10307
10308         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10309
10310 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10311
10312         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10313
10314 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10315
10316         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10317
10318         * src/SDCCglue.h: add definition for printIvalChar()
10319
10320 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10321
10322         * src/SDCCast.c: fix #498138 by Johan
10323
10324         * src/SDCCglue.c: fix #498138 by Johan
10325
10326 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10327
10328         * support/regression/Makefile: fix clean
10329
10330         * support/regression/ports/ds390/support.c: fix transmission of last character
10331
10332 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10333
10334         * /sdcc/src/ds390/gen.c:
10335         a) improved computing address of stack variable
10336         b) took out some #if 0 code
10337         c) improved parmBytes adjustment
10338         d) improved genPlusIncr & genMinusIncr
10339         e) genCmp could generate bad code (when left assigned to DPTR)
10340         f) Fixed bug in hasInc
10341
10342         * /sdcc/src/ds390/ralloc.c:
10343         a) packRegsForSupport could mess up live information (Fixed)
10344         b) packRegsDPTRuse could be incorrect for left & right shift
10345
10346         * /sdcc/src/mcs51/ralloc.c:
10347         packRegsForSupport could mess up the live information (Fixed)
10348
10349         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10350
10351         * /sdcc/src/SDCCast.c:
10352         can reverse a loop even if function call is present as long
10353         as the loop control variable is local & is not passed as parameter
10354
10355 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10356
10357         * /sdcc/ChangeLog: *** empty log message ***
10358
10359         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10360         More builtin function additions for TININative
10361
10362         * /sdcc/src/ds390/ralloc.c:
10363         Had broken the regression testsuite
10364
10365         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10366
10367         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10368         Added funcattr hasStackParms will be set for reentrant functions when there
10369         are paramteres on the stack, this helps in minimizing frame pointer generation
10370         typeFromStr can handle function pointers now
10371
10372         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10373         *** empty log message ***
10374
10375 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10376
10377         * /src/ds390/gen.c, /src/ds390/main.c:
10378         More builtin function additions for TININative
10379
10380         * /src/ds390/ralloc.c:
10381         Had broken the regression testsuite
10382
10383         * /src/SDCCast.c: Fixed a bug in dumptree
10384
10385         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10386         Added funcattr hasStackParms will be set for reentrant functions when there
10387         are paramteres on the stack, this helps in minimizing frame pointer generation
10388         typeFromStr can handle function pointers now
10389
10390         * /doc/builtins.txt, /doc/TININative.txt:
10391         *** empty log message ***
10392
10393
10394 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10395
10396         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10397         ALPHA version for -mTININative
10398
10399         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10400         updated to reflect changes in the port structure
10401
10402         * /src/port.h:
10403         added function do_assemble (similar to do_link) if non-null this function
10404         will be called to do assembly (-mTININative) requires a multi command
10405         assembly
10406         added function genAssemblerEnd will be called to generate assembler Epilogue
10407
10408         * /src/SDCCsymt.c:
10409         added _JavaNative to debug info printing
10410
10411         * /src/SDCCmain.c: added option --tini-libid
10412         added port->do_assemble function (-mTININative) has a multi command assemble
10413
10414         * /src/SDCCglue.c: Disabled "constExpr" check
10415         added port->genAssemblerEnd function
10416
10417         * /src/SDCCglobl.h: Added option --tini-libid value
10418
10419         * /src/SDCCast.h:
10420         tookout optimizeCompare from the header (has no external references)
10421
10422         * /src/SDCCast.c: made one more function "static"
10423
10424 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10425
10426         * src/z80/mappings.i: Added z80asm support.
10427
10428         * src/z80/main.c: Added z80asm support on --asm=z80asm
10429
10430         * src/z80/gen.c: Fixed asm portability issues.
10431
10432         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10433
10434         * src/SDCCglue.c (printExterns): Added global/extern split.
10435
10436 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10437
10438         * support/regression/Makefile: added test for mcs51 model large
10439
10440         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10441
10442         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10443
10444 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10445
10446         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10447
10448 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10449
10450         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10451
10452         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10453
10454 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10455
10456         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10457
10458         * support/regression/tests/simplefloat.c: Port to mcs51.
10459
10460 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10461         * support/regression/tests/bug-485362.c: Added.
10462
10463         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10464
10465         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10466
10467         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10468
10469         * src/z80/gen.c (aopDump): Added a dump function.
10470
10471 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10472         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10473
10474         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10475
10476         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10477
10478         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10479
10480         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10481
10482         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10483
10484         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10485
10486         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10487
10488         * support/regression/ports/ds390/support.c: Use tinibios.
10489
10490         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10491
10492 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10493
10494         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10495         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10496
10497         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10498
10499         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10500
10501 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10502
10503         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10504
10505         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10506         (packRegsForIYUse): Created and optimised.
10507
10508 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10509
10510         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10511 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10512
10513         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10514
10515         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10516
10517         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10518
10519 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10520
10521         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10522
10523         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10524
10525 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10526
10527         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10528
10529         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10530
10531         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10532
10533 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10534
10535         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10536         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10537         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10538
10539         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10540
10541         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10542         (genNotFloat): Added.
10543         (genUminusFloat): Added.
10544
10545         * device/lib/z80/Makefile: Added floating pt stubs.
10546
10547         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10548
10549         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10550
10551         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10552
10553 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10554
10555         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10556
10557         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10558
10559         * sdcc/support/regression/Makefile: Add port ds390.
10560
10561         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10562
10563         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10564
10565         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10566
10567         * sdcc/support/regression/ports/ds390/support.c: Added.
10568
10569         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10570
10571         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10572
10573         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10574
10575 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10576
10577         * device/include/malloc.h: Added z80 and gbz80 support.
10578
10579         * device/lib/gbz80/heap.s: Added.
10580
10581         * device/lib/z80/heap.s: Added.
10582
10583         * device/lib/malloc.c: Added z80 and gbz80 support.
10584
10585         * support/regression/tests/malloc.c (testMalloc): Added.
10586
10587         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10588
10589         * support/regression/tests/bug-478094.c: Added.
10590
10591         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10592
10593 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10594
10595         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10596
10597         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10598
10599         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10600
10601         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10602
10603         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10604
10605 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10606
10607         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10608
10609 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10610
10611         * support/regression/tests/bug-477927.c: Added.
10612
10613         * src/z80/peeph.def: Added minor rules.
10614
10615         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10616
10617         * src/z80/peeph.def: Added jump optimisation modification.
10618
10619 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10620
10621         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10622
10623 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10624
10625         * support/regression/tests/funptrs.c: Added.
10626
10627 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10628
10629         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10630
10631 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10632
10633         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10634
10635         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10636
10637         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10638         (movLeft2ResultLong): Created.
10639
10640         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10641         (joinPushes): Added.  Joins two char pushes into a word push.
10642
10643 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10644
10645         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10646
10647         * support/makebin/Makefile (install): Added creation of dest dir.
10648
10649 2001-10-24 Karl Bongers <karl AT turbobit.com>
10650
10651         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10652
10653 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10654
10655         * src/z80/ralloc.c: Turned off faulty pack for one use.
10656
10657         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10658
10659         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10660
10661 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10662
10663         * support/regression/Makefile: Improved clean
10664
10665         * support/regression/ports/gbz80/spec.mk: Added clean
10666
10667         * support/regression/ports/host/spec.mk: Added clean
10668
10669         * support/regression/ports/z80/spec.mk: Added clean
10670
10671         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10672
10673         * support/regression/ports/mcs51/timeout.c: little improvements
10674
10675 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10676
10677         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10678
10679         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10680
10681         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10682
10683 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10684
10685         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10686
10687         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10688
10689 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10690         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10691
10692         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10693
10694         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10695
10696         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10697
10698         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10699
10700         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10701
10702         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10703
10704         * support/regression/tests/longor.c: Added.
10705
10706 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10707
10708         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10709
10710         * as/mcs51/aslink.h: define PATH_MAX
10711
10712         * as/mcs51/asm.h: define PATH_MAX
10713
10714         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10715
10716         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10717
10718         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10719
10720         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10721
10722         * src/SDCCglobl.h: define PATH_MAX
10723
10724         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10725
10726         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10727
10728 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10729
10730         * src/z80/gen.c (gencjneshort): Fixed
10731
10732         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10733
10734 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10735
10736         * support/regression/tests/bug-469671.c: Added.
10737
10738         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10739
10740 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10741
10742         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10743
10744         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10745
10746 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10747
10748         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10749
10750         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10751
10752         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10753
10754         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10755
10756         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10757
10758         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10759
10760         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10761
10762 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10763
10764         * 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.
10765
10766         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10767
10768         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10769
10770 2001-10-07    <johan AT FRIJA>
10771
10772         * device/lib/gets.c (gets): fixed the return value.
10773
10774 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10775         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10776
10777         * 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.
10778
10779         * 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.
10780
10781         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10782
10783         * src/pic/gen.c: Removed Safe_strdup.
10784
10785         * configure.in: Added option to enable libgc support.
10786
10787         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10788         (bitVectUnion): Optimised.
10789         (bitVectIntersect): Optimised.
10790         (bitVectBitsInCommon): Optimised.
10791         (bitVectCplAnd): Optimised.
10792
10793         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10794
10795 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10796
10797         * src/SDCCmain.c: distinguish between assembler debug and plain options
10798
10799         * src/avr/main.c:   remove standard assembler options
10800
10801         * src/ds390/main.c: remove standard assembler options
10802
10803         * src/mcs51/main.c: remove standard assembler options
10804
10805         * src/port.h: removed "PENDING" comment
10806
10807 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10808
10809         * src/device/lib/_mulint.c  : new, with assember functions
10810
10811         * src/device/lib/_mullong.c : new, with assember functions
10812
10813         * src/device/lib/_divuint.c : with assember functions
10814
10815         * src/device/lib/_divsint.c : with assember functions
10816
10817         * src/device/lib/_divulong.c: with assember functions
10818
10819         * src/device/lib/_divslong.c: with assember functions
10820
10821         * src/device/lib/_moduint.c : with assember functions
10822
10823         * src/device/lib/_modsint.c : with assember functions
10824
10825         * src/device/lib/_modulong.c: with assember functions
10826
10827         * src/device/lib/_modslong.c: with assember functions
10828
10829         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10830
10831         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10832
10833         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10834                                       replaced _mululong.c and _mulslong.c by _mullong.c
10835
10836 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10837
10838         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10839
10840 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10841
10842         * src/SDCCglue.c: test, if win32api is available for MINGW
10843
10844 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10845
10846         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10847         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10848         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10849         * support/regression/ports/host/spec.mk: removed GENERIC
10850         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10851         * support/regression/ports/z80/spec.mk: removed GENERIC
10852
10853 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10854
10855         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10856
10857         * support/regression/tests/bug-467035.c: Created.
10858
10859 2001-10-01    <johan AT FRIJA>
10860
10861         * src/SDCC.y: fixed bug #466586 part 1
10862
10863 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10864
10865         * SDCCicode.c: z80 has no generic pointers
10866         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10867
10868 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10869
10870         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10871
10872 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10873
10874         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10875
10876         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10877
10878 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10879
10880         * configure.in: Fixed up so that ucsim is only configured once.
10881
10882         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10883
10884         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10885         (getPathDifference): As above.
10886
10887         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10888
10889         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10890
10891 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10892         * .version: Updated to 2.3.1
10893
10894         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10895         Added copyright header.
10896
10897         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10898         (assemble): Added support for macro based assembler commands.
10899         (linkEdit): Added support for macro based linker commands.
10900         (preProcess): Changed the pre-processor to use macros.
10901         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10902         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10903
10904         * device/lib/z80/crt0.s: Added module name for debugging.
10905
10906 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10907
10908         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10909
10910         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10911
10912         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10913
10914         * src/Makefile.in: Added SDCCmacro and SDCCutil
10915
10916 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10917
10918         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10919
10920 2001-09-16    <johan AT FRIJA>
10921
10922         * 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.
10923
10924 2001-09-15    <johan AT FRIJA>
10925
10926         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10927         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10928
10929 2001-09-11    <johan AT FRIJA>
10930
10931         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10932
10933 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10934
10935         * support/regression/tests/bug-460444.c: Added test case.
10936
10937         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10938         (genCast): Added justification for all of the asserts.
10939
10940 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10941
10942         * support/regression/support.c: _xdata replaced by xdata
10943
10944         * support/regression/spec.mk: removed _generic
10945
10946 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10947
10948         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10949
10950         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10951         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10952
10953         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10954
10955         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10956
10957         * support/regression/tests/bug-460010.c: Added test case.
10958
10959         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10960
10961 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10962
10963         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10964
10965         * support/regression/testfwk.c: removed workaround for bug #436344
10966
10967         * support/regression/tests/bp.c: use less memory with mcs51
10968
10969         * support/regression/tests/bug-441448.c: use less memory
10970
10971         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10972
10973         * support/regression/collate-results.py: typo
10974
10975 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10976
10977         * support/regression/tests/fetchoverlap.c: Added new test case.
10978
10979         * support/regression/tests/bp.c: Added new test case.
10980
10981         * support/regression/tests/bug-448984.c: Added new test case.
10982
10983         * support/regression/tests/pow2shifts.c: Added new test case.
10984
10985         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10986         (genlshTwo): Fixed right shift for count > 8.
10987
10988         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10989
10990 2001-09-08    <johan AT FRIJA>
10991
10992         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10993
10994 2001-09-07    <johan AT FRIJA>
10995
10996         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10997
10998         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10999
11000 2001-09-06    <johan AT FRIJA>
11001
11002         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11003         * bernhard noted me at this: "() equals to (void)" (1.38)
11004
11005 2001-09-05    <johan AT FRIJA>
11006
11007         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11008
11009 2001-09-04    <johan AT FRIJA>
11010
11011         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11012
11013
11014 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11015
11016         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11017
11018 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11019
11020         * link/z80/aslink.h: Fixed path for PATH_MAX
11021
11022 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11023
11024         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11025
11026         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11027
11028         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11029
11030         * 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.
11031
11032 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11033
11034         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11035         (genCmp): Fixed up genCmp for the GB with longs.
11036
11037         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11038
11039         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11040
11041         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11042
11043         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11044
11045 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11046
11047         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11048
11049 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11050
11051         * 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.
11052
11053         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11054
11055 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11056
11057         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11058
11059         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11060
11061 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11062
11063   * sim/ucsim/configure:    little improvement of Cygwin-detection
11064   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11065   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11066   * support/regression/tests/bug-221100.c: small changes for mcs51
11067   * support/regression/tests/bug-221168.c: small changes for mcs51
11068   * support/regression/tests/bug-227710.c: small changes for mcs51
11069   * support/regression/tests/staticinit.c: small changes for mcs51
11070   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11071   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11072   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11073
11074 $Revision$
11075