2ff56581258c99173f2f6c971364f8a9616945ff
[fw/sdcc] / ChangeLog
1 2005-07-22 Raphael Neider <rneider AT web.de>
2
3         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
4           have PIC14 handled like PIC16, fixes broken pic14 linker calls
5         * src/pic/gen.c (resolveIfx): do not "invent" labels
6         * (genSkipc): changed to positive logic
7         * (genSkipCond): removed as no longer needed
8         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
9           backport from PIC16
10         * (genLeftShift): check operands are in different registers
11         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
12           INCF does not update CARRY...
13         * src/pic/main.c: fixed _linkCmd
14         * src/pic/pcode.c (unlinkpCode): added inactive code
15         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
16           alive (do not assign result and operand overlapping registers)
17
18 2005-07-22 Raphael Neider <rneider AT web.de>
19
20         * src/pic/device.c (dump_sfr): replaced register declaration with
21           call to emitSymbolToFile() to avoid duplicate symbols
22         * (assignRelocatableRegisters): do not declare external symbols
23         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
24           right (take size of type, not etype)
25         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
26         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
27         * (packRegsForAccUse): disabled assignment of WREG as
28           the result reg to prevent occurence of just fixed #1235003,
29           fixes #1242954
30         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
31           symbols (avoids duplicate symbols in .asm file)
32         * (pic14emitRegularMap): use emitSymbolToFile()
33         * src/pic/gen.c (aopOp): fixed spillLocation handling
34         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
35         * (genDataPointerSet): removed unneccessary variables/output
36
37 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
38         * as/mcs51/lkarea.c: enlarged codemap for banked memory
39         * device/lib/mcs51/crtbank.asm: added # to 0x0F
40
41 2005-07-21 Raphael Neider <rneider AT web.de>
42
43         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
44           architecture cannot handle them efficiently, fixes bug #1235003
45         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
46           check for empty sets before using them (fixes bug #1232190)
47
48 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
49
50         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
51           (lnksect2): generate warnings for memory overlap
52         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
53           constseg to set the name of these segments so you can instruct the linker
54           to place them in banks
55         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
56         * src/SDCCglobl.h: added MODEL_HUGE to enum,
57           added code_seg and const_seg to options
58         * src/SDCCglue.c (emitMaps): use options.const_seg,
59           (createInterruptVect): put interrupt vectors in segment HOME,
60           (glue): put HOME before static segment and put the main glue in HOME,
61           (glue): use options.code_seg
62         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
63         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
64           these segments so you can instruct the linker to place them in banks
65           (linkEdit): use code_loc for HOME segment which should be the first
66           segment in code memory now
67         * src/SDCCmem.c: fixed more stuff like bug 1238386
68         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
69           (changePointer): don't change function pointers to code pointers for
70           banked functions,
71           (compareType): added exceptional check for banked function pointers
72         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
73         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
74           after static in code memory
75         * src/mcs51/gen.c: added aopLiteralLong prototype,
76           (aopForSym): use getSize for functions,
77           (genCall): generate banked calls over one trampoline __sdcc_banked_call
78           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
79           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
80           the segment,
81           (genPcall): use call for literal function pointers and generate banked
82           calls over the one trampoline so there's only one place for the user to
83           modify according to his/hers hardware,
84           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
85           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
86         * src/mcs51/main.c: added keyword banked,
87           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
88         * support/Util/SDCCerr.c,
89         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
90           needed for passing the bank and address to the trampoline
91         * device/lib/mcs51/crtbank.asm: added for bankswitching
92         * device/lib/mcs51/Makefile: added crtbank
93
94 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
95
96         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
97           for fields at offset 0 of a struct or union as reported
98           on 2005-07-07 in the developer mailing list.
99
100 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
101
102         * src/SDCCmem.c: fixed bug 1238386
103
104 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
105
106         * src/mcs51/peeph.def: added labelrefcounting for peepholes
107           (patch #1144962), added peephole 300, enabled 259.x
108         * doc/sdccman.lyx: removed screenshot and provided link instead
109
110 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
111
112         * doc/sdccman.lyx: added section about debugging with ddd
113         * doc/figures/ddd_example.eps: screenshot of debugging session
114
115 2005-07-04 Raphael Neider <rneider AT web.de>
116
117         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
118           like CODE pointers, fixes #1115683
119         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
120           call, fixes bugs #1232211, #1228110,
121           fixed wrong casts to pCodeFlow from pCodeInstructions
122
123 2005-07-04 Raphael Neider <rneider AT web.de>
124
125         * src/pic/gen.c (popGet): changed assert to allow for
126           bit operands
127         * (popGetAddr): changed signature to provide
128           an additional index, patched all call sites
129         * (genCmpEq): handle literal-like operands correctly
130         * (genAddrOf): added sanity checks on __code/__data pointers
131         * (genAssign): added handling of symbols from __code section
132         * (gencjne): do not generate code for comparisons whose result
133           is neither stored nor used, fixes bug #1171114
134         * (AccLsh, AccRsh): operate on operand instead of WREG
135         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
136           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
137           by known count
138         * rewrote complete shift-by-literal logic, commented unused
139           functions out
140         * (genConstPointerGet): get multiple bytes (if result size > 1),
141           fixed handling of non-immediate addresses
142         * (genPointerGet): handle CODE pointers like CONST pointers
143         * (genpic14Code): insert C-SRC lines as Cource-pCodes
144         * ({aop,op}_isLitLike): NEW, single place to decide whether an
145           operand is to be treated as a literal or not
146         * (mov2w,genPcall,genCmpEq),
147           src/pic/genarith.c: use aop_isLitLike() to decide between
148           literal/register contents
149         * (addSign): added missing offset
150         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
151           only emit comment in debug-mode,
152           use {aop,op}_isLitLike throughout the file
153         * src/pic/glue.c: fix initializers for pointers (work in progress)
154         * src/pic/pcode.c (get_op): honor index on _const symbols
155         * ({reset,dump}pCodeStatistics): NEW, estimate code size
156         * (dumppBlock): added pCode size estimation
157         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
158           check for IS_SYMOP before OP_SYMBOL'ing
159         * fixed indentation, compacted switch-statements
160         * (allocReg): find free register and allocate it instead of
161           allocating new registers all the time
162         * (deassignLRs): prevent POINTER_GET's from being assigned the same
163           registers as its operands (necessary only for multibyte GETs)
164
165 2005-07-01 Raphael Neider <rneider AT web.de>
166
167         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
168           debugging .asm-output macros FENTRY + FEXIT
169         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
170           way... I wonder...
171         * (emitpComment): NEW, printf to pCode
172         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
173           offset handling
174         * (popGetAddr): NEW, variant of popGet to access an immediates
175           high(er) bytes instead of the n'th byte of memory they reference,
176           replaced popGet with popGetAddr where neccessary
177         * (genDataPointerGet): reactivated and fixed implementation
178         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
179           accesses
180         * (genDataPointerSet): fixed multibyte assignments
181         * (genpic14Code): fixed --i-code-in-asm handling
182         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
183         * (genPlus): fixed index-out-of-bounds error
184         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
185         * src/pic/ralloc.c: added debugging output macro FENTRY2
186         * (spillThis): fixed indentation, enbraced for-body for clarity
187         * (rematStr): commented out as now unused
188         * (regTypeNum): commented out special spill case (overwrites
189           arbitrary values)
190         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
191
192 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
193
194         * doc/sdccman.lyx: documented sfr16/sfr32,
195           added example for using storage class with function pointers
196         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
197
198 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
199
200         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
201         * device/lib/_itoa.c,
202         * device/lib/_ltoa.c: optimized codesize
203         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
204           but don't know how to suppress the double warning.
205         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
206         * support/Util/SDCCerr.c,
207         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
208
209 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
210
211         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
212           fixed old K&R prototypes
213         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
214         * device/lib/_gptrget.c,
215         * device/lib/_gptrgetc.c,
216         * device/lib/_gptrput.c: changed versions for new memory indicator values,
217           also new versions for small generic pointers and banked generic pointers
218         * src/port.h: added const_name
219         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
220         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
221         * src/SDCCcse.c (findPrevIc): check all associative operators
222         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
223         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
224         * src/SDCCmem.c: updated comments,
225           set far-space to 0 for pdata, results in optimized code
226         * src/SDCCmem.h: added macro CONST_NAME
227         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
228           moving the info into the highest bits, see also gptrget/gptrput
229         * src/src.dsp: added sdcc.ico to project files
230         * src/avr/gen.c (genCast): fixed bug 0x%d
231         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
232         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
233           relation between ptr_type and DCL_TYPE,
234           (genCast): fixed bug 0x%d
235         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
236           (CODE)" for const_name
237         * src/hc08/gen.c (genCast): fixed bug 0x%d
238         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
239           (hc08_port): added "CONST (CODE)" for const_name
240         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
241           (aopForRemat, adjustArithmeticResult): disconnected direct relation
242           between ptr_type and DCL_TYPE,
243           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
244           operand* and took AOP() inside function so sfr-ness can be checked,
245           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
246           new prototype,
247           (genFunction, genEndFunction): optimized stack setup,
248           (genMinus): optimized for literals with ending zeroes (in bytes),
249           (genCast): fixed bug 0x%d
250         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
251           (mcs51_port): added "CONST (CODE)" for const_name
252         * src/mcs51/peeph.def: made rule 226 more generic
253         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
254         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
255         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
256         * src/z80/main.c (z80_port): added NULL for const_name,
257           (gbz80_port): added NULL for const_name
258         * support/regression/tests/bug663539.c,
259         * support/regression/tests/sfr16.c: new tests
260
261 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
262
263         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
264
265 2005-06-24 Raphael Neider <rneider AT web.de>
266
267         * device/lib/pic16/libdev/pic18f[68][567]20.c:
268           corrected typos...
269         * device/include/pic16/signal.h: added USBIF
270           and SIG_USB
271
272 2005-06-24 Raphael Neider <rneider AT web.de>
273
274         * device/lib/pic16/libdev/pic18f2455.c,
275           device/include/pic16/pic18f2455.h: NEW
276         * device/include/pic16/pic18fregs.h,
277           device/lib/pic16/pics.all,
278           src/pic16/device.c: added 18f2455
279         * device/lib/pic16/libdev/pic18f[68][567]20.c,
280           device/include/pic16/{pic18f[68][567].h,usart.h}:
281           replaced MULTIPLE_USARTS define with more relaible
282           compatibility sfrs (for USART access)
283
284 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
285
286         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
287           and the output asm file line is printed on two lines.
288
289 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
290
291         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
292           BGT, BLE, BHI, and BLS instructions
293         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
294           genCmpEq): removed
295         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
296           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
297           fixes bug #1216342
298         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
299
300 2005-06-15 Raphael Neider <rneider AT web.de>
301
302         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
303         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
304         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
305           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
306           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
307
308 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
309
310         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
311           Marcel Telka in bug #1215704
312
313 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
314
315         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
316           located in shared memory bank.
317
318 2005-05-31 Raphael Neider <rneider AT web.de>
319
320         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
321           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
322           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
323
324 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
325
326         * device/lib/_strncpy.c: fixed the fix
327
328 2005-05-26 Raphael Neider <rneider AT web.de>
329
330         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
331           initializers with \0, bug #1208187
332         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
333           intializers with \0, bug #1208187
334
335 2005-05-26 Raphael Neider <rneider AT web.de>
336
337         * src/pic16/glue.c (pic16_printIvalChar): fixed string
338           initializers with \0, bug #1208187
339         * src/pic16/main.c (_process_pragma): added sanity checks
340           for stack position and size, emit warnings when appropriate
341
342 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
343
344         * device/lib/_strncpy.c: fixed not filling with \0
345
346 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
347
348         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
349           createFunction),
350         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
351           compound_statement),
352         * src/SDCCsymt.h,
353         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
354
355 2005-05-24 Raphael Neider <rneider AT web.de>
356
357         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
358
359 2005-05-24 Raphael Neider <rneider AT web.de>
360
361         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
362           TRISE definitions, closes bug #1162453
363
364 2005-05-22 Raphael Neider <rneider AT web.de>
365
366         * src/pic16/main.c (_process_pragma): check for missing
367           arguments to pragmas code and udata
368         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
369           consistency fixes to match other headers (thanks to Jim Paris)
370         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
371
372 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
373
374         * src/SDCCicode.c (isOperandEqual): fixed missing ;
375
376 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
377
378         * support/regression/tests/bug1198642.c: new test
379         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
380         * src/SDCCcse.c (findPrevIc): added comment, please have a look
381         * support/scripts/resource.h,
382         * support/scripts/resource.rc,
383         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
384         * support/scripts/sdcc.ico: added 32x32 icon
385
386 2005-05-18 Raphael Neider <rneider AT web.de>
387
388         * device/lib/pic16/libdev/pic18f*.c,
389         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
390           keywords to "__sfr" and "__at (X)"
391         * device/include/pic16/pic18fregs.h: added pic18f4520
392         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
393           #1203088 (MPLAB compatibility)
394
395 2005-05-17 Raphael Neider <rneider AT web.de>
396
397         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
398         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
399         * device/lib/pic16/pics.all: added new devices
400         * src/pic16/device.c: added support for pic18f4520
401
402 2005-05-16 Raphael Neider <rneider AT web.de>
403         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
404         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
405         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
406           convenience function for bit access
407
408 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
409
410         * device/lib/printf_large.c: fixed bug 1193299
411         * support/regression/tests/bug1057979.c: added test %3.3s
412
413 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
414
415         * device/include/mcs51/8051.h,
416         * device/include/mcs51/8052.h: made parseable with lint
417         * device/include/mcs51/lint.h: added include file for (sp)lint
418         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
419         * doc/cdbfileformat.lyx,
420         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
421
422 2005-05-14 Raphael Neider <rneider AT web.de>
423
424         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
425         * device/lib/pic16/libc/stdlib/itoa.c (new)
426         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
427         * device/lib/pic16/libio/Makefile: exclude subdir according to
428           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
429         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
430         * src/pic16/gen.c (genFunction): prevent annoying warning
431         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
432           nameclashes on BeOS
433         * support/cpp2/cppmain.c (cpp_output_string): new
434         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
435           fixes bug 1116802
436
437 2005-05-13 Borut Razem <borut.razem AT siol.net>
438
439         * src/SDCCmain.c (linkEdit): fixed bug 1195202
440
441 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
442
443         * .version: changed to version 2.5.1; back to bleeding edge development
444
445 2005-05-11 Borut Razem <borut.razem AT siol.net>
446
447         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
448           generate PDF version 1.3 documents
449
450 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
451
452         * .version: changed to version 2.5.0
453
454 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
455
456         * doc/sdccman.lyx: updated weblinks, index and smaller updates
457
458 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
459
460         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
461         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
462         well as many smaller updates.
463         * .version: changed to version 2.5.0-pre1
464
465 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
466
467         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
468
469 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
470
471         * support/regression/tests/bug1185672.c: added
472         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
473           bug 1185672
474         * src/mcs51/gen.c (genCall): added comments, made it look safer
475         * src/mcs51/gen.c (genEndFunction): simplified
476
477 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
478
479         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
480
481 2005-04-14 Borut Razem <borut.razem AT siol.net>
482
483         * fixed bug 1045046 - SIGSEGV with really simple code?:
484           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
485           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
486
487 2005-04-14 Borut Razem <borut.razem AT siol.net>
488
489         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
490           src/pic16/device.h: temporarily disabled experimental #inline pragma
491           for 2.5.0 release
492
493 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
494
495         * device/include/z80/stdio.h,
496         * device/include/z80/string.h: removed these highly incomplete files so
497           SDCC can use the default ones in device/include/
498
499 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
500
501         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
502         gcc warning.
503         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
504         fix sdcpp warnings.
505
506 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
507
508         * device/include/malloc.h: removed redundant __reentrant prototypes
509         * device/lib/_mullong.c: added working xstack variant in asm (C version
510           doesn't pass regression tests)
511         * device/lib/bpx.c: used __data and made bpx char for mcs51
512         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
513           (createFunction): fixed bug with xstackPtr
514         * src/SDCCcse.c: corrected comments
515         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
516           (killDeadCode, eBBlockFromiCode): removed unused code
517         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
518           corrected comments
519         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
520           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
521           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
522           (genModOneByte): fixed warning in MSVC
523         * src/mcs51/main.c (): added comments
524         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
525
526 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
527
528         * src/SDCCmain.c (linkEdit): oops, changed one line too many
529
530 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
531
532         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
533
534 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
535
536         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
537         characters arrays of larger size than the declared one.
538
539 2005-04-10 Borut Razem <borut.razem AT siol.net>
540
541         * src/pic/gen.c (genInline),
542           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
543           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
544           (findNextInstruction), (findPrevInstruction),
545           (findInstructionUsingLabel),
546           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
547         * src/pic/pcode.c (findLabel): added missing '\n'
548         * src/src.dsp: added SDCCdwarf2.c to the project
549
550 2005-04-09 Borut Razem <borut.razem AT siol.net>
551
552         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
553
554 2005-04-08 Raphael Neider <rneider AT web.de>
555
556         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
557           into the chain after a given one) and mergeDefmapSymbols (combine
558           defmap entries for each symbol per pcode)
559         * (createDefmap): have defmap entries merged in the end
560         * (defmapReplaceSymRef): split defmap entries covering two accesses to
561           a symbol before replacing one access type's symbol, merge symbols in
562           the end (replacement symbol might already have an entry)
563         * (assignValnums): keep reference to written WREG intact
564
565 2005-04-08 Raphael Neider <rneider AT web.de>
566
567         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
568           Alpha)
569
570 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
571
572         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
573         bytes
574
575 2005-04-07 Raphael Neider <rneider AT web.de>
576
577         * device/include/pic16/usart.h: added compatibility defines for
578           devices with more than one USART
579         * device/include/pic16/pic18f[68][567]20.h: activated above defines
580
581 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
582
583         * device/lib/Makefile.in: updated for port specific include
584
585 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
586
587         * support/regression/ports/mcs51/spec.mk: added mcs51 include
588
589 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
590
591         * device/include/8051.h,
592         * device/include/8052.h,
593         * device/include/at89S8252.h,
594         * device/include/at89c55.h,
595         * device/include/at89x051.h,
596         * device/include/at89x51.h,
597         * device/include/at89x52.h,
598         * device/include/mcs51reg.h,
599         * device/include/reg51.h,
600         * device/include/reg764.h,
601         * device/include/regc515c.h,
602         * device/include/sab80515.h: (re)moved these 12 files
603         * device/include/mcs51/8051.h,
604         * device/include/mcs51/8052.h,
605         * device/include/mcs51/at89S8252.h,
606         * device/include/mcs51/at89c55.h,
607         * device/include/mcs51/at89x051.h,
608         * device/include/mcs51/at89x51.h,
609         * device/include/mcs51/at89x52.h,
610         * device/include/mcs51/mcs51reg.h,
611         * device/include/mcs51/reg51.h,
612         * device/include/mcs51/reg764.h,
613         * device/include/mcs51/regc515c.h,
614         * device/include/mcs51/sab80515.h: and added them here
615
616 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
617
618         * device/include/stdarg.h: changed SDCC specific keywords to double
619           underlined form.
620         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
621           mcs51 and ds390.
622         * device/include/hc08/mc68hc908gp32.h,
623         * device/include/hc08/mc68hc908jb8.h,
624         * device/include/hc08/mc68hc908jkjl.h,
625         * device/include/hc08/mc68hc908qy.h: fixed comments
626         * device/include/mcs51/README: updated
627         * device/include/mcs51/c8051f120.h: added PINRSF
628         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
629         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
630           amidst code. Also inline is not supported.
631
632 2005-04-06 Raphael Neider <rneider AT web.de>
633
634         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
635         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
636           callers stack/frame pointers
637
638 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
639
640         * device/include/pic16/usart.h: added, missing in previous commit,
641         * device/include/pic16/adc.h: fixed typo,
642         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
643         commit,
644         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
645         <p18fxxx.inc>
646         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
647         uninitialized because a bug appears with gplink
648         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
649         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
650         complains for unrecognised option
651
652 2005-04-05 Raphael Neider <rneider AT web.de>
653
654         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
655           structs as well (using memcpy)
656         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
657           on ISRs (GOTO has no label)
658         * src/pic16/device.h: added OF_OPTIMIZE_DF
659         * src/pic16/main.c: added compiler switch --optimize-df to enable the
660           new data flow analysis/optimization
661         * src/pic16/pcode.c: added (prototypes for and implementation of)
662           dataflow analysis functions, fixed pCodeInstructions' inCond and
663           outCond values, made RCALL a branch instruction
664         * (pic16_unlinkpCode): keep C line if possible
665         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
666           C line moved if possible
667         * (pic16_getRegFrompCodeOp): NEW, improved version of...
668         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
669           to use new pic16_getRegFrompCodeOp (works for more SFRs)
670         * (pic16_BuildFlow): fixed skip instructions with label (did not start
671           new flow)
672         * (pic16_getJumptabpCode): NEW, needed in...
673         * (LinkFlow): fixed handling of jumptables, calls and conditional
674           branches
675         * (pic16_InsertCommentAfter): NEW
676         * (pic16_pCodeReplace): made verbose and flow preserving
677         * (AnalyzeFlow): added call to data flow analysis
678         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
679         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
680         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
681
682 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
683
684         * src/SDCCast.c (decorateType): fixed bug #1105626
685
686 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
687
688         * device/include/asm/pic16/features.h,
689         * pic18f*.h headers,
690         * device/include/pic16/adc.h,
691         * device/include/pic16/delay.h,
692         * device/include/pic16/i2c.h,
693         * device/include/pic16/malloc.h,
694         * device/include/pic16/stdio.h,
695         * device/include/pic16/stdlib.h,
696         * device/include/pic16/string.h,
697         * device/lib/pic16/libc/stdio/printf_tiny.c,
698         * device/lib/pic16/libc/stdio/printf_small.c,
699         * device/lib/pic16/libc/stdio/strmgpsim.c,
700         * device/lib/pic16/libc/stdio/strmmssp.c,
701         * device/lib/pic16/libc/stdio/strmusart.c,
702         * device/lib/pic16/libc/stdio/vfprintf.c,
703         * device/lib/pic16/libc/stdlib/ltoa.c,
704         * device/lib/pic16/libc/stdlib/putchar.c,
705         * device/lib/pic16/libc/stdlib/x_ftoa.c,
706         * device/lib/pic16/libc/stdlib/memchrpgm.c,
707         * device/lib/pic16/libc/stdlib/memchrram.c,
708         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
709         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
710         * device/lib/pic16/libio/adc/adcbusy.c,
711         * device/lib/pic16/libio/adc/adcread.c,
712         * device/lib/pic16/libio/adc/adcsetch.c,
713         * device/lib/pic16/libio/usart/ubaud.c,
714         * device/lib/pic16/libio/usart/ubusy.c,
715         * device/lib/pic16/libio/usart/udrdy.c,
716         * device/lib/pic16/libio/usart/uopen.c,
717         * device/lib/pic16/libio/usart/uputc.c,
718         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
719         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
720         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
721         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
722         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
723         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
724         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
725         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
726         specific keywords to double underlined form,
727         * device/lib/pic16/libc/Makefile.rules,
728         * device/lib/pic16/libsdcc/Makefile.rules,
729         * device/lib/pic16/libm/Makefile,
730         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
731         to compile with C standard set in Makefile.common
732         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
733         rand.c and crc.c in compilation process,
734         * device/lib/pic16/libsdcc/int/divuint.c,
735         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
736         `c' from signed to unsigned,
737         * device/lib/pic16/startup/crt0.c,
738         * device/lib/pic16/startup/crt0i.c,
739         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
740         keywords to double underlined form, bug fixes in _do_cinit function
741         which prevented the correct initialization of the .idata segment,
742         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
743         core to enter a infinite loop
744         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
745
746 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
747
748         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
749
750 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
751
752         * device/include/Makefile.in: add support for hc08 subdirectory
753         * device/include/hc08/: new subdirectory
754         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
755         Lucas Loizaga, thanks!
756         * device/include/hc08/mc68hc908qy.h,
757         * device/include/hc08/mc68hc908gp32.h,
758         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
759         their own directory. Changed internal macro names to use the compiler
760         reserved namespace. Changed SDCC specific keywords to double
761         underlined form.
762         * device/include/math.h,
763         * device/include/malloc.h,
764         * device/include/stdarg.h,
765         * device/include/stdbool.h
766         * device/include/string.h,
767         * device/include/tinibios.h,
768         * device/include/ds400rom.h,
769         * device/include/8051.h,
770         * device/include/8052.h,
771         * device/include/80c51xa.h,
772         * device/include/at89c55.h,
773         * device/include/at89S8252.h,
774         * device/include/at89x51.h,
775         * device/include/at89x52.h,
776         * device/include/ds80c390.h,
777         * device/include/reg764.h,
778         * device/include/regc515c.h,
779         * device/include/sab80515.h,
780         * device/include/mcs51/c8051f000.h,
781         * device/include/mcs51/c8051f018.h,
782         * device/include/mcs51/c8051f020.h,
783         * device/include/mcs51/c8051f040.h,
784         * device/include/mcs51/c8051f060.h,
785         * device/include/mcs51/c8051f120.h,
786         * device/include/mcs51/c8051f300.h,
787         * device/include/mcs51/c8051f310.h,
788         * device/include/mcs51/c8051f320.h,
789         * device/include/mcs51/c8051f330.h,
790         * device/include/mcs51/c8051f350.h,
791         * device/include/z180.h: Changed SDCC specific keywords to double
792         underlined form.
793
794 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
795
796         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
797         18F4455,
798         * (pic16_assignConfigWordValue): disable testing of configuration
799         register value with config mask,
800         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
801         function with port->fun_prefix,
802         * (genFunction): when generating a naked interrupt function never
803         create an absolute segment placed in interrupt vector address, place
804         the actual interrupt function at IVA instead, when an interrupt
805         function is generated with unspecified interrupt then do not create
806         the absolute section,
807         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
808         code for generating a call to generic pointer get/put function with
809         a call to function pic16_callGenericPointer(),
810         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
811         the call to the generic pointer get/put functions with prefixing the
812         function name with port->fun_prefix,
813         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
814         * src/pic16/main.c (_process_pragma): prefix function with
815         port->fun_prefix,
816         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
817         calling assembler, old 18Fxxxx macro is deprecated,
818         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
819         PC_ASMDIR in while condition,
820         * (findInstruction): add PC_ASMDIR in while condition,
821         * (buildCallTree): prefix main with port->fun_prefix,
822         * (pic16_pCode2str): fixed bug that didn't emit the memory access
823         identifier for variable with banked access in instructions BTFSS,
824         BTFSC, BCF, BSF, BTG
825         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
826         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
827         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
828         perform optimization when enviroment variable NO_REG_OPT is set,
829         * (insideLRBlock): NEW, return 1 if register is inside an
830         INF_LOCALREGS block,
831         * (RemoveRegFromLRBlock): remove a register that is completely
832         eliminated by register optimization, but it is still left in local
833         register store/restore in/from stack block,
834         * (Remove2pcodes): after removing register, check to see if it
835         should be removed from local register store/restore in/from stack
836         block,
837         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
838         DUMMY_READ_VOLATILE,
839
840         * device/include/pic16/adc.h: minor prototype modifications and
841         update,
842         * device/include/pic16/malloc.h: added GPL notice various
843         modifications,
844         * device/include/pic16/stdint.h: NEW, standard header for ints
845         * device/include/pic16/delay.h: NEW, header for delay functions,
846         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
847         delay1mtcy,
848         * device/include/pic16/signal.h: NEW, header providing helper macros
849         for implementing signal handlers,
850         * device/include/pic16/stdio.h: added prototypes for functions,
851         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
852         prototypes for stdin and stdout, added macro PUTCHAR to
853         automatically implement putchar function prototype,
854         * device/include/pic16/usart.h: modified and updated USART library,
855         * device/lib/pic16/libio/adc/,
856         * device/lib/pic16/libio/i2c: some modifications to improve library
857         performance,
858         * device/lib/pic16/libc/stdio/: modifications for the new printf*
859         family of functions,
860         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
861         family of functions and other sources,
862         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
863         of the PIC18Fxx[28] devices,
864         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
865         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
866         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
867         _do_cinit function, because the previous failed when local variables
868         where not placed in the same memory bank,
869         * device/lib/pic16/libsdcc/char/: various modifications to improve
870         library performance,
871         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
872         information on the new functions of the c library and more...
873
874 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
875
876         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
877
878 2005-03-26 Raphael Neider <rneider AT web.de>
879
880         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
881           if condition == CARRY)
882         * (genCmp): adapted to new genSkipc semantics
883         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
884           on rIfx (genCmp was broken)
885
886 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
887
888         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
889         * src/z80/main.c (_keywords[]),
890         * src/SDCCglobal.h (struct options),
891         * src/SDCC.y,
892         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
893         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
894         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
895         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
896         always available in leading double underscore form. The C99 support is
897         mostly missing, but it's a start.
898         * support/regression/tests/bug-227710.c: fixed nonconforming use of
899         reserved identifier "__data".
900
901 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
902
903         * src/mcs51/peeph.def: fixed bug 1170013
904
905 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
906
907         * device/include/mcs51reg.h: fixed bug 842007
908
909 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
910
911         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
912         last time.
913
914 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
915
916         * src/port.h (struct PORT),
917         * src/avr/ralloc.c (avr_assignRegisters),
918         * src/avr/main.c,
919         * src/ds390/ralloc.c (ds390_assignRegisters),
920         * src/ds390/main.c,
921         * src/hc08/ralloc.c (hc08_assignRegisters),
922         * src/hc08/main.c,
923         * src/mcs51/ralloc.c (mcs51_assignRegisters),
924         * src/mcs51/main.c,
925         * src/pic/ralloc.c (pic14_assignRegisters),
926         * src/pic/main.c,
927         * src/pic16/ralloc.c (pic16_assignRegisters),
928         * src/pic16/main.c,
929         * src/xa51/ralloc.c (xa51_assignRegisters),
930         * src/xa51/main.c,
931         * src/z80/ralloc.c (z80_assignRegisters),
932         * src/z80/ralloc.h,
933         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
934         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
935         * src/SDCCcse.h,
936         * src/SDCCdflow.c (computeDataFlow),
937         * src/SDCCdflow.h,
938         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
939         * src/SDCCloop.h,
940         * src/SDCCcflow.c (*),
941         * src/SDCCcflow.h,
942         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
943         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
944         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
945         immedDom() returning wrong block; probably fixes bug #1160833)
946
947 2005-03-20 Borut Razem <borut.razem AT siol.net>
948
949         * support/scripts/inc2h.pl: WIN32 port
950
951 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
952
953         * device/lib/makefile.in: added abs.c and labs.c
954
955 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
956
957         * device/include/stdint.h: added
958         * device/lib/abs.c: added
959         * device/lib/labs.c: added
960         * device/include/stdlib.h: added abs() and labs() prototypes
961         * device/lib/libsdcc.lib: added abs and labs
962         * device/include/float.h,
963         * device/lib/_fsmul.c,
964         * device/lib/printf_fast.c,
965         * device/lib/printf_tiny.c: updated comments
966
967 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
968
969         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
970         bug #1164313
971
972 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
973
974         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
975         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
976
977 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
978
979         * device/lib/printf_large.c: removed inline assembly for portability and
980           readability. Use printf_fast if speed or size are more important.
981         * src/pic16/gen.c: removed conditions around use of DEBUGpc
982         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
983
984 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
985
986         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
987         prevent compiler warning
988
989 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
990
991         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
992         moved to level 0 and declared as static. Also they are explicit
993         placed in access bank. This was necessery because some times they
994         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
995         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
996         optimizations. Currently only compare to unsigned char is implemented,
997         * src/pic16/gen.c: added fReturnIdx array,
998         * (struct resolvedIfx) is moved to gen.h and made public,
999         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1000         * (aopForSym): added an optimization to directly store in stack of
1001         the operand of a SEND iCode,
1002         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1003         but as registers instead (AOP_REG) using the fReturnIdx array,
1004         * (pic16_freeAsmop): remove the freed register from the
1005         _G.sregsAlloc field,
1006         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1007         a compare of 'WREG',
1008         * (pic16_popGetTempRegCond): changed function prototype, now
1009         function takes also a bitVector argument v which holds the current
1010         set of registers that are allocated for stack access by aopForSym,
1011         registers allocated in aopForSym for accessing stack symbols are not
1012         any more part of the functions usedRegs field,
1013         * (genCall): some times aopOp is called for a stack variable to be
1014         send, aopForSym might perform the push, if this is true make sure
1015         that genCall doesn't push the variable twice by testing _G.resDirect,
1016         * (genFunction): changed testing for unspecified interrupt number
1017         from 256 to INTNO_UNSPEC,
1018         * modified selection scheme of frame pointer generation. Previously
1019         if function did use local registers a frame pointer was generated,
1020         now a frame pointer is generated only if function has arguments
1021         (that need PLUSW2 register access), or has stack arguments, or the
1022         compiler is not instructed to omit the frame pointer,
1023         * (genEndFunction): before restoring local registers that were saved
1024         in the function preamble, also restore the registers that *might*
1025         have been allocated for stack access,
1026         * (genRet): removed some old comments,
1027         * (genCmp, the active (RN's) version): added a call to the
1028         pic16_genCmp_special function to perform the compare with a more
1029         robust and optimized way,
1030         * (genInline): a feature has been added in inline code generation,
1031         which allows a wildcard variable substitution when writing inline
1032         assembly. Code is incomplete and experimental therefore undocumented,
1033         * (genCast): changed order of aopOp for result and right to allow
1034         aopForSym to directly load the result if possible,
1035         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1036         perform an optimized compare on some selected special occasions,
1037         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1038         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1039         generate an IVT any more,
1040         * src/pic16/main.c (pic16_optionsTable): added command line option
1041         --optimize-cmp,
1042         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1043         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1044         macros,
1045         * src/pic16/NOTES: Raphael Neider added in list of active developers
1046         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1047         jumptable_end to prevent bug #,
1048         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1049         inCond and outCond fields,
1050         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1051         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1052         turn off register spilling,
1053         * (packRegsForOneUse): synced with other ports' versions although it
1054         is not used currently,
1055         * (pic16_packRegisters): added an optimization while reading
1056         structure bitfields, some registers may be saved (malloc code is
1057         decreased by 80 bytes)
1058
1059 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1060
1061         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1062         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1063         this can be optimized more?
1064
1065 2005-03-10 Raphael Neider <rneider AT web.de>
1066
1067         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1068           genNearPointerGet): (hopefully) fixed access to bitfields via
1069           pointers (p->bitN = x; and x = p->bitN; failed)
1070
1071 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1072
1073         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1074
1075 2005-03-09 Raphael Neider <rneider AT web.de>
1076
1077         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1078
1079 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1080
1081         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1082         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1083           (regTypeNum): set REG_BIT type if necessary
1084         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1085         * support/regression/tests/critical.c: check bug 1144613
1086
1087 2005-03-02 Raphael Neider <rneider AT web.de>
1088
1089         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1090
1091 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1092
1093         * src/avr/ralloc.c (serialRegAssign),
1094         * src/ds390/ralloc.c (serialRegAssign),
1095         * src/hc08/ralloc.c (serialRegAssign),
1096         * src/mcs51/ralloc.c (serialRegAssign),
1097         * src/pic/ralloc.c (serialRegAssign),
1098         * src/pic16/ralloc.c (serialRegAssign),
1099         * src/xa51/ralloc.c (serialRegAssign),
1100         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1101
1102 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1103
1104         * src/SDCCast.c (decorateType): fixed bug 1124787
1105
1106 2005-02-20 Hubert Sack <sack AT digiplan.de>
1107         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1108
1109         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1110         patch #1121755
1111
1112 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1113
1114         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1115         to keep the correct label reference count when adding/removing references
1116         to labels. A peephole file using this is appended to patch #1144962.
1117
1118 2005-02-14 Raphael Neider <rneider AT web.de>
1119
1120         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1121         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1122         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1123           retrievals of result operand's value on assignment
1124
1125 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1126
1127         * device/include/pic16/string.h: modified prototype for memccpy()
1128         to memccpy(void *, void *, char, size_t)
1129         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1130         check whether to omit frame pointer or not,
1131         * (genInline): convert all occurences of "\n" to LF in inline
1132         assembler blocks, this helps formatting the inline text,
1133         * (pic16_loadFSR0): modified prototype,
1134         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1135         removed some 8051 legacy code,
1136         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1137         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1138         before allocating temporary registers in functions,
1139
1140 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1141
1142         * support/regression/tests/bitvars.c: corrected the "fix"
1143
1144 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1145
1146         * support/regression/tests/bitvars.c,
1147         * support/regression/tests/bitwise.c,
1148         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1149
1150 2005-02-10 Raphael Neider <rneider AT web.de>
1151
1152         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1153           different size for Alpha
1154         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1155
1156 2005-02-09 Raphael Neider <rneider AT web.de>
1157
1158         * src/SDCC.lex(doPragma) : save and restore warning options as well
1159           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1160         * have #pragma less_pedantic set the errorlevel to WARNING
1161           (fixes #1117001)
1162         * (cloneOptimize) : fixed wrong malloc's size
1163         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1164           facilitate correct handling of #pragma (save|restore)
1165
1166 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1167
1168         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1169
1170 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1171
1172         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1173
1174 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1175
1176         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1177
1178 2005-02-02 Raphael Neider <rneider AT web.de>
1179
1180         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1181         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1182         * (pic16_storeForReturn): fixed to allow returning function pointers
1183         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1184         * device/include/pic16/{stddef.h,stdbool.h}: added
1185
1186 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1187
1188         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1189
1190 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1191
1192         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1193         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1194          appeared to be required
1195
1196 2005-01-31 Borut Razem <borut.razem AT siol.net>
1197
1198         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1199           include/mcs51 and include/z80 directories to the package
1200
1201 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1202
1203         * src/hc08/gen.c (genFunction): fixed bug #1112752
1204
1205 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1206
1207         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1208
1209 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1210
1211         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1212
1213 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1214
1215         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1216
1217 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1218
1219         * device/include/c8051fxxx.h: removed these 6 files
1220         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1221
1222 2005-01-26 Raphael Neider <rneider AT web.de>
1223
1224         * src/pic16/gen.c (genAssign): fixed assignment from longs
1225           in codespace (were cut to three bytes)
1226         * (genDummyRead): implemented (except for CODESPACE...),
1227           fixed bug #1108575
1228         * src/pic16/glue.c (emitStatistics): beautified
1229         * device/lib/pic16/libm/Makefile: added include path
1230
1231 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1232
1233         * src/z80/gen.c (aopPut): fixed bug #1103902
1234
1235 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1236
1237         * device/lib/expf.c: fixed bug #1095792
1238
1239 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1240
1241         * device/lib/pic16/libm: added Math library sources
1242
1243 2005-01-24 Raphael Neider <rneider AT web.de>
1244
1245         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1246           to enable upcast to pCodeOpReg2 (there is no type tag to
1247           differenciate the two and pic16_popGet2p cast into PCOR2)
1248         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1249           (sizeof(sectNames) changed to sizeof(sectName))
1250           Both patches fix segfaults under MinGW.
1251
1252 2005-01-23 Raphael Neider <rneider AT web.de>
1253
1254         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1255           Safe_[mc]?alloc()'ed variables
1256         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1257           of (byte sized) temporaries (assign them to WREG for now)
1258         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1259           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1260           this might fix SIGSEGVs on MinGW...
1261         * src/SDCCopt.c (killDeadCode): restored original behaviour
1262           (volatile operands might get thrown away though)
1263
1264 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1265
1266         * src/pic16/gen.c: fixed bug #1106975,
1267         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1268         pointer update, INTCON is saved, global interrupts are disabled and
1269         restored after updateing TOS.
1270         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1271         * added function attribute 'shadowregs' to take advantage of shadow
1272         registers,
1273         * added function attribute 'wparam' as an alternative to the wparam
1274         pragma,
1275         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1276         user declares a non-ISR function as 'shadowregs',
1277         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1278
1279 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1280
1281         * .version: bumped version number to 2.4.8
1282         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1283         pic16 port,
1284         * device/lib/pic16/libio/i2c/: I2C module support library,
1285         * device/include/pic16/i2c.h: I2C support library header,
1286         * device/lib/pic16/libc/stdio/: standard IO support sources,
1287         * (printf_small.c): printf_small() source, supports float print,
1288         * (printf_tiny.c): printf_tiny() source, does not support floats,
1289         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1290         enable global optimizations for entire library source, other
1291         Makefiles in the source tree are also modified to reflect this,
1292         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1293         function,
1294         * doc/sdccman.lyx: updated to reflect new changes,
1295         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1296         sym->onStack if-case,
1297         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1298         sbit, idata, _idata, xdata, _xdata,
1299         * added pragma library, to link an external library, (see doc),
1300         * removed command line options, --pomit-config-words, --pomit-ivt,
1301         --pleave-reset-vector,
1302         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1303         when calling assembler to reflect memory model used, also define
1304         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1305         reflect stack model used,
1306         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1307         on stack return NULL,
1308
1309 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1310
1311         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1312           of the operands is volatile. Fixes #1020220
1313
1314 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1315
1316         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1317         * (OptimizeRegUsage): make sure that there is really no other flow where
1318           the first pCode is used
1319
1320 2005-01-22 Raphael Neider <rneider AT web.de>
1321
1322         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1323           to fix #1106967 (pCode->seq are not set up correctly)
1324
1325 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1326
1327         * src/SDCCglue.c (glue): make sure code area is declared before the
1328         static initialization area.
1329
1330 2005-01-21 Raphael Neider <rneider AT web.de>
1331
1332         * device/lib/Makefile.in: fixed test for pic16 install dir
1333         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1334           optimizations
1335         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1336           added --optimize-goto compiler switch and pragma wparam documentation
1337         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1338         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1339           and PRODH closing bug #1071770 (peephole optimizer)
1340
1341 2005-01-19 Raphael Neider <rneider AT web.de>
1342
1343         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1344           cmdLine buffers (used when calling sdcpp...) are large enough
1345           (MAX_PATH=256 truncates arguments leading to system halts when
1346           used in MinGW...)
1347         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1348         * (genUminus): rewritten to for efficiency
1349         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1350           used uninitialized in some cases)
1351         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1352           copy the third byte from the int -- now assumes 0x80 (data memory)
1353         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1354           operands (genAddLit expects the iCode's operands to swapped as
1355           well), fixed leftover bytes (crashed for short left operands)
1356         * (pic16_genMinusDec): performance improvements, removed false
1357           PIC14 emitSKPNCs
1358         * (pic16_genMinus): fixed to cope with differently sized operands
1359         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1360           for --obanksel > 1
1361         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1362         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1363           new banksel optimization
1364         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1365           analysis for temporary registers (segfaults...)
1366         * src/pic16/peeph.def: added rule
1367
1368 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1369
1370         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1371         which converts a float number to its ASCII representation
1372         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1373         functions to convert the fractional and integer part of a float to ASCII,
1374         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1375         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1376         ram
1377         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1378         _STATMEM macros,
1379         * device/include/pic16/adc.h: added GPL info,
1380         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1381         a pCodeOp as tested operand,
1382         * (genNearPointerGet): optimized bit testing, does not use
1383         intermediate register for bit value, test directly instead with
1384         BTFSS, BTFSC, works only for single bits,
1385         * (genpic16Code): dump the name of the iCode in the asm,
1386         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1387         renamed to pic16_decodeOp,
1388         * (serialRegAssign): do not allocate a temporary register for iCode
1389         sequences that test a single bit for 1/0
1390
1391 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1392
1393         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1394         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1395         access stack and frame pointers. They are initially assigned to
1396         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1397         accessing SFRs. Updated all occurences of modification of stack or
1398         frame pointer in gen.c and pcode.c,
1399         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1400         assigning of a literal value to pointers,
1401         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1402         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1403         selected
1404
1405 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1406
1407         * doc/sdccman.lyx: update documentation about stack pragma, added
1408         some info for stack memory models
1409
1410 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1411
1412         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1413
1414 2005-01-08 Raphael Neider <rneider AT web.de>
1415
1416         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1417           udata sections to fix bug #1097823
1418
1419 2005-01-05 Raphael Neider <rneider AT web.de>
1420
1421         * src/pic16/gen.c (genGenericShift): added handling of differently
1422           sized left operand and result
1423
1424 2005-01-04 Raphael Neider <rneider AT web.de>
1425
1426         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1427         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1428           to hold the condition bit)
1429         * added new version of genCmp (old code available via #define)
1430         * added new version of genShiftLeft/genShiftRight in a generic
1431           way, now supports shifting by negative values
1432         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1433           shiftCount (expected by genGenericShift)
1434         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1435         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1436           dump
1437         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1438           is an invalid literal too...)
1439
1440 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1441
1442         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1443         from Raphael Neider,
1444         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1445         for 8-bit literals. This fixes some literal operands which are sign
1446         extended to 16-bits ints when instruction needs only 8-bits.
1447
1448 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1449
1450         * device/lib/logf.c: added mcs51 assembly version
1451         * device/lib/expf.c: added mcs51 assembly version
1452         * device/lib/_logexpf.c: new shared asm code for expf and logf
1453         * device/include/math.h: add defines for assembly math library
1454         * device/lib/Makefile.in: build new _logexpf.c
1455         * device/lib/libfloat.lib: use new _logexpf.c
1456
1457 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1458
1459         * src/pic/device.c
1460         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1461           device types which have less than 0x7f registers.
1462
1463 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1464
1465         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1466
1467 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1468
1469         * device/lib/printf_fast.c: only build on supported arch.
1470         * device/lib/printf_tiny.c: only build on supported arch.
1471         * device/lib/printf_fast_f.c: only build if asm float lib
1472         * device/lib/_fsget1arg.c: only build if asm float lib
1473         * device/lib/_fsget2args.c: only build if asm float lib
1474         * device/lib/_fsnormalize.c: only build if asm float lib
1475         * device/lib/_fsreturnval.c: only build if asm float lib
1476         * device/lib/_fsrshift.c: only build if asm float lib
1477         * device/lib/_fsswapargs.c: only build if asm float lib
1478         * device/include/stdio.h: don't provide print_fast,
1479           print_fast_f, print_tiny prototypes if --xstack used
1480
1481 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1482
1483         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1484         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1485           to the SOURCES
1486
1487 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1488
1489         * device/lib/printf_fast_f.c: same as printf_fast, but
1490           with floating point enabled
1491         * device/lib/printf_fast.c: minor tweaks
1492         * device/include/stdio.h: add printf_fast_f
1493
1494 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1495
1496         * src/SDCCmain.c: make --float-reent default for mcs51
1497         * device/lib/_fsadd.c: added mcs51 assembly version
1498         * device/lib/_fssub.c: added mcs51 assembly version
1499         * device/lib/_fsmul.c: added mcs51 assembly version
1500         * device/lib/_fsdiv.c: added mcs51 assembly version
1501         * device/lib/_fseq.c: added mcs51 assembly version
1502         * device/lib/_fsneq.c: added mcs51 assembly version
1503         * device/lib/_fsgt.c: added mcs51 assembly version
1504         * device/lib/_fslt.c: added mcs51 assembly version
1505         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1506         * device/lib/Makefile.in: add _fscmp to build
1507         * device/lib/libfloat.lib: add _fscmp to build
1508
1509 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1510
1511         * device/lib/_fs2slong.c: added mcs51 assembly version
1512         * device/lib/_fs2sint.c: added mcs51 assembly version
1513         * device/lib/_fs2schar.c: added mcs51 assembly version
1514         * device/lib/_fs2ulong.c: added mcs51 assembly version
1515         * device/lib/_fs2uint.c: added mcs51 assembly version
1516         * device/lib/_fs2uchar.c: added mcs51 assembly version
1517         * device/lib/_slong2fs.c: added mcs51 assembly version
1518         * device/lib/_sint2fs.c: added mcs51 assembly version
1519         * device/lib/_schar2fs.c: added mcs51 assembly version
1520         * device/lib/_ulong2fs.c: added mcs51 assembly version
1521         * device/lib/_uint2fs.c: added mcs51 assembly version
1522         * device/lib/_uchar2fs.c: added mcs51 assembly version
1523         * device/include/float.h: added #define to select asm vs c
1524
1525 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1526
1527         * device/lib/printf_fast.c: improvements to float output
1528         * device/include/float.h: add defines for assembly float library
1529         * device/lib/_fsget1arg.c: receive 1 float arg
1530         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1531         * device/lib/_fsnormalize.c: normalize a float
1532         * device/lib/_fsreturnval.c: return float, various helper routines
1533         * device/lib/_fsrshift.c: right shift a float's mantissa
1534         * device/lib/_fsswapargs.c: swap 2 floats
1535         * device/lib/Makefile.in: build these 6 new files for mcs51
1536         * device/lib/libfloat.lib: add these 6 files to the library
1537
1538 2004-12-26 Borut Razem <borut.razem AT siol.net>
1539
1540         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1541           built by gcc 3.4.2
1542
1543 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1544
1545         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1546           and fully reentrant and register bank neutral.
1547         * device/lib/printf_fast.c: added float (not enabled by default),
1548           added compact/slower integer (also not enabled by default),
1549           improved size/speed of fast integer code, other minor changes
1550         * device/include/stdio.h, device/lib/Makefile.in,
1551           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1552
1553 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1554
1555         * src/pic16/pcode.c: declaring variables other than at the start of a
1556           block is not supported in C by VC6.
1557
1558 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1559
1560         * applied a previous patch from Raphael Neider that wasn't included
1561         in the previous commits, which fixes infinite loops within jumptable
1562         improvements,
1563         * made some fixes that previous patches introduced
1564
1565 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1566
1567         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1568         that fixes an issue with AOP_PCODE asmop's offset,
1569         * (pic16_popCopyReg): update instance field too,
1570         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1571         function of pic port,
1572         * (genCmp, genAnd, genAssign),
1573         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1574
1575 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1576
1577         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1578         variables initial values to idata section,
1579         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1580         variables in some functions. This utilizes parmBytes field of iCode
1581         structure to hold the offset of the variable in stack. (might be
1582         able to use the stack field too?)
1583         * applied patch from Raphael Neider # ### , # ###
1584         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1585         variable initial values in idata section,
1586         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1587         for static variables with initial value
1588         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1589         applied fix in while loop from Raphael Neider.
1590
1591 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1592
1593         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1594         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1595         * src/ds390/ralloc.c (serialRegAssign): spill bits
1596         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1597         * support/Util/SDCCerr.c,
1598         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1599         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1600         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1601
1602 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1603
1604         * device/include/sdcc-lib.h: inserted LGPL, added includes
1605           asm/ds390/features.h and asm/mcs51/features.h
1606         * device/include/asm/default/features.h,
1607         * device/include/asm/gbz80/features.h,
1608         * device/include/asm/z80/features.h: added empty _AUTOMEM
1609           and _STATMEM
1610         * device/include/asm/ds390/features.h,
1611         * device/include/asm/mcs51/features.h: added files with defines for
1612           _AUTOMEM and _STATMEM indicating automatic and static storage class
1613         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1614         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1615         * src/SDCCicode.c (geniCodeCast),
1616         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1617         * src/SDCCloop.c (loopInduction): removed unused variable lr
1618         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1619           to convertToFcall to include char modulo (RFE 1065037), added check
1620           if left operand is unsigned and use abs of literal value
1621         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1622           as it doesn't work after conversion from peephole.def to peephole.rul
1623         * src/mcs51/gen.c (toBoolean): added check for size,
1624           (genModOneByte): optimized code for signed char modulo a literal
1625           power of 2 (thanks to Hubert Sack),
1626           (genRRC): removed unnecessary "clr c",
1627           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1628         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1629           jump optimization,
1630           swapped rules 256.c and 256.d,
1631           extended 256.d by using new multiple checks (thanks Erik),
1632           added rules 256.e and 256.f,
1633           updated rule 261.a and 261.b to new generated code
1634         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1635
1636 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1637
1638         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1639           induction related bugs, including first part of bug #1074377
1640
1641 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1642
1643         * applied patch from bug-report #1076292,
1644         * applied patches for genAnd and Goto-optimizations for Raphael
1645         Neider,
1646         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1647         dump a less iCode information,
1648         * src/pic16/device.h (pic16_options_t): added field debgen,
1649         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1650         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1651         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1652         puclic,
1653         * (various functions): added macros FENTRY and FENTRY2 to functions,
1654         to emit function prologue,
1655         * (various functions): fixed indentation,
1656         * (genNearPointerGet): fixed loading of FSR0,
1657         * (genPackBits): applied patch from Raphael Neider to fix updating
1658         of FSR0 and touching only the modified bits,
1659         * src/pic16/genarith.c (various functions): added macros FENTRY to
1660         emit function prologue in comments,
1661         * src/pic16/pcode.h: added functions debugf2, debugf3,
1662         * src/pic16/ralloc.c: partial fix for packForPush caused
1663         segmentation fault,
1664
1665 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1666
1667         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1668           <stsp AT users.sourceforge.net> with reversed byte order
1669         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1670
1671 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1672
1673         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1674           bug #1074377
1675         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1676         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1677
1678 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1679
1680         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1681
1682 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1683
1684         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1685           conditions,
1686           (setFromConditionArgs): friendly operand parser for peephole rules,
1687           (operandBaseName, operandsNotRelated): new peephole condition
1688           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1689           architecture specific register naming into account, handles n-way
1690           comparisons, and supports quoted literals
1691         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1692
1693 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1694
1695         * src/mcs51/peeph.def: fixed bug #1076940
1696
1697 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1698
1699         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1700
1701 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1702
1703         Adding support for replacing ljmps with sjmps in jumptables
1704         generated for switch statements. For now you need to set the
1705         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1706         Now 4 algorithms for mcs51 jumptable generation are used:
1707         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1708         addresses loaded pc-relative for up to 112 cases and stack-pushing
1709         target addresses loaded with offset from dptr for up to 256 cases.
1710
1711         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1712         * src/mcs51/main.c: adapted constants for switch table generation
1713         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1714
1715 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1716
1717         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1718         * support/regression/tests/bug1057979.c: added test for bug 1073386
1719
1720 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1721
1722         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1723         compilers
1724
1725 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1726
1727         * src/pic16/device.h,
1728         * src/pic16/genarith.c,
1729         * src/pic16/glue.c,
1730         * src/pic16/main.c,
1731         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1732
1733 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1734
1735         Large cummulative patch for pic16 port.
1736         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1737         to call when a stack overflow occurs,
1738         * (malloc.h): added CVS Id tag,
1739         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1740         variable,
1741         * added libc directory. The current version of LibC contains string
1742         functions, ctype functions and macros and some functions of the
1743         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1744         be extensively tested in the future. Standard disclaimer here.
1745         Library is not automatically build yet. But one can build it by
1746         invoking 'make' inside the libc directory.
1747         * added ADC library under libio. Preliminary version yet.
1748
1749         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1750         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1751         aopForRemat() now and not by pic16_aopOp(),
1752         * (pic16_popGetTempReg): removed warning messgae when allocating
1753         temporary registers, its a buggy feature and will be removed,
1754         * (pic16_popGet): set register instance field in AOP_CRY,
1755         * (pic16_outBitC): fixed for results in size greater than 1,
1756         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1757         * (pic16_storeForReturn): optimized return of 0,
1758         * (genCmp): experimental code for new genCmp which uses PIC18's
1759         special compare&skip instructions. Initial tests fail some times
1760         with variables grater than 1 byte in size, so new code is disabled,
1761         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1762         a single bit,
1763         * (genCast): began a fix to optimize the casting of a bit to another
1764         bit, now assigning a bitfield to another bitfield will fail, sorry,
1765         * src/pic16/main.c: disabled the use of lr-support feature,
1766         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1767         * added some function prototypes, added function _debugf prototype,
1768         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1769         bits with offset (case PO_GPR_BIT),
1770         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1771         command line,
1772         * (isBankInstruction): modified to return 0 for no banking instruction,
1773         and 1 for banking instruction,
1774         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1775         caused stop processing pCodes after a inline assembly block,
1776         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1777         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1778         registers when it shouldn't,
1779         * src/pic16/ralloc.c (allocReg): add preliminary support for
1780         supporting a limited set of temporary registers,
1781
1782 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1783
1784         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1785           genDataPointerSet): ensure assignments always copy in MSB to LSB
1786           order,
1787           (loadRegFromAop): recognize CLRH optimization,
1788           (genFunction): optimize RECEIVE iCodes in reentrant functions
1789
1790 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1791
1792         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
1793           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
1794           selected.
1795         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
1796         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
1797           contiguous with data
1798
1799 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1800
1801         * device/lib/_gptrget.c (_gptrget),
1802         * device/lib/_gptrgetc.c (_gptrgetc),
1803         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
1804           instead of sjmp to ret
1805         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
1806           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
1807
1808 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1809
1810         * .version: bumped version to 2.4.7
1811         * device/lib/_gptrget.c (_gptrget): is now _naked
1812         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
1813         * device/lib/_gptrput.c (_gptrput): is now _naked
1814         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
1815           (createFunction): fixed xstack
1816         * src/SDCCglue.c (emitMaps): set allocation required for bit area
1817         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
1818           or bit either,
1819           (geniCodeCritical): store original interrupt state in an iTemp bit
1820           var unless stack-auto
1821         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
1822         * src/SDCCmain.c (setIncludePath): added include/target to search path
1823         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
1824         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
1825           prototype,
1826           (processFuncArgs): put bit vars in bit area
1827         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
1828           unsaveRBank): fixed xstack,
1829           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
1830           (genFunction, genEndFunction): fixed xstack,
1831           (genAssign): optimization don't walk backwards through mem
1832         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
1833         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
1834         * support/regression/Makefile: also make library (for stack-auto) when
1835           making "all" and added "test-mcs51-xstack-auto"
1836         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
1837         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
1838         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
1839         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
1840         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
1841           make-library by MAKE_LIBRARY
1842         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
1843           regression tests for xstack
1844         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
1845         * support/regression/tests/critical.c: test for critical on mcs51
1846
1847 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1848
1849         * support/regression/ports/ucz80/spec.mk: use include and lib files from
1850           built version of sdcc instead of installed version
1851
1852 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1853
1854         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
1855         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
1856           vprintf.c now
1857         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
1858         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
1859           WARNING: remove device/lib/build/z80/printf.o by hand when
1860           updating from previous build!
1861         * device/lib/z80/printf.c: updated comment
1862         * support/regression/tests/bug1057979.c: test all ports now
1863         * support/regression/tests/bug1065458.c: file added
1864
1865 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1866
1867         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
1868           *_start and *_end symbols for static functions
1869
1870 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
1871
1872         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
1873           and search crt0.o in all library paths,
1874           (setIncludePath): proper handling of --nostdinc,
1875           (setLibPath): proper handling of --nostdlib
1876         * support/regression/Makefile,
1877         * support/regression/ports/ds390/spec.mk,
1878         * support/regression/ports/gbz80/spec.mk,
1879         * support/regression/ports/hc08/spec.mk,
1880         * support/regression/ports/mcs51/spec.mk,
1881         * support/regression/ports/mcs51-large/spec.mk,
1882         * support/regression/ports/mcs51-stack-auto/spec.mk,
1883         * support/regression/ports/z80/spec.mk: use include and lib files from
1884           built version of sdcc instead of installed version
1885         * doc/sdccman.lyx: fixed typo in --nostdinc
1886
1887 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
1888
1889         * src/pic/pcode.c,
1890         * src/pic/device.c,
1891         * src/pic/ralloc.c,
1892         * src/pic/gen.c : added support to generate code for struct bit fields.
1893
1894 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1895
1896         * as/xa51/xa_version.h,
1897         * device/include/errno.h,
1898         * device/include/regc515c.h,
1899         * device/lib/_itoa.c,
1900         * device/lib/_ltoa.c,
1901         * device/lib/ser_ir_cts_rts.c,
1902         * sim/ucsim/xa.src/glob.cc,
1903         * sim/ucsim/xa.src/inst_gen.cc,
1904         * sim/ucsim/xa.src/xa_bit.cc,
1905         * sim/ucsim/xa.src/xa_sfr.cc,
1906         * sim/ucsim/z80.src/inst_dd.cc,
1907         * sim/ucsim/z80.src/inst_fdcb.cc,
1908         * support/scripts/keil2sdcc.pl,
1909         * src/pic16/pic16.dsp,
1910         * src/pic16/pic16a.dsp: corrected cvs line endings
1911         * device/lib/printf_large.c: fixed bug 1057979
1912         * src/pic16/gen.c: fixed non-C standard code
1913         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
1914         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
1915         * support/regression/ports/mcs51/support.c: reload T1 asap
1916         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
1917           pdata use and clear idata startup behaviour
1918         * support/regression/tests/bug1057979.c: added
1919
1920 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
1921
1922         * device/examples/ds390/ow390/ad26.h,
1923         * device/examples/ds390/ow390/cnt1d.h,
1924         * device/examples/ds390/ow390/crcutil.c,
1925         * device/examples/ds390/ow390/ownet.h,
1926         * device/examples/ds390/ow390/owsesu.c,
1927         * device/examples/ds390/ow390/swt12.h,
1928         * device/examples/ds390/ow390/swtoper.c,
1929         * device/examples/ds390/ow390/temp10.h,
1930         * device/examples/ds390/ow390/thermodl.c,
1931         * device/examples/ds390/tinitalk/tinitalk.dsp,
1932         * device/examples/ds390/tinitalk/tinitalk.dsw,
1933         * device/examples/mcs51/clock/hw.h,
1934         * device/examples/mcs51/simple2/go.bat,
1935         * device/examples/serialcomm/windows/serial.h,
1936         * device/examples/xa51/dummy.c,
1937         * device/examples/xa51/hello.c,
1938         * device/include/80c51xa.h,
1939         * device/include/at89x051.h: corrected cvs line endings
1940
1941 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
1942
1943         * src/pic16/main.c (options): added command line --gstack, to trace
1944         stack over/under flows,
1945         * added pragma 'wparam' to allow passing first byte of function
1946         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
1947         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
1948         call to __gstack_test function and sets up the symbol as extern,
1949         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
1950         * popaop): added call to pic16_testStackOverflow,
1951         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
1952         wparamList list,
1953         * (genCall, genPcall): now all parameters are passed via stack
1954         except in functions that are pass to wparam pragma in which WREG is
1955         used too,
1956         * (genPcall): REENTRANT flag is checked to see if variable prototype
1957         contains reentrant keyword, don't call a non-reentrant function, via
1958         a reentrant function pointer or vice versa, functions are never
1959         passed via WREG,
1960         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
1961         D.Winkler,
1962         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
1963         SIGSEGV when accessing a NULL register stucture,
1964         * (pic16_printGPointerType): modified to handle UPPER modifier for
1965         function initializers, changed prototype of function to simpler one,
1966         * (pic16_printIvalFuncPtr): check to see if function is already
1967         added in externs list,
1968         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
1969         optimized a move from W to SFR with a move to the same register
1970         later after a CALL,
1971         * device/lib/pic16/debug: NEW directory, contains debug features
1972         which are enabled when linking with libdebug.lib, currently command
1973         line option --gstack enables stack pointer tracing for over/under
1974         flow, corresponding sources are in debug/gstack
1975
1976 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
1977
1978         * doc/sdccman.lyx: updated SDCC version,
1979         * (PIC16 port): update list of command line options,
1980         * src/pic16/device.h (structure pic16_options_t): added field gstack
1981         to enable stack overflow tracing on push/pops,
1982         * src/pic16/device.c (statistics structure): added statistics
1983         structure,
1984         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
1985         pic16_dump_int_registers): increase statistics counters for each
1986         * variable which is encountered
1987         * (pic16_dump_usection): emit each .udata variable to its own udata
1988         section,
1989         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
1990         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
1991         parameters via stack, otherwise use old scheme,
1992         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
1993         assembler output file,
1994         * src/pic16/main.c: added command line options --gstack to enable
1995         push/pop tracing for stack overflow,
1996         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
1997         instructions): added size of each instruction,
1998         * (pic16_countInstruction): estimate size of instructions in
1999         the_pFile list, inline assembly blocks are not counted,
2000         * (pic16_FixRegisterBanking): trace previous register usage, when
2001         banksel optimizations is greater than 0, don't emit a redudant
2002         banksel directive,
2003
2004 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2005
2006         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2007         * src/pic16/ralloc.c : applied same fix for pic16.
2008         * src/pic/gen.c : tidied it up a little.
2009
2010 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2011
2012         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2013         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2014
2015 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2016
2017         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2018
2019 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2020
2021         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2022         non-reentrant function __modsint in the interrupt function (thus
2023         corrupting math operations during serial I/O)
2024         * device/lib/ser_ir.c: as above, changed buffersize
2025         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2026         256.c,d for zeroing
2027         * doc/Makefile: added option -t for rsync
2028
2029 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2030
2031         * src/SDCCast.h (struct ast),
2032         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2033
2034 2004-10-20 Borut Razem <borut.razem AT siol.net>
2035
2036         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2037         package
2038
2039 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2040
2041         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2042         makefile targets,
2043         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2044         support functions to replace long sequences of MOVFF's from access
2045         bank registers to stack and vice versa,
2046         * src/pic16/device.h: added new field opt_flags, where optimization
2047         flags can be set to enable certain features,
2048         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2049         * pBlock, (genFunction, genEndFunction): surroung loop for
2050         saving/loading used registers in stack with PC_INFO pCodes,
2051         INF_LREGS. Code in between can then be optimized by pCode optimizer
2052         to support function calls,
2053         * (genDataPointerSet): fixed bug which loaded float fields in
2054         structures with corrupt data,
2055         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2056         in a standard way debug info on stderr. Feature used for developing
2057         and debugging only,
2058         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2059         obsolete chunks of code,
2060         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2061         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2062         * pic16/src/pcode.c (pic16_newpCodeInfo,
2063         * (pic16_newpCodeOpLocalRegs),
2064         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2065         feature,
2066         * (pic16_pCodeConstString): printing of the initial value of a
2067         symbol as a comment is inhibited since parsing was already done by
2068         copyStr and output is corrupt,
2069         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2070
2071 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2072
2073         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2074
2075 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2076
2077         * as/mcs51/lkarea.c: removed old K&R style,
2078           (lnksect): changed check on boundary error,
2079           (lnksect2): changed check on boundary error,
2080           (lnksect2): extend XSTK to end of page if size = 1
2081         * as/mcs51/lkmain.c: removed old K&R style,
2082           (Areas51): create l_IRAM symbol
2083         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2084         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2085           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2086         * device/lib/_mullong.c: added version to be compiled with xstack
2087         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2088         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2089         * device/lib/mcs51/crtxstack.asm: fixed comment
2090         * src/SDCCglue.c: maxInterrupts defaults to 0,
2091           (emitMaps): added pdata,
2092           (createInterruptVect): (re)moved default,
2093           (glue): added pdata,
2094           (glue): moved __start__xstack to XSTK with default size 1
2095         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2096           and options.float_rent when options.stackAuto is set,
2097           (linkEdit): only write XDATA_NAME if provided on command line
2098         * src/SDCCmem.h,
2099         * src/SDCCmem.c: added pdata
2100         * src/port.h: added pdata_name to PORT
2101         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2102           (saveRegisters, unsaveRegisters): removed usage of B,
2103           (genMinus): fixed accumulator clash,
2104           (genJumpTab): added comment, this needs another look
2105         * src/mcs51/gen.c: added check for "B in use" paranoia,
2106           added pushB() and popB()
2107         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2108           chance
2109         * src/avr/main.c,
2110         * src/ds390/main.c,
2111         * src/hc08/main.c,
2112         * src/mcs51/main.c,
2113         * src/pic/main.c,
2114         * src/pic16/main.c,
2115         * src/xa51/main.c,
2116         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2117           added PSEG (PAG,XDATA) or NULL to port specifier
2118         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2119         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2120           (_mcs51_genInitStartup): removed __start__xstack equ,
2121           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2122         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2123         * src/z80/gen.c (_rleAppend): fixed warnings
2124         * support/regression/tests/zeropad.c: added pdata test
2125         * .version: bumped to 2.4.6
2126
2127 2004-10-17 Borut Razem <borut.razem AT siol.net>
2128
2129         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2130         as a part of nightly build
2131
2132 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2133
2134         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2135         WREG holds the first byte function parameters,
2136         * (aopForSym): take special case for symbols which are in FARSPACE
2137         but in CODESPACE too,
2138         * (assignResultValue): modified to take into account _G.useWreg,
2139         * (genCall): don't use wreg for parameter passing when function is
2140         declared as reentrant, too, added optimization INCF to stack
2141         pointer when stack parameter count is 1,
2142         * (genFunction, genEndFunction): refurnished and fixed to not using
2143         wreg for passing parameters when function has varargs or is
2144         reentrant, fixed bug with symbol name compare for generating
2145         functions in absolute address,
2146         * (pic16_storeForReturn): refurnished,
2147         * (genCmp): began writing a new version of the function, not ready
2148         yet, therefore it is disabled,
2149         * (genAssign): do not read code memory when assigning a function to
2150         a pointer function,
2151         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2152         array of characters, not pointer,
2153         * (pic16initialComments): in debug mode emit an .ident directive for
2154         the assembler,
2155         * (_process_pragma): emit a new warning type (internal to pic16)
2156         when setting stack to default length, emit a similar warning when
2157         placing a function at absolute address and address is not word aligned
2158         * (_pic16_parseOptions): added 'return TRUE' statement,
2159         * (_pic16_linkEdit): if compiling a source, then add the source's
2160         file object, first in the list of objects to link,
2161
2162 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2163
2164         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2165         * src/pic/main.c : removed VC warning.
2166         * src/pic/gen.c : changed comment.
2167
2168 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2169
2170         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2171         reference to a deprecated symbol _GPTRREG was causing failure to
2172         link. Thanks G. M. Gallant for the info.
2173
2174 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2175
2176         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2177         comments for Bugs item #954788.
2178
2179 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2180
2181         * src/pic16/device.c (pic16_dump_gsection,
2182         * pic16_groupRegistersInSection): handle symbols declared to be in
2183         access bank differently,
2184         * src/pic16/gen.c (struct _G): added field resDirect,
2185         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2186         send values read from stack directly to result and don't allocate
2187         temporary values,
2188         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2189         same registers,
2190         * (pic16_sameRegsOfs): NEW,
2191         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2192         free because they were not allocated from temporary pool,
2193         * pic16_popRegFromString): workaround to fix a problem with
2194         allocating variables twice or never,
2195         * (genGenPointerGet): using PRODL instead of FSR0H,
2196         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2197         instead of FSR0H,
2198         * (genAssign): take advantage of the _G.resDirect flag,
2199         * (genCast): around line 11844, use mov2f instead of directly
2200         MOVFF'ing between operands to account for literal values,
2201         * src/pic16/genutils.c: some new debug functions for gpsim have been
2202         added,
2203         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2204         float with integer part only,
2205         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2206         place variables in access bank
2207         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2208         updated sources to reflect recent changes in gen.c
2209
2210 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2211
2212         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2213         sources that searched for headers in installation path, now the
2214         device/include/pic16 is used,
2215         * src/pic16/glue.c (pic16glue),
2216         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2217         .line directives if not in debug mode, this suppresses assembler's
2218         warnings for ignored directives
2219
2220 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2221
2222         * src/port.h: made reset_regparms prototype void parameter explicit.
2223         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2224         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2225         * doc/sdccman.lyx: documented warning disabling and how to use
2226           printf_large to make it print floats.
2227         * device/include/stdbool.h: NEW
2228         * device/lib/_atof.c,
2229         * device/lib/_divuint.c,
2230         * device/lib/_divulong.c,
2231         * device/lib/expf.c,
2232         * device/lib/printf_large.c,
2233         * device/lib/sincosf.c,
2234         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2235         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2236           a completely reentrant lib.
2237
2238 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2239
2240         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2241         * device/include/pic16/stdio.h: fixed bug with colon
2242
2243 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2244
2245         * device/include/pic16/stdio.h,
2246         * device/include/pic16/stdlib.h,
2247         * device/include/pic16/math.h: NEW
2248         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2249         declared as _naked to reduce overhead
2250         * device/lib/Makefile.in (target port-specific-objects-pic16):
2251         changed * to *.* so to ignore the CVS directory,
2252         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2253         stacked variables back in stack,
2254         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2255         corruption
2256
2257 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2258
2259         * .version: bumped version number to 2.4.5
2260         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2261         * support/Util/SDCCerr.c (messages structure): added entry for
2262         W_POSSBUG2
2263
2264         Large cumulative patch for pic16 port and libraries.
2265         * device/include/pic16/sdcc-lib.h,
2266         * device/include/pic16/stdarg.h,
2267         * device/include/asm/pic16/features.h,
2268         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2269         * device/include/pic16/float.h: changes reentrant keyword with
2270         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2271         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2272         updated target build-libraries to include objects from gptr,
2273         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2274         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2275         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2276         all function headings,
2277         * src/SDCCmain.c: added global parameter userIncDirsSet,
2278         * (parseCmdLine): when option -I is encountered add directory to
2279         userIncDirsSet too,
2280         * src/version.awk: added space between control and long,
2281         * src/pic16/NOTES: added some notes for the port,
2282         * src/pic16/gen.c: added prototype for mov2fp function,
2283         * (fReturnpic16[]): properly named return value registers,
2284         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2285         * (aopForSym): added code to handle symbols with onStack flag set,
2286         symbols onStack are allocated PTRSIZE bytes,
2287         * (aopFreeAsmop): handles special case where asmops are stack objects,
2288         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2289         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2290         added argument lock to trace flaws in allocating temporary registers
2291         when developing port,
2292         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2293         * (pic16_popRegFromString): reenabled allocating a direct register
2294         from string,
2295         * (assignResultValue): various beautifications,
2296         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2297         referenced function argument,
2298         * (genIpush): reenabled to allow stacked arguments, handles only
2299         ic->parmPush iCodes,
2300         * (genCall, genPcall): major changes to allow for variable argument
2301         functions, fixed a bug with falsely restoring stack pointer after
2302         returning from call,
2303         * (genFunction): pending code for critical function,
2304         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2305         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2306         * (genNearPointerGet): fixed bug with indirect reading, was always
2307         reading from INDF0
2308         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2309         pointers,
2310         * (genAddrOf): rewrote code to take address of a stacked function parameter
2311         * (genCast): fixed casting to generic pointer type,
2312         * src/pic16/gen.h: added AOP_STA,
2313         * (struct asmop): added field stk,
2314         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2315         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2316         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2317         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2318         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2319         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2320         generic pointers,
2321         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2322         and library paths,
2323         * (pic16_port structure): generic pointer size is set to 3,
2324         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2325         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2326         compiler warning,
2327         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2328         operand is an iTemp,
2329
2330 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2331
2332         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2333         * debugger/mcs51/simi.c: addapt new syntax of s51
2334
2335 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2336
2337         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2338         * src/pic16/pcode.c: commented out some calls to free() in order to
2339         fix bug #989576,
2340
2341 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2342
2343         * src/SDCCicode.h,
2344         * src/SDCCicode.c (isiCodeInFunctionCall),
2345         * src/avr/ralloc.c (selectSpil),
2346         * src/pic/ralloc.c (selectSpil),
2347         * src/pic16/ralloc.c (selectSpil),
2348         * src/ds390/ralloc.c (selectSpil),
2349         * src/hc08/ralloc.c (selectSpil),
2350         * src/xa51/ralloc.c (selectSpil),
2351         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2352         stack in the middle of a function call sequence (fixes bug #1020268)
2353         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2354         costs associated with the minimum switch case.
2355
2356 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2357
2358         * src/SDCC.lex: fixed bug #1030549
2359
2360 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2361
2362         * src/SDCCcse.h (struct cseDef),
2363         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2364         over a function call if the CSE is derived from a symbol whose
2365         address has been taken (fixes bug #1029883)
2366         * support/regression/tests/bug-1029883: a new regression test for
2367         this bug
2368
2369 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2370
2371         * src/hc08/gen.c (emitinline): fixed bug #1029778
2372         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2373         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2374         and starts toward RFE #905167)
2375
2376 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2377
2378         * src/pic16/gen.c (mov2f): New function to move an operand to
2379         another without considering if it is a literal or a register,
2380         * (pic16_sameRegs): don't check if they are both AOP_REG,
2381         * (AccRsh): removed andmask=0 lines,
2382         * (genLeftShift): duplicated to be improved in future versions,
2383         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2384         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2385         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2386         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2387         * (insertBankSwitch): fixed inserting banksel directives algorithm
2388         for instructions that follow a skip instruction, this fixes a report
2389         for broken subtraction code generation,
2390         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2391         iCode is a left op, just in case result and right share the same
2392         registers
2393
2394 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2395
2396         * src/hc08/main.c,
2397         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2398         preservation of HX
2399         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2400         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2401         on 2004-09-12; it was buggy
2402
2403 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2404
2405         * src/SDCCsymt.h: removed RESULT_CHECK
2406         * src/SDCCast.c,
2407         * src/SDCCglue.c,
2408         * src/SDCCval.c,
2409         * src/pic/glue.c,
2410         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2411
2412 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2413
2414         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2415         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2416         configuration values no more rejected by compiler, they are assigned
2417         to configuration registers with a warning message instead,
2418         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2419         the for-loop so last conf register is emitted too,
2420         * (_pic16_initPaths): link library libsdcc.lib by default,
2421         * (_hasNativeMulFor): modified test for multiplication according to
2422         Raphael Neider's remarks. Integer multiplication is also done with
2423         support functions,
2424         * device/include/pic16/pic18fregs.h: corrected type error in while
2425         testing and including 18f6720 header file
2426
2427 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2428
2429         * src/pic16/device.h (pic16_options): removed field use_crt,
2430         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2431         until an optimization to handle single bits is added,
2432         * (pic16_loadFSR0): moved before genUnpackBits,
2433         * (genAnd): some white lines removed,
2434         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2435         leave_reset flags in pic16_options when using crt modules,
2436
2437 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2438
2439         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2440           for bugs 898889 & 979599. Also used some safer print instructions.
2441
2442 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2443
2444         * src/pic16/device.h (pic16_options_t): added field use_crt,
2445         crt_name, no_crt,
2446         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2447         catch a probable future bug,
2448         * src/pic16/gen.c: aopIdx function commented out,
2449         * (genAssign): commented out old code which used aopIdx,
2450         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2451         code, added if conditionals to take into account the --use-crt
2452         command line options,
2453         * src/pic16/main.c (pic16_optionsTable): added new command line
2454         options, --use-crt= and --no-crt,
2455         * (_pic16_linkEdit): now the proper crt object is added in the
2456         linker command line except than when --no-crt is specified,
2457         * src/pic16/pcode.c,
2458         * src/pic16/pcode.h: added some structures and functions for a new
2459         optimization scheme to compansate for instruction overhead between
2460         same iCodes, this scheme is currently under development and is not
2461         working in any way,
2462         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2463         to && operator,
2464         * device/lib/pic16/startup/crt0i.c,
2465         * device/lib/pic16/startup/crt0iz.c: added global char variable
2466         __uflags to force the generation of an idata section
2467
2468 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2469
2470         * doc/Makefile,
2471         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2472         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2473
2474 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2475
2476         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2477         Frieder) and clarified the default code optimization mode
2478
2479 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2480
2481         * src/SDCC.lex (doPragma, process_pragma),
2482         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2483         "opt_code_size", and "opt_code_balanced"
2484         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2485         regrouped options by category, added support for category headers
2486         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2487         and "--opt-code-size"
2488         * doc/sdccman.lyx: documented these new options and pragmas
2489         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2490         preference into account
2491
2492 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2493
2494         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2495           geniCodePreDec): Fixed bug 904237 by generating a warning
2496         * src/SDCCerr.h,
2497         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2498
2499 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2500
2501         * src/pic/device.c : When no max ram set validate full memory range.
2502         * src/pic/pcode.c,
2503         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2504
2505 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2506
2507         * device/lib/_gptrget.c,
2508         * device/lib/_gptrput.c: updated comment
2509         * device/lib/calloc.c,
2510         * device/lib/free.c,
2511         * device/lib/malloc.c,
2512         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2513         * src/SDCCcse.c (cseBBlock),
2514         * src/SDCCicode.c (printOperand, geniCodeArray),
2515         * src/SDCCicode.h (struct operand): fixed bug 868103
2516         * support/regression/tests/bug-868103.c: added
2517         * src/SDCCast.c (searchLitOp),
2518         * src/SDCCcse.h (struct cseDef),
2519         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2520         * src/SDCCicode.h (struct operand),
2521         * src/SDCCsymt.h (struct sym_link),
2522         * src/avr/gen.c (hasInc),
2523         * src/ds390/gen.c (hasInc),
2524         * src/hc08/gen.c (genPlusIncr, hasInc),
2525         * src/mcs51/gen.c (hasInc),
2526         * src/pic16/glue.c (pic16_printIvalChar),
2527         * src/pic16/ralloc.c (regWithIdx),
2528         * src/xa51/gen.c (hasInc) : removed warnings
2529         * src/SDCCast.c (createBlock): added comment ???
2530         * src/hc08/ralloc.c: updated comments
2531
2532 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2533
2534         * doc/sdccman.lyx: updated section on switch statements, added
2535         section about semaphore locking
2536         * doc/Makefile: added option -info for latex2html
2537         * device/lib/_gptrget.c,
2538         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2539
2540 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2541
2542         * src/pic/device.h,
2543         * src/pic/device.c,
2544         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2545          maxram is less than 0x100.
2546
2547 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2548
2549         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2550
2551 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2552
2553         * src/port.h,
2554         * src/mcs51/main.c,
2555         * src/ds390/main.c,
2556         * src/z80/main.c,
2557         * src/hc08/main.c,
2558         * src/pic/main.c,
2559         * src/pic16/main.c,
2560         * src/avr/main.c,
2561         * src/xa51/main.c
2562         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2563         a jump table is the best form for a switch statement, including
2564         automatic insertion of missing cases to make the case range
2565         continuous. Developed in collaboration with Frieder Ferlemann.
2566
2567 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2568
2569         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2570         accumulator result if it needs sign extension
2571
2572 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2573
2574         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2575
2576 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2577
2578         * device/lib/gbz80/printf.c,
2579         * device/lib/z80/printf.c: removed define for NULL
2580
2581 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2582
2583         * as/xa51/xa_link.c,
2584         * device/examples/ds390/ow390/ad26.c,
2585         * device/examples/ds390/ow390/cnt1d.c,
2586         * device/examples/ds390/ow390/counter.c,
2587         * device/examples/ds390/ow390/ds2480.h,
2588         * device/examples/ds390/ow390/ds2480ut.c,
2589         * device/examples/ds390/ow390/findtype.c,
2590         * device/examples/ds390/ow390/gethumd.c,
2591         * device/examples/ds390/ow390/owllu.c,
2592         * device/examples/ds390/ow390/ownetu.c,
2593         * device/examples/ds390/ow390/swt12.c,
2594         * device/examples/ds390/ow390/swtloop.c,
2595         * device/examples/ds390/ow390/temp.c,
2596         * device/examples/ds390/ow390/temp10.c,
2597         * device/examples/ds390/ow390/thermo21.c,
2598         * device/examples/ds390/ow390/tinilnk.c,
2599         * device/examples/ds390/ow390/tstfind.c,
2600         * device/examples/serialcomm/windows/serial.cpp,
2601         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2602         * device/include/reg51.h: fixed line endings for cvs
2603
2604 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2605
2606         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2607         packRegsForAccUse, packRegisters): new accumulator register
2608         packing algorithm
2609         * support/regression/ports/hc08/support.c (_putchar): suppress
2610         warning of unused variable
2611         * src/SDCCicode.c: added SWAP entry to codeTable
2612
2613 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2614
2615         * device/lib/sprintf.c: forgot to add this file before previous commit
2616
2617 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2618
2619         * src/pic16/gen.c (genPackBits): added operand right in function
2620         parameters, load result directly if p_type is POINTER (that is
2621         called by genNearPointerSet)
2622         * (genUnPackBits): added operand left in function parameters,
2623         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2624         FSR0 if accessing bitfields,
2625
2626 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2627
2628         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2629           _print_format; updated printf, sprintf, vsprintf
2630         * device/include/asm/default/features.h: corrected comment/define
2631         * device/lib/Makefile.in: added sprintf.c
2632         * device/lib/libsdcc.lib: added sprintf module
2633         * device/lib/printf_large.c,
2634         * device/lib/vprintf.c,
2635         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2636           into these 3 files
2637         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2638         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2639         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2640           hc08 test
2641         * support/regression/tests/zeropad.c: define idata as data for hc08
2642
2643 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2644
2645         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2646         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2647         labels are referenced at least once (even if a reference is not found)
2648         * src/hc08/gen.c (emitcode): set isComment flag for comments
2649         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2650         loads), rules 6a..6b (optimize jumps to return)
2651
2652 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2653
2654         * device/lib/acosf.c (acosf),
2655         * device/lib/asinf.c (asinf),
2656         * device/lib/atanf.c (atanf),
2657         * device/lib/ceilf.c (ceilf),
2658         * device/lib/cosf.c (cosf),
2659         * device/lib/coshf.c (coshf),
2660         * device/lib/cotf.c (cotf),
2661         * device/lib/fabsf.c (fabsf),
2662         * device/lib/floorf.c (floorf),
2663         * device/lib/log10f.c (log10f),
2664         * device/lib/logf.c (logf),
2665         * device/lib/sinf.c (sinf),
2666         * device/lib/sinhf.c (sinhf),
2667         * device/lib/sqrtf.c (sqrtf),
2668         * device/lib/tanf.c (tanf),
2669         * device/lib/tanhf.c (tanhf),
2670         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2671         replaced all instances of "reentrant" in the library functions
2672         defined in math.h with this macro.
2673         * support/regression/tests/float_trans.c: reenabled test for hc08
2674
2675 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2676
2677         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2678         erroneously deleted
2679
2680 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2681
2682         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2683         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2684         multi-byte volatile operands are used
2685         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2686         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2687         initialization to area GSINIT0 so that it would always precede
2688         any static initializers in GSINIT
2689         * support/regression/tests/zeropad.c: fixed idata define for hc08
2690         * support/regression/tests/bug-927659.c,
2691         * support/regression/tests/float_trans.c: disabled tests for hc08
2692         pending missing library routines
2693         * .version: increased version number to 2.4.4 - hc08 port now passes
2694         regression tests
2695
2696
2697 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2698
2699         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2700         * Makefile.common.in,
2701         * as/Makefile,
2702         * as/hc08/Makefile.in,
2703         * as/mcs51/Makefile.in,
2704         * as/z80/Makefile.in,
2705         * debugger/mcs51/Makefile.in,
2706         * device/include/Makefile.in,
2707         * device/lib/Makefile.in,
2708         * doc/Makefile,
2709         * link/Makefile,
2710         * link/z80/Makefile.in,
2711         * packihx/Makefile.in,
2712         * sim/ucsim/main_in.mk,
2713         * sim/ucsim/avr.src/Makefile.in,
2714         * sim/ucsim/doc/Makefile.in,
2715         * sim/ucsim/gui.src/serio.src/Makefile.in,
2716         * sim/ucsim/hc08.src/Makefile.in,
2717         * sim/ucsim/s51.src/Makefile.in,
2718         * sim/ucsim/xa.src/Makefile.in,
2719         * sim/ucsim/z80.src/Makefile.in,
2720         * src/Makefile.in,
2721         * support/cpp2/Makefile.in,
2722         * support/librarian/Makefile,
2723         * support/makebin/Makefile: added DESTDIR to the install path proposed
2724         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2725         * doc/sdccman.lyx: added DESTDIR documentation
2726
2727 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2728
2729         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2730         instruction for interrupt handlers, use fast returns when returning
2731         from high priority interrupts
2732
2733 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2734
2735         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2736         code generation
2737         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2738         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2739         bugs, ported much of Bernhard's code from mcs51
2740         * src/mcs51/gen.c (genSend),
2741         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2742         than one when calling a reentrant function
2743         * device/lib/_mullong.c: defined an alternate struct layout for big
2744         endian ports (hc08)
2745
2746 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2747
2748         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2749         test
2750
2751 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2752
2753         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2754         are sane and complete before asking the port its prefered parameter
2755         passing method (fixes bug #1017633)
2756         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2757         and _ret3
2758
2759 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2760
2761         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2762         problem in bitfields >= 8 bits.
2763
2764 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2765
2766         * src/SDCCsymt.c: undid changes that were not meant to be committed
2767
2768 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2769
2770         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2771
2772 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2773
2774         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2775           copied and wrong bit got inverted
2776
2777 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2778
2779         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2780         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2781         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2782         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2783         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2784         assignments to bitfields at known addresses
2785         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2786         reads from bitfields at known addresses
2787         * src/hc08/ralloc.c (packRegisters),
2788         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2789         genhc08Code): optimize pointer get values used as conditionals
2790         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
2791         and branch
2792
2793 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2794
2795         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
2796         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
2797         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
2798         as conditionals
2799
2800 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2801
2802         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
2803
2804 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2805
2806         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
2807         related problems
2808
2809 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
2810
2811         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
2812
2813 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2814
2815         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
2816         mcs51 port
2817
2818 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2819
2820         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
2821
2822 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2823
2824         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
2825         cases use more compact code.
2826
2827 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
2828
2829         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
2830
2831 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2832
2833         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
2834
2835 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2836
2837         * src/SDCCsymt.h,
2838         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
2839         parameter of changePointer() from symbol* to sym_link*
2840         * src/SDCCast.c (decorateType): call changePointer() for CAST op
2841         * src/SDCCsymt.c (compareType): void* type is castable to other
2842         pointers, but not necesarily an exact match.
2843         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
2844         is no longer blindly treated as an exact match.
2845         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
2846
2847 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
2848
2849         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
2850
2851 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
2852
2853         * src/pic/gen.c,
2854         * src/pic/pcode.c,
2855         * src/pic/ralloc.h,
2856         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
2857
2858 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
2859
2860         * src/pic/device.c,
2861         * src/pic/device.h,
2862         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
2863
2864 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2865
2866         * src/mcs51/gen.c (emitcode): fixed bug #992819
2867
2868 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
2869
2870         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
2871           there's no need to make it worse
2872
2873 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2874
2875         * src/mcs51/ralloc.c (deassignLR),
2876         * src/ds390/ralloc.c (deassignLR),
2877         * src/hc08/ralloc.c (deassignLR),
2878         * src/z80/ralloc.c (deassignLR),
2879         * src/pic/ralloc.c (deassignLR),
2880         * src/pic16/ralloc.c (deassignLR),
2881         * src/avr/ralloc.c (deassignLR),
2882         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
2883         rlivePoint): fixed another part of bug #971834
2884
2885 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2886
2887         * src/z80/main.c: enabled "critical" keyword
2888         * src/z80/mappings.i,
2889         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
2890         functions (fixes bug #979646)
2891         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
2892
2893 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2894
2895         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
2896           such as c:\mydir.
2897
2898 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
2899
2900         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
2901           doesn't disable too much optimizations
2902
2903 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2904
2905         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
2906
2907 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
2908
2909         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
2910
2911 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2912
2913         * src/pic/gen.c tidied up tabs
2914         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
2915         * src/pic/main.c tidied up tabs
2916         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
2917         * src/pic/pcoderegs.c tidied up tabs
2918         * src/pic/ralloc.c tidied up tabs
2919
2920 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
2921
2922         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
2923         to S_FIXED for pic16 port and when symbol is not in level 0,
2924         allocate for S_REGISTER storage class and pic16 port, too,
2925         * src/pic16/device.h: prototype for checkSym,
2926         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
2927         * (pic16_assignConfigWordValue): test the value and the mask to
2928         validate that the value is suitable for the configuration word,
2929         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
2930         collect extern declared symbols, don't emit symbol twice, check
2931         first if symbol is in publics set first,
2932         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
2933         * added command line '--fstack' which enables an experimental
2934         feature for stack access, too buggy to be used yet...
2935         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
2936         * (pic16_allocDirReg): when register has storage class S_REGISTER
2937         allocate in pic16_dynAccessRegs,
2938         * device/include/pic16/pic18f????.h: modified configuration word
2939         naming convention, words started as CONFIG0H but should be CONFIG1H
2940
2941 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2942
2943         * device/include/mcs51reg.h: fixed bug 970993
2944
2945 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
2946
2947         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
2948         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
2949         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
2950         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
2951         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
2952         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
2953           error/warning numbers,
2954           added function setWarningDisabled()
2955         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
2956         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
2957           _memcmp.c _memmove.c calloc.c realloc.c free.c
2958         * support/regression/tests/malloc.c: added tests for new functionality
2959         * support/regression/tests/zeropad.c: added tests for truncated initializers
2960           and initialized char arrays starting with '\x0'
2961         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
2962
2963 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
2964
2965         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
2966
2967 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2968
2969         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
2970         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
2971         peephole 177.e. Thanks to anonymous
2972
2973 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
2974
2975         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
2976         function isn't used in the source but referenced as a
2977         variable initializer then declare it as extern in .asm file
2978
2979 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
2980
2981         * .version: increased version number to 2.4.3
2982
2983         Adding version extension according to ChangeLog CVS revision
2984         * src/Makefile.in (target all): added dependency 'version.h'
2985         * (rule version.h): added rule to create version.h from ChangeLog,
2986         * (rule dep): added dependency version.h,
2987         * src/version.awk: AWK script to create version.h
2988         * src/SDCCdwarf2.c (dwWriteModule),
2989         * src/SDCCglue.c (initialComments),
2990         * src/SDCCmain.c (printVersionInfo): modified to write after
2991         version string the version extension number,
2992         * src/SDCCutil.c: included "version.h"
2993         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
2994         number,
2995         * src/SDCCutil.h: added prototype for getBuildNumber
2996
2997         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
2998         includeDirsSet, too,
2999         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3000         const char [] is found in function prototype...
3001
3002         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3003         moving to WREG with source is already in WREG,
3004         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3005         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3006         * (aopForSym): stack'ed symbols are partially supported, added
3007         if-clause to support symbols in FARSPACE,
3008         * (sameRegs): added test for AOP_ACC to see if registers are same,
3009         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3010         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3011         * (pic16_popRegFromString): will not allocate a new register if it
3012         doesn't find one by name, bug may have introduced...
3013         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3014         * (genIpush): revived to use pic16 port's stack,
3015         * (genAddrOf): added incomplete case for stack'ed operand,
3016         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3017         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3018         can handle multibyte operands,
3019         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3020         * (pic16initialComments): added message for MPLAB compatibility
3021         mode enabled,
3022         * src/pic16/main.h: prototype for pic16_mplab_comp,
3023         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3024         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3025         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3026         because of increased complexity of procedure,
3027         * (_process_pragma): stack pragma changed to format 'stack pos len',
3028         emit symbol '_stack_end' to conform with gplink,
3029         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3030         to search for register,
3031         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3032         PO_GPR_REGISTER,
3033         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3034         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3035         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3036         case for PO_GPR_REGISTER,
3037         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3038         dies, the new era is ahead !...
3039         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3040         pic16_dynInternalRegs,
3041         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3042         * (pic16_allocDirReg): minor optimizations and bug fixes,
3043         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3044
3045         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3046         load stack and frame pointer with address of 'stack_end' symbol
3047
3048 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3049
3050         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3051         without source code but only variable initializers
3052
3053 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3054
3055         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3056         external are not declared as extern to reduce overhead while linking
3057
3058 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3059
3060         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3061
3062 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3063
3064         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3065           Yee Keat for the patch
3066         * src/SDCCast.c (decorateType): fixed bug #979599
3067         * src/ds390/gen.h: removed local fReturnSizeDS390
3068         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3069         * src/ds390/gen.c (genAnd, genOr, genXor),
3070         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3071
3072 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3073
3074         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3075         add relFilesSet to $3, manipulate $2 to handle linking of object
3076         files without source files in command line,
3077         * device/include/pic16 (all headers): added ID location macros,
3078         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3079         entries for ID location bytes,
3080         * (pic16_assignIdByteValue): NEW,
3081         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3082         added field dumpcalltree to pic16_options_t,
3083         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3084         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3085         emitting rFalseIfx label after check_carry label,
3086         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3087         pic16_emitDIRegs), NEW
3088         * (pic16glue): dump .calltree file when option --calltree found,
3089         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3090         * (_pic16_genAssemblerPreamble): emit ID locations after
3091         configuration registers,
3092         * (pic16_linkCmd): modifications of the link command,
3093         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3094         * (pic16_pCodeInitRegisters): don't init stack registers,
3095         * (pic16_findPrevInstruction): fixed bug,
3096         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3097         bug with immediate registers,
3098         * (buildCallTree): traces stack push and pop,
3099         * (pct2): dump also stack usage for each function,
3100         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3101         * (pic16_allocDirReg): various modifications,
3102         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3103         fixed to 1,
3104
3105 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3106
3107         * src/pic16/pcode.c: removed buggy double colon
3108
3109 2004-07-01 Borut Razem <borut.razem AT siol.net>
3110
3111         * support/scripts/sdcc.nsi: added include/pic16 to setup
3112
3113 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3114
3115         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3116         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3117         target 'clean',
3118         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3119         specific command line arguments. Also added sample lkr script
3120         for placing a variable at a specific memory bank.
3121         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3122         at a specific memory bank,
3123         * (pic16_dump_isection): fixed bug which caused string literals to
3124         be omitted when dumping idata section,
3125         * (pic16_groupRegistersInSection): added code to handle registers
3126         in specific memory banks,
3127         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3128         public, all references are renamed too,
3129         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3130         AOP_DPTR2,
3131         * (pic16_storeForReturn): added case to handle when dest is WREG,
3132         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3133         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3134         pic16_rel_udata, check to see if that register is marked as being
3135         a member of a specific memory bank,
3136         * (pic16_printIvalCharPtr): added code to add string literals either
3137         to code or the idata sections,
3138         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3139         also accept the 'udata' pragma,
3140         * src/pic16/main.h: new structure types sectName and sectSym
3141         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3142         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3143         * (pic16_findPrevInstruction): fixed, it returned nothing,
3144         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3145         instruction combinations,
3146         * (pic16_FixRegisterBanking): heavily reorganised,
3147         * (pic16_AnalyzeBanking): if generating banksel directives is
3148         disabled, then don't call FixRegisterBanking at all,
3149         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3150         completely removed,
3151         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3152
3153 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3154
3155         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3156         Phuah Yee Keat <yk.phuah AT nestac.com>
3157
3158 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3159
3160         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3161         correctly the IVT even if it is relocated to some other location
3162
3163 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3164
3165         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3166         * device/include/pic16/pic18f2220.h: NEW,
3167         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3168         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3169         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3170         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3171         nodefaultlibs, ivt_loc is the location of the interrupt vector
3172         table, and nodefaultlibs signs that default libraries should not be
3173         linked in link stage,
3174         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3175         according to --ivt-loc argument,
3176         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3177         when pragma stack is found,
3178
3179 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3180
3181         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3182         256 (range check), 257 (do while), 258.a-f (bit banging
3183         f.e. on 3-wire SPI bus)
3184
3185 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3186
3187         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3188         variables used exclusively within a loop
3189
3190 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3191
3192         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3193
3194 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3195
3196         * src/SDCClrange.c (computeClash): fixed bug #971834
3197
3198 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3199
3200         * src/mcs51/gen.c (genCmp): fixed bug #975903
3201         * src/hc08/gen.c (operandsEqu),
3202         * src/ds390/gen.c (operandsEqu),
3203         * src/z80/gen.c (operandsEqu),
3204         * src/pic/gen.c (operandsEqu),
3205         * src/pic16/gen.c (operandsEqu),
3206         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3207         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3208
3209 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3210
3211         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3212
3213 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3214
3215         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3216         default case in switch statement,
3217         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3218         to eliminate problem with initialisation of pointers, but problem
3219         still exists,
3220         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3221         * (emitStaticSegment): removed various lines emitting debug info,
3222         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3223         added processor registers for utilizing EEPROM,
3224         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3225         configurable and set 8
3226
3227 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3228
3229         * .version: increased version number to 2.4.2,
3230
3231         Cumulative patch for pic16 port
3232         * src/pic16/device.c: changed scheme to dump initial values for
3233         variables in idata segment, all print_idata* functions were removed,
3234         now the pic16_printIval* will be called,
3235         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3236         * _pic16_printPointerType, pic16_printPointerType,
3237         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3238         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3239         NEW, similar to the respective functions in SDCCglue.c,
3240         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3241         way, emitting hex bytes,
3242         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3243
3244 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3245
3246         * src/avr/ralloc.c (serialRegAssign),
3247         * src/xa51/ralloc.c (serialRegAssign),
3248         * src/pic/ralloc.c (serialRegAssign),
3249         * src/pic16/ralloc.c (serialRegAssign),
3250         * src/hc08/ralloc.c (serialRegAssign),
3251         * src/z80/ralloc.c (serialRegAssign),
3252         * src/ds390/ralloc.c (serialRegAssign),
3253         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3254
3255 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3256
3257         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3258         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3259
3260 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3261
3262         Cumulative patch for pic16 port:
3263         * src/pic16/device.h (typedef PIC16_device) modified fields for
3264         defining microcontrollers,
3265         * src/pic16/device.c: added new info for all devices in Pics16 array,
3266         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3267         to be optimised out by the pCode optimiser,
3268         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3269         specially, bug reported by G.M. Gallant,
3270         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3271         as force'd so that cannot be optimised out by pCode optimiser,
3272         * src/pic16/pcode.c,
3273         * src/pic16/pcodepeeph.c,
3274         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3275         they are disabled by default, but can be enabled explicit with
3276         command argument --denable-peeps, for testing,
3277         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3278         --pomit-ivt in COMPILE_FLAGS
3279
3280 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3281
3282         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3283           compilation on MSVC
3284
3285 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3286
3287         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3288
3289 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3290
3291         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3292         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3293
3294 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3295
3296         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3297         would only assign 0x300001 register.
3298
3299 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3300
3301         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3302         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3303
3304 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3305
3306         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3307         for ds80c400
3308         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3309         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3310         added peephole 254 (left shift), 255 (jump table)
3311
3312 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3313
3314         * device/lib/Makefile.in: removed comment line with model-pic16,
3315         * (target port-specific-objects-pic16): the libraries and objects
3316         are copied to the build directory form the device/lib/pic16/bin
3317         directory
3318
3319         Cumulative patch concerning pic16 port:
3320         * library directory has been re-organized,
3321         * added support for PIC18F1220,
3322         * added headers and library sources for chips 18f1220,18f6520,
3323         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3324
3325         * configuration registers setting has changed, now each supported
3326         device has a complete description of the registers it uses,
3327         * all initialisations are moved to idata sections, these section
3328         can be absolute or relocatable,
3329         * fixed initialisation of codespace variables,
3330         * fixed warning about PCLATU and gpsim,
3331         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3332         * (genAssign): use table reads when assigning from variables in codespace,
3333         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3334         char/int variables placed in codespace,
3335         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3336         registers set in .asm file, no need for --pomit-config-words anymore,
3337         * (pic16glue): some 8051 legacy segments are commented out
3338         (to be removed completely),
3339         * added support for alternative assembler and linker with --asm=
3340         and --link= command line arguments,
3341         * peepholes are disabled automatically in the port, no need to
3342         specify on command line,
3343         * port supports natively char/int/long multiplication, but converts
3344         all divisions to support functions,
3345         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3346         to the file set in variable $2,
3347         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3348         strings in ASCII format and not in hex,
3349         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3350         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3351         allocate proper register if iCodes aren't temporary,
3352
3353 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3354
3355         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3356
3357 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3358
3359         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3360         is commented out
3361
3362 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3363
3364         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3365         computed address is reused
3366         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3367         multi-byte bitfields
3368
3369 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3370
3371         * src/z80/gen.c: (genArrayInit): must check for pointers too
3372
3373 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3374
3375         * support/regression/tests/zeropad.c: never meant to commit the
3376           nestedstruct test: removed, added check for GCC version
3377
3378 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3379
3380         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3381         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3382         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3383           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3384           bugs 928906 and 954082 half-empty initializers
3385         * src/SDCCsymt.h,
3386         * src/SDCCsymt.c (getAllocSize): added for above fix
3387         * src/z80/gen.c (genArrayInit): fixed bug 741044
3388         * support/regression/tests/zeropad.c: added tests
3389
3390 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3391
3392         * src/pic16/device.c (pic16_dump_section): corrected bug which
3393         caused some symbols of the libraries to be misplaced
3394
3395 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3396
3397         * src/pic16/glue.c,
3398         * src/pic16/ralloc.h,
3399         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3400         to fix conflict with pic port
3401
3402 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3403
3404         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3405         externs configuration variables,
3406         * src/pic16/ralloc.h,
3407         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3408         prototype in header, commented out some debug messages
3409
3410 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3411
3412         * src/pic16/glue.c,
3413         * src/pic16/main.c,
3414         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3415         for gpasm COFF object generation. Thanks to D. Hawkins for
3416         his patch info
3417
3418 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3419
3420         * src/ds390/main.c,
3421         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3422         Brock for spotting this)
3423         * src/ds390/gen.c (genEndFunction),
3424         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3425         interrupt handler and critical. Disable push/pop optimizations when
3426         peephole optimizations disabled.
3427
3428 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3429
3430         Updated pic16 library sources and headers.
3431         * device/lib/pic16/pic18f*/ ,
3432         * device/include/pic16/*.h: modified to handle structured SFR
3433         definitions
3434
3435 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3436
3437         * src/port.h (PORT structure): added hook initPaths, now each
3438         port can declare its own default search paths,
3439         which can been seen with the --print-search-dirs option,
3440         see pic16 port for example,
3441         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3442         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3443         * (doPrintSearchDirs): NEW, replaces in a central manner the
3444         printing of search dirs which was split in set*Paths functions,
3445         * (main): added call to port->initPaths and doPrintSearchDirs,
3446         * src/avr/main.c,
3447         * src/ds390/main.c,
3448         * src/hc08/main.c,
3449         * src/izt/i186.c,
3450         * src/izt/tlcs900h.c,
3451         * src/mcs51/main.c,
3452         * src/pic/main.c,
3453         * src/pic16/main.c: modified port structures to reflect addition of
3454         initPaths hook,
3455
3456         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3457         * (pic16_dump_section): for registers in same address reserve memory once,
3458         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3459         to no_banksel,
3460         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3461         result is greater in size than right or left,
3462         * (pic16_genUMult8X8_8): there are some cases where the result can
3463         be 16 bits size, so handle these,
3464         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3465         * (pic16_outBitC): modified to emit pcodes,
3466         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3467         or not,
3468         * (genDivOneByte): implemented algorithm to divide 8-bits,
3469         * (genCmp): uncommented goto, but issues still exist,
3470         * (genAnd): fixed a bug with variables >8bits,
3471         * (genPackBits): optimization added that uses BCF/BSF to change a
3472         single bit,
3473         * (genAssign): fixed bug when assigning floating point literals,
3474         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3475         __sdcc_gsinit_startup label,
3476         * src/pic16/main.c (_pic16_init): removed search directory
3477         initialisations,
3478         * (_pic16_initPaths): NEW, used to initialise search directories,
3479         * (_hasNativeMulFor): support functions for all except char/int
3480         multiplication, and char division,
3481         * (PIC16_port struct): modified entry for native mul support,
3482         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3483         no_banksel option,
3484         * (buildCallTree): call to register_usage is ifdef'ed out,
3485
3486 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3487
3488         * device/include/string.h: applied Stas Sergeev's patch to make this
3489         header file compatible with the preprocessor -Wundef option
3490         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3491         failure (fixes bug #941458)
3492
3493 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3494
3495         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3496         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3497         that the variable, not the function, should be static
3498         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3499         to be consistent with non-literal case
3500
3501 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3502
3503         * src/SDCCast.c (isConformingBody): fixed bug #949967
3504         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3505         convilong): fixed bug #952086
3506
3507 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3508
3509         * src/SDCCmem.c (allocVariables): fixed bug #955321
3510
3511 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3512
3513         * src/hc08/main.c (_hc08_genAssemblerEnd),
3514         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3515         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3516         completely eliminated the use of a temporary file
3517         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3518         when more than one file linked
3519         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3520
3521 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3522
3523         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3524         which fixes bug #543481
3525         * support/regression/tests/bug-751703.c: fixed comments left from a
3526         cut and paste error
3527         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3528         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3529         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3530         scopes
3531         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3532         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3533         are now changed to underscores in moduleName
3534
3535 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3536
3537         * as/mcs51/lkmem.c: better fix for bug #954173
3538
3539 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3540         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3541
3542         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3543         * device/include/c8051f000.h,
3544         * device/include/c8051f120.h,
3545         * device/include/c8051f300.h,
3546         * device/include/c8051f310.h,
3547         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3548         PWM16) and detab'ed
3549
3550 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3551
3552         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3553         and mailing lists, doc'ed --no-peep-comments, removed reference
3554         to knoppix (newest version has no LyX/LaTeX), other minor changes
3555         * src/SDCCglue.c (glue): save 2 bytes stack space with
3556         option --main-return. The ljmp could probably be avoided too
3557
3558 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3559
3560         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3561
3562 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3563
3564         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3565         * src/SDCCopt.c (isLocalWithoutDef),
3566         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3567         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3568         (credit to Maarten Brock for patch #949363, on which this is based)
3569         * support/regression/tests/bug-751703.c: some test cases of extern used
3570         within inner scopes.
3571
3572 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3573
3574         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3575         SPEC_STRUCT
3576         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3577         struct definitions
3578         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3579         dwWriteLabel): fix to create valid debugger symbols even when
3580         the module name has non-alphanumeric symbols in it
3581         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3582         when a variable's allocation has been optimized away
3583
3584
3585 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3586
3587         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3588         * src/hc08/main.c,
3589         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3590         * src/mcs51/main.c,
3591         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3592         * src/ds390/main.c,
3593         * src/z80/gen.c (z80_emitDebuggerSymbol),
3594         * src/z80/main.c,
3595         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3596         * src/pic/main.c,
3597         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3598         * src/pic16/main.c,
3599         * src/avr/gen.c (avr_emitDebuggerSymbol),
3600         * src/avr/main.c,
3601         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3602         * src/xa51/main.c,
3603         * src/SDCCdebug.c (emitDebuggerSymbol),
3604         * src/SDCCdebug.h,
3605         * src/port.h: added a debugger struct to the port struct. Added a
3606         callback for defining debugger symbols
3607
3608         * src/SDCCast.c (createLabel),
3609         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3610         with isitmp = 1
3611         * src/SDCCicode.h,
3612         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3613         iCode back to the ast for the function
3614
3615         * src/hc08/ralloc.c (hc08_assignRegisters),
3616         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3617         unneeded fields from the regs struct.
3618         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3619         pushReg() & pullReg() functions instead of emitcode()
3620
3621         * src/hc08/gen.c (genLabel, genhc08Code),
3622         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3623
3624         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3625         debugger hooks
3626
3627         * src/hc08/gen.c (genEndFunction, genhc08Code),
3628         * src/hc08/gen.h,
3629         * src/mcs51/gen.c (genEndFunction, gen51Code),
3630         * src/mcs51/gen.h,
3631         * src/ds390/gen.c (genEndFunction, gen390Code),
3632         * src/ds390/gen.h,
3633         * src/z80/gen.c (genEndFunction, genZ80Code),
3634         * src/z80/gen.h,
3635         * src/z80/z80.h,
3636         * src/pic/gen.c (genEndFunction, genpic14Code),
3637         * src/pic/gen.h,
3638         * src/pic16/gen.c (genEndFunction, genpic16Code),
3639         * src/pic16/gen.h,
3640         * src/avr/gen.c (genEndFunction, genAVRCode),
3641         * src/avr/gen.h,
3642         * src/xa51/gen.c (genEndFunction, genXA51Code),
3643         * src/xa51/gen.h,
3644         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3645         specific code to cdbFile.c and out of the backend code generators
3646
3647         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3648         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3649         starting address is now 0
3650
3651         * as/hc08/asm.h,
3652         * as/hc08/m08pst.c,
3653         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3654         assembler directive for DWARF support
3655         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3656
3657         * src/src.dsp,
3658         * src/Makefile.in,
3659         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3660
3661 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3662
3663         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3664         and inappropriate peephole optimization in jump tables
3665
3666 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3667
3668         * as/hc08/m08pst.c,
3669         * src/SDCCglue.c: sdccopt works for the hc08 port now
3670
3671 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3672
3673         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3674
3675 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3676
3677         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3678
3679 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3680
3681         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3682         rules
3683         * src/SDCCmain.c,
3684         * src/SDCCglobl.h,
3685         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3686         comments from the peephole optimizer replacement rules
3687         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3688         symbols
3689         * src/SDCCcse.c (updateSpillLocation),
3690         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3691         equivalents
3692         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3693         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3694         objects far pointers
3695
3696 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3697
3698         * src/SDCCsymt.h: a missing part of my last change
3699         * src/pic/ralloc.c (regTypeNum),
3700         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3701
3702 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3703
3704         * src/SDCCicode.h,
3705         * src/SDCCicode.c (aggrToPtrDclType),
3706         * src/SDCCptropt.h,
3707         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3708         ptrPseudoSymConvert),
3709         * src/pic/ralloc.c (regTypeNum),
3710         * src/pic16/ralloc.c (regTypeNum),
3711         * src/hc08/ralloc.c (regTypeNum),
3712         * src/ds390/ralloc.c (regTypeNum),
3713         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3714         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3715
3716 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3717
3718         * link/z80/lkmain.c (afile),
3719         * as/hc08/lkmain.c (afile),
3720         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3721         prevent a pointer problem when a filename has no directory and
3722         no extension specified.
3723
3724 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3725
3726         * link/z80/lkmain.c (afile): allow periods in directory names
3727         * link/z80/lkmain.c (afile),
3728         * as/mcs51/lkmain.c (afile),
3729         * as/hc08/lkmain.c (afile): allow linker script file to have an
3730         extension other than ".lnk"
3731         * link/z80/lklex.c (getfid),
3732         * link/z80/lkmain.c (parse),
3733         * as/mcs51/lklex.c (getfid),
3734         * as/mcs51/lkmain.c (parse),
3735         * as/hc08/lklex.c (getfid),
3736         * as/hc08/lkmain.c (parse): Support comments in the linker script
3737         file on lines by themselves and after filenames
3738
3739 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3740
3741         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3742
3743 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3744
3745         * src/z80/peeph-z80.def: removed some peephole rules that don't
3746         work with multibyte arithmetic (fixed bug #937126)
3747         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3748         to registers and not global variables
3749         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3750         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3751         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3752         checking for assignments not internally generated (fixed bug #931895)
3753         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3754         structure member (fixed bug #930072)
3755
3756 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3757
3758         * src/SDCCmain.c (linkEdit),
3759         * src/hc08/main.c (_hc08_parseOptions),
3760         * as/hc08/Makefile.in,
3761         * as/hc08/aslink.h,
3762         * as/hc08/asm.h,
3763         * as/hc08/m08pst.c,
3764         * as/hc08/lkrloc.c (relr, rele),
3765         * as/hc08/lkarea.c (lnkarea)
3766         * as/hc08/lkmain.c (afile, parse),
3767         * as/hc08/lkelf.c: support for ELF output
3768         * as/hc08/lks19.c (s19),
3769         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3770
3771 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3772
3773         * as/mcs51/lkihx.c: Fixed bug #899105.
3774
3775 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3776
3777         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3778         .dsp files from Unix to DOS.
3779
3780 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3781
3782         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3783         function pointers; we have been compliant for several months now.
3784         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3785         change that was accidently commented out
3786         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3787         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3788         bug #922319
3789
3790 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3791
3792         * src/hc08/gen.c: output of all of the internal debugging information
3793         is now controlled by the D() macro; it is disabled by default
3794
3795 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3796
3797         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
3798         harder to keep the same registers during a CAST iCode
3799         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
3800         long via int can be done in a single cast, if the signedness is
3801         correct.
3802         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
3803         putchar() in tinibios.c in ds390's library
3804
3805 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
3806
3807         * src/SDCCast.c (decorateType): fixed bug #898889,
3808         cast result of a literal complement too
3809         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
3810         fixed check for bitfields
3811
3812 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
3813
3814         * src/SDCCicode.c (geniCodeLogic): made it static,
3815         (geniCodeLogicAndOr): added in order to fix bug #905492,
3816         (ast2iCode): fixed bug #905492
3817         * support/regression/tests/bug-905492.c: added
3818         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
3819         (processParms): fixed bug #927659: don't copy parms, this will clear
3820         decorated flag
3821         * support/regression/tests/bug-927659.c: added
3822
3823 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
3824
3825         * src/SDCCast.c (addCast): don't cast float to char
3826         * device/lib/libsdcc.lib: added _memmove
3827
3828 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
3829
3830         * device/lib/large/Makefile: fixed parallel execution by
3831         replacing `make` by `$(MAKE)`
3832
3833 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3834
3835         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
3836         offsets (fixes bug #923936)
3837
3838 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
3839
3840         * device/lib/small/Makefile: fixed parallel execution by
3841         replacing `make` by `$(MAKE)`
3842
3843 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3844
3845         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
3846
3847 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
3848
3849         * src/pic/gen.c (genCpl): multi-byte complements were not working.
3850         * src/regression/Makefile: Regression test was not running.
3851
3852 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3853
3854         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
3855         complement if possible
3856         * src/SDCCval.c (valComplement),
3857         * src/SDCCicode.c (operandOperation): fixed complement of literal
3858         * support/regression/tests/onebyte.c (testComplement): added
3859
3860 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
3861
3862         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
3863         return an optimized tree; actually replace actParm with the new tree
3864         * src/SDCCast.h: added some parantheses to remove side effects
3865         * support/regression/tests/bug-920866.c
3866
3867 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
3868         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
3869         Bit operands were not being handled properly in the pic14 port.
3870         (now src/regression/add.c passes again).
3871
3872 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3873
3874         * src/SDCC.y (labeled_statement): case and default no longer require
3875         a following statement (RFE #893037)
3876
3877 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3878
3879         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
3880         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
3881         disabled (fixes bug #916294)
3882         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
3883         "mov a,acc"; patch provided by Lenny Story
3884         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
3885
3886 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3887
3888         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
3889         functions
3890         * src/ds390/gen.c (genFunction, genEndFunction),
3891         * src/ds390/ralloc.c (ds390_assignRegisters),
3892         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
3893         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
3894         pushed if there are parameters passed on the stack. Also, a cleaner
3895         way to decide if r0/r1 should be pushed/popped. (Together they fix
3896         bug #918693)
3897
3898 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3899
3900         * doc/sdccman.lyx,
3901         * device/lib/mcs51/crtpagesfr.asm,
3902         * device/lib/mcs51/crtxinit.asm,
3903         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
3904         to avoid confusion with Si Lab's SFRPAGE register.
3905
3906 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3907
3908         * src/SDCCglue.c (emitMaps): allow public sfr variables
3909         * src/SDCCglue.c (initialComments): include compiler build date
3910         with compiler version and put the timestamp of the generated
3911         assembly file on a serperate line to be less confusing.
3912         * src/port.h: added genInitStartup hook
3913         * src/avr/main.c,
3914         * src/ds390/main.c,
3915         * src/hc08/main.c,
3916         * src/pic/main.c,
3917         * src/pic16/main.c,
3918         * src/xa51/main.c,
3919         * src/z80/main.c: genInitStartup initialize as NULL (default to
3920         historical behaviour)
3921         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
3922         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
3923         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
3924         library instead of hard coding it into the compiler.
3925         * support/regression/ports/mcs51-stack-auto/spec.mk,
3926         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
3927         * device/lib/mcs51/Makefile,
3928         * device/lib/small/Makefile,
3929         * device/lib/large/Makefile,
3930         * device/lib/mcs51/crtpagesfr.asm,
3931         * device/lib/mcs51/crtstart.asm,
3932         * device/lib/mcs51/crtxclear.asm,
3933         * device/lib/mcs51/crtxinit.asm,
3934         * device/lib/mcs51/crtclear.asm,
3935         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
3936         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
3937         and into user configurable files.
3938         * device/lib/clean.mk: clean mcs51 directory too
3939         * support/regression/tests/longlit.c: added static to T1 declaration
3940         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
3941         accesses in the initialization code
3942
3943 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3944
3945         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
3946         OSCTRIMVAL as noted in bug #916008
3947
3948 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3949
3950         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
3951         in loops with multiple exits (reported as incorrect registers
3952         used by Martin Helmling in Sdcc-user list)
3953
3954 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3955
3956         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
3957         made ds390 register extensions look less like error messages
3958
3959 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3960
3961         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
3962         reported by Adam Wozniak in Sdcc-user list
3963
3964 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
3965
3966         * src/SDCCast.c (decorateType): fixed with bug and promotion in
3967         arithmetic optimizations, added debug output
3968
3969 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
3970
3971         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
3972         * sdcc.spec: updated and split sdcc into 3 rpms
3973         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
3974         needed for literals of LEFT_OP and '+'
3975         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
3976         introduced RESULT_TYPE_NOPROM
3977         (geniCodeMultiply): fixed logic for decision if mul is optimized to
3978         left shift
3979         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
3980         limited promotion to int only for '*'
3981         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
3982
3983 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
3984
3985         * src/pic16/gen.c (genSkip),
3986         (genc16bit2lit), (gencjneshort): commented out
3987         (is_LitOp): new helper function, checks operand type
3988         (genCmpEq): rewritten
3989
3990 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
3991
3992         * support/regression/tests/bug-908454.c: added
3993
3994 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
3995
3996         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
3997         * src/SDCCicode.c (usualBinaryConversions): op needs int type
3998         (geniCodeCast): cosmetic, don't preserve bit storage class
3999         (geniCodeLeftShift): added promotion
4000         (geniCodeLogic): fixed regression
4001         * src/SDCCsymt.c (computeTypeOr): accept bits too
4002         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4003
4004 2004-03-07  Borut Razem <borut.razem AT siol.net>
4005
4006         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4007
4008 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4009
4010         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4011         version of pic16_genPackRegisters which does not check if ic is a
4012         CAST operator,
4013         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4014         function cause string1.c regression test fails
4015
4016 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4017
4018         * sim/ucsim/configure.in,
4019         * sim/ucsim/configure,
4020         * sim/ucsim/doc/Makefile.in: use docdir
4021         * src/SDCC.y: fixed sbit atrributes
4022         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4023         * src/SDCCast.c (decorateType): |^& need special promotion handling
4024         * src/SDCCast.h,
4025         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4026         * src/SDCCsymt.h (computeType),
4027         * src/SDCCicode.c: computeType() needs op
4028         * src/SDCCsymt.c (checkTypeSanity),
4029         * doc/sddman.lyx: "plain" bitfields are unsigned
4030         * src/SDCCsymt.c (computeTypeOr): added
4031         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4032         |^& ops
4033         * src/SDCCval.c (val*): computeType() needs op
4034         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4035         * support/regression/tests/onebyte.c: added tests for |^&
4036
4037 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4038
4039         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4040         for writing icode into asm output.
4041
4042 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4043
4044         * src/pic16/device.c: added some debug lines enabled
4045         with macro DEBUG_CHECK,
4046         * src/pic16/genarith.c: more debug in genPlus,
4047         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4048         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4049         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4050         * (aopForSym): onStack symbols are re-placed in data memspace,
4051         and onStack flag is cleared,
4052         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4053         copy temporary pcodeop,
4054         * (genPcall): added warning for not updating PCLATU,
4055         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4056         always true for pic16 port,
4057         * (genMultOneWord): NEW, supports integer multiplication,
4058         * (genMult): modified to call genMultOneWord,
4059         * (ifxForOp): added warning when return NULL,
4060         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4061         flag is set before call to operandFromSymbol for implicit
4062         added structures,
4063         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4064         options.intlong_rent are set by default,
4065         * (_hasNativeMulFor): modified to allow port generation of integer
4066         multiplication,
4067         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4068         set regtype to REG_SFR for all registers, restricting seting the
4069         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4070
4071 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4072
4073         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4074         more than 500 times in the regression tests
4075
4076 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4077
4078         * support/Util/SDCCerr.h,
4079         * support/Util/SDCCerr.c,
4080         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4081         enumerator_list),
4082         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4083         for symbol conflicts.
4084         * support/valdiags/tests/enum.c,
4085         * support/valdiags/tests/tentdecl.c,
4086         * support/valdiags/tests/struct.c: expect possible error messages
4087         referring to original symbol definitions.
4088         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4089         * src/SDCCsymt.h,
4090         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4091
4092 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4093
4094         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4095
4096 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4097
4098         * src/pic16/ralloc.c (newReg): fixed bug #908929
4099
4100 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4101
4102         * src/ds390/gen.c: added missing #include "main.h"
4103
4104 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4105
4106         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4107         checking if symbol is already in set,
4108         * src/pic16/device.h: prototype for checkAddSym,
4109         * src/pic16/gen.c: (_G): added entry interruptvector,
4110         * (assignResultValue): removed some commented out lines,
4111         * (genFunction): check for ISR via sym->type, absolute section for
4112         interrupt code is created via a new pBlock, the goto instruction is
4113         placed now correctly at the interrupt vector position, changed all
4114         references from ivec to _G.interruptvector,
4115         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4116         is the interrupt is a high priority one, same for return from ISR,
4117         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4118         externs to calls of checkAddSym,
4119         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4120         pic16_pcode_verbose flag is set,
4121         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4122         * src/pic16/pcoderegs.c: message about how many registers are saved
4123         will only be emitted if pic16_pcode_verbose flag is set,
4124
4125 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4126
4127         * src/ds390/ralloc.h,
4128         * src/ds390/ralloc.c (ds390_regWithIdx),
4129         * src/ds390/gen.c (emitcode),
4130         * src/ds390/main.h,
4131         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4132         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4133         ds390operandCompare, getRegsRead, getRegsWritten,
4134         initializeAsmLineNode): customized instruction size calculation for
4135         ds390, started basis for some register optimizations
4136         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4137         corresponding assembly output
4138         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4139         missing push/pop of r0/r1. Optimized push/pops
4140
4141 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4142
4143         * src/mcs51/main.c (instructionSize): fixed ACALL size
4144         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4145
4146 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4147
4148         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4149         the sorting of rlist with NULL elements
4150         * (print_idataType, print_idata): NEW to create idata sections
4151         * src/pic16/device.h: idataSymSet new variable
4152         * src/pic16/gen.c (genFunction): fixed some bugs in string
4153         comparing, improved the absolute section creation for ISRs,
4154         added FSR0L/FSR0H in registers that are saved in an ISR,
4155         * (genInline): fixed the processing of inline snippets,
4156         now they undergo no process by the peephole optimizer
4157         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4158         are placed in idataSymSet,
4159         * (pic16emitStaticSeg): extern symbols are added in externs,
4160         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4161         switching when aboslute variables are placed in access bank memory
4162         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4163         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4164         commented out with #if,
4165         * (pic16_packRegisters): reintroduce the check for CAST because some
4166         symbols are not correctly handled,
4167         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4168         pCodeInstruction instead of pCode,
4169         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4170         pCodeAsmDir definition,
4171         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4172         directive, then the argument directive is emitted without the leading
4173         tab, hack for inline labels which must be in the first column,
4174         * (compareLabel,pic16_findNextInstruction),
4175         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4176         * (insertBankSwitch): modified for the new pCodeAsmDir,
4177
4178 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4179         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4180
4181         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4182         instance,
4183         * (pushSide): commented out with #if,
4184         * (assignResultValue): fixed some typos in saving
4185         registers,
4186         * (genPcall): FIXED and sync'ed with genCall,
4187         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4188         * (genNearPointerGet): fixed to handle some more cases,
4189         implementation scheme via table reads,
4190         * (genConstPointerGet): modified to access code memory correct,
4191         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4192         and improved to handle some cases
4193         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4194         instead of "RETLW" for init data
4195         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4196         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4197         variables are placed in access bank memory (<0x80 and >=0xf80),
4198         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4199         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4200         TBLWT_POSTDEC,TBLWT_PREINC
4201         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4202         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4203         directives
4204         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4205         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4206         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4207         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4208
4209 2004-02-29  Borut Razem <borut.razem AT siol.net>
4210
4211         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4212         support/Util/findme.h, support/Util/system.h: enhance binary relative
4213         search for lib and include by using findProgramPath()
4214
4215 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4216
4217         * src/SDCCpeeph.h,
4218         * src/SDCCpeeph.c (pcDistance),
4219         * src/port.h,
4220         * src/mcs51/ralloc.h,
4221         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4222         * src/mcs51/main.h,
4223         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4224         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4225         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4226         size calculation port specific, started basis for some register
4227         optimizations
4228         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4229         missing push/pop of r0/r1. Optimized push/pops
4230         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4231         * device/lib/_modsint.c (_modsint),
4232         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4233         and stack version so regression tests pass
4234
4235 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4236
4237         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4238         * src/SDCCast.c (decorateType): catch another small optimization
4239         with '?' operator
4240         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4241         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4242         modified to finally use computeType() all over SDCC,
4243         see Feature Request #877103
4244         * src/SDCCval.h: cosmetic
4245         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4246         valCompare(); regression tested in muldiv.c
4247         * support/regression/tests/muldiv.c (testMod): mod sign follows
4248         dividend only
4249
4250 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4251
4252         * src/SDCCast.c (decorateType): fixed bug #902362
4253         * doc/INSTALL.txt: fixed install instructions for win32
4254
4255 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4256
4257         * device/include/Makefile.in (install): fixed by replacing spaces
4258         by tabs
4259         * doc/README.txt,
4260         * doc/INSTALL.txt: updated for release
4261         * doc/sdccman.lyx: added warning for --xstack being buggy
4262
4263 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4264
4265         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4266         to eliminate build warnings.
4267         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4268
4269 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4270            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4271
4272         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4273         removed -penable-stack, added comment for stack pragma, added
4274         warning for not initializing the stack/frame registers, removed
4275         comment at interrupts section
4276
4277         Stack is made permanent, there is no ability to disable stack usage.
4278         * src/pic16/device.h,
4279         * src/pic16/device.c: removed all references to USE_STACK macro,
4280         * src/pic16/device.c (pic16_dump_section): when no elements in
4281         rlist, free rlist before return,
4282         * (pic16_dump_int_registers): NEW, internal registers are a new set
4283         of general purpose registers reused by each function,
4284         * (checkAddReg): returns 1 if registers is added to set,
4285         * (pic16_groupRegistersInSection): when a registers is of type
4286         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4287         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4288         SRCASECMP macro is moved here from device.c
4289         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4290         PO_PCLATU, PO_PRODL, PO_PRODH,
4291         * (pic16_pCodeOpType, genMinus,
4292         changed compares to "a" register, with AOP_ACC,
4293         * (pic16_genPlus): fixed some bugs and indented properly,
4294         * (pic16_addSign): changed size to size+offset in the MOVWF
4295         instruction,
4296         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4297         multiply 8-bit operand by literal, result is 8-bit,
4298         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4299         multiply 2 8-bit operand, result is 8-bit,
4300         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4301         genUMult8X*_16,
4302         * src/pic16/gen.c: changed accUse to contain WREG only,
4303         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4304         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4305         true, do not use immediate addressing any more unless sym is a
4306         pointer in codespace,
4307         * (aopForRemat): do not use immediate addressing when symbol not in
4308         codespace and when symbol's address is requested,
4309         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4310         accUse size (= 1),
4311         * (aopGet): added case for AOP_ACC and don't return "accumulator
4312         bug" but WREG instead,
4313         * (popGetTempReg): pushes contents of temporary register in stack,
4314         * (popReleaseTempReg): pops contents of temporary register from
4315         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4316         * (pic16_popGet): separated case AOP_ACC to return register WREG
4317         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4318         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4319         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4320         the use of immediate pointers to certain cases only.
4321
4322         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4323         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4324         * (assignResultValue, genCall, genRet): modified to use the new
4325         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4326         genPcall is still broken,
4327         * (genFunction): added code to create 'A' type pBlocks when
4328         interrupt functions are generated, code not extensively tested yet,
4329         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4330         * (genEndFunction): modified so ISRs pop stored registers from stack,
4331         * (genMultOneByte): cleanup,
4332         * (AccRsh): added flag andmask, to and result with appropriate mask,
4333         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4334         * (genDataPointerGet): fixed and reenabled its use,
4335         * (genNearDataPointerGet): bugs fixed,
4336         * (genDataPointerSet): bugs fixed,
4337         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4338         pic16_DumpSymbol, pic16_DumpOp,
4339         * src/pic16/genutils.h: function prototypes for the above functions,
4340         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4341         pointers,
4342         * (pic16emitRegularMap): many many many improvements, but needs a
4343         major cleanup,
4344         * src/pic16/main.c: enable_stack in pic16_options is removed,
4345         * (_pic16_parseOptions): removed command line options -penable-stack,
4346         * (_process_pragma): emit stack symbol only when stack pragma is
4347         processed,
4348         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4349         redirected to FSR0L/FSR0H pair,
4350         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4351         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4352         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4353         for immediates,
4354         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4355         * (dumpPicOptype): NEW,
4356         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4357         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4358         with movff instruction,
4359         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4360         added pic16_int_regs, some packRegsFor* functions are commented out,
4361         because produce errors,
4362         * src/pic16/NOTES: minor modifications
4363
4364 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4365
4366         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4367         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4368         --pack-iram.
4369         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4370         * as/mcs51/lkaomf51.c: fixed bug #895763
4371
4372 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4373
4374         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4375
4376 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4377
4378         * doc/sdccman.lyx: added details about the HC08 storage classes and
4379         interrupts, fixed the register usage info for z80 & gbz80
4380
4381 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4382
4383         * doc/sdccman.lyx: added more pic16 port documentation
4384         * device/include/pic16/: added header pic18fregs.h
4385
4386 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4387
4388         * doc/sdccman.lyx: added Vangelis' contribution
4389
4390 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4391
4392         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4393         extend to the next CALL or PCALL, not just to the next CALL.
4394
4395 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4396
4397         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4398
4399 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4400
4401         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4402         bug #895752 and a better fix for bug #716790
4403
4404 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4405
4406         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4407
4408 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4409
4410         * doc/sdccman.lyx: minor changes, minor changed
4411
4412 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4413
4414         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4415         which can't handle SDCC_NEWONEBYTEOPS,
4416         (geniCodeMultiply): removed conversion from mult to shift for pic14
4417         and pic16
4418
4419 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4420
4421         * src/hc08/gen.h,
4422         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4423         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4424         thus fixing bug #895406
4425
4426 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4427
4428         * device/lib/_modsint.c,
4429         * device/lib/_modslong.c: sign follows divisor only
4430         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4431         signs or signedness can be ignored
4432         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4433         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4434         added optimization for IFX,
4435         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4436         arguments;
4437         reenabled optimization for IFX, which was removed on 2004-01-11
4438         * src/SDCCast.h: added return type IFX
4439         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4440         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4441         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4442         SDCC_OLDONEBYTEOPS selects the old behaviour
4443         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4444         changed again and commented promotion rule
4445         * src/SDCCval.c (valDiv): promotion no longer necessary
4446         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4447         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4448         rewritten
4449         * support/regression/tests/onebyte.c: added
4450
4451 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4452
4453         * gen.c (genInline): reverted to old code for assemnling inline
4454         code because of bug reported James Chadd
4455
4456 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4457
4458         * ralloc.h: missing declarations from previous patch,
4459         seems that patch for ralloc.h was never applied, fixed
4460
4461 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4462            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4463
4464         * pcode.c,
4465         * pcode.h,
4466         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4467         indirect addressing. Marked FSR0 as deprecated
4468         * gen.c (pointerCode): commented out, not needed now
4469         (pic16_popGet2p): new MOVFF helper function
4470         (genGenPointerGet),
4471         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4472         (shiftRLong): removed duplicate debugging info
4473
4474 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4475
4476         * src/ds390/gen.c (genNearPointerGet),
4477         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4478         optimization with bits, but not bitfields.
4479         * src/ds390/ralloc.c (packRegisters),
4480         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4481
4482 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4483
4484         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4485
4486 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4487
4488         * src/SDCCsymt.h,
4489         * src/SDCCicode.c (operandFromSymbol),
4490         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4491         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4492         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4493         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4494         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4495         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4496         bug #892038
4497         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4498         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4499         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4500         * src/SDCCsymt.c (newSymbol),
4501         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4502         enumerator_list),
4503         * src/SDCCval.h,
4504         * src/SDCCval.c (newiList): fixed bug #885705
4505
4506 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4507
4508         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4509         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4510
4511 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4512
4513         * device/include/c8051f120.h,
4514         * device/include/c8051f300.h,
4515         * device/include/c8051f310.h: added/updated header files for Silicon
4516         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4517         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4518         in new section Submitting patches
4519
4520 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4521
4522         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4523         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4524         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4525         genGenPointerSet),
4526         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4527         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4528         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4529         genGenPointerSet),
4530         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4531         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4532         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4533         genGenPointerSet),
4534         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4535         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4536         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4537         genGenPointerSet): fixed bug #892400
4538         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4539         to eliminate build warnings.
4540         * src/SDCCast.c (processParms),
4541         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4542         fixed bug 751859
4543         * support/valdiag/valdiag.py: added GCC to the list of defines active
4544         when compiling with gcc
4545
4546 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4547
4548         * support/Util/SDCCerr.h,
4549         * support/Util/SDCCerr.c,
4550         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4551         with an incomplete type (fixed bug #883734)
4552         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4553
4554 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4555
4556         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4557
4558 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4559
4560         * src/SDCCast.c (decorateType),
4561         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4562         function pointer implementation
4563         * support/regression/tests/funptrs.c: added tests to verify both forms
4564         of function pointers work correctly. Added tests to verify parameters
4565         are passed in the correct order.
4566
4567 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4568
4569         * device.c (regCompare): registers are sorted by ascending
4570         address and increasing size,
4571         * main.c (_pic16_finaliseOptions): removed the declaration
4572         of compiler macro MCU. Now a macro of the format pic18fxxxx
4573         will be defined from the command line
4574
4575 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4576             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4577
4578         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4579         PCOP_RLCF was overwritten!
4580         * gen.c (genSkip): commented out calls to pic16_emitcode,
4581         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4582         * (genlshTwo),
4583         * (genRRC): added debugging info,
4584         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4585         overwritten while shifting,
4586         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4587         overwritten while shifting,
4588         * (AccLsh),
4589         * (AccRsh),
4590         * (shiftLLeftOrResult),
4591         * (shiftRLeftOrResult),
4592         * (shiftRLong),
4593         * (shiftLLong): Implemented with pic16_emitpcode
4594         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4595         * (genLeftShift): Fixed bug, operand for shift by variable always
4596         was "and"ed with 0x0f,
4597         * (genLeftShiftLiteral),
4598         * (genrshTwo),
4599         * (genRightShiftLiteral): added debugging info,
4600         * (genrshFour): added comment,
4601         * (genRightShift): determined signedness from operand "left"
4602         instead of "result"
4603
4604 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4605
4606         * src/SDCCicode.c (geniCodeParms),
4607         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4608         function pointers, fixed function pointer bugs #861242 and #861896
4609
4610 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4611
4612         * device/include/c8051f000.h,
4613         * device/include/c8051f120.h,
4614         * device/include/c8051f300.h: added header files for Silicon
4615         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4616
4617 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4618
4619         * src/SDCCast.c (processParams): added new type flow and restructured
4620         (gatherAutoInit): added new type flow
4621         (addCast): cosmetic changes
4622         (getLeftResultType): added new type flow for array indices, patch
4623         provided by Stas, see FR #877103
4624         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4625         array index patch by Stas
4626         * src/SDCCast.h: added prototype getResultTypeFromType()
4627         * src/SDCCval.h,
4628         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4629         * src/pic/glue.c (pic14emitStaticSeg),
4630         * src/pic16/glue.c (pic16emitStaticSeg),
4631         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4632         for initialization of symbols
4633         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4634         * support/Util/SDCCerr.h:
4635         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4636         * .version: bumped version number to 2.3.8
4637         * device/include/Makefile.in (install),
4638         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4639         avoid warnings
4640
4641 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4642
4643         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4644         Slade Rich fixed an optimization bug
4645         * src/pic/pcodepeep.c,
4646         * src/pic/pcoderegs.c
4647         * doc/Makefile (install): added test for directory
4648
4649 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4650
4651         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4652         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4653         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4654         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4655         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4656         * as/mcs51/asexpr.c (term),
4657         * as/hc08/asexpr.c (term): fixed bug #887146
4658
4659 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4660
4661         * src/z80/gen.c (genMult): handle single byte result product
4662         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4663         DUMMY_READ_VOLATILE (fixed bug #886367)
4664
4665 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4666
4667         * support/regression/tests/libmullong.c: fixed logic, on little endian
4668         hosts we ended without a mullong_wrapper()
4669
4670 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4671
4672         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4673         virus/worm forged address usage.
4674
4675 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4676
4677         Fixed promotion, it should be done on AST level:
4678         * src/SDCCast.c (addCast): added promotion to int
4679         (decorateType): updated call to upCast()
4680         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4681         usualUnaryConversions()
4682
4683 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4684
4685         * support/regression/tests/literalop.c (mulWrapper): Added a
4686         wrapper to remove integer overflow warnings.
4687
4688         * support/regression/tests/float_trans.c: Made work on host.
4689
4690         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4691         location of sz80.
4692
4693         * support/regression/generate-cases.py (main): Changed from inline
4694         to a main method.
4695
4696         * doc/Makefile (install): Changed to depth first to get rid of
4697         missing directory install warning.
4698
4699         * as/Makefile (install-doc): Made work on Mac.
4700
4701 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4702
4703         * src/SDCCast.c: added an additional type flow in decorateType() of
4704         opposite direction, see feature request #860006; it's enabled at runtime
4705         by setting the environment variable SDCC_NEWTYPEFLOW
4706         * src/SDCCast.h: changed prototype of decorateType()
4707         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4708         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4709         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4710         see feature request #877103
4711         * src/SDCCval.c: updated call of decorateType()
4712         (valBitwise): fixed bug #882876
4713         (valMinus): added promotion
4714         (valLogicAndOr): result is unsigned
4715         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4716         * src/SDCCsymt.c (computeType),
4717         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4718         must not cause an unsigned operation
4719         * src/pic/glue (pic14emitRegularMap),
4720         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4721
4722 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4723
4724         * src/pic/pcode.c (PCodeID): commented out left over debug code
4725
4726 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4727
4728         * support/valdiag/tests/overflow.c: added shift tests
4729         * src/pic/device.c,
4730         * src/pic/gen.c,
4731         * src/pic/gen.h,
4732         * src/pic/glue.c,
4733         * src/pic/main.c,
4734         * src/pic/pcode.c,
4735         * src/pic/pcode.h,
4736         * src/pic/pcodepeep.c,
4737         * src/pic/pcoderegs.c,
4738         * src/pic/ralloc.c,
4739         * src/pic/ralloc.h: applied patch from Slade Rich;
4740         added support for multiple code pages and multiple RAM banks on the
4741         PIC 14 port. The ASM files now no longer simply assume all the
4742         code / RAM are in the same page / bank. This means the linker can
4743         safely allocate code/RAM of separate ASM files to different pages/banks.
4744         * doc/sdccman.lyx: added Slade's tips
4745         * src/mcs51/peeph.def: fixed bug #880768
4746
4747 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4748
4749         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4750         * src/SDCCast.c (decorateType): fixed bug #880197
4751
4752 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4753
4754         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4755         getopt.h.
4756
4757         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4758         strtof is not part of C89 and isn't included with Mac OS X.
4759
4760 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4761
4762         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4763         shiftL2Left2Result): fixed bug #879326
4764         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4765         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4766         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4767         address fetch for clr instruction
4768         * device/lib/hc08/_mulint.c: created optimized assembly version
4769         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4770
4771 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4772
4773         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4774         proposed in FR #877103
4775
4776 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4777
4778         * src/SDCCval.c (cheapestVal): added missing checks
4779         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4780         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4781
4782 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4783
4784         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4785         equal operands
4786
4787 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4788
4789         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
4790         loaded with the linker search paths (-L arguments) and the libraries
4791         to be linked with the current source (-l arguments). Changes
4792         currently will affect only the pic16 port.
4793         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
4794         include path the port specific paths and port specific libraries,
4795         * gplink command now contains the $3 argument,
4796         * src/pic16/device.h,
4797         * src/pic16/device.c,: structure PIC_device is made public and
4798         renamed to PIC16_device, the same for variable Pics which is renamed
4799         to Pics16. Updated all references to them.
4800         * src/pic16/glue.c (pic16glue): corrected bug with code
4801         initialization which bypassed the variable initializations block.
4802
4803         * device/lib/pic16/Makefile.rules: removed --penable-stack from
4804         COMPILE_FLAGS and added the --nostdinc option
4805
4806 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4807
4808         * device/include/mc68hc908jb8.h: Register defs for another member
4809         of the hc08 family. Contributed by Bjorn Bringert - thanks!
4810
4811 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
4812
4813         Documenting changes from previous commits.
4814         * configure.in (version 1.56),
4815         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
4816         when generating output files to configure the pic16 library,
4817         but now I've commented it out, since gputils aren't installed in the
4818         SF compile farm, so library won't compile
4819
4820         * device/lib/Makefile.in (version 1.56): initially I've added in
4821         target 'all' the prerequestive 'model-pic16' so it compiled the
4822         pic16 library, but now I've commented it out for the same reasons
4823         above,
4824         * added targets 'model-pic16' and 'objects-pic16' to compile the
4825         library
4826         * added target 'port-specific-objects-pic16' to handle the
4827         generated libraries and copy them into the build/ directory
4828         * added target 'clean-intermediate-pic16' to clean intermediate
4829         files into pic16 directory
4830         * in target 'installdirs' added line to create directory pic16 in
4831         the installation path
4832
4833         * device/include/Makefile.in (version 1.11): in target 'install'
4834         added lines to copy all header files to installation path,
4835         * in target 'installdirs' added line create directory for pic16
4836         headers in the installation path
4837
4838 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
4839
4840         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
4841          a function call
4842
4843 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
4844
4845         * configure,
4846         * device/lib/configure.in,
4847         * device/lib/configure: fixed for autoconf 2.57
4848
4849 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4850
4851         * src/z80/main.c (_parseOptions): fixed the portmode= command line
4852         option so that it actually works. Made it specific to the z80, since
4853         the gbz80 doesn't have these kinds of I/O ports.
4854
4855 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4856
4857         * device/include/z180.h,
4858         * device/lib/_memcpy.c,
4859         * device/lib/_memmove.c,
4860         * device/lib/_mulint.c,
4861         * device/lib/ser_ir.c,
4862         * device/lib/ser_ir_cts_rts.c,
4863         * device/lib/_strcmp.c,
4864         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
4865         * src/z80/main.c (_process_pragma): add support for pragmas bank and
4866         portmode; added deprecation warning for bank= and protmode= forms.
4867         Also, guard against buffer overflow.
4868         * src/z80/gen.c (aopGet): generate better code for sfr banked read
4869
4870 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4871
4872         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
4873         changed interrupt vector table generation to only emit declared vectors.
4874         * device/include/Makefile.in: added missing backslash
4875         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
4876
4877 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4878
4879         Mainly changes to support compilation of the device libraries
4880         * src/pic16/device.c: stack is allocated via symbol and not
4881         via literal number. The symbol is placed in the corresponding
4882         position of the data ram
4883         * (pic16_dump_section): relocatable and absolute uninitialized
4884         data are now emitted in sorted order to reduce section naming,
4885         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
4886         weren't marked as being in the access bank,
4887
4888 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4889
4890         Added portion of GNU PIC Library under the directory
4891         device/include/pic16 and device/lib/pic16. These files
4892         contain the declarations of SFRs for the PIC18Fxx2 devices.
4893         The directory is initialized via configure from toplevel.
4894
4895 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
4896
4897         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
4898         the spilllocations to be compared correctly
4899
4900 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4901
4902         * src/SDCCast.c (decorateType): fixed bug introduced today
4903
4904 2004-01-12  Borut Razem <borut.razem AT siol.net>
4905
4906         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
4907         doc/sdccman.lyx: upper case pragmas are deprecated
4908
4909 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4910
4911         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
4912         in simpler and even better code
4913
4914 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
4915
4916         * src/SDCCicode.c (operandOperation): fixed bug #874819
4917         * src/SDCCast.c (decorateType): fixed
4918         char foo (unsigned long ul) { return ul > 0; }
4919
4920 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4921
4922         * doc/sdccman.lyx: Moved and added some sections, small changes
4923         all over. Telling LaTeX to be less strict with word spacing
4924         to better keep the right margin. Changed some notes about
4925         maintainance of the ports in section 3.2.1 - is it OK like this?
4926
4927 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4928
4929         SDCC source changes:
4930         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
4931         convilong): modified to inform the pic16 port that builtin functions
4932         are external
4933
4934         PIC16 PORT specific changes:
4935         * src/pic16/device.c pic16_dump_equates() added,
4936         processor registers declared internally by the port are emitted in
4937         the translation as equates,
4938         * src/pic16/gen.c: inline code is passed unprocessed to the
4939         translation,
4940         * (pic16_popGetLit2): fnuction modified to take second operand as
4941         pCodeOp pointer and not as literal,
4942         * (popRegFromIdx): prefixed with pic16_,
4943         * (pic16_popCombine2): modified to receive already allocated pCode
4944         operands,
4945         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
4946         * (genFunction): initializes local stack frame and pushes on stack
4947         all the registers used by this function,
4948         * (genEndFunction): restores all registers from stack and restores
4949         stack frame,
4950         * src/pic16/glue.c (pic16emitRegularMap): various changes and
4951         improvements,
4952         * (pic16glue): changed the program startup sequence,
4953         * added new dbName code 'A' for functions placed in absolute section
4954         * src/pic16/main.c: added function attribute _naked,
4955         * added pragma 'code' to place a fnuction at an absolute address,
4956         * added command line arguments --debug-ralloc and --pcode-verbose,
4957         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
4958         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
4959         * (pic16_newpCodeOpLit2): modified to take the second operand as
4960         pCodeOp pointer,
4961         * (pic16_printpBlock): modified to emit each function in a separate
4962         section,
4963         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
4964         UPPER for immediate operands,
4965         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
4966         instruction,
4967         * src/pic16/peeph.def: all peepholes with movff are commented out,
4968         because there is a problem in the pcode peep optimizer,
4969         * src/pic16/ralloc.c: the register allocator can now reuse local
4970         function symbols for another function. This saves register usage.
4971         * src/pic16/ralloc.h: added flag isLocal in structure regs,
4972
4973         Added file src/pic16/NOTES with information about program writing on
4974         the current port version.
4975
4976 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4977
4978         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
4979         and peephole 252 (array access)
4980
4981 2004-01-09  Borut Razem <borut.razem AT siol.net>
4982
4983         * src/SDCCmain.c : fixed #872250: -l command line defined library
4984           files are scanned before standard library files
4985
4986 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4987
4988         * src/SDCCast.c (decorateType): fixed bug #874046
4989
4990 2004-01-09  Borut Razem <borut.razem AT siol.net>
4991
4992         * support/scripts/sdcc.nsi: remove previous installation
4993
4994 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4995
4996         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
4997         bytes for last interrupt vector (mcs51)
4998         * sdcc.spec: fixed typo
4999
5000 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5001
5002         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5003         gen51Code): more efficient parameter receive for --model-large
5004         ("bug" #845294)
5005
5006 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5007
5008         * src/ds390/main.c,
5009         * src/z80/main.c: added missed needLinkerScript flags (more than
5010         one port structure defined in these file)
5011         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5012         bug #795325
5013
5014 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5015
5016         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5017         * src/port.h: added flag needLinkerScript in port->linker
5018         structure to inform whether to create a .lnk file or not,
5019         * src/avr/main.c,
5020         * src/ds390/main.c,
5021         * src/hc08/main.c,
5022         * src/mcs51/main.c,
5023         * src/pic/main.c,
5024         * src/pic16/main.c,
5025         * src/xa51/main.c,
5026         * src/z80/main.c: changed appropriately to configure
5027         needLinkerScript flag
5028         * src/pic/gen.c,
5029         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5030         * src/pic/glue.c: added variable udata_section_name to
5031         override default uninitialized data segment definition for
5032         devices only with SHAREBANK memory (reported from Erik Epetrich)
5033         * (pic14emitOverlay): modified to emit a commented overlay segment
5034         directive when no overlay data exist
5035         * (picglue): modified to emit uninitialized data segment
5036         according to udata_section_name
5037         * src/pic/main.c (_pic14_parseOptions): added command line
5038         options --udata-section-name=[name] to override default
5039         udata definition name
5040         * modified _linkCmd and _asmCmd to include compiler passed
5041         arguments via -W option
5042         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5043         object file from '.rel' to '.o' in port->linker structure,
5044         changed size of fptr from 2 to 3 in port structure
5045
5046 2004-01-07  Borut Razem <borut.razem AT siol.net>
5047
5048         * support/scripts/sdcc.nsi: update PATH
5049         * support/scripts/sdcc.ico: craeted
5050
5051 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5052
5053         * device/include/Makefile.in: fix install
5054         * doc/Makefile: fix install
5055
5056 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5057
5058         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5059         in bug #860505
5060         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5061         how the function variable allocation summary is displayed; also
5062         include information about variables allocated to the overlay
5063         segment
5064
5065 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5066
5067         * as/mcs51/lkmain.c: Help about -Y option
5068         * as/mcs51/lkarea.c: Fixed gcc warnings
5069
5070 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5071
5072         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5073         fixed warning
5074         * support/valdiag/tests/overflow.c: added
5075         * src/SDCCast.c (decorateType),
5076         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5077         LEFT_OP (left shift)
5078
5079 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5080
5081         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5082         (default behaviour).
5083
5084 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5085
5086         A python script to validate compiler diagnostic messages. It can be
5087         used to verify that sdcc complains about bad c source code and
5088         gives a good location of the error.
5089         * support/valdiag/Makefile,
5090         * support/valdiag/valdiag.py,
5091         * support/valdiag/tests/*
5092
5093 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5094
5095         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5096         * src/SDCCsymt.c (newEnumType),
5097         * src/SDCCsymt.h
5098         * support/Util/SDCCerr.c,
5099         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5100         enum related bugs.
5101         * support/regression/tests/enum.c: added test for enum values that
5102         require at least 2 bytes of storage.
5103
5104 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5105
5106         * src/common.h: added ifndef/define/endif macros
5107         around the header file.
5108         Bug reported from Jesus Calvino-Fraga
5109
5110 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5111
5112         * sdcc.spec: updated
5113         * device/include/Makefile.in: don't install CVS directories
5114         * device/lib/Makefile.in: added removal of CVS directories after install
5115         * doc/Makefile: fixed install, added local_icons
5116         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5117         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5118         * src/ds390/gen.c (genRightShift): fixed bug #870788
5119         * src/SDCCast.c (decorateType): fixed bug #870781
5120
5121 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5122
5123         PIC16 port related changes:
5124         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5125         added variable stackPos,
5126
5127         * gen.c: genCall, assignResultValue: added support for
5128         pushing/retrieving function parameters to/from stack,
5129         genFunction,genEndFunction: setup stack frame for the
5130         generated function,
5131         genAddrOf: will be changed according to bug 863624
5132
5133         * added files genutils.c and genutils.h which contain gen*
5134         debugged and optimised functions extracted from gen.c
5135
5136         * glue.c: added variable 'externs' which holds extern symbols,
5137         pic16emitRegularMap: is modified to properly handle relocatable
5138          symbols under the new scheme,
5139         pic16createInterruptVect: is modified
5140         pic16printPublics: is modified to emit 'global' assembler directives,
5141         added pic16_printExterns to print extern symbols,
5142         pic16glue: initializes stack/frame pointer in the beginning of
5143         the assembly output. Temporary hack, will be corrected later,
5144         because gplink yet does not support stack and SDCC does not
5145         yet support a type of crt0.o object to create the final binary.
5146
5147         * Removed many lines that contain 8051 legacy code.
5148         * The code is finally placed under a 'code' directive.
5149         * Added port specific options.
5150
5151         * _process_pragma: simplified since now we do not need *special*
5152         include file to define SFR registers. But a separate header
5153         will be needed. This will be developed later.
5154         * _pic16_parseOptions: added, parses port specific options:
5155         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5156         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5157         --preplace-udata-with=
5158
5159         * _pic16_setDefaultOptions: modified to initialize section names,
5160         but hack is temporarly out of order since it needs improvement.
5161         * _pic16_genAssemblerPreamble: configuration words are emitted by
5162         their address instead of their name. This part is incomplete and
5163         supports only the 18Fxx2 devices. Other devices will emit an error
5164         during assembly since they do not contain the same set of config
5165         registers
5166         * _pic16_genIVT: is modified,
5167
5168         * pcode.c: added definitions for some hardware registers that are needed
5169         for stack support
5170         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5171         All PCI entries are updated. Now LFSR is supported.
5172         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5173         * added pic16_newpCodeOpLit2 to support instructions with
5174         two literal arguments
5175         * pic16_pCode2str: corrected code that emits assembler instructions
5176         with two literal operands and those that have an access bit modifier
5177         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5178         this fixes a bug which caused some labels to be lost, when an
5179         assembler directive was added, i.e. banksel,
5180         * pic16_FixRegisterBanking: improved logic that causes the insertion
5181         of bank switching,
5182         * InlineFunction: functions that are called once, are not any more
5183         inlined. This can be a port option in the future,
5184
5185         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5186
5187         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5188         hold the corresponding uninitialized symbols,
5189         * pic16_allocProcessorRegister: registers have explicit marked the
5190         accessBank field,
5191         * pic16_allocInternalRegister: registers are explicit marked as
5192         not used,
5193         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5194         processing list, so bit registers were lost,
5195         *
5196
5197         * ralloc.h: added field 'accessBank' and original symbol operand
5198         in register definition,
5199         * removed the field isMapped from register definition,
5200
5201         ** Several functions have been removed from various sources:
5202         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5203         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5204         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5205         pic16_assignRelocatableRegisters
5206
5207         ** others have been introduced:
5208         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5209         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5210
5211 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5212
5213         * support/scripts/inc2h.pl: changed definition of BIT_AT
5214         to emit 'sbit at' instead of 'bit at'. This was a request.
5215
5216         PIC16 port related preliminary changes:
5217         * gen.c: prefixed function popRegFromString with
5218         pic16_ and all references to it corrected
5219         * pcode.c: all pic16_pc_* hardware registers prefixed
5220         with underscore (_),
5221         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5222         * ralloc.c: newReg(): when register is REG_SFR then
5223         set address to rIdx,
5224         pic16_allocProcessorRegister(): marks register wasUsed=0
5225         pic16_writeUsedRegs(): added a call to assign processor
5226         registers via pic16_assignFixedRegisters
5227
5228 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5229
5230         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5231         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5232         variables in unused register banks.  Also the SSEG is placed
5233         wherever there is enough space for it, and IDATA can be anywhere
5234         in internal RAM.  For now compile using -Wl-Y[stack_size].
5235         The mem file is different for this option as well, since it
5236         makes no sense of talking about DSEG lenght.
5237
5238 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5239
5240         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5241         in certain cases, e.g. when ROM assignment, patch provided
5242         from Albert den Haan.
5243
5244 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5245
5246         Many signedness and type propagation fixes:
5247         * src/SDCCicode.c: made geniCodeCast() static
5248         replaced SPEC_ by IS_ (cosmetic)
5249         (operandOperation): fixed div and mod operation
5250         (usualBinaryConversions): added support for promotion of char
5251         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5252         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5253         (geniCodeAdd): an array index will stay unsigned, even if promoted
5254         from char to int
5255         (geniCodeArray): ditto
5256         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5257         * src/SDCCsymt.c (computeType): added more support for char;
5258         promotion of char is selectable by promoteCharToInt, fixed signedness
5259         for all cases
5260         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5261         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5262         * src/SDCCval (val*): replaced signedness calculation by
5263         computeType()
5264         rearranged if-branches (cosmetic)
5265         (valShift): added warning W_SHIFT_CHANGED
5266         (valCompare): fixed problem with different types
5267         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5268         * support/regression/tests/literalop.c: added many cases
5269         * support/regression/tests/ast_constant_folding.c: changed finally to
5270         'unsigned int'
5271         * .version: new year, new version: 2.3.7
5272         * src/SDCCmain.c (main): applied patch #866468
5273         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5274         provided by Scott Bronson
5275         * doc/sdccman.lyx: updated documentation for sdcdb
5276         updated and added chapter tips
5277
5278 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5279
5280         * src/SDCCsymt.h: missing from yesterday's commits
5281
5282 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5283
5284         * src/SDCC.y (struct_or_union_specifier),
5285         * support/Util/SDCCerr.c,
5286         * support/Util/SDCCerr.h: verify that struct & union tags are used
5287         as declared.
5288
5289 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5290
5291         * src/SDCCglobl.h: missing from yesterday's commits
5292
5293 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5294
5295         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5296         sft_attributes, struct_declaration, parameter_declaration,
5297         type_name, start_block, declaration_list),
5298         * src/SDCC.lex (check_type): support redefinition of typedef names
5299
5300 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5301
5302         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5303         aligned xdata arrays. Erik helped me with the if clause.
5304
5305 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5306
5307         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5308         warning
5309
5310 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5311
5312         * src/SDCCast.h,
5313         * src/SDCCast.c (newAst_),
5314         * src/SDCCicode.h,
5315         * src/SDCCicode.c (ast2iCode, newiCode),
5316         * src/SDCCglobl.h,
5317         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5318         expr, statement, expression_statement, selection_statement,
5319         iteration_statement, expr_opt, jump_statement): foundation for tracking
5320         sequence points
5321         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5322         point code too)
5323
5324 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5325
5326         * support/Util/SDCCerr.c,
5327         * src/SDCCast.h,
5328         * src/SDCCast.c (createCase, createDefault, decorateType),
5329         * src/SDCClabel.c (labelUnreach),
5330         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5331         to error messages.
5332         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5333         (with thanks to Stas Sergeev)
5334         * device/include/time.h,
5335         * device/lib/time.c (CheckTime): suppress unreachable code warning
5336
5337 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5338
5339         * src/SDCCast.c (createIvalCharPtr),
5340         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5341         bug #753752)
5342         * support/regression/tests/nullstring.c: tests for these two bugs
5343
5344 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5345
5346         * support/Util/SDCCerr.h,
5347         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5348         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5349         about storage class and 'at' used inside struct or union
5350         * src/SDCCBBlock.c (iCodeFromeBBlock),
5351         * src/SDCCcse.c (ifxOptimize),
5352         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5353         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5354         printIval, emitStaticSeg, emitOverlay),
5355         * src/SDCClabel.c (deleteIfx),
5356         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5357         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5358         gatherAutoInit, processParms),
5359         * support/Util/SDCCerr.h,
5360         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5361         reporting for post-parse errors.
5362
5363 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5364
5365         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5366         implicit casts via union; they don't work on big endian systems
5367         (possible fix for bug #861138)
5368
5369 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5370
5371         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5372         * src/mcs51/main.c: fixed the fix for bug #737001
5373
5374 2003-12-15  Borut Razem <borut.razem AT siol.net>
5375
5376         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5377
5378 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5379
5380         * support/makebin/makebin.c: put output in binary mode
5381
5382 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5383
5384         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5385         xdata and data memory on startup. Set the environment variable
5386         SDCC_NOGENRAMCLEAR to disable this.
5387         * src/mcs51/peephole.def,
5388         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5389         (allows non-interrupt and interrupt code to safely compete for a resource
5390         without the non-interrupt code having to disable interrupts)
5391
5392 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5393
5394         * src/SDCCicode.c (geniCodeAdd),
5395         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5396         with valFromType if type might be a pointer and host is big endian).
5397         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5398         types, not just integer types.
5399         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5400         multiply defined with mismatching "at" address.
5401
5402 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5403
5404         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5405         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5406         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5407         with embedded nulls (fixed bug #753752)
5408
5409 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5410
5411         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5412         Apparently this did not see much testing (endless loop)
5413
5414 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5415
5416         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5417
5418 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5419
5420         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5421         gracefully handle NULL memmap pointers
5422
5423 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5424
5425         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5426         instead of deleting the iCode when an operand is volatile
5427         * src/z80/gen.c (genDummyRead),
5428         * src/mcs51/gen.c (genDummyRead),
5429         * src/ds390/gen.c (genDummyRead),
5430         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5431         not just IC_RIGHT
5432         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5433         * src/SDCC.y: fixed bug #850420
5434
5435 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5436
5437         Applied z80 i/o port patch from Peter Townson and fixed some operators
5438         to better handle operands in A register.
5439         * device/include/z180.h
5440         * src/SDCC.y
5441         * src/SDCCglue.c
5442         * src/z80/gen.c
5443         * src/z80/gen.h
5444         * src/z80/main.c
5445         * src/z80/peeph-z80.def
5446         * src/z80/peeph.def
5447         * src/z80/z80.h
5448
5449 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5450
5451         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5452
5453 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5454
5455         * device/lib/hc08/_mullong.c: Removed extra #endif
5456
5457 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5458
5459         * sim/ucsim/hc08.src/inst.cc,
5460         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5461         carries from x to h
5462         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5463         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5464         * device/include/stdarg.h: fixed varargs for hc08
5465         * device/lib/Makefile.in,
5466         * device/lib/hc08/Makefile,
5467         * device/lib/hc08/_mulint.c,
5468         * device/lib/hc08/_mullong.c: fixed some endian problems
5469
5470 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5471
5472         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5473         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5474         * device/lib/_gptrget.c,
5475         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5476
5477 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5478
5479         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5480         * src/SDCCast.c (astErrors): fixed bug #846007
5481         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5482
5483 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5484
5485         * src/SDCCast.c (decorateType): disabled a transformation I added in
5486         revision 1.188 (access to fields of a structure at an absolute address);
5487         it breaks with bitfields, extern declarations, and gcse analysis.
5488         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5489         could be assigned through a pointer, so don't complain.
5490         * src/SDCCast.c (astErrors),
5491         * src/SDCCast.h,
5492         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5493
5494 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5495
5496         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5497         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5498         output of __config directives, since gpasm now supports them
5499         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5500         pre-processor macro, i.e. -DMCU=p18f452
5501         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5502         and modified to handle 'cast' icode similarly to '=' icode
5503         * src/pic16/device.h (typedef struct PIC_device): added field
5504         'extMIface' to indicate that chip has external memory interface
5505         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5506         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5507         18F8720
5508
5509 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5510
5511         * src/SDCC.y (pointer): fixed bug #846006
5512         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5513         * src/SDCCast.c (decorateType): fixed bug #846009
5514         * src/ds390/peeph.def,
5515         * src/ds390/gen.c (genAnd, genOr),
5516         * src/mcs51/peeph.def,
5517         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5518
5519 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5520
5521         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5522         * src/SDCCdflow.c
5523         * src/SDCCcse.c
5524         * src/SDCCcse.h
5525         * src/SDCCBBlock.h
5526         * src/SDCCBBlock.c
5527
5528 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5529
5530         fixed bug #845089
5531         * src/SDCCbitv.h,
5532         * src/SDCCbitv.c: added function to free a bitvector
5533         * src/SDCClrange.h,
5534         * src/SDCClrange.c: added function to recompute the liveranges
5535         * src/avr/ralloc.c,
5536         * src/ds390/ralloc.c,
5537         * src/hc08/ralloc.c,
5538         * src/mcs51/ralloc.c,
5539         * src/pic/ralloc.c,
5540         * src/pic16/ralloc.c,
5541         * src/xa51/ralloc.c,
5542         * src/z80/ralloc.c: recompute the liveranges after register packing
5543
5544 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5545
5546         * src/SDCCloop.c (newInduction): fixed bug #845630
5547
5548 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5549
5550         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5551         inadvertantly left behind from my 2003-11-12 change
5552
5553 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5554
5555         Updated headers I neglected to commit yesterday.
5556         * src/SDCClrange.h,
5557         * src/SDCCicode.h
5558
5559 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5560
5561         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5562         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5563         * src/SDCCopt.c (eBBlockFromiCode),
5564         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5565         the creation of the key hash table from the sequencing so it can be used
5566         earlier (for some GCSE bug fixes still pending)
5567
5568 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5569
5570         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5571         * support/regression/tests/addsub.c: testing genPlus shortcut
5572
5573 2003-11-15  Borut Razem <borut.razem AT siol.net>
5574
5575         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5576
5577 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5578
5579         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5580         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5581         ordering is immaterial.
5582         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5583
5584 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5585
5586         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5587         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5588         (SIGSEV) of bug #840381
5589         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5590         unlink new file before rename if new and old filenames are the same)
5591
5592 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5593
5594         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5595         uninitialized variables) for the mcs51. Set environment variable
5596         SDCC_GENRAMCLEAR to test.
5597         xdata initialization slightly shorter
5598
5599 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5600
5601         * src/SDCCsymt.h,
5602         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5603         #838241 & 780691 (basicly the same bug)
5604         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5605         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5606
5607 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5608
5609         * src/SDCCmain.c (linkEdit): "fix" #834252
5610
5611 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5612
5613         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5614         * src/SDCCast.h,
5615         * src/SDCC.y: fixed bug #819403
5616
5617 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5618
5619         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5620         the reentrant attribute.
5621         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5622         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5623         simulation
5624         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5625         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5626         erroneously reduced to a literal.
5627         * src/hc08/ralloc.c (packRegisters, rematStr),
5628         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5629         some cases
5630
5631 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5632
5633         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5634         * doc/sdccman.lyx: changed from 'article' to 'book'
5635         * doc/Makefile: readded test_suite_spec and cdbfileformat
5636
5637 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5638
5639         * device/include/stdlib.h: include malloc.h to comply with ANSI
5640         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5641
5642 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5643
5644         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5645         * doc/clean.mk: also remove *.out files
5646         * doc/sdccman.lyx: some additions, larger top/bottom margins
5647
5648 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5649
5650         * src/SDCC.y: fixed bug #837365
5651         * support/regression/tests/bitopcse.c
5652         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5653         a symbol (might be valop instead)
5654         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5655         * device/lib/clean.mk: added hc08 to the cleaning list
5656
5657 2003-11-04  Borut Razem <borut.razem AT siol.net>
5658
5659         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5660           made 2003-11-04
5661         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5662           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5663           malloc is declared in standard stdlib.h
5664
5665 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5666
5667         * device/lib/hc08/Makefile: need to clean .rel not .o files
5668         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5669
5670 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5671
5672         * src/port.h,
5673         * src/hc08/main.c,
5674         * src/mcs51/main.c,
5675         * src/ds390/main.c,
5676         * src/z80/main.c,
5677         * src/avr/main.c,
5678         * src/pic/main.c,
5679         * src/pic16/main.c,
5680         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5681         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5682         tests (which uses the port's oclsExpense function)
5683         * src/SDCC.y,
5684         * src/SDCCast.c,
5685         * src/SDCCicode.c,
5686         * src/hc08/gen.c,
5687         * src/ds390/gen.c,
5688         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5689
5690 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5691
5692         * src/SDCCcse.c (ifxOptimize),
5693         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5694         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5695         deleting the IFX iCode.
5696         * src/hc08/ralloc.c: reduced unneeded slocs
5697         * src/hc08/gen.c: fixed bug in asmopToBoolean
5698
5699 2003-11-04  Borut Razem <borut.razem AT siol.net>
5700
5701         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5702           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5703           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5704           transferred to configure
5705
5706 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5707
5708         Use headers defined in the C[++] standards:
5709         * sim/ucsim/gui.src/serio.src/fileio.cc
5710         * sim/ucsim/gui.src/serio.src/frontend.cc
5711         * sim/ucsim/gui.src/serio.src/main.cc
5712         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5713         * support/Util/NewAlloc.c
5714         * as/hc08/lklibr.c
5715         * as/mcs51/lklibr.c
5716         * as/z80/aslist.c
5717         * as/z80/assym.c
5718
5719 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5720
5721         * Added MSVC projects for hc08 assembler and linker:
5722         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5723         /as/hc08/link_hc08.dsp
5724
5725 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5726
5727         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5728
5729 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5730
5731         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5732
5733 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5734
5735         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5736
5737 2003-10-31  Borut Razem <borut.razem AT siol.net>
5738
5739         * support/cpp2/cpplib.h,
5740           support/cpp2/cpplib.c,
5741           support/cpp2/cpplex.c,
5742           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5743           to switch _asm block preprocessing on / off. Default is
5744           #pragma preproc_asm +
5745
5746 2003-10-31  Borut Razem <borut.razem AT siol.net>
5747
5748         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5749           when outputting comment blocks (when executed with -C option) and
5750           _asm (SDCPP specific) blocks
5751
5752 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5753
5754         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5755
5756 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5757
5758         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5759
5760 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5761
5762         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5763         * src/SDCCast.c (decorateType): fixed bug #832664
5764
5765 2003-10-31  Borut Razem <borut.razem AT siol.net>
5766
5767         * support\cpp2\cpplex.c: fixed for SDCPP:
5768           comments(when executed with -C option) and _asm blocks
5769           were included even if they where in skipped #if block.
5770           Applied solution from GCC cpp 3.3.2
5771
5772 2003-10-31  Borut Razem <borut.razem AT siol.net>
5773
5774         * src/SDCC.lex: sdcc now understands both formats:
5775           '# <line_number> <file_name>' and
5776           '#line <line_number> <file_name>'
5777         * support/cpp2/cppmain.c: sdcpp now generates the standard
5778           '# <line_number> <file_name>' instead of former
5779           '#line <line_number> <file_name>'
5780
5781 2003-10-30  Borut Razem <borut.razem AT siol.net>
5782
5783         * support/cpp2/cpphash.h,
5784         * support/cpp2/cpplib.h
5785         * support/cpp2/cpplex.c,
5786         * support/cpp2/cppmain.c,
5787         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5788
5789 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5790
5791         Fixed a number of problems revealed by bug #827883.
5792         * src/SDCCloop.c (loopInvariants): Spill location of the
5793         result operand should be recomputed if extracted from
5794         a loop. Also, don't extract assignments of an iTemp
5795         from a literal.
5796         * src/SDCCast.c (isConformingBody): loop reversal should
5797         not occur if the control variable is involved with a
5798         relational operator.
5799
5800 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
5801
5802         * .version: bumped to 2.3.6 to reflect the big improvements
5803         made by Erik and Klaus. Thanks!
5804
5805 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
5806
5807         Replaced the livrange code.
5808         * src/SDCClrange.c: added new LR code
5809         * src/SDCCloop.c,
5810         * src/SDCCBBlock.h: removed remainig parts from old LR code
5811         * src/ds390/ralloc.c,
5812         * src/ds390/gen.c: minor fixes to make it work with new code
5813
5814 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5815
5816         * as/hc08/asm.h,
5817         * as/hc08/lkrloc.c,
5818         * src/hc08/gen.c,
5819         * src/hc08/ralloc.c: Fix various warnings related to the hc08
5820         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
5821         (tweaked fix for bug #818696)
5822
5823 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5824
5825         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
5826
5827 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5828
5829         * src/SDCCmain.c,
5830         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
5831         * src/mcs51/gen.c (gencjneshort),
5832         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
5833         more efficient (per Scott Bronson's suggestion)
5834
5835 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5836
5837         Extended the semantics of the critical keyword to include
5838         individual statements. See RFE #827755 and #799831
5839         * src/SDCC.y
5840         * src/SDCCicode.c
5841         * src/SDCCopt.c
5842         * src/SDCCast.c
5843         * support/Util/SDCCerr.c
5844         * support/Util/SDCCerr.h
5845         * src/mcs51/gen.c
5846         * src/ds390/gen.c
5847         * src/hc08/gen.c
5848
5849 2003-10-19  Borut Razem <borut.razem AT siol.net>
5850
5851         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
5852
5853 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5854
5855         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
5856         Fixed bug #818696
5857         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
5858         and predecrement operand is displayed
5859
5860 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5861
5862         * src/SDCCval.c (valMinus): fixed bug #826041
5863
5864 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5865
5866         Some hc08 related updates that I missed earlier
5867         * sim/ucsim/stypes.h
5868         * support/regression/ports/hc08/spec.mk
5869
5870 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5871
5872         New target "hc08" for the Motorola 68hc08 family of micros
5873
5874         * configure
5875         * configure.in
5876         * Makefile
5877         * src/hc08/*
5878         * src/SDCCmain.c
5879         * src/port.h
5880         * sim/ucsim/hc08.src/*
5881         * sim/ucsim/configure.in
5882         * src/ucsim/configure
5883         * sim/ucsim/packages_in.mk
5884         * as/hc08/*
5885         * as/Makefile
5886         * device/include/mc68hc908qy.h
5887         * device/lib/hc08/*
5888         * device/lib/Makefile.in
5889         * support/regression/ports/hc08/*
5890         * support/regression/Makefile
5891
5892 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5893
5894         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
5895         regression test
5896         * src/ds390/gen.c (genCast): fixed bug #821957
5897
5898 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5899
5900         * device/lib/logf.c: "fixed" overlay bug
5901         * support/regression/ports/host/spec.mk: added m library
5902         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
5903         * support/regression/tests/float_trans: added (for Eric)
5904
5905 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
5906
5907         * src/mcs51/gen.c (genCpl): fixed bug
5908         http://sf.net/mailarchive/message.php?msg_id=6263915
5909
5910 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
5911
5912         * src/SDCCast.c (decorateType): added extended constant folding
5913         * src/SDCCsymt.c (computeType): cleanup
5914         * src/SDCCval.c (valShift): minor optimization
5915         * support/regression/tests/ast_constant_folding.c: added
5916
5917 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5918
5919         * src/SDCCmain.c: removed some unintended changes
5920
5921 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5922
5923         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
5924         * src/z80/gen.c: fixed part of bug #817589
5925         * src/SDCCsymt.c (checkFunction): fixed bug #817895
5926
5927 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
5928
5929         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
5930         * src/SDCCcflow.c
5931         * src/SDCCcse.c
5932         * src/SDCCdflow.c
5933         * src/SDCClabel.c
5934         * src/SDCClrange.c
5935         * src/SDCCmem.c
5936         * src/SDCCopt.c
5937         * src/SDCCpeeph.c
5938         * src/SDCCset.c
5939         * src/avr/ralloc.c
5940         * src/ds390/ralloc.c
5941         * src/izt/ralloc.c
5942         * src/mcs51/ralloc.c
5943         * src/pic/ralloc.c
5944         * src/pic16/ralloc.c
5945         * src/xa51/ralloc.c
5946         * src/z80/ralloc.c
5947         * src/z80/gen.c: removed unused label "release:"
5948
5949 2003-10-06  Borut Razem <borut.razem AT siol.net>
5950
5951         * src/SDCC.lex: removed definition of unused variables
5952           save_optimize and save_options
5953
5954 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
5955
5956         * clean.mk: removed '=' in "-maxdepth=1"
5957         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
5958         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
5959
5960 2003-10-06  Borut Razem <borut.razem AT siol.net>
5961
5962         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
5963           my_unput() replaced by unput()
5964
5965 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
5966
5967         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
5968         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
5969         type-punned pointer will break strict-aliasing rules"
5970         Old LR behaviour is again default; Klaus' LR can be choosen by
5971         defining the environment variable LRKLAUS
5972         * src/SDCCBBlock.h
5973         * src/SDCCloop.c
5974         * src/SDCClrange.c
5975         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
5976         * clean.mk: fixed removal of files in bin/CVS/
5977         * device/lib/clean.mk: fixed removal of directories small and large
5978         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
5979         * src/SDCCicode.c,
5980         * src/SDCCval.c: removed superflous test for pedantic
5981
5982 2003-10-05  Borut Razem <borut.razem AT siol.net>
5983
5984         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
5985           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
5986           message "unmatched #pragma SAVE and #pragma RESTORE"
5987
5988 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5989
5990         * doc/sdccman.lyx: various additions and updates (interrupts, inline
5991           assembly, critical functions, atomic, nojtbound)
5992
5993 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
5994
5995         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
5996         * src/SDCCBBlock.h
5997         * src/SDCCloop.c
5998         * src/SDCCloop.h
5999         * src/SDCClrange.c
6000
6001 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6002
6003         * src/z80/gen.h,
6004         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6005         * src/mcs51/gen.h
6006         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6007         * src/ds390/gen.h
6008         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6009         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6010         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6011
6012 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6013
6014         * src/z80/gen.c (genRet): fixed bug #524753
6015         * src/z80/gen.c (genCast): fixed internal error on cast from
6016         pointer to long
6017         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6018         fix for bug #477835 to the z80
6019         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6020         for tracking iCodes in the peephole optimizer for z80
6021
6022 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6023
6024         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6025         the other part of bug #814548
6026         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6027
6028 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6029
6030         * src/SDCCcse.c: fixed part of bug #814548
6031
6032 2003-09-28  Borut Razem <borut.razem AT siol.net>
6033
6034         * src/asm.c: rewrite of printILine() to use temporary file instead
6035           a pipe
6036         * src/xa51/main.c: commented out declaration of int rewinds
6037
6038 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6039
6040         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6041
6042 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6043
6044         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6045         * src/asm.c (printILine): Fixed bug #811015
6046
6047 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6048
6049         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6050         freeing.
6051
6052 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6053
6054         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6055         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6056         to correctly handle general case of AOP_PAIRPTR
6057         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6058
6059 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6060
6061         * src/mcs51/ralloc.c (fillGaps),
6062         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6063         register positioning bug)
6064
6065 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6066
6067         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6068
6069 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6070
6071         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6072         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6073         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6074         (ralloc doesn't intentionally do this now, but perhaps later)
6075         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6076         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6077         register positioning bugs (Fixed bug #762602 and #795325)
6078         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6079         (Fixed bug #808779)
6080         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6081         lines that --i-code-in-asm generates
6082
6083 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6084
6085         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6086         trying to fclose a FILE* that was already closed.
6087
6088 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6089
6090         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6091         of const struct should be treated as if const themselves)
6092
6093 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6094
6095         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6096
6097 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6098
6099         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6100         Unix (/n) and DOS (/r/n) line terminations.
6101
6102 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6105         bug #613775
6106
6107 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6108
6109         * src/mcs51/gen.c (genFunction, genEndFunction),
6110         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6111         and restore of EA so that stack offsets to parameters are
6112         correct when using both critical and reentrant/stack-auto.
6113         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6114         size (can be triggered in error if sloc is shared between
6115         different sized objects)
6116         * device/include/float.h: fixed macros to explicitly use
6117         unsigned long where needed
6118
6119 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6120
6121         Feature req. 799831: added code to allow nesting of critical functions
6122         * src/mcs51/gen.c (genFunction, genEndFunction)
6123         * src/ds390/gen.c (genFunction, genEndFunction)
6124
6125 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6126
6127         * src/SDCCsymt.c (sclsFromPtr),
6128         * src/SDCCsymt.h,
6129         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6130         support for standard C idiom of memory mapped variables; for
6131         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6132         to xdata int at 0x1234 tempvar = 1.
6133         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6134         provided by Akiya ISHIDA
6135
6136 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6137
6138         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6139         * src/SDCCval.c (constVal): added reduction from int to char
6140         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6141         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6142         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6143         to ignore the sign
6144         * support/regression/tests/shifts.c: fixed
6145
6146 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6147
6148         * src/z80/gen.c (genXor): Fixed bug #805445
6149
6150 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6151
6152         Fixed bug #621531 (const & volatile confusion in the type chain).
6153         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6154         refer to the const or volatile state of the pointer itself.
6155
6156         * src/SDCCast.c
6157         * src/SDCCglue.c
6158         * src/SDCCicode.c
6159         * src/SDCCsymt.c
6160         * src/SDCCval.c
6161         * src/SDCC.y
6162         * src/SDCCsymt.h
6163         * src/pic/gen.c
6164         * src/pic/ralloc.c
6165         * src/pic16/gen.c
6166         * src/pic16/ralloc.c
6167         * support/regression/tests/const.c
6168
6169 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6170
6171         When checking for duplicated modules, use absolute paths
6172         instead of relative paths.  Files changed:
6173
6174         * as/mcs51/lklib.c
6175         * link/z80/lklib.c
6176
6177 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6178
6179         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6180
6181 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6182
6183         * device/include/string.h: added size_t typedef, changed
6184         prototypes to use size_t, eliminated separate reentrant and
6185         non-reentrant declarations, added _memmove declaration
6186         * device/lib/_memcpy.c: changed to use size_t instead of int,
6187         changed /4 to >>2 to avoid division library call
6188         * device/lib/_memcmp.c,
6189         * device/lib/_memset.c,
6190         * device/lib/_strncat.c,
6191         * device/lib/_strncpy.c,
6192         * device/lib/_strncmp.c: changed to use size_t instead of int
6193         * device/lib/_memmove.c: new file (fixed bug #772294)
6194         * device/lib/Makefile.in: added _memmove.c
6195         * device/lib/z80/asm_strings.s: fixed bug #772290
6196         * support/regression/tests/bitfields.c: attempt to fix host assertion
6197         failure on amd64-unknown-linux2.2
6198
6199 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6200
6201         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6202         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6203         * as/z80/asmain.c (main): fixed bug #801766
6204
6205 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6206
6207         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6208         compilers
6209
6210 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6211
6212         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6213         reported in bug #800609
6214
6215 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6216
6217         * Top header beautifications in src/pic16 directory:
6218           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6219           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6220           pcoderegs.h, ralloc.c, ralloc.h
6221         * main.c: added top header and GPL license notice
6222         * pcode.c: fixed the if-conditional warning
6223
6224 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6225
6226         * device/lib/_mullong.c: replaced int by short for gcc
6227
6228 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6229
6230         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6231         and JUMPTABLE iCodes properly now (worked by accident before)
6232         * src/mcs51/gen.c (leftRightUseAcc),
6233         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6234         iCode properly now. Use getSize instead of nRegs since a & b
6235         aren't part of the nRegs tally.
6236
6237 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6238
6239         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6240         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6241           before instructions that use the _STATUS register
6242
6243 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6244
6245         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6246         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6247         fetching of the pointer
6248         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6249         copied from genNearPointerSet()
6250         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6251         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6252         If they pop r0/r1 they must be called in the opposite order than aopOp().
6253         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6254         (resp. --stack-auto), prepared for --xstack
6255
6256 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6257
6258         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6259
6260 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6261
6262         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6263         these ports have their own __sdcc_external_start()
6264
6265 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6266
6267         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6268         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6269         type for bits was changed. It resulted in bit variables becoming
6270         global, which is not permitted in PIC 14 assembly output.
6271
6272 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6273
6274         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6275
6276 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6277
6278         Z80 and MCS51 linkers complaint if a public symbol is defined
6279         in more than one library module:
6280
6281         * as/mcs51/lklib.c
6282         * link/z80/lklib.c
6283         * as/mcs51/Makefile.in
6284
6285 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6286
6287         A few small changes that speed up the peephole optimizer.
6288
6289         * src/SDCCpeeph.c
6290
6291 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6292
6293         Try to make the peephole optimizer smarter by maintaining
6294         an association between the assembly source code and the
6295         iCodes that originated them. Put this information to use
6296         with a new peephole rule condition "notVolatile" so that
6297         the rules can be aggressive yet still safe.
6298
6299         * src/SDCCpeeph.c
6300         * src/SDCCpeeph.h
6301         * src/mcs51/gen.c
6302         * src/mcs51/peeph.def
6303
6304 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6305
6306         Fixed bug #741761
6307
6308         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6309         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6310         if the left or right operand symbols have the accuse flag set.
6311
6312 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6313
6314         Changed the type of the result of the ! (NOT) operator to char;
6315         previously it returned the same type as the source. This allows
6316         us to eliminate all the genFloatNot functions (all of its target
6317         implementations were very buggy) since !float can use the same
6318         code as !long now.
6319
6320         * src/SDCCicode.c (ast2iCode): ! returns char
6321         * src/mcs51/gen.c (genNot, genNotFloat),
6322         * src/ds390/gen.c (genNot, genNotFloat),
6323         * src/z80/gen.c (genNot, genNotFloat),
6324         * src/pic/gen.c (genNot, genNotFloat),
6325         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6326
6327 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6328
6329         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6330         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6331            during interrupts. Ensure WSAVE is located at a shared bank address.
6332         2. Fixed page selection in some places
6333         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6334            the registers name strings.
6335         4. Fixed "signed / unsigned compare" compiler warnings.
6336         5. The PIC port manages its own allocation of the general purpose
6337            registers, but makes no attempt to reuse them. As a result when
6338            compiling it soon runs out of general purpose registers. Some
6339            additional code was added to the files pcode.c and device.c to walk
6340            through the function call tree and rename the registers so that they
6341            get reused.
6342
6343         * src/pic/device.c
6344         * src/pic/gen.c
6345         * src/pic/glue.c
6346         * src/pic/pcode.c
6347         * src/pic/pcode.h
6348         * src/pic/ralloc.c
6349         * src/pic/ralloc.h
6350         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6351         genPlus() & genMinus() when the result is the same as left or right
6352
6353 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6354
6355         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6356
6357 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6358
6359         Made bitfield a distinct type from bit so that bitfields
6360         convert as per ANSI C and bits retain their traditional
6361         boolean style behaviour. Implemented bitfield support in
6362         the z80 port.
6363
6364         * src/SDCCsymt.h,
6365         * src/SDCCsymt.c,
6366         * src/SDCCast.c,
6367         * src/cdbFile.c,
6368         * src/mcs51/gen.c,
6369         * src/ds390/gen.c: bit v bitfield split
6370         * src/z80/gen.c: New support for bitfields
6371         * support/regression/tests/bitfields.c: reenabled z80,
6372         added more tests
6373
6374 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6375
6376         Rules 246.x, 247.x relate to bitfields, the others speed up
6377         access to xdata mapped I/O devices.
6378
6379         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6380
6381 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6382
6383         Cleaned up genPackBits and genUnpackBits and added two helper
6384         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6385         for literal assignments in genPackBits (thanks to Frieder for
6386         reminding me).
6387
6388         * src/mcs51/gen.c
6389         * src/ds390/gen.c
6390
6391 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6392
6393         Fixed bug #748310 (pointer to function type mishandled when the
6394         function name is omitted). Also fixed a SIGSEGV when a function
6395         attribute (reentrant, etc) is used on a non-function or on a
6396         function but misplaced before the parameter list.
6397
6398         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6399         bug #748310
6400         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6401         * support/Util/SDCCerr.h,
6402         * support/Util/SDCCerr.c: Added func attr misuse error msg
6403
6404 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6405
6406         Fixed bug #787649 by anonymous
6407         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6408         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6409
6410 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6411
6412         Fixed numerous bitfield problems.
6413
6414         * src/SDCC.y: More bitfield related error checking
6415         * src/SDCCsymt.h,
6416         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6417         * support/Util/SDCCerr.h,
6418         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6419         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6420         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6421         * support/regression/tests/bitfields.c: tests added
6422
6423 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6424
6425         Made the constant following the "interrupt" keyword optional. If
6426         omitted, the function will not automatically be given an entry
6427         in the interrupt vector table (similar to #pragma NOIV, but
6428         less syntacticly kludgy). The interrupt number is also now
6429         range checked. Also fixed a bug in the high order bit example
6430         in the manual.
6431
6432         * src/SDCC.y
6433         * src/SDCCmem.c
6434         * src/SDCCglue.c
6435         * src/SDCCsymt.h
6436         * support/Util/SDCCerr.c
6437         * support/Util/SDCCerr.h
6438         * doc/sdccman.lyx
6439
6440 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6441
6442         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6443         * src/SDCCicode.c (operandOperation): rewritten some ops
6444         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6445         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6446         other type
6447         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6448         be re-activated by defining REDUCE_LITERALS)
6449         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6450         unsigned, but are signed by default
6451         * src/SDCCval.c (constVal): rearranged
6452         * src/SDCCval.c (valMod): preliminary fix
6453         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6454         * support/regression/literalop.c: added, work in progress
6455
6456 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6457
6458         Generate warnings for useless declarations like "char data;"
6459         that don't do what new users expect.
6460
6461         * src/SDCC.y
6462         * support/Util/SDCCerr.h
6463         * support/Util/SDCCerr.c
6464
6465 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6466
6467         * src/SDCCval.c (valMult): fix overflow detection of negative int
6468
6469 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6470
6471         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6472
6473         Changes to support big endian targets:
6474
6475         * src/ports.h
6476         * src/SDCCglue.c
6477         * src/avr/main.c
6478         * src/ds390/main.c
6479         * src/izt/i186.c
6480         * src/mcs51/main.c
6481         * src/pic/main.c
6482         * src/pic16/main.c
6483         * src/xa51/main.c
6484         * src/z80/main.c
6485
6486 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6487
6488         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6489         * device/lib/time.c: fixed warning "integer overflow in expression"
6490
6491 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6492
6493         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6494         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6495         constants are unsigned; added recognition of "u" flag for unsigned
6496         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6497         * src/SDCCval.c (valDiv, valMod): fixed signdness
6498         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6499         signedness of modulo, left and right shift
6500         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6501         * support/Util/SDCCerr.h: added warning W_INT_OVL
6502         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6503         * src/SDCCast.c (ast_print): improved output of constants
6504
6505 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6506
6507         Fixed some warnings when building with MSVC:
6508
6509         * as\mcs51\asdata.c
6510         * as\z80\asdata.c
6511         * as\mcs51\asm.h
6512         * as\z80\asm.h
6513         * link\z80\aslink.h
6514         * link\z80\lkdata.c
6515         * link\z80\lkeval.c
6516         * link\z80\lkgb.c
6517         * link\z80\lkihx.c
6518         * link\z80\lks19.c
6519         * link\z80\lksym.c
6520         * support\cpp2\cpplib.c
6521         * src\ds390\gen.c
6522         * src\mcs51\gen.c
6523
6524 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6525
6526         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6527
6528 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6529
6530         * support\librarian\clean.mk: Do not remove Makefile.
6531         * support\librarian\Makefile: added.
6532
6533 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6534
6535         Added librarian to MSVC build:
6536         * all.dsp
6537         * sdcc.dsw
6538         * support\librarian\librarian.dsp
6539
6540         'configure' not needed for librarian, removed:
6541         * support\librarian\configure
6542         * support\librarian\configure.in
6543         * support\librarian\config_in.h
6544         * support\librarian\Makefile.in
6545
6546         Hopefully these ones built the librarian and the rest of sdcc properly:
6547         * Makefile
6548         * Makefile.common.in
6549
6550         Messed up 'configure', so revert to previous version:
6551         * configure
6552         * configure.in
6553
6554 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6555
6556         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6557         there, while the mantissa of a double is "only" 53 bits wide.
6558
6559 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6560
6561         Adding sdcclib to the build.  MSVC project coming soon.
6562         Files added/changed:
6563
6564         * support\librarian\clean.mk
6565         * support\librarian\configure
6566         * support\librarian\configure.in
6567         * support\librarian\config_in.h
6568         * support\librarian\Makefile.bcc
6569         * support\librarian\Makefile.in
6570         * support\librarian\sdcclib.c
6571         * Makefile.bcc
6572         * Makefile
6573         * Makefile.common.in
6574         * configure
6575         * configure.in
6576
6577 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6578
6579         Linker now complaints if linked modules have conflicting options, for
6580         example, one compiled using --model-large and another one compiled with
6581         --model-small.  The following files were modified:
6582
6583         * as\mcs51\asdata.c
6584         * as\mcs51\aslink.h
6585         * as\mcs51\asm.h
6586         * as\mcs51\asmain.c
6587         * as\mcs51\asout.c
6588         * as\mcs51\i51pst.c
6589         * as\mcs51\lkdata.c
6590         * as\mcs51\lklibr.c
6591         * as\mcs51\lkmain.c
6592         * as\z80\asdata.c
6593         * as\z80\asm.h
6594         * as\z80\asmain.c
6595         * as\z80\asout.c
6596         * as\z80\z80pst.c
6597         * link\z80\aslink.h
6598         * link\z80\lkdata.c
6599         * link\z80\lklibr.c
6600         * link\z80\lkmain.c
6601         * src\SDCCglue.c
6602
6603 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6604
6605         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6606         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6607
6608 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6609
6610         * src/z80/mappings.i: fix _mul[us][int,long] entries
6611
6612 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6613
6614         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6615
6616 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6617
6618         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6619         * support/regression/tests/bitopcse.c: added
6620         fixed warning:
6621         * src/avr/gen.c:
6622         * src/pic/gen.c:
6623         * src/pic16/gen.c:
6624         * src/z80/gen.c:
6625         * src/xa51/gen.c:
6626
6627 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6628
6629         added support for new library format to z80, gbz80 linkers:
6630         *link/z80/aslink.h
6631         *link/z80/lklex.c
6632         *link/z80/lklib.c
6633         *link/z80/lklist.c
6634
6635 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6636
6637         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6638         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6639
6640 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6641
6642         added DUMMY_READ_VOLATILE:
6643         * src/SDCC.y:
6644         * src/avr/gen.c:
6645         * src/xa51/gen.c:
6646         * src/z80/gen.c:
6647         * src/pic/gen.c:
6648         * src/pic16/gen.c:
6649         * src/mcs51/gen.c:
6650         * src/ds390/gen.c:
6651         * src/SDCCcse.c (algebraicOpts): many improvements
6652         * src/SDCCcse.h: removed algebraicOpts()
6653         * src/SDCCicode.c (picDummyRead): added
6654
6655 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6656
6657         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6658         "Insufficient space in data memory".
6659
6660 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6661
6662         * src/mcs51/gen.c: fixed bug #771358
6663         * src/z80/gen.c: fixed bug #759087
6664
6665 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6666
6667         * src/pic16/glue.c: minor cleanup by Vangelis
6668
6669 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6670
6671         * device/include/regc515c.h: fixed #758477
6672         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6673         * device/lib/_gptrput.c: saved a few bytes
6674         * my tab spacing is 8, yours too?)
6675         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6676         * device/lib/serial.c: process RX bytes earlier than TX bytes
6677         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6678
6679 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6680
6681         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6682
6683 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6684
6685     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6686
6687 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6688
6689         * device/lib/Makefile.in: bad fix, reverted to 1.43
6690
6691 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6692
6693         * device/lib/Makefile.in: added missing z80 object files
6694
6695 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6696
6697         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6698         pic16 progress by Vangelis:
6699         * src/SDCCglobl.h:
6700         * src/SDCCmain.c:
6701         * src/pic/Makefile:
6702         * src/pic:
6703         * pic/Makefile:
6704         * pic16/device.c:
6705         * pic16/device.h:
6706         * pic16/gen.c:
6707         * pic16/gen.h:
6708         * pic16/genarith.c:
6709         * pic16/glue.c:
6710         * pic16/main.c:
6711         * pic16/pcode.c:
6712         * pic16/pcode.h:
6713         * pic16/pcodepeep.c:
6714         * pic16/peeph.def:
6715
6716 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6717
6718     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6719
6720 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6721
6722     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6723     added gbz80 build to MSVC project.
6724     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6725     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6726     from 8051 stuff and setup so it links using a .lnk file.
6727
6728 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6729
6730     * support/librarian/sdcclib.c: sdcc librarian.
6731     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6732     with sdcclib.
6733
6734 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6735
6736     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6737
6738 2003-07-02  Borut Razem <borut.razem AT siol.net>
6739
6740         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6741         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6742         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6743         src/xa51/main.c, src/z80/main.c:
6744         virtualization of glue() function: each port has it's own glue function,
6745         which is accessed by do_glue function pointer in PORT.general structure
6746
6747 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6748
6749         * DS800C400 fun, improved ROM interface and tinibios.
6750
6751 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6752
6753         * More support for DS80C400. Now includes beginning of interface to ROM.
6754
6755 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6756
6757         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6758
6759 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6760
6761         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6762
6763 2003-06-19  Borut Razem <borut.razem AT siol.net>
6764
6765         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6766
6767 2003-06-19  Borut Razem <borut.razem AT siol.net>
6768
6769         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6770         fixed Z80 port - crt0.o: cannot open.
6771
6772 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6773
6774         * support/Util/MySystem.c (merge_command): revert bad fix
6775
6776 2003-06-18  Borut Razem <borut.razem AT siol.net>
6777
6778         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6779
6780 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6781
6782         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6783         option --use-stdout sends errors to stdout instead of stderr.
6784
6785 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6786
6787         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6788
6789 2003-06-15  Borut Razem <borut.razem AT siol.net>
6790
6791         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
6792         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
6793         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
6794         fixed width array of pointers replaced with sets;
6795         multiple include and lib paths ared transferred to preprocessor and linker
6796         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
6797         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
6798         fixed width array of pointers
6799         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
6800         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
6801         fixupPath(), getPathDifference()
6802         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
6803         fixed width array of pointers
6804
6805 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
6806
6807         * src/pic16/ralloc.c: fix warnings
6808         * src/pic16/pcode.c: fix warning
6809
6810 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
6811
6812          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
6813         know all the details, but essentially this set of changes enable
6814         the pic16 port to generate movff instructions and generate assembler
6815         directives,
6816         * src/SDCCmain.c:
6817         * src/pic16/gen.c:
6818         * src/pic16/glue.c:
6819         * src/pic16/pcode.c:
6820         * src/pic16/device.c:
6821         * src/pic16/main.c:
6822         * src/pic16/pcode.h:
6823         * src/pic16/pcoderegs.c:
6824         * src/pic16/ralloc.c:
6825         * src/pic16/ralloc.h:
6826
6827 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6828
6829         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6830         added option --vc, so sdcc errors and warnings are compatible with
6831         Microsoft Visual Studio.
6832
6833 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6834
6835         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
6836           device/lib/libfloat.lib: added atof function.
6837
6838 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * doc/sdccman.lyx: updated to Lyx 1.3
6841         * doc/cdbfileformat.lyx: updated to Lyx 1.3
6842         * doc/test_suite_spec.lyx: updated to Lyx 1.3
6843         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
6844
6845 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
6846
6847         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
6848
6849 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6850
6851         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
6852           additions to the "related tools/documentation" section
6853
6854 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
6855
6856         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
6857
6858 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
6859
6860         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
6861         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
6862
6863 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
6864
6865         * doc/sdccman.lyx: fix double dash and other minor things
6866         * doc/Makefile: fix double dash
6867
6868 2003-05-28  Karl Bongers(patches from Martin Helmling)
6869         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
6870           condition and ignore commands.
6871
6872 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6873
6874         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
6875           is in parts still quite out of date, I did changes as far as I felt makes sense
6876           for a non-native english speaker.
6877           Please feel free to add to the manual or to correct my changes.
6878         * doc/Makefile: undid touching the date of intermediate tex files.
6879
6880 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6881
6882         * doc/sdccman.lyx: Manual has an index now
6883
6884 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
6885
6886         Finalize muluint/mulsint and mululong/mulslong merging:
6887         * device/lib/_mulint.c
6888         * device/lib/_mullong.c
6889         * device/lib/gbz80/mul.s
6890         * device/lib/gbz80/stubs.s
6891         * device/lib/z80/mul.s
6892         * device/lib/z80/stubs.s
6893         * src/SDCCsymt.c (initCSupport)
6894
6895 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6896
6897         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
6898         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
6899           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
6900           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
6901           instead of /Zm500.
6902
6903 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6904
6905         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
6906           the regression tests I'm not brave enough to enable 245.b, 245.c
6907         * doc/sdccman.lyx: added latex preamble for hyperref package.
6908           Using pdflatex this will give you a hyperlinked pdf file with
6909           bookmarks. (prepend '%' before /usepackage if this breaks something)
6910
6911 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6912
6913          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
6914
6915 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
6916
6917         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
6918
6919 2003-05-21    <johan AT balder>
6920
6921         * src/SDCCglue.c (printIval): fixed bug #739934
6922
6923 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
6924
6925         Applied patch from bug 737905 (renamed yylineo to mylineno):
6926         * src/altlex.c
6927         * src/SDCCast.c
6928         * src/SDCglobl.h
6929         * src/SDCC.lex
6930         * src/SDCCsymt.c
6931         * src/SDCCval.c
6932         * src/pic16/pcode.c: Cleaned warnings
6933         * src/pic16/pcodeflow.c: Cleaned warnings
6934         * src/pic16/pcoderegs.c: Cleaned warnings
6935
6936 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
6937
6938         * src/pic16/pcode.c: Cleaned warnings
6939         * src/pic16/pcodepeep.c: Cleaned warnings
6940         * src/pic16/ralloc.c: Cleaned warnings
6941
6942 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
6943
6944         * doc/sdccman.lyx: fixed bug 739745
6945         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
6946
6947 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
6948
6949         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
6950         it can be defined with CFLAGS when running configure
6951         * src/SDCCmain.c: fixed compiling + linking with object files
6952
6953 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
6954
6955         * configure.in: configure for pic16 port,
6956             added --disable-pic16-port
6957         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
6958         * src/SDCCmain.c: linkOptions is changed to set *,
6959             added if/endif conditional macros to remove options help
6960             messages from optionsTable when a port is not configured, added
6961             support for the PIc16 port in the ports table, when executing
6962             the compiler with no port specified on command line, a default
6963             port is selected with the new macro DEFAULT_PORT which is
6964             defined in port.h, in setDefaultOptions() linkOptions is removed
6965             from initialization assignment, since now it is a set,
6966             parseCmdLine uses setParseWithComma for linkOptions, in
6967             linkEdit() linkOptions are accessed with new function indexSet()
6968             which returns the i'th item of a set variable. See SDCCset.c, in
6969             linkEdit() when calling buildCmdLine(), added linkOptions as
6970             last argument. Now users can pass arguments to gplink via the
6971             -Wl option, main() uses pic16glue() to glue up pic16 programs
6972         * src/SDCCpeeph.c: various changes to support pic16
6973         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
6974             return the i'th item of the set
6975         * src/SDCCset.h: added function prototype for indexSet()
6976         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
6977         * src/clean.mk: added pic16 in CLEANALLPORTS variable
6978         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
6979             added macro DEFAULT_PORT
6980         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
6981         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
6982             generated
6983         * src/pic16/glue.c: commented out some error producing lines
6984         * src/pic16/main.c: __config directives are commented out to stop
6985             gpasm complaining and test the linkage with gplink, _linkCmd and
6986             _asmCmd changed to be more gplink and gpasm friendly
6987         * src/pic16/peeph.def: peep rule 3 is commented out, since it
6988             produced an error when parsed, peep rule 12 is added to utilize
6989             movff, but it is commented out since the pCode does not support
6990             yet a command with 2 address arguments
6991
6992 2003-05-18    <johan AT balder>
6993
6994         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
6995         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
6996 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
6997
6998         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
6999   Added feature to script commands from file.
7000
7001 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7002
7003         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7004         * src/SDCCutil.c: include ctype.h for win32
7005
7006 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7007
7008         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7009
7010 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7011
7012         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7013   Fixed so you can set breakpoints prior to run, run does not stop
7014   on entry now.  Add tbreak.  Other enhancements and fixes for use
7015   with ddd.
7016
7017 2003-05-12  Borut Razem <borut.razem AT siol.net>
7018
7019         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7020
7021 2003-05-11  Borut Razem <borut.razem AT siol.net>
7022
7023         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7024         the path of bin directory, so that PATH is the only env. variable, which has to be set
7025         in case of standard installation.
7026         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7027         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7028         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7029
7030 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7031
7032         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7033         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7034         temp files are in the port dir; clean the gen/test directory when
7035         generating new test.c
7036         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7037         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7038         * support/regression/tests/zeropad.c: added
7039
7040 2003-05-09    <johan AT balder>
7041
7042         * src/SDCCglue.c: fixed bug #597940
7043
7044 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7045
7046         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7047   cache sfr, optimize next,step, fix off by one sourceline,
7048   support ddd list function.
7049         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7050
7051 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7052
7053         * support/regression/HTMLgen.py: added compare_s2f()
7054         * support/regression/Makefile: redo 1.27
7055         * support/regression/generate-cases.py: redo 1.5
7056
7057 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7058
7059         * support/regression/tests/float.c: workaround 33 bit hex constant
7060         * support/regression/tests/simplefloat.c: fix division for host
7061
7062 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7063
7064         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7065         that tame's the PIC's over-aggressive optimizer.
7066
7067 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7068
7069          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7070          support for MSVC.
7071
7072 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7073
7074         Initial support for DS80C400. "Hello world" runs on TINIm400
7075         (with polled I/O).
7076
7077 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7078
7079          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7080          * Some notes on ddd usage added in debugger/README
7081          Martin Helmling adding more features and fixes for ddd GUI debugger.
7082          Code added for nexti, stepi, up, down, and other adjustments.
7083
7084 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7085
7086         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7087         * src/pic/peeph.def Added two rules to optimize carry manipulation
7088         * src/pic/* removed debug printfs
7089
7090 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7091
7092         * debugger/mcs51/cmd.c: added header newalloc.h
7093
7094 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7095
7096         * as/Makefile: new EXEEXT
7097         * as/z80/Makefile: remove trailing slash of BUILDIR
7098         * as/z80/clean.mk: new EXEEXT
7099         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7100         * support/cpp2/Makefile.in: new EXEEXT
7101         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7102
7103 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7104
7105         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7106         EXEEXT was introduced to fix all related problems with targets
7107         "clean", "install" and "uninstall"; a couple of further flaws
7108         especially with "clean" have been fixed too
7109         * as/mcs51/Makefile.in
7110         * as/mcs51/clean.mk
7111         * as/z80/Makefile
7112         * Makefile
7113         * clean.mk
7114         * debugger/mcs51/Makefile.in
7115         * debugger/mcs51/clean.mk
7116         * link/z80/Makefile
7117         * link/z80/Makefile.in
7118         * link/z80/clean.mk
7119         * link/Makefile
7120         * packihx/Makefile.in
7121         * packihx/clean.mk
7122         * sim/ucsim/Makefile
7123         * sim/ucsim/clean.mk
7124         * sim/ucsim/avr.src/Makefile.in
7125         * sim/ucsim/avr.src/clean.mk
7126         * sim/ucsim/s51.src/Makefile.in
7127         * sim/ucsim/s51.src/clean.mk
7128         * sim/ucsim/xa.src/Makefile.in
7129         * sim/ucsim/xa.src/clean.mk
7130         * sim/ucsim/z80.src/Makefile.in
7131         * sim/ucsim/z80.src/clean.mk
7132         * sim/ucsim/main_in.mk
7133         * sim/ucsim/packages_in.mk
7134         * sim/ucsim/gui.src/Makefile.in
7135         * sim/ucsim/gui.src/serio.src/Makefile.in
7136         * sim/ucsim/gui.src/serio.src/clean.mk
7137         * src/Makefile.in
7138         * src/clean.mk
7139         * support/cpp2/Makefile.in
7140         * support/cpp2/clean.mk
7141         * support/makebin/Makefile
7142         * support/makebin/clean.mk
7143         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7144         * doc/sdccman.lyx: --program-suffix no longer needed
7145
7146 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7147
7148          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7149          Martin Helmling added support for ddd GUI debugger.
7150          Code added to display assembly, set variables, and other commands
7151          to interface to ddd.
7152
7153 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7154
7155         * as/Makefile: fix target clean
7156         * as/clean.mk: fix target clean
7157         * as/z80/clean.mk: fix target clean
7158
7159 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7160
7161         * Makefile.common.in: added  AT EXEEXT AT
7162         * configure.in: removed all mingw32 stuff
7163         * configure: rebuilt from configure.in
7164         * doc/sdccman.lyx: updated section "installation"
7165         * support/scripts/sdcc_mingw32: adapted to configure
7166         * support/scripts/sdcc_cygwin_mingw32: added
7167
7168 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7169
7170         * src/pic Added object file support for the PIC port
7171         * src/pic Applied patch from Craig Franklin (this started the object file support)
7172         * src/regression Updated the PIC regression tests for object files
7173
7174 2003-04-20  Borut Razem <borut.razem AT siol.net>
7175
7176         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7177           lklex.c: In function `getfid':
7178           lklex.c:203: warning: array subscript has type `char'
7179         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7180           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7181         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7182           stack handling macros
7183
7184 2003-04-19  Borut Razem <borut.razem AT siol.net>
7185
7186         * "handling space characters in file path" task:
7187         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7188         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7189         * support/Util/MySystem.h: make it self-sufficient
7190         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7191           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7192           handling space characters in file path
7193         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7194           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7195         * support/Util/MySystem.c: handling space characters in executable's path
7196
7197 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7198
7199         * as/z80/Makefile: fix permanent rebuild of z80
7200         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7201         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7202
7203 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7204
7205         * src/SDCCopt.c: add special case optimization to replace modulo by
7206           a power of two with a bitwise AND.
7207
7208 2003-04-18    <johan AT balder>
7209
7210         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7211
7212 2003-04-17    <johan AT balder>
7213
7214         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7215         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7216
7217 2003-04-13  Borut Razem <borut.razem AT siol.net>
7218
7219         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7220         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7221           fixed mingw problem in adl_NORMALIZE_PATH
7222
7223 2003-04-12  Borut Razem <borut.razem AT siol.net>
7224
7225         * fixed "#pragma SAVE/RESTORE can not be nested":
7226         * src/SDCC.lex: reworked pragma handling functions
7227         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7228         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7229
7230 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7231
7232         * src/SDCCutil.c (pathEquivalent): defined but not used
7233         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7234         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7235         * configure: rebuilt from configure.in
7236         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7237         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7238         * device/include/Makefile.in: replace sdcc_datadir
7239         * device/lib/Makefile.in: replace sdcc_datadir
7240         * Makefile.common.in: add LDFLAGS from configure
7241         * packihx/Makefile.in: use LDFLAGS
7242         * src/Makefile.in: use LDFLAGS
7243         * support/cpp2/Makefile.in: add LDFLAGS from configure
7244         * support/makebin/Makefile: use LDFLAGS
7245         * .version: bumped version number to 2.3.5
7246
7247 2003-04-12  Borut Razem <borut.razem AT siol.net>
7248
7249         * completed "different paths" task:
7250         * src/SDCCmacro.c: fixed bug in handling quotes
7251         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7252         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7253
7254 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7255
7256         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7257
7258 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7259
7260         * ds390/gen.c ds390/peeph.def: fix bug 706781
7261
7262 2003-04-11  Borut Razem <borut.razem AT siol.net>
7263
7264         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7265
7266 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7267
7268         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7269         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7270          set - this bit used to not be set...).
7271         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7272           bad code in PIC Port
7273         * src/regression/and2.c added to test bug 609268
7274         * src/regression/Makefile added and2.c to regression test
7275
7276
7277 2003-04-08    <johan AT CP255758-A>
7278
7279         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7280         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7281         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7282
7283 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7284
7285         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7286         fix bug #487815
7287         * support/cpp2/Makefile.in: fix bug #487815
7288         * configure: rebuilt from configure.in
7289         * Makefile.common.in: docdir changed, new path suffixes
7290         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7291         * sdcc_vc_in.h: reflect changes from sdccconf.h
7292         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7293         * src/SDCCutil.h: remove BINDIR hack
7294         * doc/sdccman.lyx: update new path hierarchy
7295
7296 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7297
7298         * src/SDCCpeeph.c: added okToRemoveSLOC test
7299
7300 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7301
7302         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7303
7304 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7305
7306         * src/SDCCpeeph.c: added labelIsReturnOnly test
7307         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7308
7309 2003-04-05    <johan AT balder>
7310
7311         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7312         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7313         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7314         * src/SDCCast.c: fixed a warning
7315         * src/SDCCast.h: fixed a warning
7316         * src/SDCCicode.c (operandFromAst): fixed a warning
7317
7318 2003-04-04    <johan AT balder>
7319
7320         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7321         * src/SDCCast.c (decorateType): fixed bug #715076
7322         * src/SDCC.y: fixed bug #702907
7323
7324 2003-04-03    <johan AT balder>
7325
7326         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7327         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7328         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7329         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7330         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7331
7332 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7333
7334         * _decdptr.c: fix return values
7335         * _gptrget.c: fix return values
7336         * _gptrgetc.c: fix return values
7337         * _gptrput.c: fix return values
7338         * _mulint.c: fix return values
7339         * as/z80/Makefile: fix 'make -j' problem
7340
7341 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7342
7343         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7344         * configure.in: big cleanup, updated to autoconf 2.5x
7345         * configure: rebuilt from configure.in
7346         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7347         * sdcc_vc_in.h: reflect changes from sdccconf.h
7348         * doc/Makefile: fixed a flaw in "make install"
7349
7350 2003-04-02    <johan AT balder>
7351
7352         * src/ds390/gen.c (genCmp): no comments
7353         * src/mcs51/gen.c (genCmp): no comments
7354         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7355         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7356
7357 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7358
7359         * support/regression/generate-cases.py: place generated file in given sub directory
7360         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7361         * support/regression/Makefile: improvements for 'make -j';
7362         side effect: it's simpler and faster now
7363
7364 2003-03-31  Borut Razem <borut.razem AT siol.net>
7365
7366         * src/z80/main.c: link-{port} and as-{port} defined without path
7367         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7368
7369 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7370
7371         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7372
7373 2003-03-30  Borut Razem <borut.razem AT siol.net>
7374
7375         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7376           changed type of list parameter to set
7377         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7378         * src/port.h: changed type of do_assemble() parameter to set
7379         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7380           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7381           definition of "cppoutfilename" macro with NULL value in preProcess()
7382         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7383         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7384         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7385           replaced with set *binPathSet
7386         * shash_add() deallocates the item, if allready exsists, before adding the new one
7387         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7388
7389 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7390
7391         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7392           a nested for loop bug in the PIC port
7393         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7394           for loops
7395
7396 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7397
7398         * support/Util/dbuf.h: remove C++ stuff to make it portable
7399
7400 2003-03-28  Borut Razem <borut.razem AT siol.net>
7401
7402         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7403           literal strings in stringLiteral()
7404         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7405         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7406           to the project
7407
7408 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7409
7410         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7411
7412 2003-03-26    <johan AT balder>
7413
7414         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7415         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7416         * src/SDCCast.c (decorateType): fixed " -v < 3"
7417
7418 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7419
7420         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7421         Added Lenny Story's debug infrastructure changes:
7422         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7423         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7424         * src/cdbFile.c: added
7425         * src/SDCCdebug.c: added
7426         * src/SDCCdebug.h: added
7427         * src/SDCCast.c (createFunction)
7428         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7429         * src/SDCCmain.c (parseCmdLine, main)
7430         * src/SDCCmem.c (redoStackOffsets)
7431         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7432         * src/SDCCsymt.h
7433         * src/common.h
7434         * src/avr/gen.c (genAVRCode)
7435         * src/ds390/gen.c (gen390Code)
7436         * src/mcs51/gen.c (gen51Code)
7437         * src/pic/gen.c (genpic14Code)
7438         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7439         * src/xa51/gen.c (genXA51Code)
7440         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7441
7442 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7443
7444         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7445         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7446
7447 2003-03-22    <johan AT balder>
7448
7449         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7450
7451 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7452
7453         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7454         * doc/cdbfileformat.lyx: added, written by Lenny Story
7455         * doc/Makefile: added cdbfileformat.lyx
7456         * doc/clean.mk: added cdbfileformat.lyx
7457
7458 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7459
7460         * src/mcs51/peeph.def: fix bug #705773
7461
7462 2003-03-20    <johan AT balder>
7463
7464         An sfr/sbit can have an "at #" AND an initializer
7465         * src/SDCCsymt.c (checkSClass):
7466         * src/SDCCmem.c (allocGlobal):
7467         * src/SDCCmem.c (allocLocal):
7468         * src/SDCCast.c (createBlock):
7469
7470 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7471
7472         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7473
7474 2003-03-16    <johan AT balder>
7475
7476         Undid the hackup of const and volatile, the problem is much bigger
7477         * src/SDCC.y:1.65
7478         * src/SDCCast.c:1.171
7479         * src/SDCCglue.c:1.138
7480         * src/SDCCicode.c:1.146
7481         * src/SDCCsymt.c:1.150
7482         * src/SDCCval.c:1.65
7483
7484 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7485
7486         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7487         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7488
7489 2003-03-13    <johan AT balder>
7490
7491         Hackup const and volatile modifiers in type chains a bit:
7492         * src/SDCC.y:1.63
7493         * src/SDCCast.c:1.169
7494         * src/SDCCglue.c:1.136
7495         * src/SDCCicode.c:1.143
7496         * src/SDCCsymt.c1.146
7497         * src/SDCCsymt.h1.59
7498         * src/SDCCval.c:1.63
7499
7500 2003-03-12    <johan AT balder>
7501
7502         * src/SDCCBBlock.h: more LRH debugging junk
7503         * src/SDCCcflow.h: more LRH debugging junk
7504         * src/SDCCloop.c: more LRH debugging junk
7505         * src/SDCC.y (struct_declaration): fixed bug #697590
7506         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7507         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7508         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7509
7510 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7511         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7512         test function names must now match exactly).
7513         * src/SDCCcse.c: added special case in findCheaperOp to allow
7514         extending a short integer. Makes less awful code for bug 700121 test case.
7515
7516 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7517
7518         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7519         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7520
7521 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7522
7523         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7524         actually called (operandsNotEqual() was called for all
7525         operandsNotEqualX tests).
7526
7527 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7528
7529         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7530         with shorter literals. Fixes bug 700121.
7531
7532 2003-03-11    <johan AT balder>
7533
7534         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7535
7536 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7537
7538         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7539         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7540
7541 2003-03-10  Borut Razem <borut.razem AT siol.net>
7542
7543         * src/SDCCmain.c: pipe preprocessor's output
7544         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7545         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7546         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7547         which closes all pipes in pipeSet set
7548         * src/SDCCset.c: free deleted item in function deleteSetItem()
7549         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7550         moved from z80 to src subproject
7551         * .version: increased version number to 2.3.4
7552
7553 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7554
7555         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7556         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7557         * support/regression/ports/xa51/spec.mk: fix typo
7558
7559 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7560
7561         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7562
7563 2003-03-09  Borut Razem <borut.razem AT siol.net>
7564
7565         * src/SDCCmain.c: pipe preprocessor's output
7566         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7567         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7568         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7569         which closes all pipes in pipeSet set
7570         * src/SDCCset.c: free deleted item in function deleteSetItem()
7571         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7572         moved from z80 to src subproject
7573
7574 2003-03-09  Borut Razem <borut.razem AT siol.net>
7575
7576         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7577         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7578         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7579         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7580         * src/SDCCglobl.h: unification of WIN32 native definitions
7581
7582 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7583
7584         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7585
7586 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7587
7588         * src/configure.in:   check for endianess (even while cross-compiling)
7589         * src/configure:      check for endianess (even while cross-compiling)
7590         * src/configure_in.h: check for endianess (even while cross-compiling)
7591         * src/avr/gen.c:        remove old endianess stuff
7592         * src/mcs51/gen.c:      remove old endianess stuff
7593         * src/ds390/gen.c:      remove old endianess stuff
7594         * src/pic/gen.c:        remove old endianess stuff
7595         * src/pic/genarith.c:   remove old endianess stuff
7596         * src/pic/glue.c:       fix endianess check
7597         * src/pic16/gen.c:      remove old endianess stuff
7598         * src/pic16/genarith.c: remove old endianess stuff
7599         * src/pic16/glue.c:     fix endianess check
7600         * src/xa51/gen.c:       remove old endianess stuff
7601         * src/z80/gen.c:        fix endianess check
7602         * src/SDCCglue.c:       fix endianess check
7603         * src/ds390/peeph.def: fix bug 700036
7604
7605 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7606
7607         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7608         * src/configure: find appropriate data-types on host for SDCC's int and long
7609         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7610         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7611         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7612
7613 2003-03-07    <johan AT balder>
7614
7615         Just a big NOOP:
7616                 some minor cleanups before the big shot
7617                 OP_DEFS and OP_USES now use Kevin's protection
7618                 new option --nolabelopt
7619
7620         * src/SDCCBBlock.c:
7621         * src/SDCCast.c,:
7622         * src/SDCCcflow.c:
7623         * src/SDCCcse.c:
7624         * src/SDCCicode.c:
7625         * src/SDCCicode.h:
7626         * src/SDCClabel.c:
7627         * src/SDCCloop.c:
7628         * src/SDCCmain.c:
7629         * src/ds390/ralloc.c:
7630         * src/mcs51/ralloc.c:
7631         * src/pic/ralloc.c:
7632         * src/xa51/ralloc.c:
7633         * src/z80/ralloc.c:
7634
7635 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7636
7637         * src/pic/pcode.c (get_op): fix 64 bit warnings
7638         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7639         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7640         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7641         * support/regression/tests/malloc.c: fix 64 bit warnings
7642
7643 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7644
7645         * src/mcs51/gen.c (genMinus): fixed bug 696436
7646
7647 2003-03-02  Borut Razem <borut.razem AT siol.net>
7648
7649         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7650
7651 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7652
7653         * configure.in: test for mkstemp
7654         * sdccconf_in.h: add HAVE_MKSTEMP
7655
7656 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7657
7658         * device/include/ctype.h: removed warning while using --stack-auto
7659         * device/include/malloc.h: removed warning while using --stack-auto
7660         * device/include/string.h: removed warning while using --stack-auto
7661
7662 2003-02-23  Borut Razem <borut.razem AT siol.net>
7663
7664         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7665         because NDEBUG is defined (see man assert)
7666         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7667
7668 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7669
7670         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7671         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7672
7673 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7674
7675         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7676         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7677
7678 2003-02-18    <johan AT balder>
7679
7680         * as/mcs51/asmain.c (asmbl): module can start with a digit
7681         * as/z80/asmain.c (asmbl): module can start with a digit
7682
7683 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7684
7685         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7686         * src/asm.c: fix pipe() for Mingw32
7687
7688 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7689
7690         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7691         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7692         make -V work again; --c1mode reads now from stdin
7693         * doc/sdccman.lyx: added --c1mode
7694         * support/Util/SDCCerr.c: new messages for c1 mode
7695         * support/Util/SDCCerr.h: new messages for c1 mode
7696         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7697
7698 2003-02-15    <johan AT balder>
7699
7700         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7701
7702 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7703
7704         * doc/sdccman.lyx: Environment variables, -o and other minor things
7705
7706 2003-02-14    <johan AT balder>
7707
7708         * src/xa51/main.c: before anyone really tries to use it :)
7709
7710         * Install doc's in share/sdcc/doc
7711         * removed some obsolete files
7712         * Do a proper make distclean and uninstall
7713         M Makefile.common.in
7714         R sdccbuild.sh
7715         M as/Makefile
7716         M device/include/Makefile.in
7717         M device/lib/Makefile.in
7718         M doc/sdccman.lyx
7719         M link/Makefile
7720         M sim/ucsim/doc/Makefile.in
7721         M src/clean.mk
7722         R src/avr/peeph.rul
7723         R src/xa51/peeph.rul
7724         M support/cpp2/Makefile.in
7725         M support/makebin/Makefile
7726
7727
7728 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7729
7730         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7731
7732 2003-02-10  Borut Razem <borut.razem AT siol.net>
7733
7734         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7735         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7736         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7737         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7738         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7739         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7740         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7741         src/z80/Makefile.bcc: Borland Makefile cleanup
7742         * as/z80/Makefile.bcc: Added Borland Makefile
7743         * support/cpp2/borland.h: Removed
7744
7745 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7746
7747         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7748         * src/SDCC.lex: new pragma NOIV
7749         * src/SDCCglobl.h: new pragma NOIV
7750         * src/SDCCmem.c: new pragma NOIV
7751
7752 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7753
7754         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7755
7756 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7757
7758         * src/SDCCmain.c: signal handling is switched off by --debug
7759         * doc/Makefile: small fix for install; use clean.mk again
7760         * doc/clean.mk: clean *.pdf and *.html too
7761
7762 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7763
7764         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7765         * device/lib/printfl.c: fix a ds390 bug by making it portable
7766         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7767         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7768         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7769         * debugger/mcs51/cmd.c: converted multi-line string literals
7770         * sim/ucsim/globals.cc: converted multi-line string literals
7771         * src/SDCCmain.c: introduced signal handler to remove temp files
7772         * doc/Makefile: small tweaks, implement clean
7773         * doc: removed generated files
7774
7775 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7776
7777         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7778         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7779         Address Record is not correctly generated for DS390."
7780
7781 2003-02-02  Borut Razem <borut.razem AT siol.net>
7782
7783         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7784         * as/mcs51/asm.h: fixed compilation with Borland C
7785         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7786         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7787         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7788         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7789         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
7790         src/z80/Makefile.bcc: delete $(LIB) only if exist
7791         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
7792
7793 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
7794
7795         * device/include/malloc.h: introduced NULL
7796         * device/include/string.h: introduced NULL
7797         * device/include/stdlib.h: introduced NULL
7798         * device/lib/_memcpy.c: removed NULL
7799         * device/lib/_strcat.c: removed NULL
7800         * device/lib/_strchr.c: removed NULL
7801         * device/lib/_strcmp.c: removed NULL
7802         * device/lib/_strcpy.c: removed NULL
7803         * device/lib/_strcspn.c: removed NULL
7804         * device/lib/_strlen.c: removed NULL
7805         * device/lib/_strncat.c: removed NULL
7806         * device/lib/_strncmp.c: removed NULL
7807         * device/lib/_strncpy.c: removed NULL
7808         * device/lib/_strpbrk.c: removed NULL
7809         * device/lib/_strrchr.c: removed NULL
7810         * device/lib/_strspn.c: removed NULL
7811         * device/lib/_strstr.c: removed NULL
7812         * device/lib/_strtok.c: removed NULL
7813         * device/lib/malloc.c: removed NULL, include own header
7814
7815 2003-02-02    <johan AT balder>
7816
7817         * 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
7818         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
7819         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
7820         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
7821         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
7822         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
7823
7824 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7825
7826         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
7827         area 'DATA'"
7828
7829 2003-02-01    <johan AT balder>
7830
7831         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
7832
7833 2003-01-31    <johan AT CP255758-A>
7834
7835         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
7836
7837 2003-01-30    <johan AT balder>
7838
7839         * src/SDCCBBlock.c: automatic bug detection
7840         * src/SDCCicode.c: automatic bug detection
7841
7842 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7843
7844         * src/SDCCglobl.h:   now --xram-size 0 works
7845         * src/SDCCmain.c:    now --xram-size 0 works
7846
7847 2003-01-29    <johan AT balder>
7848
7849         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
7850
7851 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7852
7853         * as/mcs51/aslink.h: Added options --xram-size and --code-size
7854         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
7855         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
7856         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
7857         * src/SDCCglobl.h:   Added options --xram-size and --code-size
7858         * src/SDCCmain.c:    Added options --xram-size and --code-size
7859
7860 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
7861
7862         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
7863         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
7864
7865 2003-01-27    <johan AT balder>
7866
7867         * src/SDCC.y: fixed bug #613764
7868
7869 2003-01-26    <johan AT balder>
7870
7871         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
7872         * src/SDCCsymt.h: fixed bug #673374
7873         * src/SDCCglue.c: fixed bug #661910
7874         * src/SDCCast.c: fixed bug #458099 and 673374
7875
7876 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
7877
7878         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
7879         * as/mcs51/strcmpi.h: added
7880         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
7881         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
7882         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
7883         * as/mcs51/assym.c: strcmpi -> as_strcmpi
7884         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
7885         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
7886         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
7887         * as/mcs51/Makefile.aslink: new module strcmpi
7888         * as/mcs51/Makefile.asx8051: new module strcmpi
7889         * as/mcs51/Makefil.bcc: new module strcmpi
7890         * as/mcs51/Makefile.in: new module strcmpi
7891         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
7892
7893 2003-01-26    <johan AT balder>
7894
7895         * src/SDCCglue.c: reverted back to 1.124
7896         * src/SDCCast.c: reverted back to 1.156
7897         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
7898
7899 2003-01-25    <johan AT balder>
7900
7901         * src/SDCCglue.c: A better fix for bug #661910
7902         * src/SDCCast.c: A better fix for bug #661910
7903         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
7904
7905 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7906
7907         * src/Makefile.in: remove spawn.o
7908         * src/SDCCmain.c: remove spawn.h
7909         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
7910         * src/spawn.c: removed
7911         * src/spawn.h: removed
7912         * support/regression/ports/ds390/spec.mk: link with -r
7913
7914 2003-01-24    <johan AT CP255758-A>
7915
7916         * src/ds390/gen.c (aopOp): fixed bug #667458
7917         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
7918         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
7919         (createIvalCharPtr): an ival doesn't always have a storage class anymore
7920
7921 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7922
7923         * src/mcs51/peeph.def: better assembler identation by Frieder
7924         * src/mcs51/gen.c: better assembler identation by Frieder
7925
7926 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
7927
7928         * as/z80/string.h: removed for gcc 3.2
7929         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
7930         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
7931
7932 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
7933
7934         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
7935         * src/SDCCpeeph.c (replaceRule): fix bug #663503
7936         * support/regression/Makefile: separate temp files for ports
7937         * support/regression/generate-cases.py: separate temp files for ports
7938         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
7939         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
7940
7941 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
7942
7943         * moved tinitalk to device/examples/ds390
7944
7945 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
7946
7947         * as/mcs51/lkmem.c: rflag is for DS390
7948         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
7949         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
7950                          (linkEdit): move mem- and map-files the same way as ihx-files
7951         * src/z80/main.c (_setDefaultOptions): removed --generic
7952         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
7953         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
7954         * src/pic/glue.c (picglue): --c1mode works again
7955         * src/pic16/glue.c (pic16glue): --c1mode works again
7956         * src/asm.c (printCLine): fix #660034
7957
7958 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
7959
7960         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
7961         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
7962         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
7963         * as/mcs51/lkmem (summary): better fix for sp problem
7964         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
7965         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
7966         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
7967                                               remove --stack-after-data
7968
7969 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
7970
7971         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
7972         * src/SDCCutil.c (join): ugly bug: missing '\0'
7973         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
7974
7975 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
7976
7977         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
7978         * src/port.h: typo
7979         * src/pic/main.c (_asmCmd): gpasm supports -o
7980         * src/z80/main.c: more general macros
7981         * device/lib/Makefile.in: remove intermediate files
7982
7983 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
7984
7985         * .version: Bumped version number to 2.3.3
7986         * src/SDCCBBlock.c: new option -o
7987         * src/SDCCglobl.h: new option -o
7988         * src/SDCCglue.c: new option -o
7989         * src/SDCCmain.c: new option -o
7990         * src/asm.c: new option -o
7991         * src/ds390/main.c: new option -o
7992         * src/pic/glue.c: new option -o
7993         * src/pic/pcode.c: new option -o
7994         * src/pic/ralloc.c: new option -o
7995         * src/pic16/glue.c: new option -o
7996         * src/pic16/pcode.c: new option -o
7997         * src/pic16/ralloc.c: new option -o
7998         * src/z80/main.c: new option -o
7999         * device/lib/Makefile.in: use -o
8000         * support/regression/ports/ds390/spec.mk: use -o
8001         * support/regression/ports/gbz80/spec.mk: use -o
8002         * support/regression/ports/mcs51/spec.mk: use -o
8003         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8004         * support/regression/ports/z80/spec.mk: use -o
8005         * support/regression/ports/ucz80/spec.mk: use -o
8006         * support/regression/ports/xa51/spec.mk: use -o
8007         * support/regression/fwk/lib/timeout.c: fix usage string
8008
8009 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8010         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8011
8012 2003-01-07    <johan AT balder>
8013
8014         * src/SDCCast.c (decorateType): fixed bug #600035
8015
8016 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8017         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8018         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8019         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8020         * src/pic/pcode.c: outcommented unused variable to remove warnings
8021         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8022
8023 2003-01-06    <karl AT turbobit.com>
8024         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8025    regression tests.
8026
8027 2003-01-06    <johan AT balder>
8028
8029         * src/SDCCicode.c: fixed array add
8030
8031 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8032         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8033         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8034
8035 2003-01-04    <johan AT balder>
8036
8037         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8038
8039 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8040         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8041
8042 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8043         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8044         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8045
8046 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8047         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8048
8049 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8050         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8051
8052 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8053         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8054
8055 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8056
8057     * in \sdcc\as\mcs51\ changed these files in order to create an
8058     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8059     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8060     following files to include the previous two files: aslink.dsp,
8061     Makefile.aslink, Makefile.bcc, and Makefile.in.
8062
8063     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8064     .adb instead of .cdb
8065
8066 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8067
8068         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8069         value from option --iram-size.
8070
8071 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8072
8073         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8074         dram[] array.
8075
8076 2002-09-18    <wiml AT hhhh.org>
8077
8078         * SDCClrange.h: exposed setFromRange() and setToRange()
8079         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8080           packRegsForAccUse() (bug 542397)
8081         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8082           multiple times and emitting the fetch operations more than once
8083           added aopGetUsesAcc() function to allow binary operators to
8084           fetch their operands in the correct order; made genMinus() emit
8085           compact code for X = LITERAL - Y
8086
8087 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8088         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8089         sprintf() in line 1267.
8090
8091 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8092         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8093         like ports.
8094
8095 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8096         Changes to aslink (All the changes are marked with 'JCF'):
8097
8098         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8099         summary().
8100
8101         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8102         area BSEG.  Also moves, if possible, the DATA area down into the internal
8103         ram so more space is available.
8104
8105         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8106         sflag.
8107
8108         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8109         not bytes.  Function summary() which creates a memory usage summary
8110         file with extension .mem.  Reports of overlaping stack and small stack
8111         size.  If the space for the stack is less than 16 bytes aslink trows a
8112         warning.
8113
8114         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8115         the 8051.  Option 'y' for memory summary output file.
8116
8117         Changes to sdcc (All the changes are marked with 'JCF'):
8118
8119         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8120
8121         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8122         overlaying area for it (uses RegBankUsed[4]).
8123
8124         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8125         bank zero as used by default.  By default aslink locates the stack
8126         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8127         the creation of the .mem file.  Delegates the allocation of data area
8128         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8129         the begining of the stack area to aslink.
8130
8131         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8132         glue() in SDCCglue.c creates an area for it.
8133
8134 2002-09-03  Borut Razem <borut.razem AT siol.net>
8135         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8136         sdcc/src/pic/glue.c:
8137         introduced atexit() handler for teporay files removal in case of
8138         errors, assertions, ...
8139
8140 2002-08-29  Borut Razem <borut.razem AT siol.net>
8141         * sdcc/support/cpp2/auto-host_vc_in.h:
8142         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8143         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8144         Maybe there is a similar problem with BORLANDC? It should be checked!
8145
8146         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8147         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8148         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8149         was not executed, and the compiler (cl) launched a warning:
8150         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8151
8152 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8153         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8154
8155 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8156         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8157
8158         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8159           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8160           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8161           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8162           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8163           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8164           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8165         - added Release configuration in VS projects
8166         - review of compiler an linker options
8167         - VC .exe files are generated in bin_vc directory, not to interfere
8168           with binaries generated from other projects (cygwin, mingw, bcc ...)
8169
8170         * sdcc/src/yacc.dsp: added
8171
8172         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8173         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8174         and insert the version number definitions from .version
8175
8176         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8177
8178         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8179         added - genarate auto-host.h using auto-host_vc_in.h as template
8180
8181         * sdcc/sdcc_vc.h,
8182         removed from CVS, generated automatically
8183
8184 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8185         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8186
8187 2002-08-11  Borut Razem <borut.razem AT siol.net>
8188         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8189
8190 2002-08-10  Borut Razem <borut.razem AT siol.net>
8191         * src/SDCCmain.c (main):
8192         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8193         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8194         The consequence was that some temporary files were not removed.
8195
8196         * src/SDCCglue.c:
8197         unification of code in functions tempfilename() and tempfile():
8198         function tempnam() is defined in Visual Studio 6.0 and .NET
8199
8200         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8201
8202         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8203           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8204         - removed compiler command line option /WX: Treats all warnings as errors
8205         - update a list of source files, included into the project
8206
8207         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8208           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8209         changed project type to Generic Project so that can be correcly converted to VS.NET project
8210
8211         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8212
8213         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8214
8215         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8216
8217         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8218         added return 0 statements after assert() to make compiler happy
8219
8220         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8221         added newline in the def file to keep MSC compiler satisfied
8222
8223         * sdcc/src/z80/gen.c:
8224         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8225           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8226         - solved MSC error in function aopDump()
8227
8228         * sdcc_vc.h: define PREFIX as "\\sdcc"
8229
8230 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8231         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8232
8233 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8234         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8235         - Rewrote the register banking algorithm.
8236         - Added pCode live-range analysis to registers (for now, only non-used and
8237         singly-used registers optimized away)
8238
8239         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8240
8241         * 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.
8242
8243 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8244         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8245
8246 2002-04-22  Michael Hope  <michaelh AT vroom>
8247
8248         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8249
8250         * configure.in (DD_COPT): Added include support required for gbdk.
8251
8252         * .version: Bumped version number just to increase it.
8253
8254         * src/SDCCmain.c: Added -nostdinc to the default options.
8255
8256 2002-04-15  Michael Hope  <michaelh AT vroom>
8257
8258         * device/lib/z80/printf.c (sprintf): Added.
8259
8260         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8261
8262         * src/z80/peeph.def: Added transpose redundent load rule.
8263
8264         * src/z80/main.c: Added force callee saves for jaune.
8265
8266         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8267
8268         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8269
8270 2002-03-28  Johan Knol  <johan AT balder>
8271
8272         * src/SDCCval.c: fixed bug #532436
8273
8274 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8275         * /src/port.h:
8276         Added "char *Processor" field to the port structure.
8277
8278         * /src/SDCCmain.c:
8279         Added -p option. Allows port dependent processor to be specified.
8280
8281         * all ports:
8282         Initialized the new field char *Processor field to NULL in all ports
8283
8284         * /src/pic/*:
8285         Compiler generated registers for interrupt context saving
8286         were not getting allocated.
8287
8288 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8289
8290         * /src/SDCCast.c:
8291         Fixed left shift. Will promote the left side of a left shift
8292         if a) left shifting more than size of operand or b) when assigned
8293         to something size > size of left side
8294
8295 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8296         * src/pic/*
8297         tons of changes. Register allocation has been
8298         rewritten. Added customization for the various PICs. Flow
8299         analysis is restructured. ...
8300
8301         * src/pic/device.h:
8302         Added
8303
8304         * src/pic/device.c:
8305         Added. device.c is a PIC port hack to accomodate variations
8306         in PIC devices.
8307
8308 2002-03-13  Michael Hope  <michaelh AT vroom>
8309
8310         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8311
8312 2002-03-04  johanknol  <johanknol AT manik>
8313
8314         * /src/SDCCval.c: fixed
8315
8316         const unsigned char arr[][2] = { { 0, 1 } };
8317         t18.c:1: error: Initializer element is not constant
8318
8319 2002-03-04  bela  <bela AT manik>
8320
8321         * /device/include/mcs51reg.h:
8322         ds89c420 register definition update
8323
8324 2002-03-03    <johan AT FRIJA>
8325
8326         * support/Util/SDCCerr.c: did something, but don't no why anymore
8327
8328         * support/regression/tests/bug-524691.c: made it a little less shy
8329
8330         * src/SDCCast.c (decorateType): fixed bug #524697
8331
8332         * src/SDCCast.c: made some lineno improvements
8333
8334         * src/SDCCval.c (getNelements): changed warning to error
8335
8336         * src/SDCCglue.c (printIvalArray): changed warning to error
8337
8338         * src/SDCCicode.c: fixed a warning for mingw
8339
8340         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8341
8342         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8343
8344 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8345
8346         * src/ds390/peeph.def:
8347         Added some more peephole rules
8348
8349         * src/ds390/gen.c: Various fixes & enhancements
8350
8351         * src/SDCClrange.c, src/SDCClrange.h:
8352         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8353
8354         * src/ds390/ralloc.c:
8355         various fixes & enhancements (ds390) specific
8356
8357         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8358         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8359         from rallocs.
8360
8361         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8362
8363 2002-03-02    <johan AT FRIJA>
8364
8365         * src/SDCCast.c (decorateType): fixed bug #524708
8366
8367         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8368
8369         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8370
8371 2002-03-01  Michael Hope  <michaelh AT vroom>
8372
8373         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8374
8375         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8376
8377 2002-03-01    <johan AT FRIJA>
8378
8379         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8380
8381         * src/SDCCast.c (decorateType): fixed bug #524209
8382
8383         * src/SDCCval.c (valNot): fixed bug #524195
8384
8385 2002-02-26    <johan AT balder>
8386
8387         * src/xa51/gen.c: fixed a warning
8388
8389         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8390
8391         * src/SDCCast.c (decorateType): fixed bug #522534
8392
8393 2002-02-23    <johan AT balder>
8394
8395         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8396
8397 2002-02-22    <johan AT balder>
8398
8399         * src/SDCCast.c: fixed bug #514865
8400
8401         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8402
8403 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8404
8405         * sdcc/src/SDCCloop.c:
8406         Previous fix was not good. basic blocks that have "break" or "return" are
8407         not really partof a loop , but live ranges used in these blocks should
8408         be live thru the entire loop, so set partOfLoop but don't add them to
8409         loop region
8410
8411 2002-02-21    <johan AT FRIJA>
8412
8413         * src/SDCCcse.c: fixed bug #514308
8414
8415 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8416
8417         * src/SDCCloop.c:
8418         Fixed BUG #519583. If a conditional block ended in a return/break
8419         statement inside a loop, it was not being considered part of the loop.
8420
8421         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8422
8423 2002-02-10  Karl Bongers <karl AT turbobit.com>
8424
8425         * debugger/*:
8426         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8427         with lots of comments and notes.
8428
8429         * device/examples/test2.c:
8430         Fix bug, "red" variable not being initialized(compiler complained).
8431
8432         * device/examples/Makefile, examples/test3.c:
8433         Add Makefile in device/examples folder, compiles test3.c
8434         for use as a multiple module SDCDB test case.
8435
8436         * sim/ucsim/cmd.src/cmdset.cc:
8437         Took out debug printfs in ucsim "next" command.
8438
8439         * sim/ucsim/xa.src:
8440         Karl and Johan start ucsim XA support.  Most dissassembly working,
8441         about 75% emulation done(plenty of work remaining).
8442
8443         * sim/ucsim/z80.src:
8444         Add Z80 support to ucsim, add test-ucz80 regression test,
8445         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8446         Notice z80 compiler fails on examples/test3.c/crc code.
8447
8448 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8449
8450         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8451         Added support for --parms-in-bank1
8452
8453         * src/ds390/peeph.def:
8454         added a few more peephole optimzations
8455
8456         * src/ds390/main.c:
8457         1) added __builtin_inp & __builtin_outp used to read in data of given length
8458            from a memory mapped port
8459         2) added __builtin_memcmp
8460         3) added __builtin_swapw swap bytes of a short
8461
8462         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8463         1) handle multiple send & receives from register bank1
8464         2) ralloc can now allocate DPTR1 to some liveRanges
8465
8466         * src/SDCCsymt.c, src/SDCCsymt.h:
8467         changes to handle multiple sends & receives
8468
8469         * src/SDCCptropt.h:
8470         added some pointer arithmetic optimization
8471
8472         * src/SDCCptropt.c:
8473         added some pointer arithmetic optimizations but not stable yet so not
8474         called from anywhere (will get this working shortly)
8475
8476         * src/SDCCopt.c: fixed for multiple sends & receives
8477
8478         * src/SDCCmain.c:
8479         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8480         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8481            set preprocessor defines (depending on options)
8482
8483         * src/SDCCicode.c, src/SDCCicode.h:
8484         changes made to handle multiple sends & receives
8485
8486         * src/SDCCglobl.h:
8487         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8488
8489         * src/SDCCcse.c, src/SDCCcse.h:
8490         added function findbackward def (to be used in upcoming optimization)
8491
8492         * src/SDCCcflow.c, src/SDCCcflow.h:
8493         added function returnAtEnd - to determine if a basic block terminates with
8494         a RETURN iCode
8495
8496         * src/SDCCast.c, src/SDCCast.h:
8497         added option parms-in-bank1
8498
8499         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8500         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8501         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8502         adjusted for --parms-in-bank1 option
8503
8504         * device/include/string.h:
8505         donot redefine "reentrant" keyword
8506
8507         * device/include/ds80c390.h: Added some more SFRs
8508
8509 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8510
8511         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8512
8513 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8514
8515         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8516
8517 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8518
8519         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8520
8521 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8522
8523         * Added --xram-movc option
8524
8525 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8526
8527         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8528
8529 2002-01-11  Johan Knol
8530
8531         * Added math lib of Jesus Calvino-Fraga
8532
8533 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8534
8535         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8536         * support/regression/Makefile: new target test-mcs51-stack-auto
8537         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8538
8539 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8540
8541         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8542
8543 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8544
8545         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8546
8547 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8548
8549         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8550
8551         * src/SDCCglue.h: add definition for printIvalChar()
8552
8553 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8554
8555         * src/SDCCast.c: fix #498138 by Johan
8556
8557         * src/SDCCglue.c: fix #498138 by Johan
8558
8559 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8560
8561         * support/regression/Makefile: fix clean
8562
8563         * support/regression/ports/ds390/support.c: fix transmission of last character
8564
8565 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8566
8567         * /sdcc/src/ds390/gen.c:
8568         a) improved computing address of stack variable
8569         b) took out some #if 0 code
8570         c) improved parmBytes adjustment
8571         d) improved genPlusIncr & genMinusIncr
8572         e) genCmp could generate bad code (when left assigned to DPTR)
8573         f) Fixed bug in hasInc
8574
8575         * /sdcc/src/ds390/ralloc.c:
8576         a) packRegsForSupport could mess up live information (Fixed)
8577         b) packRegsDPTRuse could be incorrect for left & right shift
8578
8579         * /sdcc/src/mcs51/ralloc.c:
8580         packRegsForSupport could mess up the live information (Fixed)
8581
8582         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8583
8584         * /sdcc/src/SDCCast.c:
8585         can reverse a loop even if function call is present as long
8586         as the loop control variable is local & is not passed as parameter
8587
8588 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8589
8590         * /sdcc/ChangeLog: *** empty log message ***
8591
8592         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8593         More builtin function additions for TININative
8594
8595         * /sdcc/src/ds390/ralloc.c:
8596         Had broken the regression testsuite
8597
8598         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8599
8600         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8601         Added funcattr hasStackParms will be set for reentrant functions when there
8602         are paramteres on the stack, this helps in minimizing frame pointer generation
8603         typeFromStr can handle function pointers now
8604
8605         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8606         *** empty log message ***
8607
8608 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8609
8610         * /src/ds390/gen.c, /src/ds390/main.c:
8611         More builtin function additions for TININative
8612
8613         * /src/ds390/ralloc.c:
8614         Had broken the regression testsuite
8615
8616         * /src/SDCCast.c: Fixed a bug in dumptree
8617
8618         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8619         Added funcattr hasStackParms will be set for reentrant functions when there
8620         are paramteres on the stack, this helps in minimizing frame pointer generation
8621         typeFromStr can handle function pointers now
8622
8623         * /doc/builtins.txt, /doc/TININative.txt:
8624         *** empty log message ***
8625
8626
8627 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8628
8629         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8630         ALPHA version for -mTININative
8631
8632         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8633         updated to reflect changes in the port structure
8634
8635         * /src/port.h:
8636         added function do_assemble (similar to do_link) if non-null this function
8637         will be called to do assembly (-mTININative) requires a multi command
8638         assembly
8639         added function genAssemblerEnd will be called to generate assembler Epilogue
8640
8641         * /src/SDCCsymt.c:
8642         added _JavaNative to debug info printing
8643
8644         * /src/SDCCmain.c: added option --tini-libid
8645         added port->do_assemble function (-mTININative) has a multi command assemble
8646
8647         * /src/SDCCglue.c: Disabled "constExpr" check
8648         added port->genAssemblerEnd function
8649
8650         * /src/SDCCglobl.h: Added option --tini-libid value
8651
8652         * /src/SDCCast.h:
8653         tookout optimizeCompare from the header (has no external references)
8654
8655         * /src/SDCCast.c: made one more function "static"
8656
8657 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8658
8659         * src/z80/mappings.i: Added z80asm support.
8660
8661         * src/z80/main.c: Added z80asm support on --asm=z80asm
8662
8663         * src/z80/gen.c: Fixed asm portability issues.
8664
8665         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8666
8667         * src/SDCCglue.c (printExterns): Added global/extern split.
8668
8669 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8670
8671         * support/regression/Makefile: added test for mcs51 model large
8672
8673         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8674
8675         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8676
8677 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8678
8679         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8680
8681 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8682
8683         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8684
8685         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8686
8687 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8688
8689         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8690
8691         * support/regression/tests/simplefloat.c: Port to mcs51.
8692
8693 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8694         * support/regression/tests/bug-485362.c: Added.
8695
8696         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8697
8698         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8699
8700         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8701
8702         * src/z80/gen.c (aopDump): Added a dump function.
8703
8704 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8705         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8706
8707         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8708
8709         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8710
8711         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8712
8713         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8714
8715         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8716
8717         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8718
8719         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8720
8721         * support/regression/ports/ds390/support.c: Use tinibios.
8722
8723         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8724
8725 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8726
8727         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8728         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8729
8730         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8731
8732         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8733
8734 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8735
8736         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8737
8738         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8739         (packRegsForIYUse): Created and optimised.
8740
8741 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8742
8743         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8744 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8745
8746         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8747
8748         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8749
8750         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8751
8752 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8753
8754         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8755
8756         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8757
8758 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8759
8760         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8761
8762         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8763
8764         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8765
8766 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8767
8768         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8769         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8770         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8771
8772         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8773
8774         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8775         (genNotFloat): Added.
8776         (genUminusFloat): Added.
8777
8778         * device/lib/z80/Makefile: Added floating pt stubs.
8779
8780         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8781
8782         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8783
8784         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8785
8786 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8787
8788         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8789
8790         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
8791
8792         * sdcc/support/regression/Makefile: Add port ds390.
8793
8794         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
8795
8796         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
8797
8798         * sdcc/support/regression/ports/ds390/spec.mk: Added.
8799
8800         * sdcc/support/regression/ports/ds390/support.c: Added.
8801
8802         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
8803
8804         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
8805
8806         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
8807
8808 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8809
8810         * device/include/malloc.h: Added z80 and gbz80 support.
8811
8812         * device/lib/gbz80/heap.s: Added.
8813
8814         * device/lib/z80/heap.s: Added.
8815
8816         * device/lib/malloc.c: Added z80 and gbz80 support.
8817
8818         * support/regression/tests/malloc.c (testMalloc): Added.
8819
8820         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
8821
8822         * support/regression/tests/bug-478094.c: Added.
8823
8824         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
8825
8826 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
8827
8828         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
8829
8830         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
8831
8832         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
8833
8834         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
8835
8836         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
8837
8838 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8839
8840         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
8841
8842 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
8843
8844         * support/regression/tests/bug-477927.c: Added.
8845
8846         * src/z80/peeph.def: Added minor rules.
8847
8848         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
8849
8850         * src/z80/peeph.def: Added jump optimisation modification.
8851
8852 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
8853
8854         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
8855
8856 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
8857
8858         * support/regression/tests/funptrs.c: Added.
8859
8860 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
8861
8862         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
8863
8864 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
8865
8866         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
8867
8868         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
8869
8870         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
8871         (movLeft2ResultLong): Created.
8872
8873         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
8874         (joinPushes): Added.  Joins two char pushes into a word push.
8875
8876 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
8877
8878         * support/cpp2/Makefile.in (install): Added creation of dest dir.
8879
8880         * support/makebin/Makefile (install): Added creation of dest dir.
8881
8882 2001-10-24 Karl Bongers <karl AT turbobit.com>
8883
8884         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
8885
8886 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
8887
8888         * src/z80/ralloc.c: Turned off faulty pack for one use.
8889
8890         * src/z80/peeph-gbz80.def: Removed redundent restart options.
8891
8892         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
8893
8894 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
8895
8896         * support/regression/Makefile: Improved clean
8897
8898         * support/regression/ports/gbz80/spec.mk: Added clean
8899
8900         * support/regression/ports/host/spec.mk: Added clean
8901
8902         * support/regression/ports/z80/spec.mk: Added clean
8903
8904         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
8905
8906         * support/regression/ports/mcs51/timeout.c: little improvements
8907
8908 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
8909
8910         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
8911
8912         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
8913
8914         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
8915
8916 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
8917
8918         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
8919
8920         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
8921
8922 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
8923         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
8924
8925         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
8926
8927         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
8928
8929         * src/mcs51/main.c (_linkCmd): Added bin path to command.
8930
8931         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
8932
8933         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
8934
8935         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
8936
8937         * support/regression/tests/longor.c: Added.
8938
8939 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
8940
8941         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
8942
8943         * as/mcs51/aslink.h: define PATH_MAX
8944
8945         * as/mcs51/asm.h: define PATH_MAX
8946
8947         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
8948
8949         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
8950
8951         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
8952
8953         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
8954
8955         * src/SDCCglobl.h: define PATH_MAX
8956
8957         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
8958
8959         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
8960
8961 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
8962
8963         * src/z80/gen.c (gencjneshort): Fixed
8964
8965         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
8966
8967 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
8968
8969         * support/regression/tests/bug-469671.c: Added.
8970
8971         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
8972
8973 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
8974
8975         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
8976
8977         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
8978
8979 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
8980
8981         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
8982
8983         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
8984
8985         * src/device/lib/_mullong.c : removed hint: nooverlay bug
8986
8987         * src/device/lib/_divuint.c : removed hint: nooverlay bug
8988
8989         * src/device/lib/_divulong.c: removed hint: nooverlay bug
8990
8991         * src/device/lib/_moduint.c : removed hint: nooverlay bug
8992
8993         * src/device/lib/_modulong.c: removed hint: nooverlay bug
8994
8995 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
8996
8997         * 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.
8998
8999         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9000
9001         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9002
9003 2001-10-07    <johan AT FRIJA>
9004
9005         * device/lib/gets.c (gets): fixed the return value.
9006
9007 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9008         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9009
9010         * 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.
9011
9012         * 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.
9013
9014         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9015
9016         * src/pic/gen.c: Removed Safe_strdup.
9017
9018         * configure.in: Added option to enable libgc support.
9019
9020         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9021         (bitVectUnion): Optimised.
9022         (bitVectIntersect): Optimised.
9023         (bitVectBitsInCommon): Optimised.
9024         (bitVectCplAnd): Optimised.
9025
9026         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9027
9028 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9029
9030         * src/SDCCmain.c: distinguish between assembler debug and plain options
9031
9032         * src/avr/main.c:   remove standard assembler options
9033
9034         * src/ds390/main.c: remove standard assembler options
9035
9036         * src/mcs51/main.c: remove standard assembler options
9037
9038         * src/port.h: removed "PENDING" comment
9039
9040 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9041
9042         * src/device/lib/_mulint.c  : new, with assember functions
9043
9044         * src/device/lib/_mullong.c : new, with assember functions
9045
9046         * src/device/lib/_divuint.c : with assember functions
9047
9048         * src/device/lib/_divsint.c : with assember functions
9049
9050         * src/device/lib/_divulong.c: with assember functions
9051
9052         * src/device/lib/_divslong.c: with assember functions
9053
9054         * src/device/lib/_moduint.c : with assember functions
9055
9056         * src/device/lib/_modsint.c : with assember functions
9057
9058         * src/device/lib/_modulong.c: with assember functions
9059
9060         * src/device/lib/_modslong.c: with assember functions
9061
9062         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9063
9064         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9065
9066         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9067                                       replaced _mululong.c and _mulslong.c by _mullong.c
9068
9069 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9070
9071         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9072
9073 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9074
9075         * src/SDCCglue.c: test, if win32api is available for MINGW
9076
9077 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9078
9079         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9080         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9081         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9082         * support/regression/ports/host/spec.mk: removed GENERIC
9083         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9084         * support/regression/ports/z80/spec.mk: removed GENERIC
9085
9086 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9087
9088         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9089
9090         * support/regression/tests/bug-467035.c: Created.
9091
9092 2001-10-01    <johan AT FRIJA>
9093
9094         * src/SDCC.y: fixed bug #466586 part 1
9095
9096 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9097
9098         * SDCCicode.c: z80 has no generic pointers
9099         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9100
9101 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9102
9103         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9104
9105 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9106
9107         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9108
9109         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9110
9111 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9112
9113         * configure.in: Fixed up so that ucsim is only configured once.
9114
9115         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9116
9117         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9118         (getPathDifference): As above.
9119
9120         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9121
9122         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9123
9124 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9125         * .version: Updated to 2.3.1
9126
9127         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9128         Added copyright header.
9129
9130         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9131         (assemble): Added support for macro based assembler commands.
9132         (linkEdit): Added support for macro based linker commands.
9133         (preProcess): Changed the pre-processor to use macros.
9134         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9135         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9136
9137         * device/lib/z80/crt0.s: Added module name for debugging.
9138
9139 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9140
9141         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9142
9143         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9144
9145         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9146
9147         * src/Makefile.in: Added SDCCmacro and SDCCutil
9148
9149 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9150
9151         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9152
9153 2001-09-16    <johan AT FRIJA>
9154
9155         * 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.
9156
9157 2001-09-15    <johan AT FRIJA>
9158
9159         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9160         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9161
9162 2001-09-11    <johan AT FRIJA>
9163
9164         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9165
9166 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9167
9168         * support/regression/tests/bug-460444.c: Added test case.
9169
9170         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9171         (genCast): Added justification for all of the asserts.
9172
9173 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9174
9175         * support/regression/support.c: _xdata replaced by xdata
9176
9177         * support/regression/spec.mk: removed _generic
9178
9179 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9180
9181         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9182
9183         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9184         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9185
9186         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9187
9188         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9189
9190         * support/regression/tests/bug-460010.c: Added test case.
9191
9192         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9193
9194 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9195
9196         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9197
9198         * support/regression/testfwk.c: removed workaround for bug #436344
9199
9200         * support/regression/tests/bp.c: use less memory with mcs51
9201
9202         * support/regression/tests/bug-441448.c: use less memory
9203
9204         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9205
9206         * support/regression/collate-results.py: typo
9207
9208 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9209
9210         * support/regression/tests/fetchoverlap.c: Added new test case.
9211
9212         * support/regression/tests/bp.c: Added new test case.
9213
9214         * support/regression/tests/bug-448984.c: Added new test case.
9215
9216         * support/regression/tests/pow2shifts.c: Added new test case.
9217
9218         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9219         (genlshTwo): Fixed right shift for count > 8.
9220
9221         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9222
9223 2001-09-08    <johan AT FRIJA>
9224
9225         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9226
9227 2001-09-07    <johan AT FRIJA>
9228
9229         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9230
9231         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9232
9233 2001-09-06    <johan AT FRIJA>
9234
9235         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9236         * bernhard noted me at this: "() equals to (void)" (1.38)
9237
9238 2001-09-05    <johan AT FRIJA>
9239
9240         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9241
9242 2001-09-04    <johan AT FRIJA>
9243
9244         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9245
9246
9247 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9248
9249         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9250
9251 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9252
9253         * link/z80/aslink.h: Fixed path for PATH_MAX
9254
9255 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9256
9257         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9258
9259         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9260
9261         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9262
9263         * 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.
9264
9265 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9266
9267         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9268         (genCmp): Fixed up genCmp for the GB with longs.
9269
9270         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9271
9272         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9273
9274         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9275
9276         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9277
9278 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9279
9280         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9281
9282 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9283
9284         * 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.
9285
9286         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9287
9288 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9289
9290         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9291
9292         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9293
9294 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9295
9296   * sim/ucsim/configure:    little improvement of Cygwin-detection
9297   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9298   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9299   * support/regression/tests/bug-221100.c: small changes for mcs51
9300   * support/regression/tests/bug-221168.c: small changes for mcs51
9301   * support/regression/tests/bug-227710.c: small changes for mcs51
9302   * support/regression/tests/staticinit.c: small changes for mcs51
9303   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9304   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9305   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9306
9307 $Revision$