device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h
[fw/sdcc] / ChangeLog
1 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2
3         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
4
5 2005-07-31 Raphael Neider <rneider AT web.de>
6
7         * device/lib/pic16/libdev/pic18f458.c,
8           device/include/pic16/pic18f458.h: added missing T0CONbits
9
10 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
11
12         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
13
14 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
15
16         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
17
18 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
19
20         * device/include/mcs51/at89c51ed2.h: added.
21
22 2005-07-23 Raphael Neider <rneider AT web.de>
23
24         * src/pic/gen.h: added emitpcode macro for debugging
25         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
26           and replace by macro adding debug information on demand
27         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
28         * (gencjne): tried to fix; replaced with correct (slower) code
29         * (gen{Unp,P}ackBits): fixed single bit access
30         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
31         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
32           previous instruction
33         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
34           register has to be handled with care (forbidding movement
35           of assignments/uses, removing assignments completely, ...)
36         * (pCodeOptime2pCodes): make use of regIsSpecial
37         * added lots of debugging output (commented out)
38         * src/pic/rallloc.c (deassignLRs): prevent operand registers
39           from being reused as result UNLESS it is known to work
40
41 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
42
43         * support/Util/dbuf.h: include <stddef.h> for size_t
44         * .version: changed to version 2.5.2
45
46 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
47
48         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
49
50 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
51
52         * src/hc08/gen.c (genMinus): fixed bug #1241835,
53           (genModOneByte): removed needless psha/pula
54
55 2005-07-22 Raphael Neider <rneider AT web.de>
56
57         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
58           have PIC14 handled like PIC16, fixes broken pic14 linker calls
59         * src/pic/gen.c (resolveIfx): do not "invent" labels
60         * (genSkipc): changed to positive logic
61         * (genSkipCond): removed as no longer needed
62         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
63           backport from PIC16
64         * (genLeftShift): check operands are in different registers
65         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
66           INCF does not update CARRY...
67         * src/pic/main.c: fixed _linkCmd
68         * src/pic/pcode.c (unlinkpCode): added inactive code
69         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
70           alive (do not assign result and operand overlapping registers)
71
72 2005-07-22 Raphael Neider <rneider AT web.de>
73
74         * src/pic/device.c (dump_sfr): replaced register declaration with
75           call to emitSymbolToFile() to avoid duplicate symbols
76         * (assignRelocatableRegisters): do not declare external symbols
77         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
78           right (take size of type, not etype)
79         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
80         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
81         * (packRegsForAccUse): disabled assignment of WREG as
82           the result reg to prevent occurence of just fixed #1235003,
83           fixes #1242954
84         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
85           symbols (avoids duplicate symbols in .asm file)
86         * (pic14emitRegularMap): use emitSymbolToFile()
87         * src/pic/gen.c (aopOp): fixed spillLocation handling
88         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
89         * (genDataPointerSet): removed unneccessary variables/output
90
91 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
92
93         * as/mcs51/lkarea.c: enlarged codemap for banked memory
94         * device/lib/mcs51/crtbank.asm: added # to 0x0F
95
96 2005-07-21 Raphael Neider <rneider AT web.de>
97
98         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
99           architecture cannot handle them efficiently, fixes bug #1235003
100         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
101           check for empty sets before using them (fixes bug #1232190)
102
103 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
104
105         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
106           (lnksect2): generate warnings for memory overlap
107         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
108           constseg to set the name of these segments so you can instruct the linker
109           to place them in banks
110         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
111         * src/SDCCglobl.h: added MODEL_HUGE to enum,
112           added code_seg and const_seg to options
113         * src/SDCCglue.c (emitMaps): use options.const_seg,
114           (createInterruptVect): put interrupt vectors in segment HOME,
115           (glue): put HOME before static segment and put the main glue in HOME,
116           (glue): use options.code_seg
117         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
118         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
119           these segments so you can instruct the linker to place them in banks
120           (linkEdit): use code_loc for HOME segment which should be the first
121           segment in code memory now
122         * src/SDCCmem.c: fixed more stuff like bug 1238386
123         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
124           (changePointer): don't change function pointers to code pointers for
125           banked functions,
126           (compareType): added exceptional check for banked function pointers
127         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
128         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
129           after static in code memory
130         * src/mcs51/gen.c: added aopLiteralLong prototype,
131           (aopForSym): use getSize for functions,
132           (genCall): generate banked calls over one trampoline __sdcc_banked_call
133           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
134           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
135           the segment,
136           (genPcall): use call for literal function pointers and generate banked
137           calls over the one trampoline so there's only one place for the user to
138           modify according to his/hers hardware,
139           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
140           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
141         * src/mcs51/main.c: added keyword banked,
142           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
143         * support/Util/SDCCerr.c,
144         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
145           needed for passing the bank and address to the trampoline
146         * device/lib/mcs51/crtbank.asm: added for bankswitching
147         * device/lib/mcs51/Makefile: added crtbank
148
149 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
150
151         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
152           for fields at offset 0 of a struct or union as reported
153           on 2005-07-07 in the developer mailing list.
154
155 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
156
157         * src/SDCCmem.c: fixed bug 1238386
158
159 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
160
161         * src/mcs51/peeph.def: added labelrefcounting for peepholes
162           (patch #1144962), added peephole 300, enabled 259.x
163         * doc/sdccman.lyx: removed screenshot and provided link instead
164
165 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
166
167         * doc/sdccman.lyx: added section about debugging with ddd
168         * doc/figures/ddd_example.eps: screenshot of debugging session
169
170 2005-07-04 Raphael Neider <rneider AT web.de>
171
172         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
173           like CODE pointers, fixes #1115683
174         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
175           call, fixes bugs #1232211, #1228110,
176           fixed wrong casts to pCodeFlow from pCodeInstructions
177
178 2005-07-04 Raphael Neider <rneider AT web.de>
179
180         * src/pic/gen.c (popGet): changed assert to allow for
181           bit operands
182         * (popGetAddr): changed signature to provide
183           an additional index, patched all call sites
184         * (genCmpEq): handle literal-like operands correctly
185         * (genAddrOf): added sanity checks on __code/__data pointers
186         * (genAssign): added handling of symbols from __code section
187         * (gencjne): do not generate code for comparisons whose result
188           is neither stored nor used, fixes bug #1171114
189         * (AccLsh, AccRsh): operate on operand instead of WREG
190         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
191           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
192           by known count
193         * rewrote complete shift-by-literal logic, commented unused
194           functions out
195         * (genConstPointerGet): get multiple bytes (if result size > 1),
196           fixed handling of non-immediate addresses
197         * (genPointerGet): handle CODE pointers like CONST pointers
198         * (genpic14Code): insert C-SRC lines as Cource-pCodes
199         * ({aop,op}_isLitLike): NEW, single place to decide whether an
200           operand is to be treated as a literal or not
201         * (mov2w,genPcall,genCmpEq),
202           src/pic/genarith.c: use aop_isLitLike() to decide between
203           literal/register contents
204         * (addSign): added missing offset
205         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
206           only emit comment in debug-mode,
207           use {aop,op}_isLitLike throughout the file
208         * src/pic/glue.c: fix initializers for pointers (work in progress)
209         * src/pic/pcode.c (get_op): honor index on _const symbols
210         * ({reset,dump}pCodeStatistics): NEW, estimate code size
211         * (dumppBlock): added pCode size estimation
212         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
213           check for IS_SYMOP before OP_SYMBOL'ing
214         * fixed indentation, compacted switch-statements
215         * (allocReg): find free register and allocate it instead of
216           allocating new registers all the time
217         * (deassignLRs): prevent POINTER_GET's from being assigned the same
218           registers as its operands (necessary only for multibyte GETs)
219
220 2005-07-01 Raphael Neider <rneider AT web.de>
221
222         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
223           debugging .asm-output macros FENTRY + FEXIT
224         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
225           way... I wonder...
226         * (emitpComment): NEW, printf to pCode
227         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
228           offset handling
229         * (popGetAddr): NEW, variant of popGet to access an immediates
230           high(er) bytes instead of the n'th byte of memory they reference,
231           replaced popGet with popGetAddr where neccessary
232         * (genDataPointerGet): reactivated and fixed implementation
233         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
234           accesses
235         * (genDataPointerSet): fixed multibyte assignments
236         * (genpic14Code): fixed --i-code-in-asm handling
237         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
238         * (genPlus): fixed index-out-of-bounds error
239         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
240         * src/pic/ralloc.c: added debugging output macro FENTRY2
241         * (spillThis): fixed indentation, enbraced for-body for clarity
242         * (rematStr): commented out as now unused
243         * (regTypeNum): commented out special spill case (overwrites
244           arbitrary values)
245         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
246
247 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
248
249         * doc/sdccman.lyx: documented sfr16/sfr32,
250           added example for using storage class with function pointers
251         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
252
253 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
254
255         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
256         * device/lib/_itoa.c,
257         * device/lib/_ltoa.c: optimized codesize
258         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
259           but don't know how to suppress the double warning.
260         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
261         * support/Util/SDCCerr.c,
262         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
263
264 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
265
266         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
267           fixed old K&R prototypes
268         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
269         * device/lib/_gptrget.c,
270         * device/lib/_gptrgetc.c,
271         * device/lib/_gptrput.c: changed versions for new memory indicator values,
272           also new versions for small generic pointers and banked generic pointers
273         * src/port.h: added const_name
274         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
275         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
276         * src/SDCCcse.c (findPrevIc): check all associative operators
277         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
278         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
279         * src/SDCCmem.c: updated comments,
280           set far-space to 0 for pdata, results in optimized code
281         * src/SDCCmem.h: added macro CONST_NAME
282         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
283           moving the info into the highest bits, see also gptrget/gptrput
284         * src/src.dsp: added sdcc.ico to project files
285         * src/avr/gen.c (genCast): fixed bug 0x%d
286         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
287         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
288           relation between ptr_type and DCL_TYPE,
289           (genCast): fixed bug 0x%d
290         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
291           (CODE)" for const_name
292         * src/hc08/gen.c (genCast): fixed bug 0x%d
293         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
294           (hc08_port): added "CONST (CODE)" for const_name
295         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
296           (aopForRemat, adjustArithmeticResult): disconnected direct relation
297           between ptr_type and DCL_TYPE,
298           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
299           operand* and took AOP() inside function so sfr-ness can be checked,
300           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
301           new prototype,
302           (genFunction, genEndFunction): optimized stack setup,
303           (genMinus): optimized for literals with ending zeroes (in bytes),
304           (genCast): fixed bug 0x%d
305         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
306           (mcs51_port): added "CONST (CODE)" for const_name
307         * src/mcs51/peeph.def: made rule 226 more generic
308         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
309         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
310         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
311         * src/z80/main.c (z80_port): added NULL for const_name,
312           (gbz80_port): added NULL for const_name
313         * support/regression/tests/bug663539.c,
314         * support/regression/tests/sfr16.c: new tests
315
316 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
317
318         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
319
320 2005-06-24 Raphael Neider <rneider AT web.de>
321
322         * device/lib/pic16/libdev/pic18f[68][567]20.c:
323           corrected typos...
324         * device/include/pic16/signal.h: added USBIF
325           and SIG_USB
326
327 2005-06-24 Raphael Neider <rneider AT web.de>
328
329         * device/lib/pic16/libdev/pic18f2455.c,
330           device/include/pic16/pic18f2455.h: NEW
331         * device/include/pic16/pic18fregs.h,
332           device/lib/pic16/pics.all,
333           src/pic16/device.c: added 18f2455
334         * device/lib/pic16/libdev/pic18f[68][567]20.c,
335           device/include/pic16/{pic18f[68][567].h,usart.h}:
336           replaced MULTIPLE_USARTS define with more relaible
337           compatibility sfrs (for USART access)
338
339 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
340
341         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
342           and the output asm file line is printed on two lines.
343
344 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
345
346         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
347           BGT, BLE, BHI, and BLS instructions
348         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
349           genCmpEq): removed
350         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
351           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
352           fixes bug #1216342
353         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
354
355 2005-06-15 Raphael Neider <rneider AT web.de>
356
357         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
358         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
359         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
360           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
361           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
362
363 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
364
365         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
366           Marcel Telka in bug #1215704
367
368 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
369
370         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
371           located in shared memory bank.
372
373 2005-05-31 Raphael Neider <rneider AT web.de>
374
375         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
376           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
377           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
378
379 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
380
381         * device/lib/_strncpy.c: fixed the fix
382
383 2005-05-26 Raphael Neider <rneider AT web.de>
384
385         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
386           initializers with \0, bug #1208187
387         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
388           intializers with \0, bug #1208187
389
390 2005-05-26 Raphael Neider <rneider AT web.de>
391
392         * src/pic16/glue.c (pic16_printIvalChar): fixed string
393           initializers with \0, bug #1208187
394         * src/pic16/main.c (_process_pragma): added sanity checks
395           for stack position and size, emit warnings when appropriate
396
397 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
398
399         * device/lib/_strncpy.c: fixed not filling with \0
400
401 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
402
403         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
404           createFunction),
405         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
406           compound_statement),
407         * src/SDCCsymt.h,
408         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
409
410 2005-05-24 Raphael Neider <rneider AT web.de>
411
412         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
413
414 2005-05-24 Raphael Neider <rneider AT web.de>
415
416         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
417           TRISE definitions, closes bug #1162453
418
419 2005-05-22 Raphael Neider <rneider AT web.de>
420
421         * src/pic16/main.c (_process_pragma): check for missing
422           arguments to pragmas code and udata
423         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
424           consistency fixes to match other headers (thanks to Jim Paris)
425         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
426
427 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
428
429         * src/SDCCicode.c (isOperandEqual): fixed missing ;
430
431 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
432
433         * support/regression/tests/bug1198642.c: new test
434         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
435         * src/SDCCcse.c (findPrevIc): added comment, please have a look
436         * support/scripts/resource.h,
437         * support/scripts/resource.rc,
438         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
439         * support/scripts/sdcc.ico: added 32x32 icon
440
441 2005-05-18 Raphael Neider <rneider AT web.de>
442
443         * device/lib/pic16/libdev/pic18f*.c,
444         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
445           keywords to "__sfr" and "__at (X)"
446         * device/include/pic16/pic18fregs.h: added pic18f4520
447         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
448           #1203088 (MPLAB compatibility)
449
450 2005-05-17 Raphael Neider <rneider AT web.de>
451
452         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
453         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
454         * device/lib/pic16/pics.all: added new devices
455         * src/pic16/device.c: added support for pic18f4520
456
457 2005-05-16 Raphael Neider <rneider AT web.de>
458         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
459         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
460         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
461           convenience function for bit access
462
463 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
464
465         * device/lib/printf_large.c: fixed bug 1193299
466         * support/regression/tests/bug1057979.c: added test %3.3s
467
468 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
469
470         * device/include/mcs51/8051.h,
471         * device/include/mcs51/8052.h: made parseable with lint
472         * device/include/mcs51/lint.h: added include file for (sp)lint
473         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
474         * doc/cdbfileformat.lyx,
475         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
476
477 2005-05-14 Raphael Neider <rneider AT web.de>
478
479         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
480         * device/lib/pic16/libc/stdlib/itoa.c (new)
481         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
482         * device/lib/pic16/libio/Makefile: exclude subdir according to
483           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
484         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
485         * src/pic16/gen.c (genFunction): prevent annoying warning
486         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
487           nameclashes on BeOS
488         * support/cpp2/cppmain.c (cpp_output_string): new
489         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
490           fixes bug 1116802
491
492 2005-05-13 Borut Razem <borut.razem AT siol.net>
493
494         * src/SDCCmain.c (linkEdit): fixed bug 1195202
495
496 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
497
498         * .version: changed to version 2.5.1; back to bleeding edge development
499
500 2005-05-11 Borut Razem <borut.razem AT siol.net>
501
502         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
503           generate PDF version 1.3 documents
504
505 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
506
507         * .version: changed to version 2.5.0
508
509 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
510
511         * doc/sdccman.lyx: updated weblinks, index and smaller updates
512
513 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
514
515         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
516         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
517         well as many smaller updates.
518         * .version: changed to version 2.5.0-pre1
519
520 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
521
522         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
523
524 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
525
526         * support/regression/tests/bug1185672.c: added
527         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
528           bug 1185672
529         * src/mcs51/gen.c (genCall): added comments, made it look safer
530         * src/mcs51/gen.c (genEndFunction): simplified
531
532 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
533
534         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
535
536 2005-04-14 Borut Razem <borut.razem AT siol.net>
537
538         * fixed bug 1045046 - SIGSEGV with really simple code?:
539           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
540           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
541
542 2005-04-14 Borut Razem <borut.razem AT siol.net>
543
544         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
545           src/pic16/device.h: temporarily disabled experimental #inline pragma
546           for 2.5.0 release
547
548 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
549
550         * device/include/z80/stdio.h,
551         * device/include/z80/string.h: removed these highly incomplete files so
552           SDCC can use the default ones in device/include/
553
554 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
555
556         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
557         gcc warning.
558         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
559         fix sdcpp warnings.
560
561 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
562
563         * device/include/malloc.h: removed redundant __reentrant prototypes
564         * device/lib/_mullong.c: added working xstack variant in asm (C version
565           doesn't pass regression tests)
566         * device/lib/bpx.c: used __data and made bpx char for mcs51
567         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
568           (createFunction): fixed bug with xstackPtr
569         * src/SDCCcse.c: corrected comments
570         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
571           (killDeadCode, eBBlockFromiCode): removed unused code
572         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
573           corrected comments
574         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
575           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
576           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
577           (genModOneByte): fixed warning in MSVC
578         * src/mcs51/main.c (): added comments
579         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
580
581 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
582
583         * src/SDCCmain.c (linkEdit): oops, changed one line too many
584
585 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
586
587         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
588
589 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
590
591         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
592         characters arrays of larger size than the declared one.
593
594 2005-04-10 Borut Razem <borut.razem AT siol.net>
595
596         * src/pic/gen.c (genInline),
597           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
598           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
599           (findNextInstruction), (findPrevInstruction),
600           (findInstructionUsingLabel),
601           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
602         * src/pic/pcode.c (findLabel): added missing '\n'
603         * src/src.dsp: added SDCCdwarf2.c to the project
604
605 2005-04-09 Borut Razem <borut.razem AT siol.net>
606
607         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
608
609 2005-04-08 Raphael Neider <rneider AT web.de>
610
611         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
612           into the chain after a given one) and mergeDefmapSymbols (combine
613           defmap entries for each symbol per pcode)
614         * (createDefmap): have defmap entries merged in the end
615         * (defmapReplaceSymRef): split defmap entries covering two accesses to
616           a symbol before replacing one access type's symbol, merge symbols in
617           the end (replacement symbol might already have an entry)
618         * (assignValnums): keep reference to written WREG intact
619
620 2005-04-08 Raphael Neider <rneider AT web.de>
621
622         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
623           Alpha)
624
625 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
626
627         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
628         bytes
629
630 2005-04-07 Raphael Neider <rneider AT web.de>
631
632         * device/include/pic16/usart.h: added compatibility defines for
633           devices with more than one USART
634         * device/include/pic16/pic18f[68][567]20.h: activated above defines
635
636 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
637
638         * device/lib/Makefile.in: updated for port specific include
639
640 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
641
642         * support/regression/ports/mcs51/spec.mk: added mcs51 include
643
644 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
645
646         * device/include/8051.h,
647         * device/include/8052.h,
648         * device/include/at89S8252.h,
649         * device/include/at89c55.h,
650         * device/include/at89x051.h,
651         * device/include/at89x51.h,
652         * device/include/at89x52.h,
653         * device/include/mcs51reg.h,
654         * device/include/reg51.h,
655         * device/include/reg764.h,
656         * device/include/regc515c.h,
657         * device/include/sab80515.h: (re)moved these 12 files
658         * device/include/mcs51/8051.h,
659         * device/include/mcs51/8052.h,
660         * device/include/mcs51/at89S8252.h,
661         * device/include/mcs51/at89c55.h,
662         * device/include/mcs51/at89x051.h,
663         * device/include/mcs51/at89x51.h,
664         * device/include/mcs51/at89x52.h,
665         * device/include/mcs51/mcs51reg.h,
666         * device/include/mcs51/reg51.h,
667         * device/include/mcs51/reg764.h,
668         * device/include/mcs51/regc515c.h,
669         * device/include/mcs51/sab80515.h: and added them here
670
671 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
672
673         * device/include/stdarg.h: changed SDCC specific keywords to double
674           underlined form.
675         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
676           mcs51 and ds390.
677         * device/include/hc08/mc68hc908gp32.h,
678         * device/include/hc08/mc68hc908jb8.h,
679         * device/include/hc08/mc68hc908jkjl.h,
680         * device/include/hc08/mc68hc908qy.h: fixed comments
681         * device/include/mcs51/README: updated
682         * device/include/mcs51/c8051f120.h: added PINRSF
683         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
684         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
685           amidst code. Also inline is not supported.
686
687 2005-04-06 Raphael Neider <rneider AT web.de>
688
689         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
690         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
691           callers stack/frame pointers
692
693 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
694
695         * device/include/pic16/usart.h: added, missing in previous commit,
696         * device/include/pic16/adc.h: fixed typo,
697         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
698         commit,
699         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
700         <p18fxxx.inc>
701         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
702         uninitialized because a bug appears with gplink
703         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
704         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
705         complains for unrecognised option
706
707 2005-04-05 Raphael Neider <rneider AT web.de>
708
709         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
710           structs as well (using memcpy)
711         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
712           on ISRs (GOTO has no label)
713         * src/pic16/device.h: added OF_OPTIMIZE_DF
714         * src/pic16/main.c: added compiler switch --optimize-df to enable the
715           new data flow analysis/optimization
716         * src/pic16/pcode.c: added (prototypes for and implementation of)
717           dataflow analysis functions, fixed pCodeInstructions' inCond and
718           outCond values, made RCALL a branch instruction
719         * (pic16_unlinkpCode): keep C line if possible
720         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
721           C line moved if possible
722         * (pic16_getRegFrompCodeOp): NEW, improved version of...
723         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
724           to use new pic16_getRegFrompCodeOp (works for more SFRs)
725         * (pic16_BuildFlow): fixed skip instructions with label (did not start
726           new flow)
727         * (pic16_getJumptabpCode): NEW, needed in...
728         * (LinkFlow): fixed handling of jumptables, calls and conditional
729           branches
730         * (pic16_InsertCommentAfter): NEW
731         * (pic16_pCodeReplace): made verbose and flow preserving
732         * (AnalyzeFlow): added call to data flow analysis
733         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
734         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
735         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
736
737 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
738
739         * src/SDCCast.c (decorateType): fixed bug #1105626
740
741 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
742
743         * device/include/asm/pic16/features.h,
744         * pic18f*.h headers,
745         * device/include/pic16/adc.h,
746         * device/include/pic16/delay.h,
747         * device/include/pic16/i2c.h,
748         * device/include/pic16/malloc.h,
749         * device/include/pic16/stdio.h,
750         * device/include/pic16/stdlib.h,
751         * device/include/pic16/string.h,
752         * device/lib/pic16/libc/stdio/printf_tiny.c,
753         * device/lib/pic16/libc/stdio/printf_small.c,
754         * device/lib/pic16/libc/stdio/strmgpsim.c,
755         * device/lib/pic16/libc/stdio/strmmssp.c,
756         * device/lib/pic16/libc/stdio/strmusart.c,
757         * device/lib/pic16/libc/stdio/vfprintf.c,
758         * device/lib/pic16/libc/stdlib/ltoa.c,
759         * device/lib/pic16/libc/stdlib/putchar.c,
760         * device/lib/pic16/libc/stdlib/x_ftoa.c,
761         * device/lib/pic16/libc/stdlib/memchrpgm.c,
762         * device/lib/pic16/libc/stdlib/memchrram.c,
763         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
764         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
765         * device/lib/pic16/libio/adc/adcbusy.c,
766         * device/lib/pic16/libio/adc/adcread.c,
767         * device/lib/pic16/libio/adc/adcsetch.c,
768         * device/lib/pic16/libio/usart/ubaud.c,
769         * device/lib/pic16/libio/usart/ubusy.c,
770         * device/lib/pic16/libio/usart/udrdy.c,
771         * device/lib/pic16/libio/usart/uopen.c,
772         * device/lib/pic16/libio/usart/uputc.c,
773         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
774         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
775         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
776         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
777         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
778         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
779         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
780         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
781         specific keywords to double underlined form,
782         * device/lib/pic16/libc/Makefile.rules,
783         * device/lib/pic16/libsdcc/Makefile.rules,
784         * device/lib/pic16/libm/Makefile,
785         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
786         to compile with C standard set in Makefile.common
787         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
788         rand.c and crc.c in compilation process,
789         * device/lib/pic16/libsdcc/int/divuint.c,
790         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
791         `c' from signed to unsigned,
792         * device/lib/pic16/startup/crt0.c,
793         * device/lib/pic16/startup/crt0i.c,
794         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
795         keywords to double underlined form, bug fixes in _do_cinit function
796         which prevented the correct initialization of the .idata segment,
797         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
798         core to enter a infinite loop
799         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
800
801 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
802
803         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
804
805 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
806
807         * device/include/Makefile.in: add support for hc08 subdirectory
808         * device/include/hc08/: new subdirectory
809         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
810         Lucas Loizaga, thanks!
811         * device/include/hc08/mc68hc908qy.h,
812         * device/include/hc08/mc68hc908gp32.h,
813         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
814         their own directory. Changed internal macro names to use the compiler
815         reserved namespace. Changed SDCC specific keywords to double
816         underlined form.
817         * device/include/math.h,
818         * device/include/malloc.h,
819         * device/include/stdarg.h,
820         * device/include/stdbool.h
821         * device/include/string.h,
822         * device/include/tinibios.h,
823         * device/include/ds400rom.h,
824         * device/include/8051.h,
825         * device/include/8052.h,
826         * device/include/80c51xa.h,
827         * device/include/at89c55.h,
828         * device/include/at89S8252.h,
829         * device/include/at89x51.h,
830         * device/include/at89x52.h,
831         * device/include/ds80c390.h,
832         * device/include/reg764.h,
833         * device/include/regc515c.h,
834         * device/include/sab80515.h,
835         * device/include/mcs51/c8051f000.h,
836         * device/include/mcs51/c8051f018.h,
837         * device/include/mcs51/c8051f020.h,
838         * device/include/mcs51/c8051f040.h,
839         * device/include/mcs51/c8051f060.h,
840         * device/include/mcs51/c8051f120.h,
841         * device/include/mcs51/c8051f300.h,
842         * device/include/mcs51/c8051f310.h,
843         * device/include/mcs51/c8051f320.h,
844         * device/include/mcs51/c8051f330.h,
845         * device/include/mcs51/c8051f350.h,
846         * device/include/z180.h: Changed SDCC specific keywords to double
847         underlined form.
848
849 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
850
851         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
852         18F4455,
853         * (pic16_assignConfigWordValue): disable testing of configuration
854         register value with config mask,
855         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
856         function with port->fun_prefix,
857         * (genFunction): when generating a naked interrupt function never
858         create an absolute segment placed in interrupt vector address, place
859         the actual interrupt function at IVA instead, when an interrupt
860         function is generated with unspecified interrupt then do not create
861         the absolute section,
862         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
863         code for generating a call to generic pointer get/put function with
864         a call to function pic16_callGenericPointer(),
865         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
866         the call to the generic pointer get/put functions with prefixing the
867         function name with port->fun_prefix,
868         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
869         * src/pic16/main.c (_process_pragma): prefix function with
870         port->fun_prefix,
871         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
872         calling assembler, old 18Fxxxx macro is deprecated,
873         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
874         PC_ASMDIR in while condition,
875         * (findInstruction): add PC_ASMDIR in while condition,
876         * (buildCallTree): prefix main with port->fun_prefix,
877         * (pic16_pCode2str): fixed bug that didn't emit the memory access
878         identifier for variable with banked access in instructions BTFSS,
879         BTFSC, BCF, BSF, BTG
880         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
881         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
882         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
883         perform optimization when enviroment variable NO_REG_OPT is set,
884         * (insideLRBlock): NEW, return 1 if register is inside an
885         INF_LOCALREGS block,
886         * (RemoveRegFromLRBlock): remove a register that is completely
887         eliminated by register optimization, but it is still left in local
888         register store/restore in/from stack block,
889         * (Remove2pcodes): after removing register, check to see if it
890         should be removed from local register store/restore in/from stack
891         block,
892         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
893         DUMMY_READ_VOLATILE,
894
895         * device/include/pic16/adc.h: minor prototype modifications and
896         update,
897         * device/include/pic16/malloc.h: added GPL notice various
898         modifications,
899         * device/include/pic16/stdint.h: NEW, standard header for ints
900         * device/include/pic16/delay.h: NEW, header for delay functions,
901         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
902         delay1mtcy,
903         * device/include/pic16/signal.h: NEW, header providing helper macros
904         for implementing signal handlers,
905         * device/include/pic16/stdio.h: added prototypes for functions,
906         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
907         prototypes for stdin and stdout, added macro PUTCHAR to
908         automatically implement putchar function prototype,
909         * device/include/pic16/usart.h: modified and updated USART library,
910         * device/lib/pic16/libio/adc/,
911         * device/lib/pic16/libio/i2c: some modifications to improve library
912         performance,
913         * device/lib/pic16/libc/stdio/: modifications for the new printf*
914         family of functions,
915         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
916         family of functions and other sources,
917         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
918         of the PIC18Fxx[28] devices,
919         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
920         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
921         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
922         _do_cinit function, because the previous failed when local variables
923         where not placed in the same memory bank,
924         * device/lib/pic16/libsdcc/char/: various modifications to improve
925         library performance,
926         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
927         information on the new functions of the c library and more...
928
929 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
930
931         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
932
933 2005-03-26 Raphael Neider <rneider AT web.de>
934
935         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
936           if condition == CARRY)
937         * (genCmp): adapted to new genSkipc semantics
938         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
939           on rIfx (genCmp was broken)
940
941 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
942
943         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
944         * src/z80/main.c (_keywords[]),
945         * src/SDCCglobal.h (struct options),
946         * src/SDCC.y,
947         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
948         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
949         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
950         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
951         always available in leading double underscore form. The C99 support is
952         mostly missing, but it's a start.
953         * support/regression/tests/bug-227710.c: fixed nonconforming use of
954         reserved identifier "__data".
955
956 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
957
958         * src/mcs51/peeph.def: fixed bug 1170013
959
960 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
961
962         * device/include/mcs51reg.h: fixed bug 842007
963
964 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
965
966         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
967         last time.
968
969 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
970
971         * src/port.h (struct PORT),
972         * src/avr/ralloc.c (avr_assignRegisters),
973         * src/avr/main.c,
974         * src/ds390/ralloc.c (ds390_assignRegisters),
975         * src/ds390/main.c,
976         * src/hc08/ralloc.c (hc08_assignRegisters),
977         * src/hc08/main.c,
978         * src/mcs51/ralloc.c (mcs51_assignRegisters),
979         * src/mcs51/main.c,
980         * src/pic/ralloc.c (pic14_assignRegisters),
981         * src/pic/main.c,
982         * src/pic16/ralloc.c (pic16_assignRegisters),
983         * src/pic16/main.c,
984         * src/xa51/ralloc.c (xa51_assignRegisters),
985         * src/xa51/main.c,
986         * src/z80/ralloc.c (z80_assignRegisters),
987         * src/z80/ralloc.h,
988         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
989         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
990         * src/SDCCcse.h,
991         * src/SDCCdflow.c (computeDataFlow),
992         * src/SDCCdflow.h,
993         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
994         * src/SDCCloop.h,
995         * src/SDCCcflow.c (*),
996         * src/SDCCcflow.h,
997         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
998         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
999         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1000         immedDom() returning wrong block; probably fixes bug #1160833)
1001
1002 2005-03-20 Borut Razem <borut.razem AT siol.net>
1003
1004         * support/scripts/inc2h.pl: WIN32 port
1005
1006 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1007
1008         * device/lib/makefile.in: added abs.c and labs.c
1009
1010 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1011
1012         * device/include/stdint.h: added
1013         * device/lib/abs.c: added
1014         * device/lib/labs.c: added
1015         * device/include/stdlib.h: added abs() and labs() prototypes
1016         * device/lib/libsdcc.lib: added abs and labs
1017         * device/include/float.h,
1018         * device/lib/_fsmul.c,
1019         * device/lib/printf_fast.c,
1020         * device/lib/printf_tiny.c: updated comments
1021
1022 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1023
1024         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1025         bug #1164313
1026
1027 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1028
1029         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1030         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1031
1032 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1033
1034         * device/lib/printf_large.c: removed inline assembly for portability and
1035           readability. Use printf_fast if speed or size are more important.
1036         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1037         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1038
1039 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1040
1041         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1042         prevent compiler warning
1043
1044 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1045
1046         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1047         moved to level 0 and declared as static. Also they are explicit
1048         placed in access bank. This was necessery because some times they
1049         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1050         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1051         optimizations. Currently only compare to unsigned char is implemented,
1052         * src/pic16/gen.c: added fReturnIdx array,
1053         * (struct resolvedIfx) is moved to gen.h and made public,
1054         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1055         * (aopForSym): added an optimization to directly store in stack of
1056         the operand of a SEND iCode,
1057         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1058         but as registers instead (AOP_REG) using the fReturnIdx array,
1059         * (pic16_freeAsmop): remove the freed register from the
1060         _G.sregsAlloc field,
1061         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1062         a compare of 'WREG',
1063         * (pic16_popGetTempRegCond): changed function prototype, now
1064         function takes also a bitVector argument v which holds the current
1065         set of registers that are allocated for stack access by aopForSym,
1066         registers allocated in aopForSym for accessing stack symbols are not
1067         any more part of the functions usedRegs field,
1068         * (genCall): some times aopOp is called for a stack variable to be
1069         send, aopForSym might perform the push, if this is true make sure
1070         that genCall doesn't push the variable twice by testing _G.resDirect,
1071         * (genFunction): changed testing for unspecified interrupt number
1072         from 256 to INTNO_UNSPEC,
1073         * modified selection scheme of frame pointer generation. Previously
1074         if function did use local registers a frame pointer was generated,
1075         now a frame pointer is generated only if function has arguments
1076         (that need PLUSW2 register access), or has stack arguments, or the
1077         compiler is not instructed to omit the frame pointer,
1078         * (genEndFunction): before restoring local registers that were saved
1079         in the function preamble, also restore the registers that *might*
1080         have been allocated for stack access,
1081         * (genRet): removed some old comments,
1082         * (genCmp, the active (RN's) version): added a call to the
1083         pic16_genCmp_special function to perform the compare with a more
1084         robust and optimized way,
1085         * (genInline): a feature has been added in inline code generation,
1086         which allows a wildcard variable substitution when writing inline
1087         assembly. Code is incomplete and experimental therefore undocumented,
1088         * (genCast): changed order of aopOp for result and right to allow
1089         aopForSym to directly load the result if possible,
1090         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1091         perform an optimized compare on some selected special occasions,
1092         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1093         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1094         generate an IVT any more,
1095         * src/pic16/main.c (pic16_optionsTable): added command line option
1096         --optimize-cmp,
1097         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1098         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1099         macros,
1100         * src/pic16/NOTES: Raphael Neider added in list of active developers
1101         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1102         jumptable_end to prevent bug #,
1103         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1104         inCond and outCond fields,
1105         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1106         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1107         turn off register spilling,
1108         * (packRegsForOneUse): synced with other ports' versions although it
1109         is not used currently,
1110         * (pic16_packRegisters): added an optimization while reading
1111         structure bitfields, some registers may be saved (malloc code is
1112         decreased by 80 bytes)
1113
1114 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1115
1116         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1117         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1118         this can be optimized more?
1119
1120 2005-03-10 Raphael Neider <rneider AT web.de>
1121
1122         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1123           genNearPointerGet): (hopefully) fixed access to bitfields via
1124           pointers (p->bitN = x; and x = p->bitN; failed)
1125
1126 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1127
1128         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1129
1130 2005-03-09 Raphael Neider <rneider AT web.de>
1131
1132         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1133
1134 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1135
1136         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1137         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1138           (regTypeNum): set REG_BIT type if necessary
1139         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1140         * support/regression/tests/critical.c: check bug 1144613
1141
1142 2005-03-02 Raphael Neider <rneider AT web.de>
1143
1144         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1145
1146 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1147
1148         * src/avr/ralloc.c (serialRegAssign),
1149         * src/ds390/ralloc.c (serialRegAssign),
1150         * src/hc08/ralloc.c (serialRegAssign),
1151         * src/mcs51/ralloc.c (serialRegAssign),
1152         * src/pic/ralloc.c (serialRegAssign),
1153         * src/pic16/ralloc.c (serialRegAssign),
1154         * src/xa51/ralloc.c (serialRegAssign),
1155         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1156
1157 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1158
1159         * src/SDCCast.c (decorateType): fixed bug 1124787
1160
1161 2005-02-20 Hubert Sack <sack AT digiplan.de>
1162         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1163
1164         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1165         patch #1121755
1166
1167 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1168
1169         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1170         to keep the correct label reference count when adding/removing references
1171         to labels. A peephole file using this is appended to patch #1144962.
1172
1173 2005-02-14 Raphael Neider <rneider AT web.de>
1174
1175         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1176         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1177         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1178           retrievals of result operand's value on assignment
1179
1180 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1181
1182         * device/include/pic16/string.h: modified prototype for memccpy()
1183         to memccpy(void *, void *, char, size_t)
1184         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1185         check whether to omit frame pointer or not,
1186         * (genInline): convert all occurences of "\n" to LF in inline
1187         assembler blocks, this helps formatting the inline text,
1188         * (pic16_loadFSR0): modified prototype,
1189         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1190         removed some 8051 legacy code,
1191         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1192         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1193         before allocating temporary registers in functions,
1194
1195 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1196
1197         * support/regression/tests/bitvars.c: corrected the "fix"
1198
1199 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1200
1201         * support/regression/tests/bitvars.c,
1202         * support/regression/tests/bitwise.c,
1203         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1204
1205 2005-02-10 Raphael Neider <rneider AT web.de>
1206
1207         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1208           different size for Alpha
1209         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1210
1211 2005-02-09 Raphael Neider <rneider AT web.de>
1212
1213         * src/SDCC.lex(doPragma) : save and restore warning options as well
1214           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1215         * have #pragma less_pedantic set the errorlevel to WARNING
1216           (fixes #1117001)
1217         * (cloneOptimize) : fixed wrong malloc's size
1218         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1219           facilitate correct handling of #pragma (save|restore)
1220
1221 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1222
1223         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1224
1225 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1226
1227         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1228
1229 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1230
1231         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1232
1233 2005-02-02 Raphael Neider <rneider AT web.de>
1234
1235         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1236         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1237         * (pic16_storeForReturn): fixed to allow returning function pointers
1238         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1239         * device/include/pic16/{stddef.h,stdbool.h}: added
1240
1241 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1242
1243         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1244
1245 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1246
1247         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1248         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1249          appeared to be required
1250
1251 2005-01-31 Borut Razem <borut.razem AT siol.net>
1252
1253         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1254           include/mcs51 and include/z80 directories to the package
1255
1256 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1257
1258         * src/hc08/gen.c (genFunction): fixed bug #1112752
1259
1260 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1261
1262         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1263
1264 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1265
1266         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1267
1268 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1269
1270         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1271
1272 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1273
1274         * device/include/c8051fxxx.h: removed these 6 files
1275         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1276
1277 2005-01-26 Raphael Neider <rneider AT web.de>
1278
1279         * src/pic16/gen.c (genAssign): fixed assignment from longs
1280           in codespace (were cut to three bytes)
1281         * (genDummyRead): implemented (except for CODESPACE...),
1282           fixed bug #1108575
1283         * src/pic16/glue.c (emitStatistics): beautified
1284         * device/lib/pic16/libm/Makefile: added include path
1285
1286 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1287
1288         * src/z80/gen.c (aopPut): fixed bug #1103902
1289
1290 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1291
1292         * device/lib/expf.c: fixed bug #1095792
1293
1294 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1295
1296         * device/lib/pic16/libm: added Math library sources
1297
1298 2005-01-24 Raphael Neider <rneider AT web.de>
1299
1300         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1301           to enable upcast to pCodeOpReg2 (there is no type tag to
1302           differenciate the two and pic16_popGet2p cast into PCOR2)
1303         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1304           (sizeof(sectNames) changed to sizeof(sectName))
1305           Both patches fix segfaults under MinGW.
1306
1307 2005-01-23 Raphael Neider <rneider AT web.de>
1308
1309         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1310           Safe_[mc]?alloc()'ed variables
1311         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1312           of (byte sized) temporaries (assign them to WREG for now)
1313         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1314           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1315           this might fix SIGSEGVs on MinGW...
1316         * src/SDCCopt.c (killDeadCode): restored original behaviour
1317           (volatile operands might get thrown away though)
1318
1319 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1320
1321         * src/pic16/gen.c: fixed bug #1106975,
1322         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1323         pointer update, INTCON is saved, global interrupts are disabled and
1324         restored after updateing TOS.
1325         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1326         * added function attribute 'shadowregs' to take advantage of shadow
1327         registers,
1328         * added function attribute 'wparam' as an alternative to the wparam
1329         pragma,
1330         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1331         user declares a non-ISR function as 'shadowregs',
1332         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1333
1334 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1335
1336         * .version: bumped version number to 2.4.8
1337         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1338         pic16 port,
1339         * device/lib/pic16/libio/i2c/: I2C module support library,
1340         * device/include/pic16/i2c.h: I2C support library header,
1341         * device/lib/pic16/libc/stdio/: standard IO support sources,
1342         * (printf_small.c): printf_small() source, supports float print,
1343         * (printf_tiny.c): printf_tiny() source, does not support floats,
1344         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1345         enable global optimizations for entire library source, other
1346         Makefiles in the source tree are also modified to reflect this,
1347         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1348         function,
1349         * doc/sdccman.lyx: updated to reflect new changes,
1350         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1351         sym->onStack if-case,
1352         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1353         sbit, idata, _idata, xdata, _xdata,
1354         * added pragma library, to link an external library, (see doc),
1355         * removed command line options, --pomit-config-words, --pomit-ivt,
1356         --pleave-reset-vector,
1357         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1358         when calling assembler to reflect memory model used, also define
1359         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1360         reflect stack model used,
1361         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1362         on stack return NULL,
1363
1364 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1365
1366         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1367           of the operands is volatile. Fixes #1020220
1368
1369 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1370
1371         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1372         * (OptimizeRegUsage): make sure that there is really no other flow where
1373           the first pCode is used
1374
1375 2005-01-22 Raphael Neider <rneider AT web.de>
1376
1377         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1378           to fix #1106967 (pCode->seq are not set up correctly)
1379
1380 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1381
1382         * src/SDCCglue.c (glue): make sure code area is declared before the
1383         static initialization area.
1384
1385 2005-01-21 Raphael Neider <rneider AT web.de>
1386
1387         * device/lib/Makefile.in: fixed test for pic16 install dir
1388         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1389           optimizations
1390         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1391           added --optimize-goto compiler switch and pragma wparam documentation
1392         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1393         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1394           and PRODH closing bug #1071770 (peephole optimizer)
1395
1396 2005-01-19 Raphael Neider <rneider AT web.de>
1397
1398         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1399           cmdLine buffers (used when calling sdcpp...) are large enough
1400           (MAX_PATH=256 truncates arguments leading to system halts when
1401           used in MinGW...)
1402         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1403         * (genUminus): rewritten to for efficiency
1404         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1405           used uninitialized in some cases)
1406         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1407           copy the third byte from the int -- now assumes 0x80 (data memory)
1408         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1409           operands (genAddLit expects the iCode's operands to swapped as
1410           well), fixed leftover bytes (crashed for short left operands)
1411         * (pic16_genMinusDec): performance improvements, removed false
1412           PIC14 emitSKPNCs
1413         * (pic16_genMinus): fixed to cope with differently sized operands
1414         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1415           for --obanksel > 1
1416         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1417         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1418           new banksel optimization
1419         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1420           analysis for temporary registers (segfaults...)
1421         * src/pic16/peeph.def: added rule
1422
1423 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1424
1425         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1426         which converts a float number to its ASCII representation
1427         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1428         functions to convert the fractional and integer part of a float to ASCII,
1429         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1430         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1431         ram
1432         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1433         _STATMEM macros,
1434         * device/include/pic16/adc.h: added GPL info,
1435         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1436         a pCodeOp as tested operand,
1437         * (genNearPointerGet): optimized bit testing, does not use
1438         intermediate register for bit value, test directly instead with
1439         BTFSS, BTFSC, works only for single bits,
1440         * (genpic16Code): dump the name of the iCode in the asm,
1441         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1442         renamed to pic16_decodeOp,
1443         * (serialRegAssign): do not allocate a temporary register for iCode
1444         sequences that test a single bit for 1/0
1445
1446 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1447
1448         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1449         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1450         access stack and frame pointers. They are initially assigned to
1451         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1452         accessing SFRs. Updated all occurences of modification of stack or
1453         frame pointer in gen.c and pcode.c,
1454         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1455         assigning of a literal value to pointers,
1456         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1457         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1458         selected
1459
1460 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1461
1462         * doc/sdccman.lyx: update documentation about stack pragma, added
1463         some info for stack memory models
1464
1465 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1466
1467         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1468
1469 2005-01-08 Raphael Neider <rneider AT web.de>
1470
1471         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1472           udata sections to fix bug #1097823
1473
1474 2005-01-05 Raphael Neider <rneider AT web.de>
1475
1476         * src/pic16/gen.c (genGenericShift): added handling of differently
1477           sized left operand and result
1478
1479 2005-01-04 Raphael Neider <rneider AT web.de>
1480
1481         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1482         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1483           to hold the condition bit)
1484         * added new version of genCmp (old code available via #define)
1485         * added new version of genShiftLeft/genShiftRight in a generic
1486           way, now supports shifting by negative values
1487         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1488           shiftCount (expected by genGenericShift)
1489         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1490         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1491           dump
1492         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1493           is an invalid literal too...)
1494
1495 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1496
1497         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1498         from Raphael Neider,
1499         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1500         for 8-bit literals. This fixes some literal operands which are sign
1501         extended to 16-bits ints when instruction needs only 8-bits.
1502
1503 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1504
1505         * device/lib/logf.c: added mcs51 assembly version
1506         * device/lib/expf.c: added mcs51 assembly version
1507         * device/lib/_logexpf.c: new shared asm code for expf and logf
1508         * device/include/math.h: add defines for assembly math library
1509         * device/lib/Makefile.in: build new _logexpf.c
1510         * device/lib/libfloat.lib: use new _logexpf.c
1511
1512 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1513
1514         * src/pic/device.c
1515         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1516           device types which have less than 0x7f registers.
1517
1518 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1519
1520         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1521
1522 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1523
1524         * device/lib/printf_fast.c: only build on supported arch.
1525         * device/lib/printf_tiny.c: only build on supported arch.
1526         * device/lib/printf_fast_f.c: only build if asm float lib
1527         * device/lib/_fsget1arg.c: only build if asm float lib
1528         * device/lib/_fsget2args.c: only build if asm float lib
1529         * device/lib/_fsnormalize.c: only build if asm float lib
1530         * device/lib/_fsreturnval.c: only build if asm float lib
1531         * device/lib/_fsrshift.c: only build if asm float lib
1532         * device/lib/_fsswapargs.c: only build if asm float lib
1533         * device/include/stdio.h: don't provide print_fast,
1534           print_fast_f, print_tiny prototypes if --xstack used
1535
1536 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1537
1538         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1539         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1540           to the SOURCES
1541
1542 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1543
1544         * device/lib/printf_fast_f.c: same as printf_fast, but
1545           with floating point enabled
1546         * device/lib/printf_fast.c: minor tweaks
1547         * device/include/stdio.h: add printf_fast_f
1548
1549 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1550
1551         * src/SDCCmain.c: make --float-reent default for mcs51
1552         * device/lib/_fsadd.c: added mcs51 assembly version
1553         * device/lib/_fssub.c: added mcs51 assembly version
1554         * device/lib/_fsmul.c: added mcs51 assembly version
1555         * device/lib/_fsdiv.c: added mcs51 assembly version
1556         * device/lib/_fseq.c: added mcs51 assembly version
1557         * device/lib/_fsneq.c: added mcs51 assembly version
1558         * device/lib/_fsgt.c: added mcs51 assembly version
1559         * device/lib/_fslt.c: added mcs51 assembly version
1560         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1561         * device/lib/Makefile.in: add _fscmp to build
1562         * device/lib/libfloat.lib: add _fscmp to build
1563
1564 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1565
1566         * device/lib/_fs2slong.c: added mcs51 assembly version
1567         * device/lib/_fs2sint.c: added mcs51 assembly version
1568         * device/lib/_fs2schar.c: added mcs51 assembly version
1569         * device/lib/_fs2ulong.c: added mcs51 assembly version
1570         * device/lib/_fs2uint.c: added mcs51 assembly version
1571         * device/lib/_fs2uchar.c: added mcs51 assembly version
1572         * device/lib/_slong2fs.c: added mcs51 assembly version
1573         * device/lib/_sint2fs.c: added mcs51 assembly version
1574         * device/lib/_schar2fs.c: added mcs51 assembly version
1575         * device/lib/_ulong2fs.c: added mcs51 assembly version
1576         * device/lib/_uint2fs.c: added mcs51 assembly version
1577         * device/lib/_uchar2fs.c: added mcs51 assembly version
1578         * device/include/float.h: added #define to select asm vs c
1579
1580 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1581
1582         * device/lib/printf_fast.c: improvements to float output
1583         * device/include/float.h: add defines for assembly float library
1584         * device/lib/_fsget1arg.c: receive 1 float arg
1585         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1586         * device/lib/_fsnormalize.c: normalize a float
1587         * device/lib/_fsreturnval.c: return float, various helper routines
1588         * device/lib/_fsrshift.c: right shift a float's mantissa
1589         * device/lib/_fsswapargs.c: swap 2 floats
1590         * device/lib/Makefile.in: build these 6 new files for mcs51
1591         * device/lib/libfloat.lib: add these 6 files to the library
1592
1593 2004-12-26 Borut Razem <borut.razem AT siol.net>
1594
1595         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1596           built by gcc 3.4.2
1597
1598 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1599
1600         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1601           and fully reentrant and register bank neutral.
1602         * device/lib/printf_fast.c: added float (not enabled by default),
1603           added compact/slower integer (also not enabled by default),
1604           improved size/speed of fast integer code, other minor changes
1605         * device/include/stdio.h, device/lib/Makefile.in,
1606           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1607
1608 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1609
1610         * src/pic16/pcode.c: declaring variables other than at the start of a
1611           block is not supported in C by VC6.
1612
1613 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1614
1615         * applied a previous patch from Raphael Neider that wasn't included
1616         in the previous commits, which fixes infinite loops within jumptable
1617         improvements,
1618         * made some fixes that previous patches introduced
1619
1620 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1621
1622         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1623         that fixes an issue with AOP_PCODE asmop's offset,
1624         * (pic16_popCopyReg): update instance field too,
1625         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1626         function of pic port,
1627         * (genCmp, genAnd, genAssign),
1628         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1629
1630 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1631
1632         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1633         variables initial values to idata section,
1634         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1635         variables in some functions. This utilizes parmBytes field of iCode
1636         structure to hold the offset of the variable in stack. (might be
1637         able to use the stack field too?)
1638         * applied patch from Raphael Neider # ### , # ###
1639         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1640         variable initial values in idata section,
1641         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1642         for static variables with initial value
1643         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1644         applied fix in while loop from Raphael Neider.
1645
1646 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1647
1648         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1649         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1650         * src/ds390/ralloc.c (serialRegAssign): spill bits
1651         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1652         * support/Util/SDCCerr.c,
1653         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1654         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1655         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1656
1657 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1658
1659         * device/include/sdcc-lib.h: inserted LGPL, added includes
1660           asm/ds390/features.h and asm/mcs51/features.h
1661         * device/include/asm/default/features.h,
1662         * device/include/asm/gbz80/features.h,
1663         * device/include/asm/z80/features.h: added empty _AUTOMEM
1664           and _STATMEM
1665         * device/include/asm/ds390/features.h,
1666         * device/include/asm/mcs51/features.h: added files with defines for
1667           _AUTOMEM and _STATMEM indicating automatic and static storage class
1668         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1669         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1670         * src/SDCCicode.c (geniCodeCast),
1671         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1672         * src/SDCCloop.c (loopInduction): removed unused variable lr
1673         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1674           to convertToFcall to include char modulo (RFE 1065037), added check
1675           if left operand is unsigned and use abs of literal value
1676         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1677           as it doesn't work after conversion from peephole.def to peephole.rul
1678         * src/mcs51/gen.c (toBoolean): added check for size,
1679           (genModOneByte): optimized code for signed char modulo a literal
1680           power of 2 (thanks to Hubert Sack),
1681           (genRRC): removed unnecessary "clr c",
1682           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1683         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1684           jump optimization,
1685           swapped rules 256.c and 256.d,
1686           extended 256.d by using new multiple checks (thanks Erik),
1687           added rules 256.e and 256.f,
1688           updated rule 261.a and 261.b to new generated code
1689         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1690
1691 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1692
1693         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1694           induction related bugs, including first part of bug #1074377
1695
1696 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1697
1698         * applied patch from bug-report #1076292,
1699         * applied patches for genAnd and Goto-optimizations for Raphael
1700         Neider,
1701         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1702         dump a less iCode information,
1703         * src/pic16/device.h (pic16_options_t): added field debgen,
1704         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1705         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1706         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1707         puclic,
1708         * (various functions): added macros FENTRY and FENTRY2 to functions,
1709         to emit function prologue,
1710         * (various functions): fixed indentation,
1711         * (genNearPointerGet): fixed loading of FSR0,
1712         * (genPackBits): applied patch from Raphael Neider to fix updating
1713         of FSR0 and touching only the modified bits,
1714         * src/pic16/genarith.c (various functions): added macros FENTRY to
1715         emit function prologue in comments,
1716         * src/pic16/pcode.h: added functions debugf2, debugf3,
1717         * src/pic16/ralloc.c: partial fix for packForPush caused
1718         segmentation fault,
1719
1720 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1721
1722         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1723           <stsp AT users.sourceforge.net> with reversed byte order
1724         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1725
1726 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1727
1728         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1729           bug #1074377
1730         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1731         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1732
1733 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1734
1735         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1736
1737 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1738
1739         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1740           conditions,
1741           (setFromConditionArgs): friendly operand parser for peephole rules,
1742           (operandBaseName, operandsNotRelated): new peephole condition
1743           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1744           architecture specific register naming into account, handles n-way
1745           comparisons, and supports quoted literals
1746         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1747
1748 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1749
1750         * src/mcs51/peeph.def: fixed bug #1076940
1751
1752 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1753
1754         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1755
1756 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1757
1758         Adding support for replacing ljmps with sjmps in jumptables
1759         generated for switch statements. For now you need to set the
1760         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1761         Now 4 algorithms for mcs51 jumptable generation are used:
1762         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1763         addresses loaded pc-relative for up to 112 cases and stack-pushing
1764         target addresses loaded with offset from dptr for up to 256 cases.
1765
1766         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1767         * src/mcs51/main.c: adapted constants for switch table generation
1768         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1769
1770 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1771
1772         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1773         * support/regression/tests/bug1057979.c: added test for bug 1073386
1774
1775 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1776
1777         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1778         compilers
1779
1780 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1781
1782         * src/pic16/device.h,
1783         * src/pic16/genarith.c,
1784         * src/pic16/glue.c,
1785         * src/pic16/main.c,
1786         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1787
1788 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1789
1790         Large cummulative patch for pic16 port.
1791         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1792         to call when a stack overflow occurs,
1793         * (malloc.h): added CVS Id tag,
1794         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1795         variable,
1796         * added libc directory. The current version of LibC contains string
1797         functions, ctype functions and macros and some functions of the
1798         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1799         be extensively tested in the future. Standard disclaimer here.
1800         Library is not automatically build yet. But one can build it by
1801         invoking 'make' inside the libc directory.
1802         * added ADC library under libio. Preliminary version yet.
1803
1804         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1805         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1806         aopForRemat() now and not by pic16_aopOp(),
1807         * (pic16_popGetTempReg): removed warning messgae when allocating
1808         temporary registers, its a buggy feature and will be removed,
1809         * (pic16_popGet): set register instance field in AOP_CRY,
1810         * (pic16_outBitC): fixed for results in size greater than 1,
1811         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1812         * (pic16_storeForReturn): optimized return of 0,
1813         * (genCmp): experimental code for new genCmp which uses PIC18's
1814         special compare&skip instructions. Initial tests fail some times
1815         with variables grater than 1 byte in size, so new code is disabled,
1816         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1817         a single bit,
1818         * (genCast): began a fix to optimize the casting of a bit to another
1819         bit, now assigning a bitfield to another bitfield will fail, sorry,
1820         * src/pic16/main.c: disabled the use of lr-support feature,
1821         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1822         * added some function prototypes, added function _debugf prototype,
1823         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1824         bits with offset (case PO_GPR_BIT),
1825         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1826         command line,
1827         * (isBankInstruction): modified to return 0 for no banking instruction,
1828         and 1 for banking instruction,
1829         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1830         caused stop processing pCodes after a inline assembly block,
1831         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1832         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1833         registers when it shouldn't,
1834         * src/pic16/ralloc.c (allocReg): add preliminary support for
1835         supporting a limited set of temporary registers,
1836
1837 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1838
1839         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1840           genDataPointerSet): ensure assignments always copy in MSB to LSB
1841           order,
1842           (loadRegFromAop): recognize CLRH optimization,
1843           (genFunction): optimize RECEIVE iCodes in reentrant functions
1844
1845 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1846
1847         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
1848           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
1849           selected.
1850         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
1851         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
1852           contiguous with data
1853
1854 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1855
1856         * device/lib/_gptrget.c (_gptrget),
1857         * device/lib/_gptrgetc.c (_gptrgetc),
1858         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
1859           instead of sjmp to ret
1860         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
1861           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
1862
1863 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1864
1865         * .version: bumped version to 2.4.7
1866         * device/lib/_gptrget.c (_gptrget): is now _naked
1867         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
1868         * device/lib/_gptrput.c (_gptrput): is now _naked
1869         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
1870           (createFunction): fixed xstack
1871         * src/SDCCglue.c (emitMaps): set allocation required for bit area
1872         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
1873           or bit either,
1874           (geniCodeCritical): store original interrupt state in an iTemp bit
1875           var unless stack-auto
1876         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
1877         * src/SDCCmain.c (setIncludePath): added include/target to search path
1878         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
1879         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
1880           prototype,
1881           (processFuncArgs): put bit vars in bit area
1882         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
1883           unsaveRBank): fixed xstack,
1884           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
1885           (genFunction, genEndFunction): fixed xstack,
1886           (genAssign): optimization don't walk backwards through mem
1887         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
1888         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
1889         * support/regression/Makefile: also make library (for stack-auto) when
1890           making "all" and added "test-mcs51-xstack-auto"
1891         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
1892         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
1893         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
1894         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
1895         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
1896           make-library by MAKE_LIBRARY
1897         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
1898           regression tests for xstack
1899         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
1900         * support/regression/tests/critical.c: test for critical on mcs51
1901
1902 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1903
1904         * support/regression/ports/ucz80/spec.mk: use include and lib files from
1905           built version of sdcc instead of installed version
1906
1907 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1908
1909         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
1910         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
1911           vprintf.c now
1912         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
1913         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
1914           WARNING: remove device/lib/build/z80/printf.o by hand when
1915           updating from previous build!
1916         * device/lib/z80/printf.c: updated comment
1917         * support/regression/tests/bug1057979.c: test all ports now
1918         * support/regression/tests/bug1065458.c: file added
1919
1920 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1921
1922         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
1923           *_start and *_end symbols for static functions
1924
1925 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
1926
1927         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
1928           and search crt0.o in all library paths,
1929           (setIncludePath): proper handling of --nostdinc,
1930           (setLibPath): proper handling of --nostdlib
1931         * support/regression/Makefile,
1932         * support/regression/ports/ds390/spec.mk,
1933         * support/regression/ports/gbz80/spec.mk,
1934         * support/regression/ports/hc08/spec.mk,
1935         * support/regression/ports/mcs51/spec.mk,
1936         * support/regression/ports/mcs51-large/spec.mk,
1937         * support/regression/ports/mcs51-stack-auto/spec.mk,
1938         * support/regression/ports/z80/spec.mk: use include and lib files from
1939           built version of sdcc instead of installed version
1940         * doc/sdccman.lyx: fixed typo in --nostdinc
1941
1942 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
1943
1944         * src/pic/pcode.c,
1945         * src/pic/device.c,
1946         * src/pic/ralloc.c,
1947         * src/pic/gen.c : added support to generate code for struct bit fields.
1948
1949 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1950
1951         * as/xa51/xa_version.h,
1952         * device/include/errno.h,
1953         * device/include/regc515c.h,
1954         * device/lib/_itoa.c,
1955         * device/lib/_ltoa.c,
1956         * device/lib/ser_ir_cts_rts.c,
1957         * sim/ucsim/xa.src/glob.cc,
1958         * sim/ucsim/xa.src/inst_gen.cc,
1959         * sim/ucsim/xa.src/xa_bit.cc,
1960         * sim/ucsim/xa.src/xa_sfr.cc,
1961         * sim/ucsim/z80.src/inst_dd.cc,
1962         * sim/ucsim/z80.src/inst_fdcb.cc,
1963         * support/scripts/keil2sdcc.pl,
1964         * src/pic16/pic16.dsp,
1965         * src/pic16/pic16a.dsp: corrected cvs line endings
1966         * device/lib/printf_large.c: fixed bug 1057979
1967         * src/pic16/gen.c: fixed non-C standard code
1968         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
1969         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
1970         * support/regression/ports/mcs51/support.c: reload T1 asap
1971         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
1972           pdata use and clear idata startup behaviour
1973         * support/regression/tests/bug1057979.c: added
1974
1975 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
1976
1977         * device/examples/ds390/ow390/ad26.h,
1978         * device/examples/ds390/ow390/cnt1d.h,
1979         * device/examples/ds390/ow390/crcutil.c,
1980         * device/examples/ds390/ow390/ownet.h,
1981         * device/examples/ds390/ow390/owsesu.c,
1982         * device/examples/ds390/ow390/swt12.h,
1983         * device/examples/ds390/ow390/swtoper.c,
1984         * device/examples/ds390/ow390/temp10.h,
1985         * device/examples/ds390/ow390/thermodl.c,
1986         * device/examples/ds390/tinitalk/tinitalk.dsp,
1987         * device/examples/ds390/tinitalk/tinitalk.dsw,
1988         * device/examples/mcs51/clock/hw.h,
1989         * device/examples/mcs51/simple2/go.bat,
1990         * device/examples/serialcomm/windows/serial.h,
1991         * device/examples/xa51/dummy.c,
1992         * device/examples/xa51/hello.c,
1993         * device/include/80c51xa.h,
1994         * device/include/at89x051.h: corrected cvs line endings
1995
1996 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
1997
1998         * src/pic16/main.c (options): added command line --gstack, to trace
1999         stack over/under flows,
2000         * added pragma 'wparam' to allow passing first byte of function
2001         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2002         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2003         call to __gstack_test function and sets up the symbol as extern,
2004         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2005         * popaop): added call to pic16_testStackOverflow,
2006         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2007         wparamList list,
2008         * (genCall, genPcall): now all parameters are passed via stack
2009         except in functions that are pass to wparam pragma in which WREG is
2010         used too,
2011         * (genPcall): REENTRANT flag is checked to see if variable prototype
2012         contains reentrant keyword, don't call a non-reentrant function, via
2013         a reentrant function pointer or vice versa, functions are never
2014         passed via WREG,
2015         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2016         D.Winkler,
2017         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2018         SIGSEGV when accessing a NULL register stucture,
2019         * (pic16_printGPointerType): modified to handle UPPER modifier for
2020         function initializers, changed prototype of function to simpler one,
2021         * (pic16_printIvalFuncPtr): check to see if function is already
2022         added in externs list,
2023         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2024         optimized a move from W to SFR with a move to the same register
2025         later after a CALL,
2026         * device/lib/pic16/debug: NEW directory, contains debug features
2027         which are enabled when linking with libdebug.lib, currently command
2028         line option --gstack enables stack pointer tracing for over/under
2029         flow, corresponding sources are in debug/gstack
2030
2031 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2032
2033         * doc/sdccman.lyx: updated SDCC version,
2034         * (PIC16 port): update list of command line options,
2035         * src/pic16/device.h (structure pic16_options_t): added field gstack
2036         to enable stack overflow tracing on push/pops,
2037         * src/pic16/device.c (statistics structure): added statistics
2038         structure,
2039         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2040         pic16_dump_int_registers): increase statistics counters for each
2041         * variable which is encountered
2042         * (pic16_dump_usection): emit each .udata variable to its own udata
2043         section,
2044         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2045         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2046         parameters via stack, otherwise use old scheme,
2047         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2048         assembler output file,
2049         * src/pic16/main.c: added command line options --gstack to enable
2050         push/pop tracing for stack overflow,
2051         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2052         instructions): added size of each instruction,
2053         * (pic16_countInstruction): estimate size of instructions in
2054         the_pFile list, inline assembly blocks are not counted,
2055         * (pic16_FixRegisterBanking): trace previous register usage, when
2056         banksel optimizations is greater than 0, don't emit a redudant
2057         banksel directive,
2058
2059 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2060
2061         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2062         * src/pic16/ralloc.c : applied same fix for pic16.
2063         * src/pic/gen.c : tidied it up a little.
2064
2065 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2066
2067         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2068         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2069
2070 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2071
2072         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2073
2074 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2075
2076         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2077         non-reentrant function __modsint in the interrupt function (thus
2078         corrupting math operations during serial I/O)
2079         * device/lib/ser_ir.c: as above, changed buffersize
2080         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2081         256.c,d for zeroing
2082         * doc/Makefile: added option -t for rsync
2083
2084 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2085
2086         * src/SDCCast.h (struct ast),
2087         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2088
2089 2004-10-20 Borut Razem <borut.razem AT siol.net>
2090
2091         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2092         package
2093
2094 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2095
2096         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2097         makefile targets,
2098         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2099         support functions to replace long sequences of MOVFF's from access
2100         bank registers to stack and vice versa,
2101         * src/pic16/device.h: added new field opt_flags, where optimization
2102         flags can be set to enable certain features,
2103         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2104         * pBlock, (genFunction, genEndFunction): surroung loop for
2105         saving/loading used registers in stack with PC_INFO pCodes,
2106         INF_LREGS. Code in between can then be optimized by pCode optimizer
2107         to support function calls,
2108         * (genDataPointerSet): fixed bug which loaded float fields in
2109         structures with corrupt data,
2110         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2111         in a standard way debug info on stderr. Feature used for developing
2112         and debugging only,
2113         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2114         obsolete chunks of code,
2115         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2116         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2117         * pic16/src/pcode.c (pic16_newpCodeInfo,
2118         * (pic16_newpCodeOpLocalRegs),
2119         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2120         feature,
2121         * (pic16_pCodeConstString): printing of the initial value of a
2122         symbol as a comment is inhibited since parsing was already done by
2123         copyStr and output is corrupt,
2124         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2125
2126 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2127
2128         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2129
2130 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2131
2132         * as/mcs51/lkarea.c: removed old K&R style,
2133           (lnksect): changed check on boundary error,
2134           (lnksect2): changed check on boundary error,
2135           (lnksect2): extend XSTK to end of page if size = 1
2136         * as/mcs51/lkmain.c: removed old K&R style,
2137           (Areas51): create l_IRAM symbol
2138         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2139         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2140           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2141         * device/lib/_mullong.c: added version to be compiled with xstack
2142         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2143         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2144         * device/lib/mcs51/crtxstack.asm: fixed comment
2145         * src/SDCCglue.c: maxInterrupts defaults to 0,
2146           (emitMaps): added pdata,
2147           (createInterruptVect): (re)moved default,
2148           (glue): added pdata,
2149           (glue): moved __start__xstack to XSTK with default size 1
2150         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2151           and options.float_rent when options.stackAuto is set,
2152           (linkEdit): only write XDATA_NAME if provided on command line
2153         * src/SDCCmem.h,
2154         * src/SDCCmem.c: added pdata
2155         * src/port.h: added pdata_name to PORT
2156         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2157           (saveRegisters, unsaveRegisters): removed usage of B,
2158           (genMinus): fixed accumulator clash,
2159           (genJumpTab): added comment, this needs another look
2160         * src/mcs51/gen.c: added check for "B in use" paranoia,
2161           added pushB() and popB()
2162         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2163           chance
2164         * src/avr/main.c,
2165         * src/ds390/main.c,
2166         * src/hc08/main.c,
2167         * src/mcs51/main.c,
2168         * src/pic/main.c,
2169         * src/pic16/main.c,
2170         * src/xa51/main.c,
2171         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2172           added PSEG (PAG,XDATA) or NULL to port specifier
2173         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2174         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2175           (_mcs51_genInitStartup): removed __start__xstack equ,
2176           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2177         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2178         * src/z80/gen.c (_rleAppend): fixed warnings
2179         * support/regression/tests/zeropad.c: added pdata test
2180         * .version: bumped to 2.4.6
2181
2182 2004-10-17 Borut Razem <borut.razem AT siol.net>
2183
2184         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2185         as a part of nightly build
2186
2187 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2188
2189         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2190         WREG holds the first byte function parameters,
2191         * (aopForSym): take special case for symbols which are in FARSPACE
2192         but in CODESPACE too,
2193         * (assignResultValue): modified to take into account _G.useWreg,
2194         * (genCall): don't use wreg for parameter passing when function is
2195         declared as reentrant, too, added optimization INCF to stack
2196         pointer when stack parameter count is 1,
2197         * (genFunction, genEndFunction): refurnished and fixed to not using
2198         wreg for passing parameters when function has varargs or is
2199         reentrant, fixed bug with symbol name compare for generating
2200         functions in absolute address,
2201         * (pic16_storeForReturn): refurnished,
2202         * (genCmp): began writing a new version of the function, not ready
2203         yet, therefore it is disabled,
2204         * (genAssign): do not read code memory when assigning a function to
2205         a pointer function,
2206         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2207         array of characters, not pointer,
2208         * (pic16initialComments): in debug mode emit an .ident directive for
2209         the assembler,
2210         * (_process_pragma): emit a new warning type (internal to pic16)
2211         when setting stack to default length, emit a similar warning when
2212         placing a function at absolute address and address is not word aligned
2213         * (_pic16_parseOptions): added 'return TRUE' statement,
2214         * (_pic16_linkEdit): if compiling a source, then add the source's
2215         file object, first in the list of objects to link,
2216
2217 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2218
2219         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2220         * src/pic/main.c : removed VC warning.
2221         * src/pic/gen.c : changed comment.
2222
2223 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2224
2225         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2226         reference to a deprecated symbol _GPTRREG was causing failure to
2227         link. Thanks G. M. Gallant for the info.
2228
2229 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2230
2231         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2232         comments for Bugs item #954788.
2233
2234 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2235
2236         * src/pic16/device.c (pic16_dump_gsection,
2237         * pic16_groupRegistersInSection): handle symbols declared to be in
2238         access bank differently,
2239         * src/pic16/gen.c (struct _G): added field resDirect,
2240         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2241         send values read from stack directly to result and don't allocate
2242         temporary values,
2243         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2244         same registers,
2245         * (pic16_sameRegsOfs): NEW,
2246         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2247         free because they were not allocated from temporary pool,
2248         * pic16_popRegFromString): workaround to fix a problem with
2249         allocating variables twice or never,
2250         * (genGenPointerGet): using PRODL instead of FSR0H,
2251         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2252         instead of FSR0H,
2253         * (genAssign): take advantage of the _G.resDirect flag,
2254         * (genCast): around line 11844, use mov2f instead of directly
2255         MOVFF'ing between operands to account for literal values,
2256         * src/pic16/genutils.c: some new debug functions for gpsim have been
2257         added,
2258         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2259         float with integer part only,
2260         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2261         place variables in access bank
2262         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2263         updated sources to reflect recent changes in gen.c
2264
2265 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2266
2267         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2268         sources that searched for headers in installation path, now the
2269         device/include/pic16 is used,
2270         * src/pic16/glue.c (pic16glue),
2271         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2272         .line directives if not in debug mode, this suppresses assembler's
2273         warnings for ignored directives
2274
2275 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2276
2277         * src/port.h: made reset_regparms prototype void parameter explicit.
2278         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2279         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2280         * doc/sdccman.lyx: documented warning disabling and how to use
2281           printf_large to make it print floats.
2282         * device/include/stdbool.h: NEW
2283         * device/lib/_atof.c,
2284         * device/lib/_divuint.c,
2285         * device/lib/_divulong.c,
2286         * device/lib/expf.c,
2287         * device/lib/printf_large.c,
2288         * device/lib/sincosf.c,
2289         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2290         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2291           a completely reentrant lib.
2292
2293 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2294
2295         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2296         * device/include/pic16/stdio.h: fixed bug with colon
2297
2298 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2299
2300         * device/include/pic16/stdio.h,
2301         * device/include/pic16/stdlib.h,
2302         * device/include/pic16/math.h: NEW
2303         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2304         declared as _naked to reduce overhead
2305         * device/lib/Makefile.in (target port-specific-objects-pic16):
2306         changed * to *.* so to ignore the CVS directory,
2307         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2308         stacked variables back in stack,
2309         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2310         corruption
2311
2312 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2313
2314         * .version: bumped version number to 2.4.5
2315         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2316         * support/Util/SDCCerr.c (messages structure): added entry for
2317         W_POSSBUG2
2318
2319         Large cumulative patch for pic16 port and libraries.
2320         * device/include/pic16/sdcc-lib.h,
2321         * device/include/pic16/stdarg.h,
2322         * device/include/asm/pic16/features.h,
2323         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2324         * device/include/pic16/float.h: changes reentrant keyword with
2325         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2326         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2327         updated target build-libraries to include objects from gptr,
2328         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2329         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2330         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2331         all function headings,
2332         * src/SDCCmain.c: added global parameter userIncDirsSet,
2333         * (parseCmdLine): when option -I is encountered add directory to
2334         userIncDirsSet too,
2335         * src/version.awk: added space between control and long,
2336         * src/pic16/NOTES: added some notes for the port,
2337         * src/pic16/gen.c: added prototype for mov2fp function,
2338         * (fReturnpic16[]): properly named return value registers,
2339         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2340         * (aopForSym): added code to handle symbols with onStack flag set,
2341         symbols onStack are allocated PTRSIZE bytes,
2342         * (aopFreeAsmop): handles special case where asmops are stack objects,
2343         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2344         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2345         added argument lock to trace flaws in allocating temporary registers
2346         when developing port,
2347         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2348         * (pic16_popRegFromString): reenabled allocating a direct register
2349         from string,
2350         * (assignResultValue): various beautifications,
2351         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2352         referenced function argument,
2353         * (genIpush): reenabled to allow stacked arguments, handles only
2354         ic->parmPush iCodes,
2355         * (genCall, genPcall): major changes to allow for variable argument
2356         functions, fixed a bug with falsely restoring stack pointer after
2357         returning from call,
2358         * (genFunction): pending code for critical function,
2359         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2360         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2361         * (genNearPointerGet): fixed bug with indirect reading, was always
2362         reading from INDF0
2363         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2364         pointers,
2365         * (genAddrOf): rewrote code to take address of a stacked function parameter
2366         * (genCast): fixed casting to generic pointer type,
2367         * src/pic16/gen.h: added AOP_STA,
2368         * (struct asmop): added field stk,
2369         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2370         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2371         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2372         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2373         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2374         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2375         generic pointers,
2376         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2377         and library paths,
2378         * (pic16_port structure): generic pointer size is set to 3,
2379         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2380         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2381         compiler warning,
2382         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2383         operand is an iTemp,
2384
2385 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2386
2387         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2388         * debugger/mcs51/simi.c: addapt new syntax of s51
2389
2390 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2391
2392         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2393         * src/pic16/pcode.c: commented out some calls to free() in order to
2394         fix bug #989576,
2395
2396 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2397
2398         * src/SDCCicode.h,
2399         * src/SDCCicode.c (isiCodeInFunctionCall),
2400         * src/avr/ralloc.c (selectSpil),
2401         * src/pic/ralloc.c (selectSpil),
2402         * src/pic16/ralloc.c (selectSpil),
2403         * src/ds390/ralloc.c (selectSpil),
2404         * src/hc08/ralloc.c (selectSpil),
2405         * src/xa51/ralloc.c (selectSpil),
2406         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2407         stack in the middle of a function call sequence (fixes bug #1020268)
2408         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2409         costs associated with the minimum switch case.
2410
2411 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2412
2413         * src/SDCC.lex: fixed bug #1030549
2414
2415 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2416
2417         * src/SDCCcse.h (struct cseDef),
2418         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2419         over a function call if the CSE is derived from a symbol whose
2420         address has been taken (fixes bug #1029883)
2421         * support/regression/tests/bug-1029883: a new regression test for
2422         this bug
2423
2424 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2425
2426         * src/hc08/gen.c (emitinline): fixed bug #1029778
2427         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2428         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2429         and starts toward RFE #905167)
2430
2431 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2432
2433         * src/pic16/gen.c (mov2f): New function to move an operand to
2434         another without considering if it is a literal or a register,
2435         * (pic16_sameRegs): don't check if they are both AOP_REG,
2436         * (AccRsh): removed andmask=0 lines,
2437         * (genLeftShift): duplicated to be improved in future versions,
2438         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2439         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2440         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2441         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2442         * (insertBankSwitch): fixed inserting banksel directives algorithm
2443         for instructions that follow a skip instruction, this fixes a report
2444         for broken subtraction code generation,
2445         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2446         iCode is a left op, just in case result and right share the same
2447         registers
2448
2449 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2450
2451         * src/hc08/main.c,
2452         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2453         preservation of HX
2454         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2455         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2456         on 2004-09-12; it was buggy
2457
2458 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2459
2460         * src/SDCCsymt.h: removed RESULT_CHECK
2461         * src/SDCCast.c,
2462         * src/SDCCglue.c,
2463         * src/SDCCval.c,
2464         * src/pic/glue.c,
2465         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2466
2467 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2468
2469         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2470         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2471         configuration values no more rejected by compiler, they are assigned
2472         to configuration registers with a warning message instead,
2473         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2474         the for-loop so last conf register is emitted too,
2475         * (_pic16_initPaths): link library libsdcc.lib by default,
2476         * (_hasNativeMulFor): modified test for multiplication according to
2477         Raphael Neider's remarks. Integer multiplication is also done with
2478         support functions,
2479         * device/include/pic16/pic18fregs.h: corrected type error in while
2480         testing and including 18f6720 header file
2481
2482 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2483
2484         * src/pic16/device.h (pic16_options): removed field use_crt,
2485         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2486         until an optimization to handle single bits is added,
2487         * (pic16_loadFSR0): moved before genUnpackBits,
2488         * (genAnd): some white lines removed,
2489         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2490         leave_reset flags in pic16_options when using crt modules,
2491
2492 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2493
2494         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2495           for bugs 898889 & 979599. Also used some safer print instructions.
2496
2497 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2498
2499         * src/pic16/device.h (pic16_options_t): added field use_crt,
2500         crt_name, no_crt,
2501         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2502         catch a probable future bug,
2503         * src/pic16/gen.c: aopIdx function commented out,
2504         * (genAssign): commented out old code which used aopIdx,
2505         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2506         code, added if conditionals to take into account the --use-crt
2507         command line options,
2508         * src/pic16/main.c (pic16_optionsTable): added new command line
2509         options, --use-crt= and --no-crt,
2510         * (_pic16_linkEdit): now the proper crt object is added in the
2511         linker command line except than when --no-crt is specified,
2512         * src/pic16/pcode.c,
2513         * src/pic16/pcode.h: added some structures and functions for a new
2514         optimization scheme to compansate for instruction overhead between
2515         same iCodes, this scheme is currently under development and is not
2516         working in any way,
2517         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2518         to && operator,
2519         * device/lib/pic16/startup/crt0i.c,
2520         * device/lib/pic16/startup/crt0iz.c: added global char variable
2521         __uflags to force the generation of an idata section
2522
2523 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2524
2525         * doc/Makefile,
2526         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2527         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2528
2529 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2530
2531         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2532         Frieder) and clarified the default code optimization mode
2533
2534 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2535
2536         * src/SDCC.lex (doPragma, process_pragma),
2537         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2538         "opt_code_size", and "opt_code_balanced"
2539         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2540         regrouped options by category, added support for category headers
2541         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2542         and "--opt-code-size"
2543         * doc/sdccman.lyx: documented these new options and pragmas
2544         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2545         preference into account
2546
2547 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2548
2549         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2550           geniCodePreDec): Fixed bug 904237 by generating a warning
2551         * src/SDCCerr.h,
2552         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2553
2554 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2555
2556         * src/pic/device.c : When no max ram set validate full memory range.
2557         * src/pic/pcode.c,
2558         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2559
2560 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2561
2562         * device/lib/_gptrget.c,
2563         * device/lib/_gptrput.c: updated comment
2564         * device/lib/calloc.c,
2565         * device/lib/free.c,
2566         * device/lib/malloc.c,
2567         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2568         * src/SDCCcse.c (cseBBlock),
2569         * src/SDCCicode.c (printOperand, geniCodeArray),
2570         * src/SDCCicode.h (struct operand): fixed bug 868103
2571         * support/regression/tests/bug-868103.c: added
2572         * src/SDCCast.c (searchLitOp),
2573         * src/SDCCcse.h (struct cseDef),
2574         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2575         * src/SDCCicode.h (struct operand),
2576         * src/SDCCsymt.h (struct sym_link),
2577         * src/avr/gen.c (hasInc),
2578         * src/ds390/gen.c (hasInc),
2579         * src/hc08/gen.c (genPlusIncr, hasInc),
2580         * src/mcs51/gen.c (hasInc),
2581         * src/pic16/glue.c (pic16_printIvalChar),
2582         * src/pic16/ralloc.c (regWithIdx),
2583         * src/xa51/gen.c (hasInc) : removed warnings
2584         * src/SDCCast.c (createBlock): added comment ???
2585         * src/hc08/ralloc.c: updated comments
2586
2587 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2588
2589         * doc/sdccman.lyx: updated section on switch statements, added
2590         section about semaphore locking
2591         * doc/Makefile: added option -info for latex2html
2592         * device/lib/_gptrget.c,
2593         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2594
2595 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2596
2597         * src/pic/device.h,
2598         * src/pic/device.c,
2599         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2600          maxram is less than 0x100.
2601
2602 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2603
2604         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2605
2606 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2607
2608         * src/port.h,
2609         * src/mcs51/main.c,
2610         * src/ds390/main.c,
2611         * src/z80/main.c,
2612         * src/hc08/main.c,
2613         * src/pic/main.c,
2614         * src/pic16/main.c,
2615         * src/avr/main.c,
2616         * src/xa51/main.c
2617         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2618         a jump table is the best form for a switch statement, including
2619         automatic insertion of missing cases to make the case range
2620         continuous. Developed in collaboration with Frieder Ferlemann.
2621
2622 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2623
2624         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2625         accumulator result if it needs sign extension
2626
2627 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2628
2629         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2630
2631 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2632
2633         * device/lib/gbz80/printf.c,
2634         * device/lib/z80/printf.c: removed define for NULL
2635
2636 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2637
2638         * as/xa51/xa_link.c,
2639         * device/examples/ds390/ow390/ad26.c,
2640         * device/examples/ds390/ow390/cnt1d.c,
2641         * device/examples/ds390/ow390/counter.c,
2642         * device/examples/ds390/ow390/ds2480.h,
2643         * device/examples/ds390/ow390/ds2480ut.c,
2644         * device/examples/ds390/ow390/findtype.c,
2645         * device/examples/ds390/ow390/gethumd.c,
2646         * device/examples/ds390/ow390/owllu.c,
2647         * device/examples/ds390/ow390/ownetu.c,
2648         * device/examples/ds390/ow390/swt12.c,
2649         * device/examples/ds390/ow390/swtloop.c,
2650         * device/examples/ds390/ow390/temp.c,
2651         * device/examples/ds390/ow390/temp10.c,
2652         * device/examples/ds390/ow390/thermo21.c,
2653         * device/examples/ds390/ow390/tinilnk.c,
2654         * device/examples/ds390/ow390/tstfind.c,
2655         * device/examples/serialcomm/windows/serial.cpp,
2656         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2657         * device/include/reg51.h: fixed line endings for cvs
2658
2659 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2660
2661         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2662         packRegsForAccUse, packRegisters): new accumulator register
2663         packing algorithm
2664         * support/regression/ports/hc08/support.c (_putchar): suppress
2665         warning of unused variable
2666         * src/SDCCicode.c: added SWAP entry to codeTable
2667
2668 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2669
2670         * device/lib/sprintf.c: forgot to add this file before previous commit
2671
2672 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2673
2674         * src/pic16/gen.c (genPackBits): added operand right in function
2675         parameters, load result directly if p_type is POINTER (that is
2676         called by genNearPointerSet)
2677         * (genUnPackBits): added operand left in function parameters,
2678         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2679         FSR0 if accessing bitfields,
2680
2681 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2682
2683         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2684           _print_format; updated printf, sprintf, vsprintf
2685         * device/include/asm/default/features.h: corrected comment/define
2686         * device/lib/Makefile.in: added sprintf.c
2687         * device/lib/libsdcc.lib: added sprintf module
2688         * device/lib/printf_large.c,
2689         * device/lib/vprintf.c,
2690         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2691           into these 3 files
2692         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2693         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2694         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2695           hc08 test
2696         * support/regression/tests/zeropad.c: define idata as data for hc08
2697
2698 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2699
2700         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2701         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2702         labels are referenced at least once (even if a reference is not found)
2703         * src/hc08/gen.c (emitcode): set isComment flag for comments
2704         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2705         loads), rules 6a..6b (optimize jumps to return)
2706
2707 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2708
2709         * device/lib/acosf.c (acosf),
2710         * device/lib/asinf.c (asinf),
2711         * device/lib/atanf.c (atanf),
2712         * device/lib/ceilf.c (ceilf),
2713         * device/lib/cosf.c (cosf),
2714         * device/lib/coshf.c (coshf),
2715         * device/lib/cotf.c (cotf),
2716         * device/lib/fabsf.c (fabsf),
2717         * device/lib/floorf.c (floorf),
2718         * device/lib/log10f.c (log10f),
2719         * device/lib/logf.c (logf),
2720         * device/lib/sinf.c (sinf),
2721         * device/lib/sinhf.c (sinhf),
2722         * device/lib/sqrtf.c (sqrtf),
2723         * device/lib/tanf.c (tanf),
2724         * device/lib/tanhf.c (tanhf),
2725         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2726         replaced all instances of "reentrant" in the library functions
2727         defined in math.h with this macro.
2728         * support/regression/tests/float_trans.c: reenabled test for hc08
2729
2730 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2731
2732         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2733         erroneously deleted
2734
2735 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2736
2737         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2738         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2739         multi-byte volatile operands are used
2740         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2741         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2742         initialization to area GSINIT0 so that it would always precede
2743         any static initializers in GSINIT
2744         * support/regression/tests/zeropad.c: fixed idata define for hc08
2745         * support/regression/tests/bug-927659.c,
2746         * support/regression/tests/float_trans.c: disabled tests for hc08
2747         pending missing library routines
2748         * .version: increased version number to 2.4.4 - hc08 port now passes
2749         regression tests
2750
2751
2752 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2753
2754         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2755         * Makefile.common.in,
2756         * as/Makefile,
2757         * as/hc08/Makefile.in,
2758         * as/mcs51/Makefile.in,
2759         * as/z80/Makefile.in,
2760         * debugger/mcs51/Makefile.in,
2761         * device/include/Makefile.in,
2762         * device/lib/Makefile.in,
2763         * doc/Makefile,
2764         * link/Makefile,
2765         * link/z80/Makefile.in,
2766         * packihx/Makefile.in,
2767         * sim/ucsim/main_in.mk,
2768         * sim/ucsim/avr.src/Makefile.in,
2769         * sim/ucsim/doc/Makefile.in,
2770         * sim/ucsim/gui.src/serio.src/Makefile.in,
2771         * sim/ucsim/hc08.src/Makefile.in,
2772         * sim/ucsim/s51.src/Makefile.in,
2773         * sim/ucsim/xa.src/Makefile.in,
2774         * sim/ucsim/z80.src/Makefile.in,
2775         * src/Makefile.in,
2776         * support/cpp2/Makefile.in,
2777         * support/librarian/Makefile,
2778         * support/makebin/Makefile: added DESTDIR to the install path proposed
2779         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2780         * doc/sdccman.lyx: added DESTDIR documentation
2781
2782 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2783
2784         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2785         instruction for interrupt handlers, use fast returns when returning
2786         from high priority interrupts
2787
2788 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2789
2790         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2791         code generation
2792         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2793         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2794         bugs, ported much of Bernhard's code from mcs51
2795         * src/mcs51/gen.c (genSend),
2796         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2797         than one when calling a reentrant function
2798         * device/lib/_mullong.c: defined an alternate struct layout for big
2799         endian ports (hc08)
2800
2801 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2802
2803         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2804         test
2805
2806 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2807
2808         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2809         are sane and complete before asking the port its prefered parameter
2810         passing method (fixes bug #1017633)
2811         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2812         and _ret3
2813
2814 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2815
2816         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2817         problem in bitfields >= 8 bits.
2818
2819 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2820
2821         * src/SDCCsymt.c: undid changes that were not meant to be committed
2822
2823 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2824
2825         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2826
2827 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2828
2829         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2830           copied and wrong bit got inverted
2831
2832 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2833
2834         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2835         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2836         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2837         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2838         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2839         assignments to bitfields at known addresses
2840         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2841         reads from bitfields at known addresses
2842         * src/hc08/ralloc.c (packRegisters),
2843         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2844         genhc08Code): optimize pointer get values used as conditionals
2845         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
2846         and branch
2847
2848 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2849
2850         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
2851         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
2852         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
2853         as conditionals
2854
2855 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2856
2857         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
2858
2859 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2860
2861         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
2862         related problems
2863
2864 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
2865
2866         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
2867
2868 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2869
2870         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
2871         mcs51 port
2872
2873 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2874
2875         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
2876
2877 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2878
2879         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
2880         cases use more compact code.
2881
2882 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
2883
2884         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
2885
2886 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2887
2888         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
2889
2890 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2891
2892         * src/SDCCsymt.h,
2893         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
2894         parameter of changePointer() from symbol* to sym_link*
2895         * src/SDCCast.c (decorateType): call changePointer() for CAST op
2896         * src/SDCCsymt.c (compareType): void* type is castable to other
2897         pointers, but not necesarily an exact match.
2898         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
2899         is no longer blindly treated as an exact match.
2900         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
2901
2902 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
2903
2904         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
2905
2906 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
2907
2908         * src/pic/gen.c,
2909         * src/pic/pcode.c,
2910         * src/pic/ralloc.h,
2911         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
2912
2913 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
2914
2915         * src/pic/device.c,
2916         * src/pic/device.h,
2917         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
2918
2919 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2920
2921         * src/mcs51/gen.c (emitcode): fixed bug #992819
2922
2923 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
2924
2925         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
2926           there's no need to make it worse
2927
2928 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2929
2930         * src/mcs51/ralloc.c (deassignLR),
2931         * src/ds390/ralloc.c (deassignLR),
2932         * src/hc08/ralloc.c (deassignLR),
2933         * src/z80/ralloc.c (deassignLR),
2934         * src/pic/ralloc.c (deassignLR),
2935         * src/pic16/ralloc.c (deassignLR),
2936         * src/avr/ralloc.c (deassignLR),
2937         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
2938         rlivePoint): fixed another part of bug #971834
2939
2940 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2941
2942         * src/z80/main.c: enabled "critical" keyword
2943         * src/z80/mappings.i,
2944         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
2945         functions (fixes bug #979646)
2946         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
2947
2948 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2949
2950         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
2951           such as c:\mydir.
2952
2953 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
2954
2955         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
2956           doesn't disable too much optimizations
2957
2958 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2959
2960         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
2961
2962 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
2963
2964         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
2965
2966 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2967
2968         * src/pic/gen.c tidied up tabs
2969         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
2970         * src/pic/main.c tidied up tabs
2971         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
2972         * src/pic/pcoderegs.c tidied up tabs
2973         * src/pic/ralloc.c tidied up tabs
2974
2975 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
2976
2977         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
2978         to S_FIXED for pic16 port and when symbol is not in level 0,
2979         allocate for S_REGISTER storage class and pic16 port, too,
2980         * src/pic16/device.h: prototype for checkSym,
2981         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
2982         * (pic16_assignConfigWordValue): test the value and the mask to
2983         validate that the value is suitable for the configuration word,
2984         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
2985         collect extern declared symbols, don't emit symbol twice, check
2986         first if symbol is in publics set first,
2987         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
2988         * added command line '--fstack' which enables an experimental
2989         feature for stack access, too buggy to be used yet...
2990         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
2991         * (pic16_allocDirReg): when register has storage class S_REGISTER
2992         allocate in pic16_dynAccessRegs,
2993         * device/include/pic16/pic18f????.h: modified configuration word
2994         naming convention, words started as CONFIG0H but should be CONFIG1H
2995
2996 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2997
2998         * device/include/mcs51reg.h: fixed bug 970993
2999
3000 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3001
3002         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3003         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3004         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3005         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3006         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3007         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3008           error/warning numbers,
3009           added function setWarningDisabled()
3010         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3011         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3012           _memcmp.c _memmove.c calloc.c realloc.c free.c
3013         * support/regression/tests/malloc.c: added tests for new functionality
3014         * support/regression/tests/zeropad.c: added tests for truncated initializers
3015           and initialized char arrays starting with '\x0'
3016         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3017
3018 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3019
3020         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3021
3022 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3023
3024         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3025         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3026         peephole 177.e. Thanks to anonymous
3027
3028 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3029
3030         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3031         function isn't used in the source but referenced as a
3032         variable initializer then declare it as extern in .asm file
3033
3034 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3035
3036         * .version: increased version number to 2.4.3
3037
3038         Adding version extension according to ChangeLog CVS revision
3039         * src/Makefile.in (target all): added dependency 'version.h'
3040         * (rule version.h): added rule to create version.h from ChangeLog,
3041         * (rule dep): added dependency version.h,
3042         * src/version.awk: AWK script to create version.h
3043         * src/SDCCdwarf2.c (dwWriteModule),
3044         * src/SDCCglue.c (initialComments),
3045         * src/SDCCmain.c (printVersionInfo): modified to write after
3046         version string the version extension number,
3047         * src/SDCCutil.c: included "version.h"
3048         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3049         number,
3050         * src/SDCCutil.h: added prototype for getBuildNumber
3051
3052         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3053         includeDirsSet, too,
3054         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3055         const char [] is found in function prototype...
3056
3057         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3058         moving to WREG with source is already in WREG,
3059         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3060         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3061         * (aopForSym): stack'ed symbols are partially supported, added
3062         if-clause to support symbols in FARSPACE,
3063         * (sameRegs): added test for AOP_ACC to see if registers are same,
3064         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3065         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3066         * (pic16_popRegFromString): will not allocate a new register if it
3067         doesn't find one by name, bug may have introduced...
3068         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3069         * (genIpush): revived to use pic16 port's stack,
3070         * (genAddrOf): added incomplete case for stack'ed operand,
3071         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3072         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3073         can handle multibyte operands,
3074         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3075         * (pic16initialComments): added message for MPLAB compatibility
3076         mode enabled,
3077         * src/pic16/main.h: prototype for pic16_mplab_comp,
3078         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3079         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3080         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3081         because of increased complexity of procedure,
3082         * (_process_pragma): stack pragma changed to format 'stack pos len',
3083         emit symbol '_stack_end' to conform with gplink,
3084         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3085         to search for register,
3086         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3087         PO_GPR_REGISTER,
3088         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3089         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3090         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3091         case for PO_GPR_REGISTER,
3092         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3093         dies, the new era is ahead !...
3094         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3095         pic16_dynInternalRegs,
3096         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3097         * (pic16_allocDirReg): minor optimizations and bug fixes,
3098         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3099
3100         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3101         load stack and frame pointer with address of 'stack_end' symbol
3102
3103 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3104
3105         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3106         without source code but only variable initializers
3107
3108 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3109
3110         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3111         external are not declared as extern to reduce overhead while linking
3112
3113 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3114
3115         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3116
3117 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3118
3119         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3120           Yee Keat for the patch
3121         * src/SDCCast.c (decorateType): fixed bug #979599
3122         * src/ds390/gen.h: removed local fReturnSizeDS390
3123         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3124         * src/ds390/gen.c (genAnd, genOr, genXor),
3125         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3126
3127 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3128
3129         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3130         add relFilesSet to $3, manipulate $2 to handle linking of object
3131         files without source files in command line,
3132         * device/include/pic16 (all headers): added ID location macros,
3133         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3134         entries for ID location bytes,
3135         * (pic16_assignIdByteValue): NEW,
3136         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3137         added field dumpcalltree to pic16_options_t,
3138         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3139         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3140         emitting rFalseIfx label after check_carry label,
3141         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3142         pic16_emitDIRegs), NEW
3143         * (pic16glue): dump .calltree file when option --calltree found,
3144         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3145         * (_pic16_genAssemblerPreamble): emit ID locations after
3146         configuration registers,
3147         * (pic16_linkCmd): modifications of the link command,
3148         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3149         * (pic16_pCodeInitRegisters): don't init stack registers,
3150         * (pic16_findPrevInstruction): fixed bug,
3151         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3152         bug with immediate registers,
3153         * (buildCallTree): traces stack push and pop,
3154         * (pct2): dump also stack usage for each function,
3155         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3156         * (pic16_allocDirReg): various modifications,
3157         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3158         fixed to 1,
3159
3160 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3161
3162         * src/pic16/pcode.c: removed buggy double colon
3163
3164 2004-07-01 Borut Razem <borut.razem AT siol.net>
3165
3166         * support/scripts/sdcc.nsi: added include/pic16 to setup
3167
3168 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3169
3170         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3171         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3172         target 'clean',
3173         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3174         specific command line arguments. Also added sample lkr script
3175         for placing a variable at a specific memory bank.
3176         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3177         at a specific memory bank,
3178         * (pic16_dump_isection): fixed bug which caused string literals to
3179         be omitted when dumping idata section,
3180         * (pic16_groupRegistersInSection): added code to handle registers
3181         in specific memory banks,
3182         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3183         public, all references are renamed too,
3184         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3185         AOP_DPTR2,
3186         * (pic16_storeForReturn): added case to handle when dest is WREG,
3187         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3188         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3189         pic16_rel_udata, check to see if that register is marked as being
3190         a member of a specific memory bank,
3191         * (pic16_printIvalCharPtr): added code to add string literals either
3192         to code or the idata sections,
3193         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3194         also accept the 'udata' pragma,
3195         * src/pic16/main.h: new structure types sectName and sectSym
3196         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3197         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3198         * (pic16_findPrevInstruction): fixed, it returned nothing,
3199         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3200         instruction combinations,
3201         * (pic16_FixRegisterBanking): heavily reorganised,
3202         * (pic16_AnalyzeBanking): if generating banksel directives is
3203         disabled, then don't call FixRegisterBanking at all,
3204         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3205         completely removed,
3206         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3207
3208 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3209
3210         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3211         Phuah Yee Keat <yk.phuah AT nestac.com>
3212
3213 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3214
3215         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3216         correctly the IVT even if it is relocated to some other location
3217
3218 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3219
3220         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3221         * device/include/pic16/pic18f2220.h: NEW,
3222         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3223         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3224         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3225         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3226         nodefaultlibs, ivt_loc is the location of the interrupt vector
3227         table, and nodefaultlibs signs that default libraries should not be
3228         linked in link stage,
3229         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3230         according to --ivt-loc argument,
3231         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3232         when pragma stack is found,
3233
3234 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3235
3236         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3237         256 (range check), 257 (do while), 258.a-f (bit banging
3238         f.e. on 3-wire SPI bus)
3239
3240 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3241
3242         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3243         variables used exclusively within a loop
3244
3245 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3246
3247         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3248
3249 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3250
3251         * src/SDCClrange.c (computeClash): fixed bug #971834
3252
3253 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3254
3255         * src/mcs51/gen.c (genCmp): fixed bug #975903
3256         * src/hc08/gen.c (operandsEqu),
3257         * src/ds390/gen.c (operandsEqu),
3258         * src/z80/gen.c (operandsEqu),
3259         * src/pic/gen.c (operandsEqu),
3260         * src/pic16/gen.c (operandsEqu),
3261         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3262         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3263
3264 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3265
3266         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3267
3268 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3269
3270         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3271         default case in switch statement,
3272         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3273         to eliminate problem with initialisation of pointers, but problem
3274         still exists,
3275         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3276         * (emitStaticSegment): removed various lines emitting debug info,
3277         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3278         added processor registers for utilizing EEPROM,
3279         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3280         configurable and set 8
3281
3282 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3283
3284         * .version: increased version number to 2.4.2,
3285
3286         Cumulative patch for pic16 port
3287         * src/pic16/device.c: changed scheme to dump initial values for
3288         variables in idata segment, all print_idata* functions were removed,
3289         now the pic16_printIval* will be called,
3290         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3291         * _pic16_printPointerType, pic16_printPointerType,
3292         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3293         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3294         NEW, similar to the respective functions in SDCCglue.c,
3295         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3296         way, emitting hex bytes,
3297         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3298
3299 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3300
3301         * src/avr/ralloc.c (serialRegAssign),
3302         * src/xa51/ralloc.c (serialRegAssign),
3303         * src/pic/ralloc.c (serialRegAssign),
3304         * src/pic16/ralloc.c (serialRegAssign),
3305         * src/hc08/ralloc.c (serialRegAssign),
3306         * src/z80/ralloc.c (serialRegAssign),
3307         * src/ds390/ralloc.c (serialRegAssign),
3308         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3309
3310 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3311
3312         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3313         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3314
3315 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3316
3317         Cumulative patch for pic16 port:
3318         * src/pic16/device.h (typedef PIC16_device) modified fields for
3319         defining microcontrollers,
3320         * src/pic16/device.c: added new info for all devices in Pics16 array,
3321         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3322         to be optimised out by the pCode optimiser,
3323         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3324         specially, bug reported by G.M. Gallant,
3325         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3326         as force'd so that cannot be optimised out by pCode optimiser,
3327         * src/pic16/pcode.c,
3328         * src/pic16/pcodepeeph.c,
3329         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3330         they are disabled by default, but can be enabled explicit with
3331         command argument --denable-peeps, for testing,
3332         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3333         --pomit-ivt in COMPILE_FLAGS
3334
3335 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3336
3337         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3338           compilation on MSVC
3339
3340 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3341
3342         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3343
3344 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3345
3346         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3347         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3348
3349 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3350
3351         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3352         would only assign 0x300001 register.
3353
3354 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3355
3356         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3357         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3358
3359 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3360
3361         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3362         for ds80c400
3363         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3364         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3365         added peephole 254 (left shift), 255 (jump table)
3366
3367 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3368
3369         * device/lib/Makefile.in: removed comment line with model-pic16,
3370         * (target port-specific-objects-pic16): the libraries and objects
3371         are copied to the build directory form the device/lib/pic16/bin
3372         directory
3373
3374         Cumulative patch concerning pic16 port:
3375         * library directory has been re-organized,
3376         * added support for PIC18F1220,
3377         * added headers and library sources for chips 18f1220,18f6520,
3378         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3379
3380         * configuration registers setting has changed, now each supported
3381         device has a complete description of the registers it uses,
3382         * all initialisations are moved to idata sections, these section
3383         can be absolute or relocatable,
3384         * fixed initialisation of codespace variables,
3385         * fixed warning about PCLATU and gpsim,
3386         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3387         * (genAssign): use table reads when assigning from variables in codespace,
3388         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3389         char/int variables placed in codespace,
3390         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3391         registers set in .asm file, no need for --pomit-config-words anymore,
3392         * (pic16glue): some 8051 legacy segments are commented out
3393         (to be removed completely),
3394         * added support for alternative assembler and linker with --asm=
3395         and --link= command line arguments,
3396         * peepholes are disabled automatically in the port, no need to
3397         specify on command line,
3398         * port supports natively char/int/long multiplication, but converts
3399         all divisions to support functions,
3400         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3401         to the file set in variable $2,
3402         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3403         strings in ASCII format and not in hex,
3404         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3405         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3406         allocate proper register if iCodes aren't temporary,
3407
3408 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3409
3410         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3411
3412 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3413
3414         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3415         is commented out
3416
3417 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3418
3419         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3420         computed address is reused
3421         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3422         multi-byte bitfields
3423
3424 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3425
3426         * src/z80/gen.c: (genArrayInit): must check for pointers too
3427
3428 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3429
3430         * support/regression/tests/zeropad.c: never meant to commit the
3431           nestedstruct test: removed, added check for GCC version
3432
3433 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3434
3435         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3436         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3437         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3438           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3439           bugs 928906 and 954082 half-empty initializers
3440         * src/SDCCsymt.h,
3441         * src/SDCCsymt.c (getAllocSize): added for above fix
3442         * src/z80/gen.c (genArrayInit): fixed bug 741044
3443         * support/regression/tests/zeropad.c: added tests
3444
3445 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3446
3447         * src/pic16/device.c (pic16_dump_section): corrected bug which
3448         caused some symbols of the libraries to be misplaced
3449
3450 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3451
3452         * src/pic16/glue.c,
3453         * src/pic16/ralloc.h,
3454         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3455         to fix conflict with pic port
3456
3457 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3458
3459         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3460         externs configuration variables,
3461         * src/pic16/ralloc.h,
3462         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3463         prototype in header, commented out some debug messages
3464
3465 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3466
3467         * src/pic16/glue.c,
3468         * src/pic16/main.c,
3469         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3470         for gpasm COFF object generation. Thanks to D. Hawkins for
3471         his patch info
3472
3473 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3474
3475         * src/ds390/main.c,
3476         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3477         Brock for spotting this)
3478         * src/ds390/gen.c (genEndFunction),
3479         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3480         interrupt handler and critical. Disable push/pop optimizations when
3481         peephole optimizations disabled.
3482
3483 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3484
3485         Updated pic16 library sources and headers.
3486         * device/lib/pic16/pic18f*/ ,
3487         * device/include/pic16/*.h: modified to handle structured SFR
3488         definitions
3489
3490 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3491
3492         * src/port.h (PORT structure): added hook initPaths, now each
3493         port can declare its own default search paths,
3494         which can been seen with the --print-search-dirs option,
3495         see pic16 port for example,
3496         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3497         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3498         * (doPrintSearchDirs): NEW, replaces in a central manner the
3499         printing of search dirs which was split in set*Paths functions,
3500         * (main): added call to port->initPaths and doPrintSearchDirs,
3501         * src/avr/main.c,
3502         * src/ds390/main.c,
3503         * src/hc08/main.c,
3504         * src/izt/i186.c,
3505         * src/izt/tlcs900h.c,
3506         * src/mcs51/main.c,
3507         * src/pic/main.c,
3508         * src/pic16/main.c: modified port structures to reflect addition of
3509         initPaths hook,
3510
3511         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3512         * (pic16_dump_section): for registers in same address reserve memory once,
3513         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3514         to no_banksel,
3515         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3516         result is greater in size than right or left,
3517         * (pic16_genUMult8X8_8): there are some cases where the result can
3518         be 16 bits size, so handle these,
3519         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3520         * (pic16_outBitC): modified to emit pcodes,
3521         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3522         or not,
3523         * (genDivOneByte): implemented algorithm to divide 8-bits,
3524         * (genCmp): uncommented goto, but issues still exist,
3525         * (genAnd): fixed a bug with variables >8bits,
3526         * (genPackBits): optimization added that uses BCF/BSF to change a
3527         single bit,
3528         * (genAssign): fixed bug when assigning floating point literals,
3529         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3530         __sdcc_gsinit_startup label,
3531         * src/pic16/main.c (_pic16_init): removed search directory
3532         initialisations,
3533         * (_pic16_initPaths): NEW, used to initialise search directories,
3534         * (_hasNativeMulFor): support functions for all except char/int
3535         multiplication, and char division,
3536         * (PIC16_port struct): modified entry for native mul support,
3537         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3538         no_banksel option,
3539         * (buildCallTree): call to register_usage is ifdef'ed out,
3540
3541 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3542
3543         * device/include/string.h: applied Stas Sergeev's patch to make this
3544         header file compatible with the preprocessor -Wundef option
3545         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3546         failure (fixes bug #941458)
3547
3548 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3549
3550         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3551         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3552         that the variable, not the function, should be static
3553         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3554         to be consistent with non-literal case
3555
3556 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3557
3558         * src/SDCCast.c (isConformingBody): fixed bug #949967
3559         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3560         convilong): fixed bug #952086
3561
3562 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3563
3564         * src/SDCCmem.c (allocVariables): fixed bug #955321
3565
3566 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3567
3568         * src/hc08/main.c (_hc08_genAssemblerEnd),
3569         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3570         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3571         completely eliminated the use of a temporary file
3572         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3573         when more than one file linked
3574         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3575
3576 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3577
3578         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3579         which fixes bug #543481
3580         * support/regression/tests/bug-751703.c: fixed comments left from a
3581         cut and paste error
3582         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3583         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3584         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3585         scopes
3586         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3587         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3588         are now changed to underscores in moduleName
3589
3590 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3591
3592         * as/mcs51/lkmem.c: better fix for bug #954173
3593
3594 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3595         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3596
3597         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3598         * device/include/c8051f000.h,
3599         * device/include/c8051f120.h,
3600         * device/include/c8051f300.h,
3601         * device/include/c8051f310.h,
3602         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3603         PWM16) and detab'ed
3604
3605 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3606
3607         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3608         and mailing lists, doc'ed --no-peep-comments, removed reference
3609         to knoppix (newest version has no LyX/LaTeX), other minor changes
3610         * src/SDCCglue.c (glue): save 2 bytes stack space with
3611         option --main-return. The ljmp could probably be avoided too
3612
3613 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3614
3615         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3616
3617 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3618
3619         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3620         * src/SDCCopt.c (isLocalWithoutDef),
3621         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3622         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3623         (credit to Maarten Brock for patch #949363, on which this is based)
3624         * support/regression/tests/bug-751703.c: some test cases of extern used
3625         within inner scopes.
3626
3627 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3628
3629         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3630         SPEC_STRUCT
3631         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3632         struct definitions
3633         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3634         dwWriteLabel): fix to create valid debugger symbols even when
3635         the module name has non-alphanumeric symbols in it
3636         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3637         when a variable's allocation has been optimized away
3638
3639
3640 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3641
3642         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3643         * src/hc08/main.c,
3644         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3645         * src/mcs51/main.c,
3646         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3647         * src/ds390/main.c,
3648         * src/z80/gen.c (z80_emitDebuggerSymbol),
3649         * src/z80/main.c,
3650         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3651         * src/pic/main.c,
3652         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3653         * src/pic16/main.c,
3654         * src/avr/gen.c (avr_emitDebuggerSymbol),
3655         * src/avr/main.c,
3656         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3657         * src/xa51/main.c,
3658         * src/SDCCdebug.c (emitDebuggerSymbol),
3659         * src/SDCCdebug.h,
3660         * src/port.h: added a debugger struct to the port struct. Added a
3661         callback for defining debugger symbols
3662
3663         * src/SDCCast.c (createLabel),
3664         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3665         with isitmp = 1
3666         * src/SDCCicode.h,
3667         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3668         iCode back to the ast for the function
3669
3670         * src/hc08/ralloc.c (hc08_assignRegisters),
3671         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3672         unneeded fields from the regs struct.
3673         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3674         pushReg() & pullReg() functions instead of emitcode()
3675
3676         * src/hc08/gen.c (genLabel, genhc08Code),
3677         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3678
3679         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3680         debugger hooks
3681
3682         * src/hc08/gen.c (genEndFunction, genhc08Code),
3683         * src/hc08/gen.h,
3684         * src/mcs51/gen.c (genEndFunction, gen51Code),
3685         * src/mcs51/gen.h,
3686         * src/ds390/gen.c (genEndFunction, gen390Code),
3687         * src/ds390/gen.h,
3688         * src/z80/gen.c (genEndFunction, genZ80Code),
3689         * src/z80/gen.h,
3690         * src/z80/z80.h,
3691         * src/pic/gen.c (genEndFunction, genpic14Code),
3692         * src/pic/gen.h,
3693         * src/pic16/gen.c (genEndFunction, genpic16Code),
3694         * src/pic16/gen.h,
3695         * src/avr/gen.c (genEndFunction, genAVRCode),
3696         * src/avr/gen.h,
3697         * src/xa51/gen.c (genEndFunction, genXA51Code),
3698         * src/xa51/gen.h,
3699         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3700         specific code to cdbFile.c and out of the backend code generators
3701
3702         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3703         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3704         starting address is now 0
3705
3706         * as/hc08/asm.h,
3707         * as/hc08/m08pst.c,
3708         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3709         assembler directive for DWARF support
3710         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3711
3712         * src/src.dsp,
3713         * src/Makefile.in,
3714         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3715
3716 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3717
3718         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3719         and inappropriate peephole optimization in jump tables
3720
3721 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3722
3723         * as/hc08/m08pst.c,
3724         * src/SDCCglue.c: sdccopt works for the hc08 port now
3725
3726 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3727
3728         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3729
3730 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3731
3732         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3733
3734 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3735
3736         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3737         rules
3738         * src/SDCCmain.c,
3739         * src/SDCCglobl.h,
3740         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3741         comments from the peephole optimizer replacement rules
3742         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3743         symbols
3744         * src/SDCCcse.c (updateSpillLocation),
3745         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3746         equivalents
3747         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3748         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3749         objects far pointers
3750
3751 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3752
3753         * src/SDCCsymt.h: a missing part of my last change
3754         * src/pic/ralloc.c (regTypeNum),
3755         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3756
3757 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3758
3759         * src/SDCCicode.h,
3760         * src/SDCCicode.c (aggrToPtrDclType),
3761         * src/SDCCptropt.h,
3762         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3763         ptrPseudoSymConvert),
3764         * src/pic/ralloc.c (regTypeNum),
3765         * src/pic16/ralloc.c (regTypeNum),
3766         * src/hc08/ralloc.c (regTypeNum),
3767         * src/ds390/ralloc.c (regTypeNum),
3768         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3769         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3770
3771 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3772
3773         * link/z80/lkmain.c (afile),
3774         * as/hc08/lkmain.c (afile),
3775         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3776         prevent a pointer problem when a filename has no directory and
3777         no extension specified.
3778
3779 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3780
3781         * link/z80/lkmain.c (afile): allow periods in directory names
3782         * link/z80/lkmain.c (afile),
3783         * as/mcs51/lkmain.c (afile),
3784         * as/hc08/lkmain.c (afile): allow linker script file to have an
3785         extension other than ".lnk"
3786         * link/z80/lklex.c (getfid),
3787         * link/z80/lkmain.c (parse),
3788         * as/mcs51/lklex.c (getfid),
3789         * as/mcs51/lkmain.c (parse),
3790         * as/hc08/lklex.c (getfid),
3791         * as/hc08/lkmain.c (parse): Support comments in the linker script
3792         file on lines by themselves and after filenames
3793
3794 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3795
3796         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3797
3798 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3799
3800         * src/z80/peeph-z80.def: removed some peephole rules that don't
3801         work with multibyte arithmetic (fixed bug #937126)
3802         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3803         to registers and not global variables
3804         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3805         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3806         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3807         checking for assignments not internally generated (fixed bug #931895)
3808         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3809         structure member (fixed bug #930072)
3810
3811 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3812
3813         * src/SDCCmain.c (linkEdit),
3814         * src/hc08/main.c (_hc08_parseOptions),
3815         * as/hc08/Makefile.in,
3816         * as/hc08/aslink.h,
3817         * as/hc08/asm.h,
3818         * as/hc08/m08pst.c,
3819         * as/hc08/lkrloc.c (relr, rele),
3820         * as/hc08/lkarea.c (lnkarea)
3821         * as/hc08/lkmain.c (afile, parse),
3822         * as/hc08/lkelf.c: support for ELF output
3823         * as/hc08/lks19.c (s19),
3824         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3825
3826 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3827
3828         * as/mcs51/lkihx.c: Fixed bug #899105.
3829
3830 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3831
3832         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3833         .dsp files from Unix to DOS.
3834
3835 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3836
3837         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3838         function pointers; we have been compliant for several months now.
3839         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3840         change that was accidently commented out
3841         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3842         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3843         bug #922319
3844
3845 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3846
3847         * src/hc08/gen.c: output of all of the internal debugging information
3848         is now controlled by the D() macro; it is disabled by default
3849
3850 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3851
3852         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
3853         harder to keep the same registers during a CAST iCode
3854         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
3855         long via int can be done in a single cast, if the signedness is
3856         correct.
3857         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
3858         putchar() in tinibios.c in ds390's library
3859
3860 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
3861
3862         * src/SDCCast.c (decorateType): fixed bug #898889,
3863         cast result of a literal complement too
3864         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
3865         fixed check for bitfields
3866
3867 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
3868
3869         * src/SDCCicode.c (geniCodeLogic): made it static,
3870         (geniCodeLogicAndOr): added in order to fix bug #905492,
3871         (ast2iCode): fixed bug #905492
3872         * support/regression/tests/bug-905492.c: added
3873         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
3874         (processParms): fixed bug #927659: don't copy parms, this will clear
3875         decorated flag
3876         * support/regression/tests/bug-927659.c: added
3877
3878 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
3879
3880         * src/SDCCast.c (addCast): don't cast float to char
3881         * device/lib/libsdcc.lib: added _memmove
3882
3883 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
3884
3885         * device/lib/large/Makefile: fixed parallel execution by
3886         replacing `make` by `$(MAKE)`
3887
3888 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3889
3890         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
3891         offsets (fixes bug #923936)
3892
3893 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
3894
3895         * device/lib/small/Makefile: fixed parallel execution by
3896         replacing `make` by `$(MAKE)`
3897
3898 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3899
3900         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
3901
3902 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
3903
3904         * src/pic/gen.c (genCpl): multi-byte complements were not working.
3905         * src/regression/Makefile: Regression test was not running.
3906
3907 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3908
3909         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
3910         complement if possible
3911         * src/SDCCval.c (valComplement),
3912         * src/SDCCicode.c (operandOperation): fixed complement of literal
3913         * support/regression/tests/onebyte.c (testComplement): added
3914
3915 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
3916
3917         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
3918         return an optimized tree; actually replace actParm with the new tree
3919         * src/SDCCast.h: added some parantheses to remove side effects
3920         * support/regression/tests/bug-920866.c
3921
3922 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
3923         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
3924         Bit operands were not being handled properly in the pic14 port.
3925         (now src/regression/add.c passes again).
3926
3927 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3928
3929         * src/SDCC.y (labeled_statement): case and default no longer require
3930         a following statement (RFE #893037)
3931
3932 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3933
3934         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
3935         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
3936         disabled (fixes bug #916294)
3937         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
3938         "mov a,acc"; patch provided by Lenny Story
3939         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
3940
3941 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3942
3943         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
3944         functions
3945         * src/ds390/gen.c (genFunction, genEndFunction),
3946         * src/ds390/ralloc.c (ds390_assignRegisters),
3947         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
3948         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
3949         pushed if there are parameters passed on the stack. Also, a cleaner
3950         way to decide if r0/r1 should be pushed/popped. (Together they fix
3951         bug #918693)
3952
3953 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * doc/sdccman.lyx,
3956         * device/lib/mcs51/crtpagesfr.asm,
3957         * device/lib/mcs51/crtxinit.asm,
3958         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
3959         to avoid confusion with Si Lab's SFRPAGE register.
3960
3961 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3962
3963         * src/SDCCglue.c (emitMaps): allow public sfr variables
3964         * src/SDCCglue.c (initialComments): include compiler build date
3965         with compiler version and put the timestamp of the generated
3966         assembly file on a serperate line to be less confusing.
3967         * src/port.h: added genInitStartup hook
3968         * src/avr/main.c,
3969         * src/ds390/main.c,
3970         * src/hc08/main.c,
3971         * src/pic/main.c,
3972         * src/pic16/main.c,
3973         * src/xa51/main.c,
3974         * src/z80/main.c: genInitStartup initialize as NULL (default to
3975         historical behaviour)
3976         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
3977         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
3978         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
3979         library instead of hard coding it into the compiler.
3980         * support/regression/ports/mcs51-stack-auto/spec.mk,
3981         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
3982         * device/lib/mcs51/Makefile,
3983         * device/lib/small/Makefile,
3984         * device/lib/large/Makefile,
3985         * device/lib/mcs51/crtpagesfr.asm,
3986         * device/lib/mcs51/crtstart.asm,
3987         * device/lib/mcs51/crtxclear.asm,
3988         * device/lib/mcs51/crtxinit.asm,
3989         * device/lib/mcs51/crtclear.asm,
3990         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
3991         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
3992         and into user configurable files.
3993         * device/lib/clean.mk: clean mcs51 directory too
3994         * support/regression/tests/longlit.c: added static to T1 declaration
3995         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
3996         accesses in the initialization code
3997
3998 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3999
4000         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4001         OSCTRIMVAL as noted in bug #916008
4002
4003 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4004
4005         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4006         in loops with multiple exits (reported as incorrect registers
4007         used by Martin Helmling in Sdcc-user list)
4008
4009 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4010
4011         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4012         made ds390 register extensions look less like error messages
4013
4014 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4015
4016         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4017         reported by Adam Wozniak in Sdcc-user list
4018
4019 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4020
4021         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4022         arithmetic optimizations, added debug output
4023
4024 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4025
4026         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4027         * sdcc.spec: updated and split sdcc into 3 rpms
4028         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4029         needed for literals of LEFT_OP and '+'
4030         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4031         introduced RESULT_TYPE_NOPROM
4032         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4033         left shift
4034         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4035         limited promotion to int only for '*'
4036         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4037
4038 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4039
4040         * src/pic16/gen.c (genSkip),
4041         (genc16bit2lit), (gencjneshort): commented out
4042         (is_LitOp): new helper function, checks operand type
4043         (genCmpEq): rewritten
4044
4045 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4046
4047         * support/regression/tests/bug-908454.c: added
4048
4049 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4050
4051         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4052         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4053         (geniCodeCast): cosmetic, don't preserve bit storage class
4054         (geniCodeLeftShift): added promotion
4055         (geniCodeLogic): fixed regression
4056         * src/SDCCsymt.c (computeTypeOr): accept bits too
4057         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4058
4059 2004-03-07  Borut Razem <borut.razem AT siol.net>
4060
4061         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4062
4063 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4064
4065         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4066         version of pic16_genPackRegisters which does not check if ic is a
4067         CAST operator,
4068         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4069         function cause string1.c regression test fails
4070
4071 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4072
4073         * sim/ucsim/configure.in,
4074         * sim/ucsim/configure,
4075         * sim/ucsim/doc/Makefile.in: use docdir
4076         * src/SDCC.y: fixed sbit atrributes
4077         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4078         * src/SDCCast.c (decorateType): |^& need special promotion handling
4079         * src/SDCCast.h,
4080         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4081         * src/SDCCsymt.h (computeType),
4082         * src/SDCCicode.c: computeType() needs op
4083         * src/SDCCsymt.c (checkTypeSanity),
4084         * doc/sddman.lyx: "plain" bitfields are unsigned
4085         * src/SDCCsymt.c (computeTypeOr): added
4086         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4087         |^& ops
4088         * src/SDCCval.c (val*): computeType() needs op
4089         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4090         * support/regression/tests/onebyte.c: added tests for |^&
4091
4092 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4093
4094         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4095         for writing icode into asm output.
4096
4097 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4098
4099         * src/pic16/device.c: added some debug lines enabled
4100         with macro DEBUG_CHECK,
4101         * src/pic16/genarith.c: more debug in genPlus,
4102         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4103         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4104         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4105         * (aopForSym): onStack symbols are re-placed in data memspace,
4106         and onStack flag is cleared,
4107         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4108         copy temporary pcodeop,
4109         * (genPcall): added warning for not updating PCLATU,
4110         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4111         always true for pic16 port,
4112         * (genMultOneWord): NEW, supports integer multiplication,
4113         * (genMult): modified to call genMultOneWord,
4114         * (ifxForOp): added warning when return NULL,
4115         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4116         flag is set before call to operandFromSymbol for implicit
4117         added structures,
4118         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4119         options.intlong_rent are set by default,
4120         * (_hasNativeMulFor): modified to allow port generation of integer
4121         multiplication,
4122         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4123         set regtype to REG_SFR for all registers, restricting seting the
4124         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4125
4126 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4127
4128         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4129         more than 500 times in the regression tests
4130
4131 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4132
4133         * support/Util/SDCCerr.h,
4134         * support/Util/SDCCerr.c,
4135         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4136         enumerator_list),
4137         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4138         for symbol conflicts.
4139         * support/valdiags/tests/enum.c,
4140         * support/valdiags/tests/tentdecl.c,
4141         * support/valdiags/tests/struct.c: expect possible error messages
4142         referring to original symbol definitions.
4143         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4144         * src/SDCCsymt.h,
4145         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4146
4147 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4148
4149         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4150
4151 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4152
4153         * src/pic16/ralloc.c (newReg): fixed bug #908929
4154
4155 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4156
4157         * src/ds390/gen.c: added missing #include "main.h"
4158
4159 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4160
4161         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4162         checking if symbol is already in set,
4163         * src/pic16/device.h: prototype for checkAddSym,
4164         * src/pic16/gen.c: (_G): added entry interruptvector,
4165         * (assignResultValue): removed some commented out lines,
4166         * (genFunction): check for ISR via sym->type, absolute section for
4167         interrupt code is created via a new pBlock, the goto instruction is
4168         placed now correctly at the interrupt vector position, changed all
4169         references from ivec to _G.interruptvector,
4170         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4171         is the interrupt is a high priority one, same for return from ISR,
4172         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4173         externs to calls of checkAddSym,
4174         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4175         pic16_pcode_verbose flag is set,
4176         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4177         * src/pic16/pcoderegs.c: message about how many registers are saved
4178         will only be emitted if pic16_pcode_verbose flag is set,
4179
4180 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4181
4182         * src/ds390/ralloc.h,
4183         * src/ds390/ralloc.c (ds390_regWithIdx),
4184         * src/ds390/gen.c (emitcode),
4185         * src/ds390/main.h,
4186         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4187         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4188         ds390operandCompare, getRegsRead, getRegsWritten,
4189         initializeAsmLineNode): customized instruction size calculation for
4190         ds390, started basis for some register optimizations
4191         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4192         corresponding assembly output
4193         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4194         missing push/pop of r0/r1. Optimized push/pops
4195
4196 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4197
4198         * src/mcs51/main.c (instructionSize): fixed ACALL size
4199         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4200
4201 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4202
4203         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4204         the sorting of rlist with NULL elements
4205         * (print_idataType, print_idata): NEW to create idata sections
4206         * src/pic16/device.h: idataSymSet new variable
4207         * src/pic16/gen.c (genFunction): fixed some bugs in string
4208         comparing, improved the absolute section creation for ISRs,
4209         added FSR0L/FSR0H in registers that are saved in an ISR,
4210         * (genInline): fixed the processing of inline snippets,
4211         now they undergo no process by the peephole optimizer
4212         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4213         are placed in idataSymSet,
4214         * (pic16emitStaticSeg): extern symbols are added in externs,
4215         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4216         switching when aboslute variables are placed in access bank memory
4217         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4218         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4219         commented out with #if,
4220         * (pic16_packRegisters): reintroduce the check for CAST because some
4221         symbols are not correctly handled,
4222         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4223         pCodeInstruction instead of pCode,
4224         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4225         pCodeAsmDir definition,
4226         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4227         directive, then the argument directive is emitted without the leading
4228         tab, hack for inline labels which must be in the first column,
4229         * (compareLabel,pic16_findNextInstruction),
4230         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4231         * (insertBankSwitch): modified for the new pCodeAsmDir,
4232
4233 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4234         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4235
4236         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4237         instance,
4238         * (pushSide): commented out with #if,
4239         * (assignResultValue): fixed some typos in saving
4240         registers,
4241         * (genPcall): FIXED and sync'ed with genCall,
4242         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4243         * (genNearPointerGet): fixed to handle some more cases,
4244         implementation scheme via table reads,
4245         * (genConstPointerGet): modified to access code memory correct,
4246         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4247         and improved to handle some cases
4248         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4249         instead of "RETLW" for init data
4250         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4251         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4252         variables are placed in access bank memory (<0x80 and >=0xf80),
4253         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4254         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4255         TBLWT_POSTDEC,TBLWT_PREINC
4256         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4257         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4258         directives
4259         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4260         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4261         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4262         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4263
4264 2004-02-29  Borut Razem <borut.razem AT siol.net>
4265
4266         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4267         support/Util/findme.h, support/Util/system.h: enhance binary relative
4268         search for lib and include by using findProgramPath()
4269
4270 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4271
4272         * src/SDCCpeeph.h,
4273         * src/SDCCpeeph.c (pcDistance),
4274         * src/port.h,
4275         * src/mcs51/ralloc.h,
4276         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4277         * src/mcs51/main.h,
4278         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4279         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4280         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4281         size calculation port specific, started basis for some register
4282         optimizations
4283         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4284         missing push/pop of r0/r1. Optimized push/pops
4285         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4286         * device/lib/_modsint.c (_modsint),
4287         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4288         and stack version so regression tests pass
4289
4290 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4291
4292         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4293         * src/SDCCast.c (decorateType): catch another small optimization
4294         with '?' operator
4295         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4296         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4297         modified to finally use computeType() all over SDCC,
4298         see Feature Request #877103
4299         * src/SDCCval.h: cosmetic
4300         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4301         valCompare(); regression tested in muldiv.c
4302         * support/regression/tests/muldiv.c (testMod): mod sign follows
4303         dividend only
4304
4305 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4306
4307         * src/SDCCast.c (decorateType): fixed bug #902362
4308         * doc/INSTALL.txt: fixed install instructions for win32
4309
4310 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4311
4312         * device/include/Makefile.in (install): fixed by replacing spaces
4313         by tabs
4314         * doc/README.txt,
4315         * doc/INSTALL.txt: updated for release
4316         * doc/sdccman.lyx: added warning for --xstack being buggy
4317
4318 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4319
4320         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4321         to eliminate build warnings.
4322         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4323
4324 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4325            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4326
4327         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4328         removed -penable-stack, added comment for stack pragma, added
4329         warning for not initializing the stack/frame registers, removed
4330         comment at interrupts section
4331
4332         Stack is made permanent, there is no ability to disable stack usage.
4333         * src/pic16/device.h,
4334         * src/pic16/device.c: removed all references to USE_STACK macro,
4335         * src/pic16/device.c (pic16_dump_section): when no elements in
4336         rlist, free rlist before return,
4337         * (pic16_dump_int_registers): NEW, internal registers are a new set
4338         of general purpose registers reused by each function,
4339         * (checkAddReg): returns 1 if registers is added to set,
4340         * (pic16_groupRegistersInSection): when a registers is of type
4341         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4342         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4343         SRCASECMP macro is moved here from device.c
4344         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4345         PO_PCLATU, PO_PRODL, PO_PRODH,
4346         * (pic16_pCodeOpType, genMinus,
4347         changed compares to "a" register, with AOP_ACC,
4348         * (pic16_genPlus): fixed some bugs and indented properly,
4349         * (pic16_addSign): changed size to size+offset in the MOVWF
4350         instruction,
4351         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4352         multiply 8-bit operand by literal, result is 8-bit,
4353         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4354         multiply 2 8-bit operand, result is 8-bit,
4355         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4356         genUMult8X*_16,
4357         * src/pic16/gen.c: changed accUse to contain WREG only,
4358         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4359         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4360         true, do not use immediate addressing any more unless sym is a
4361         pointer in codespace,
4362         * (aopForRemat): do not use immediate addressing when symbol not in
4363         codespace and when symbol's address is requested,
4364         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4365         accUse size (= 1),
4366         * (aopGet): added case for AOP_ACC and don't return "accumulator
4367         bug" but WREG instead,
4368         * (popGetTempReg): pushes contents of temporary register in stack,
4369         * (popReleaseTempReg): pops contents of temporary register from
4370         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4371         * (pic16_popGet): separated case AOP_ACC to return register WREG
4372         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4373         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4374         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4375         the use of immediate pointers to certain cases only.
4376
4377         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4378         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4379         * (assignResultValue, genCall, genRet): modified to use the new
4380         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4381         genPcall is still broken,
4382         * (genFunction): added code to create 'A' type pBlocks when
4383         interrupt functions are generated, code not extensively tested yet,
4384         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4385         * (genEndFunction): modified so ISRs pop stored registers from stack,
4386         * (genMultOneByte): cleanup,
4387         * (AccRsh): added flag andmask, to and result with appropriate mask,
4388         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4389         * (genDataPointerGet): fixed and reenabled its use,
4390         * (genNearDataPointerGet): bugs fixed,
4391         * (genDataPointerSet): bugs fixed,
4392         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4393         pic16_DumpSymbol, pic16_DumpOp,
4394         * src/pic16/genutils.h: function prototypes for the above functions,
4395         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4396         pointers,
4397         * (pic16emitRegularMap): many many many improvements, but needs a
4398         major cleanup,
4399         * src/pic16/main.c: enable_stack in pic16_options is removed,
4400         * (_pic16_parseOptions): removed command line options -penable-stack,
4401         * (_process_pragma): emit stack symbol only when stack pragma is
4402         processed,
4403         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4404         redirected to FSR0L/FSR0H pair,
4405         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4406         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4407         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4408         for immediates,
4409         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4410         * (dumpPicOptype): NEW,
4411         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4412         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4413         with movff instruction,
4414         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4415         added pic16_int_regs, some packRegsFor* functions are commented out,
4416         because produce errors,
4417         * src/pic16/NOTES: minor modifications
4418
4419 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4420
4421         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4422         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4423         --pack-iram.
4424         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4425         * as/mcs51/lkaomf51.c: fixed bug #895763
4426
4427 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4428
4429         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4430
4431 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4432
4433         * doc/sdccman.lyx: added details about the HC08 storage classes and
4434         interrupts, fixed the register usage info for z80 & gbz80
4435
4436 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4437
4438         * doc/sdccman.lyx: added more pic16 port documentation
4439         * device/include/pic16/: added header pic18fregs.h
4440
4441 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4442
4443         * doc/sdccman.lyx: added Vangelis' contribution
4444
4445 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4446
4447         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4448         extend to the next CALL or PCALL, not just to the next CALL.
4449
4450 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4451
4452         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4453
4454 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4455
4456         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4457         bug #895752 and a better fix for bug #716790
4458
4459 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4460
4461         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4462
4463 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4464
4465         * doc/sdccman.lyx: minor changes, minor changed
4466
4467 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4468
4469         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4470         which can't handle SDCC_NEWONEBYTEOPS,
4471         (geniCodeMultiply): removed conversion from mult to shift for pic14
4472         and pic16
4473
4474 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4475
4476         * src/hc08/gen.h,
4477         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4478         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4479         thus fixing bug #895406
4480
4481 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4482
4483         * device/lib/_modsint.c,
4484         * device/lib/_modslong.c: sign follows divisor only
4485         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4486         signs or signedness can be ignored
4487         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4488         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4489         added optimization for IFX,
4490         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4491         arguments;
4492         reenabled optimization for IFX, which was removed on 2004-01-11
4493         * src/SDCCast.h: added return type IFX
4494         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4495         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4496         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4497         SDCC_OLDONEBYTEOPS selects the old behaviour
4498         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4499         changed again and commented promotion rule
4500         * src/SDCCval.c (valDiv): promotion no longer necessary
4501         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4502         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4503         rewritten
4504         * support/regression/tests/onebyte.c: added
4505
4506 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4507
4508         * gen.c (genInline): reverted to old code for assemnling inline
4509         code because of bug reported James Chadd
4510
4511 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4512
4513         * ralloc.h: missing declarations from previous patch,
4514         seems that patch for ralloc.h was never applied, fixed
4515
4516 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4517            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4518
4519         * pcode.c,
4520         * pcode.h,
4521         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4522         indirect addressing. Marked FSR0 as deprecated
4523         * gen.c (pointerCode): commented out, not needed now
4524         (pic16_popGet2p): new MOVFF helper function
4525         (genGenPointerGet),
4526         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4527         (shiftRLong): removed duplicate debugging info
4528
4529 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4530
4531         * src/ds390/gen.c (genNearPointerGet),
4532         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4533         optimization with bits, but not bitfields.
4534         * src/ds390/ralloc.c (packRegisters),
4535         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4536
4537 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4538
4539         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4540
4541 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4542
4543         * src/SDCCsymt.h,
4544         * src/SDCCicode.c (operandFromSymbol),
4545         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4546         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4547         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4548         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4549         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4550         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4551         bug #892038
4552         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4553         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4554         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4555         * src/SDCCsymt.c (newSymbol),
4556         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4557         enumerator_list),
4558         * src/SDCCval.h,
4559         * src/SDCCval.c (newiList): fixed bug #885705
4560
4561 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4562
4563         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4564         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4565
4566 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4567
4568         * device/include/c8051f120.h,
4569         * device/include/c8051f300.h,
4570         * device/include/c8051f310.h: added/updated header files for Silicon
4571         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4572         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4573         in new section Submitting patches
4574
4575 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4576
4577         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4578         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4579         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4580         genGenPointerSet),
4581         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4582         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4583         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4584         genGenPointerSet),
4585         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4586         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4587         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4588         genGenPointerSet),
4589         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4590         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4591         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4592         genGenPointerSet): fixed bug #892400
4593         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4594         to eliminate build warnings.
4595         * src/SDCCast.c (processParms),
4596         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4597         fixed bug 751859
4598         * support/valdiag/valdiag.py: added GCC to the list of defines active
4599         when compiling with gcc
4600
4601 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4602
4603         * support/Util/SDCCerr.h,
4604         * support/Util/SDCCerr.c,
4605         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4606         with an incomplete type (fixed bug #883734)
4607         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4608
4609 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4610
4611         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4612
4613 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4614
4615         * src/SDCCast.c (decorateType),
4616         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4617         function pointer implementation
4618         * support/regression/tests/funptrs.c: added tests to verify both forms
4619         of function pointers work correctly. Added tests to verify parameters
4620         are passed in the correct order.
4621
4622 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4623
4624         * device.c (regCompare): registers are sorted by ascending
4625         address and increasing size,
4626         * main.c (_pic16_finaliseOptions): removed the declaration
4627         of compiler macro MCU. Now a macro of the format pic18fxxxx
4628         will be defined from the command line
4629
4630 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4631             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4632
4633         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4634         PCOP_RLCF was overwritten!
4635         * gen.c (genSkip): commented out calls to pic16_emitcode,
4636         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4637         * (genlshTwo),
4638         * (genRRC): added debugging info,
4639         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4640         overwritten while shifting,
4641         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4642         overwritten while shifting,
4643         * (AccLsh),
4644         * (AccRsh),
4645         * (shiftLLeftOrResult),
4646         * (shiftRLeftOrResult),
4647         * (shiftRLong),
4648         * (shiftLLong): Implemented with pic16_emitpcode
4649         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4650         * (genLeftShift): Fixed bug, operand for shift by variable always
4651         was "and"ed with 0x0f,
4652         * (genLeftShiftLiteral),
4653         * (genrshTwo),
4654         * (genRightShiftLiteral): added debugging info,
4655         * (genrshFour): added comment,
4656         * (genRightShift): determined signedness from operand "left"
4657         instead of "result"
4658
4659 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4660
4661         * src/SDCCicode.c (geniCodeParms),
4662         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4663         function pointers, fixed function pointer bugs #861242 and #861896
4664
4665 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4666
4667         * device/include/c8051f000.h,
4668         * device/include/c8051f120.h,
4669         * device/include/c8051f300.h: added header files for Silicon
4670         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4671
4672 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4673
4674         * src/SDCCast.c (processParams): added new type flow and restructured
4675         (gatherAutoInit): added new type flow
4676         (addCast): cosmetic changes
4677         (getLeftResultType): added new type flow for array indices, patch
4678         provided by Stas, see FR #877103
4679         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4680         array index patch by Stas
4681         * src/SDCCast.h: added prototype getResultTypeFromType()
4682         * src/SDCCval.h,
4683         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4684         * src/pic/glue.c (pic14emitStaticSeg),
4685         * src/pic16/glue.c (pic16emitStaticSeg),
4686         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4687         for initialization of symbols
4688         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4689         * support/Util/SDCCerr.h:
4690         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4691         * .version: bumped version number to 2.3.8
4692         * device/include/Makefile.in (install),
4693         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4694         avoid warnings
4695
4696 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4697
4698         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4699         Slade Rich fixed an optimization bug
4700         * src/pic/pcodepeep.c,
4701         * src/pic/pcoderegs.c
4702         * doc/Makefile (install): added test for directory
4703
4704 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4705
4706         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4707         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4708         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4709         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4710         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4711         * as/mcs51/asexpr.c (term),
4712         * as/hc08/asexpr.c (term): fixed bug #887146
4713
4714 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4715
4716         * src/z80/gen.c (genMult): handle single byte result product
4717         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4718         DUMMY_READ_VOLATILE (fixed bug #886367)
4719
4720 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4721
4722         * support/regression/tests/libmullong.c: fixed logic, on little endian
4723         hosts we ended without a mullong_wrapper()
4724
4725 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4726
4727         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4728         virus/worm forged address usage.
4729
4730 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4731
4732         Fixed promotion, it should be done on AST level:
4733         * src/SDCCast.c (addCast): added promotion to int
4734         (decorateType): updated call to upCast()
4735         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4736         usualUnaryConversions()
4737
4738 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4739
4740         * support/regression/tests/literalop.c (mulWrapper): Added a
4741         wrapper to remove integer overflow warnings.
4742
4743         * support/regression/tests/float_trans.c: Made work on host.
4744
4745         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4746         location of sz80.
4747
4748         * support/regression/generate-cases.py (main): Changed from inline
4749         to a main method.
4750
4751         * doc/Makefile (install): Changed to depth first to get rid of
4752         missing directory install warning.
4753
4754         * as/Makefile (install-doc): Made work on Mac.
4755
4756 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4757
4758         * src/SDCCast.c: added an additional type flow in decorateType() of
4759         opposite direction, see feature request #860006; it's enabled at runtime
4760         by setting the environment variable SDCC_NEWTYPEFLOW
4761         * src/SDCCast.h: changed prototype of decorateType()
4762         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4763         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4764         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4765         see feature request #877103
4766         * src/SDCCval.c: updated call of decorateType()
4767         (valBitwise): fixed bug #882876
4768         (valMinus): added promotion
4769         (valLogicAndOr): result is unsigned
4770         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4771         * src/SDCCsymt.c (computeType),
4772         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4773         must not cause an unsigned operation
4774         * src/pic/glue (pic14emitRegularMap),
4775         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4776
4777 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4778
4779         * src/pic/pcode.c (PCodeID): commented out left over debug code
4780
4781 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4782
4783         * support/valdiag/tests/overflow.c: added shift tests
4784         * src/pic/device.c,
4785         * src/pic/gen.c,
4786         * src/pic/gen.h,
4787         * src/pic/glue.c,
4788         * src/pic/main.c,
4789         * src/pic/pcode.c,
4790         * src/pic/pcode.h,
4791         * src/pic/pcodepeep.c,
4792         * src/pic/pcoderegs.c,
4793         * src/pic/ralloc.c,
4794         * src/pic/ralloc.h: applied patch from Slade Rich;
4795         added support for multiple code pages and multiple RAM banks on the
4796         PIC 14 port. The ASM files now no longer simply assume all the
4797         code / RAM are in the same page / bank. This means the linker can
4798         safely allocate code/RAM of separate ASM files to different pages/banks.
4799         * doc/sdccman.lyx: added Slade's tips
4800         * src/mcs51/peeph.def: fixed bug #880768
4801
4802 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4803
4804         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4805         * src/SDCCast.c (decorateType): fixed bug #880197
4806
4807 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4808
4809         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4810         getopt.h.
4811
4812         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4813         strtof is not part of C89 and isn't included with Mac OS X.
4814
4815 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4816
4817         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4818         shiftL2Left2Result): fixed bug #879326
4819         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4820         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4821         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4822         address fetch for clr instruction
4823         * device/lib/hc08/_mulint.c: created optimized assembly version
4824         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4825
4826 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4827
4828         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4829         proposed in FR #877103
4830
4831 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4832
4833         * src/SDCCval.c (cheapestVal): added missing checks
4834         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4835         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4836
4837 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4838
4839         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4840         equal operands
4841
4842 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4843
4844         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
4845         loaded with the linker search paths (-L arguments) and the libraries
4846         to be linked with the current source (-l arguments). Changes
4847         currently will affect only the pic16 port.
4848         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
4849         include path the port specific paths and port specific libraries,
4850         * gplink command now contains the $3 argument,
4851         * src/pic16/device.h,
4852         * src/pic16/device.c,: structure PIC_device is made public and
4853         renamed to PIC16_device, the same for variable Pics which is renamed
4854         to Pics16. Updated all references to them.
4855         * src/pic16/glue.c (pic16glue): corrected bug with code
4856         initialization which bypassed the variable initializations block.
4857
4858         * device/lib/pic16/Makefile.rules: removed --penable-stack from
4859         COMPILE_FLAGS and added the --nostdinc option
4860
4861 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4862
4863         * device/include/mc68hc908jb8.h: Register defs for another member
4864         of the hc08 family. Contributed by Bjorn Bringert - thanks!
4865
4866 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
4867
4868         Documenting changes from previous commits.
4869         * configure.in (version 1.56),
4870         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
4871         when generating output files to configure the pic16 library,
4872         but now I've commented it out, since gputils aren't installed in the
4873         SF compile farm, so library won't compile
4874
4875         * device/lib/Makefile.in (version 1.56): initially I've added in
4876         target 'all' the prerequestive 'model-pic16' so it compiled the
4877         pic16 library, but now I've commented it out for the same reasons
4878         above,
4879         * added targets 'model-pic16' and 'objects-pic16' to compile the
4880         library
4881         * added target 'port-specific-objects-pic16' to handle the
4882         generated libraries and copy them into the build/ directory
4883         * added target 'clean-intermediate-pic16' to clean intermediate
4884         files into pic16 directory
4885         * in target 'installdirs' added line to create directory pic16 in
4886         the installation path
4887
4888         * device/include/Makefile.in (version 1.11): in target 'install'
4889         added lines to copy all header files to installation path,
4890         * in target 'installdirs' added line create directory for pic16
4891         headers in the installation path
4892
4893 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
4894
4895         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
4896          a function call
4897
4898 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
4899
4900         * configure,
4901         * device/lib/configure.in,
4902         * device/lib/configure: fixed for autoconf 2.57
4903
4904 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4905
4906         * src/z80/main.c (_parseOptions): fixed the portmode= command line
4907         option so that it actually works. Made it specific to the z80, since
4908         the gbz80 doesn't have these kinds of I/O ports.
4909
4910 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4911
4912         * device/include/z180.h,
4913         * device/lib/_memcpy.c,
4914         * device/lib/_memmove.c,
4915         * device/lib/_mulint.c,
4916         * device/lib/ser_ir.c,
4917         * device/lib/ser_ir_cts_rts.c,
4918         * device/lib/_strcmp.c,
4919         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
4920         * src/z80/main.c (_process_pragma): add support for pragmas bank and
4921         portmode; added deprecation warning for bank= and protmode= forms.
4922         Also, guard against buffer overflow.
4923         * src/z80/gen.c (aopGet): generate better code for sfr banked read
4924
4925 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4926
4927         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
4928         changed interrupt vector table generation to only emit declared vectors.
4929         * device/include/Makefile.in: added missing backslash
4930         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
4931
4932 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4933
4934         Mainly changes to support compilation of the device libraries
4935         * src/pic16/device.c: stack is allocated via symbol and not
4936         via literal number. The symbol is placed in the corresponding
4937         position of the data ram
4938         * (pic16_dump_section): relocatable and absolute uninitialized
4939         data are now emitted in sorted order to reduce section naming,
4940         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
4941         weren't marked as being in the access bank,
4942
4943 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4944
4945         Added portion of GNU PIC Library under the directory
4946         device/include/pic16 and device/lib/pic16. These files
4947         contain the declarations of SFRs for the PIC18Fxx2 devices.
4948         The directory is initialized via configure from toplevel.
4949
4950 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
4951
4952         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
4953         the spilllocations to be compared correctly
4954
4955 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4956
4957         * src/SDCCast.c (decorateType): fixed bug introduced today
4958
4959 2004-01-12  Borut Razem <borut.razem AT siol.net>
4960
4961         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
4962         doc/sdccman.lyx: upper case pragmas are deprecated
4963
4964 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4965
4966         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
4967         in simpler and even better code
4968
4969 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
4970
4971         * src/SDCCicode.c (operandOperation): fixed bug #874819
4972         * src/SDCCast.c (decorateType): fixed
4973         char foo (unsigned long ul) { return ul > 0; }
4974
4975 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4976
4977         * doc/sdccman.lyx: Moved and added some sections, small changes
4978         all over. Telling LaTeX to be less strict with word spacing
4979         to better keep the right margin. Changed some notes about
4980         maintainance of the ports in section 3.2.1 - is it OK like this?
4981
4982 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4983
4984         SDCC source changes:
4985         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
4986         convilong): modified to inform the pic16 port that builtin functions
4987         are external
4988
4989         PIC16 PORT specific changes:
4990         * src/pic16/device.c pic16_dump_equates() added,
4991         processor registers declared internally by the port are emitted in
4992         the translation as equates,
4993         * src/pic16/gen.c: inline code is passed unprocessed to the
4994         translation,
4995         * (pic16_popGetLit2): fnuction modified to take second operand as
4996         pCodeOp pointer and not as literal,
4997         * (popRegFromIdx): prefixed with pic16_,
4998         * (pic16_popCombine2): modified to receive already allocated pCode
4999         operands,
5000         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5001         * (genFunction): initializes local stack frame and pushes on stack
5002         all the registers used by this function,
5003         * (genEndFunction): restores all registers from stack and restores
5004         stack frame,
5005         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5006         improvements,
5007         * (pic16glue): changed the program startup sequence,
5008         * added new dbName code 'A' for functions placed in absolute section
5009         * src/pic16/main.c: added function attribute _naked,
5010         * added pragma 'code' to place a fnuction at an absolute address,
5011         * added command line arguments --debug-ralloc and --pcode-verbose,
5012         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5013         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5014         * (pic16_newpCodeOpLit2): modified to take the second operand as
5015         pCodeOp pointer,
5016         * (pic16_printpBlock): modified to emit each function in a separate
5017         section,
5018         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5019         UPPER for immediate operands,
5020         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5021         instruction,
5022         * src/pic16/peeph.def: all peepholes with movff are commented out,
5023         because there is a problem in the pcode peep optimizer,
5024         * src/pic16/ralloc.c: the register allocator can now reuse local
5025         function symbols for another function. This saves register usage.
5026         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5027
5028         Added file src/pic16/NOTES with information about program writing on
5029         the current port version.
5030
5031 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5032
5033         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5034         and peephole 252 (array access)
5035
5036 2004-01-09  Borut Razem <borut.razem AT siol.net>
5037
5038         * src/SDCCmain.c : fixed #872250: -l command line defined library
5039           files are scanned before standard library files
5040
5041 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5042
5043         * src/SDCCast.c (decorateType): fixed bug #874046
5044
5045 2004-01-09  Borut Razem <borut.razem AT siol.net>
5046
5047         * support/scripts/sdcc.nsi: remove previous installation
5048
5049 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5050
5051         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5052         bytes for last interrupt vector (mcs51)
5053         * sdcc.spec: fixed typo
5054
5055 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5056
5057         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5058         gen51Code): more efficient parameter receive for --model-large
5059         ("bug" #845294)
5060
5061 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5062
5063         * src/ds390/main.c,
5064         * src/z80/main.c: added missed needLinkerScript flags (more than
5065         one port structure defined in these file)
5066         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5067         bug #795325
5068
5069 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5070
5071         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5072         * src/port.h: added flag needLinkerScript in port->linker
5073         structure to inform whether to create a .lnk file or not,
5074         * src/avr/main.c,
5075         * src/ds390/main.c,
5076         * src/hc08/main.c,
5077         * src/mcs51/main.c,
5078         * src/pic/main.c,
5079         * src/pic16/main.c,
5080         * src/xa51/main.c,
5081         * src/z80/main.c: changed appropriately to configure
5082         needLinkerScript flag
5083         * src/pic/gen.c,
5084         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5085         * src/pic/glue.c: added variable udata_section_name to
5086         override default uninitialized data segment definition for
5087         devices only with SHAREBANK memory (reported from Erik Epetrich)
5088         * (pic14emitOverlay): modified to emit a commented overlay segment
5089         directive when no overlay data exist
5090         * (picglue): modified to emit uninitialized data segment
5091         according to udata_section_name
5092         * src/pic/main.c (_pic14_parseOptions): added command line
5093         options --udata-section-name=[name] to override default
5094         udata definition name
5095         * modified _linkCmd and _asmCmd to include compiler passed
5096         arguments via -W option
5097         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5098         object file from '.rel' to '.o' in port->linker structure,
5099         changed size of fptr from 2 to 3 in port structure
5100
5101 2004-01-07  Borut Razem <borut.razem AT siol.net>
5102
5103         * support/scripts/sdcc.nsi: update PATH
5104         * support/scripts/sdcc.ico: craeted
5105
5106 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5107
5108         * device/include/Makefile.in: fix install
5109         * doc/Makefile: fix install
5110
5111 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5112
5113         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5114         in bug #860505
5115         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5116         how the function variable allocation summary is displayed; also
5117         include information about variables allocated to the overlay
5118         segment
5119
5120 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5121
5122         * as/mcs51/lkmain.c: Help about -Y option
5123         * as/mcs51/lkarea.c: Fixed gcc warnings
5124
5125 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5126
5127         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5128         fixed warning
5129         * support/valdiag/tests/overflow.c: added
5130         * src/SDCCast.c (decorateType),
5131         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5132         LEFT_OP (left shift)
5133
5134 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5135
5136         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5137         (default behaviour).
5138
5139 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5140
5141         A python script to validate compiler diagnostic messages. It can be
5142         used to verify that sdcc complains about bad c source code and
5143         gives a good location of the error.
5144         * support/valdiag/Makefile,
5145         * support/valdiag/valdiag.py,
5146         * support/valdiag/tests/*
5147
5148 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5149
5150         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5151         * src/SDCCsymt.c (newEnumType),
5152         * src/SDCCsymt.h
5153         * support/Util/SDCCerr.c,
5154         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5155         enum related bugs.
5156         * support/regression/tests/enum.c: added test for enum values that
5157         require at least 2 bytes of storage.
5158
5159 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5160
5161         * src/common.h: added ifndef/define/endif macros
5162         around the header file.
5163         Bug reported from Jesus Calvino-Fraga
5164
5165 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5166
5167         * sdcc.spec: updated
5168         * device/include/Makefile.in: don't install CVS directories
5169         * device/lib/Makefile.in: added removal of CVS directories after install
5170         * doc/Makefile: fixed install, added local_icons
5171         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5172         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5173         * src/ds390/gen.c (genRightShift): fixed bug #870788
5174         * src/SDCCast.c (decorateType): fixed bug #870781
5175
5176 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5177
5178         PIC16 port related changes:
5179         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5180         added variable stackPos,
5181
5182         * gen.c: genCall, assignResultValue: added support for
5183         pushing/retrieving function parameters to/from stack,
5184         genFunction,genEndFunction: setup stack frame for the
5185         generated function,
5186         genAddrOf: will be changed according to bug 863624
5187
5188         * added files genutils.c and genutils.h which contain gen*
5189         debugged and optimised functions extracted from gen.c
5190
5191         * glue.c: added variable 'externs' which holds extern symbols,
5192         pic16emitRegularMap: is modified to properly handle relocatable
5193          symbols under the new scheme,
5194         pic16createInterruptVect: is modified
5195         pic16printPublics: is modified to emit 'global' assembler directives,
5196         added pic16_printExterns to print extern symbols,
5197         pic16glue: initializes stack/frame pointer in the beginning of
5198         the assembly output. Temporary hack, will be corrected later,
5199         because gplink yet does not support stack and SDCC does not
5200         yet support a type of crt0.o object to create the final binary.
5201
5202         * Removed many lines that contain 8051 legacy code.
5203         * The code is finally placed under a 'code' directive.
5204         * Added port specific options.
5205
5206         * _process_pragma: simplified since now we do not need *special*
5207         include file to define SFR registers. But a separate header
5208         will be needed. This will be developed later.
5209         * _pic16_parseOptions: added, parses port specific options:
5210         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5211         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5212         --preplace-udata-with=
5213
5214         * _pic16_setDefaultOptions: modified to initialize section names,
5215         but hack is temporarly out of order since it needs improvement.
5216         * _pic16_genAssemblerPreamble: configuration words are emitted by
5217         their address instead of their name. This part is incomplete and
5218         supports only the 18Fxx2 devices. Other devices will emit an error
5219         during assembly since they do not contain the same set of config
5220         registers
5221         * _pic16_genIVT: is modified,
5222
5223         * pcode.c: added definitions for some hardware registers that are needed
5224         for stack support
5225         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5226         All PCI entries are updated. Now LFSR is supported.
5227         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5228         * added pic16_newpCodeOpLit2 to support instructions with
5229         two literal arguments
5230         * pic16_pCode2str: corrected code that emits assembler instructions
5231         with two literal operands and those that have an access bit modifier
5232         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5233         this fixes a bug which caused some labels to be lost, when an
5234         assembler directive was added, i.e. banksel,
5235         * pic16_FixRegisterBanking: improved logic that causes the insertion
5236         of bank switching,
5237         * InlineFunction: functions that are called once, are not any more
5238         inlined. This can be a port option in the future,
5239
5240         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5241
5242         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5243         hold the corresponding uninitialized symbols,
5244         * pic16_allocProcessorRegister: registers have explicit marked the
5245         accessBank field,
5246         * pic16_allocInternalRegister: registers are explicit marked as
5247         not used,
5248         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5249         processing list, so bit registers were lost,
5250         *
5251
5252         * ralloc.h: added field 'accessBank' and original symbol operand
5253         in register definition,
5254         * removed the field isMapped from register definition,
5255
5256         ** Several functions have been removed from various sources:
5257         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5258         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5259         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5260         pic16_assignRelocatableRegisters
5261
5262         ** others have been introduced:
5263         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5264         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5265
5266 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5267
5268         * support/scripts/inc2h.pl: changed definition of BIT_AT
5269         to emit 'sbit at' instead of 'bit at'. This was a request.
5270
5271         PIC16 port related preliminary changes:
5272         * gen.c: prefixed function popRegFromString with
5273         pic16_ and all references to it corrected
5274         * pcode.c: all pic16_pc_* hardware registers prefixed
5275         with underscore (_),
5276         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5277         * ralloc.c: newReg(): when register is REG_SFR then
5278         set address to rIdx,
5279         pic16_allocProcessorRegister(): marks register wasUsed=0
5280         pic16_writeUsedRegs(): added a call to assign processor
5281         registers via pic16_assignFixedRegisters
5282
5283 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5284
5285         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5286         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5287         variables in unused register banks.  Also the SSEG is placed
5288         wherever there is enough space for it, and IDATA can be anywhere
5289         in internal RAM.  For now compile using -Wl-Y[stack_size].
5290         The mem file is different for this option as well, since it
5291         makes no sense of talking about DSEG lenght.
5292
5293 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5294
5295         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5296         in certain cases, e.g. when ROM assignment, patch provided
5297         from Albert den Haan.
5298
5299 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5300
5301         Many signedness and type propagation fixes:
5302         * src/SDCCicode.c: made geniCodeCast() static
5303         replaced SPEC_ by IS_ (cosmetic)
5304         (operandOperation): fixed div and mod operation
5305         (usualBinaryConversions): added support for promotion of char
5306         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5307         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5308         (geniCodeAdd): an array index will stay unsigned, even if promoted
5309         from char to int
5310         (geniCodeArray): ditto
5311         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5312         * src/SDCCsymt.c (computeType): added more support for char;
5313         promotion of char is selectable by promoteCharToInt, fixed signedness
5314         for all cases
5315         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5316         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5317         * src/SDCCval (val*): replaced signedness calculation by
5318         computeType()
5319         rearranged if-branches (cosmetic)
5320         (valShift): added warning W_SHIFT_CHANGED
5321         (valCompare): fixed problem with different types
5322         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5323         * support/regression/tests/literalop.c: added many cases
5324         * support/regression/tests/ast_constant_folding.c: changed finally to
5325         'unsigned int'
5326         * .version: new year, new version: 2.3.7
5327         * src/SDCCmain.c (main): applied patch #866468
5328         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5329         provided by Scott Bronson
5330         * doc/sdccman.lyx: updated documentation for sdcdb
5331         updated and added chapter tips
5332
5333 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5334
5335         * src/SDCCsymt.h: missing from yesterday's commits
5336
5337 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5338
5339         * src/SDCC.y (struct_or_union_specifier),
5340         * support/Util/SDCCerr.c,
5341         * support/Util/SDCCerr.h: verify that struct & union tags are used
5342         as declared.
5343
5344 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5345
5346         * src/SDCCglobl.h: missing from yesterday's commits
5347
5348 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5351         sft_attributes, struct_declaration, parameter_declaration,
5352         type_name, start_block, declaration_list),
5353         * src/SDCC.lex (check_type): support redefinition of typedef names
5354
5355 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5356
5357         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5358         aligned xdata arrays. Erik helped me with the if clause.
5359
5360 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5361
5362         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5363         warning
5364
5365 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5366
5367         * src/SDCCast.h,
5368         * src/SDCCast.c (newAst_),
5369         * src/SDCCicode.h,
5370         * src/SDCCicode.c (ast2iCode, newiCode),
5371         * src/SDCCglobl.h,
5372         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5373         expr, statement, expression_statement, selection_statement,
5374         iteration_statement, expr_opt, jump_statement): foundation for tracking
5375         sequence points
5376         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5377         point code too)
5378
5379 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5380
5381         * support/Util/SDCCerr.c,
5382         * src/SDCCast.h,
5383         * src/SDCCast.c (createCase, createDefault, decorateType),
5384         * src/SDCClabel.c (labelUnreach),
5385         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5386         to error messages.
5387         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5388         (with thanks to Stas Sergeev)
5389         * device/include/time.h,
5390         * device/lib/time.c (CheckTime): suppress unreachable code warning
5391
5392 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5393
5394         * src/SDCCast.c (createIvalCharPtr),
5395         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5396         bug #753752)
5397         * support/regression/tests/nullstring.c: tests for these two bugs
5398
5399 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5400
5401         * support/Util/SDCCerr.h,
5402         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5403         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5404         about storage class and 'at' used inside struct or union
5405         * src/SDCCBBlock.c (iCodeFromeBBlock),
5406         * src/SDCCcse.c (ifxOptimize),
5407         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5408         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5409         printIval, emitStaticSeg, emitOverlay),
5410         * src/SDCClabel.c (deleteIfx),
5411         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5412         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5413         gatherAutoInit, processParms),
5414         * support/Util/SDCCerr.h,
5415         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5416         reporting for post-parse errors.
5417
5418 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5419
5420         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5421         implicit casts via union; they don't work on big endian systems
5422         (possible fix for bug #861138)
5423
5424 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5425
5426         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5427         * src/mcs51/main.c: fixed the fix for bug #737001
5428
5429 2003-12-15  Borut Razem <borut.razem AT siol.net>
5430
5431         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5432
5433 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5434
5435         * support/makebin/makebin.c: put output in binary mode
5436
5437 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5438
5439         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5440         xdata and data memory on startup. Set the environment variable
5441         SDCC_NOGENRAMCLEAR to disable this.
5442         * src/mcs51/peephole.def,
5443         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5444         (allows non-interrupt and interrupt code to safely compete for a resource
5445         without the non-interrupt code having to disable interrupts)
5446
5447 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5448
5449         * src/SDCCicode.c (geniCodeAdd),
5450         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5451         with valFromType if type might be a pointer and host is big endian).
5452         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5453         types, not just integer types.
5454         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5455         multiply defined with mismatching "at" address.
5456
5457 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5458
5459         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5460         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5461         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5462         with embedded nulls (fixed bug #753752)
5463
5464 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5465
5466         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5467         Apparently this did not see much testing (endless loop)
5468
5469 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5470
5471         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5472
5473 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5474
5475         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5476         gracefully handle NULL memmap pointers
5477
5478 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5479
5480         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5481         instead of deleting the iCode when an operand is volatile
5482         * src/z80/gen.c (genDummyRead),
5483         * src/mcs51/gen.c (genDummyRead),
5484         * src/ds390/gen.c (genDummyRead),
5485         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5486         not just IC_RIGHT
5487         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5488         * src/SDCC.y: fixed bug #850420
5489
5490 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5491
5492         Applied z80 i/o port patch from Peter Townson and fixed some operators
5493         to better handle operands in A register.
5494         * device/include/z180.h
5495         * src/SDCC.y
5496         * src/SDCCglue.c
5497         * src/z80/gen.c
5498         * src/z80/gen.h
5499         * src/z80/main.c
5500         * src/z80/peeph-z80.def
5501         * src/z80/peeph.def
5502         * src/z80/z80.h
5503
5504 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5505
5506         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5507
5508 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5509
5510         * device/lib/hc08/_mullong.c: Removed extra #endif
5511
5512 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5513
5514         * sim/ucsim/hc08.src/inst.cc,
5515         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5516         carries from x to h
5517         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5518         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5519         * device/include/stdarg.h: fixed varargs for hc08
5520         * device/lib/Makefile.in,
5521         * device/lib/hc08/Makefile,
5522         * device/lib/hc08/_mulint.c,
5523         * device/lib/hc08/_mullong.c: fixed some endian problems
5524
5525 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5526
5527         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5528         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5529         * device/lib/_gptrget.c,
5530         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5531
5532 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5533
5534         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5535         * src/SDCCast.c (astErrors): fixed bug #846007
5536         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5537
5538 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5539
5540         * src/SDCCast.c (decorateType): disabled a transformation I added in
5541         revision 1.188 (access to fields of a structure at an absolute address);
5542         it breaks with bitfields, extern declarations, and gcse analysis.
5543         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5544         could be assigned through a pointer, so don't complain.
5545         * src/SDCCast.c (astErrors),
5546         * src/SDCCast.h,
5547         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5548
5549 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5550
5551         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5552         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5553         output of __config directives, since gpasm now supports them
5554         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5555         pre-processor macro, i.e. -DMCU=p18f452
5556         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5557         and modified to handle 'cast' icode similarly to '=' icode
5558         * src/pic16/device.h (typedef struct PIC_device): added field
5559         'extMIface' to indicate that chip has external memory interface
5560         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5561         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5562         18F8720
5563
5564 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5565
5566         * src/SDCC.y (pointer): fixed bug #846006
5567         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5568         * src/SDCCast.c (decorateType): fixed bug #846009
5569         * src/ds390/peeph.def,
5570         * src/ds390/gen.c (genAnd, genOr),
5571         * src/mcs51/peeph.def,
5572         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5573
5574 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5575
5576         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5577         * src/SDCCdflow.c
5578         * src/SDCCcse.c
5579         * src/SDCCcse.h
5580         * src/SDCCBBlock.h
5581         * src/SDCCBBlock.c
5582
5583 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5584
5585         fixed bug #845089
5586         * src/SDCCbitv.h,
5587         * src/SDCCbitv.c: added function to free a bitvector
5588         * src/SDCClrange.h,
5589         * src/SDCClrange.c: added function to recompute the liveranges
5590         * src/avr/ralloc.c,
5591         * src/ds390/ralloc.c,
5592         * src/hc08/ralloc.c,
5593         * src/mcs51/ralloc.c,
5594         * src/pic/ralloc.c,
5595         * src/pic16/ralloc.c,
5596         * src/xa51/ralloc.c,
5597         * src/z80/ralloc.c: recompute the liveranges after register packing
5598
5599 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5600
5601         * src/SDCCloop.c (newInduction): fixed bug #845630
5602
5603 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5604
5605         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5606         inadvertantly left behind from my 2003-11-12 change
5607
5608 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5609
5610         Updated headers I neglected to commit yesterday.
5611         * src/SDCClrange.h,
5612         * src/SDCCicode.h
5613
5614 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5615
5616         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5617         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5618         * src/SDCCopt.c (eBBlockFromiCode),
5619         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5620         the creation of the key hash table from the sequencing so it can be used
5621         earlier (for some GCSE bug fixes still pending)
5622
5623 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5624
5625         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5626         * support/regression/tests/addsub.c: testing genPlus shortcut
5627
5628 2003-11-15  Borut Razem <borut.razem AT siol.net>
5629
5630         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5631
5632 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5633
5634         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5635         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5636         ordering is immaterial.
5637         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5638
5639 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5640
5641         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5642         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5643         (SIGSEV) of bug #840381
5644         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5645         unlink new file before rename if new and old filenames are the same)
5646
5647 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5648
5649         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5650         uninitialized variables) for the mcs51. Set environment variable
5651         SDCC_GENRAMCLEAR to test.
5652         xdata initialization slightly shorter
5653
5654 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5655
5656         * src/SDCCsymt.h,
5657         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5658         #838241 & 780691 (basicly the same bug)
5659         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5660         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5661
5662 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5663
5664         * src/SDCCmain.c (linkEdit): "fix" #834252
5665
5666 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5667
5668         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5669         * src/SDCCast.h,
5670         * src/SDCC.y: fixed bug #819403
5671
5672 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5673
5674         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5675         the reentrant attribute.
5676         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5677         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5678         simulation
5679         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5680         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5681         erroneously reduced to a literal.
5682         * src/hc08/ralloc.c (packRegisters, rematStr),
5683         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5684         some cases
5685
5686 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5687
5688         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5689         * doc/sdccman.lyx: changed from 'article' to 'book'
5690         * doc/Makefile: readded test_suite_spec and cdbfileformat
5691
5692 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5693
5694         * device/include/stdlib.h: include malloc.h to comply with ANSI
5695         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5696
5697 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5698
5699         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5700         * doc/clean.mk: also remove *.out files
5701         * doc/sdccman.lyx: some additions, larger top/bottom margins
5702
5703 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5704
5705         * src/SDCC.y: fixed bug #837365
5706         * support/regression/tests/bitopcse.c
5707         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5708         a symbol (might be valop instead)
5709         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5710         * device/lib/clean.mk: added hc08 to the cleaning list
5711
5712 2003-11-04  Borut Razem <borut.razem AT siol.net>
5713
5714         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5715           made 2003-11-04
5716         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5717           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5718           malloc is declared in standard stdlib.h
5719
5720 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5721
5722         * device/lib/hc08/Makefile: need to clean .rel not .o files
5723         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5724
5725 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5726
5727         * src/port.h,
5728         * src/hc08/main.c,
5729         * src/mcs51/main.c,
5730         * src/ds390/main.c,
5731         * src/z80/main.c,
5732         * src/avr/main.c,
5733         * src/pic/main.c,
5734         * src/pic16/main.c,
5735         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5736         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5737         tests (which uses the port's oclsExpense function)
5738         * src/SDCC.y,
5739         * src/SDCCast.c,
5740         * src/SDCCicode.c,
5741         * src/hc08/gen.c,
5742         * src/ds390/gen.c,
5743         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5744
5745 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5746
5747         * src/SDCCcse.c (ifxOptimize),
5748         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5749         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5750         deleting the IFX iCode.
5751         * src/hc08/ralloc.c: reduced unneeded slocs
5752         * src/hc08/gen.c: fixed bug in asmopToBoolean
5753
5754 2003-11-04  Borut Razem <borut.razem AT siol.net>
5755
5756         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5757           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5758           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5759           transferred to configure
5760
5761 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5762
5763         Use headers defined in the C[++] standards:
5764         * sim/ucsim/gui.src/serio.src/fileio.cc
5765         * sim/ucsim/gui.src/serio.src/frontend.cc
5766         * sim/ucsim/gui.src/serio.src/main.cc
5767         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5768         * support/Util/NewAlloc.c
5769         * as/hc08/lklibr.c
5770         * as/mcs51/lklibr.c
5771         * as/z80/aslist.c
5772         * as/z80/assym.c
5773
5774 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5775
5776         * Added MSVC projects for hc08 assembler and linker:
5777         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5778         /as/hc08/link_hc08.dsp
5779
5780 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5781
5782         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5783
5784 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5785
5786         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5787
5788 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5789
5790         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5791
5792 2003-10-31  Borut Razem <borut.razem AT siol.net>
5793
5794         * support/cpp2/cpplib.h,
5795           support/cpp2/cpplib.c,
5796           support/cpp2/cpplex.c,
5797           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5798           to switch _asm block preprocessing on / off. Default is
5799           #pragma preproc_asm +
5800
5801 2003-10-31  Borut Razem <borut.razem AT siol.net>
5802
5803         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5804           when outputting comment blocks (when executed with -C option) and
5805           _asm (SDCPP specific) blocks
5806
5807 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5808
5809         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5810
5811 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5812
5813         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5814
5815 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5816
5817         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5818         * src/SDCCast.c (decorateType): fixed bug #832664
5819
5820 2003-10-31  Borut Razem <borut.razem AT siol.net>
5821
5822         * support\cpp2\cpplex.c: fixed for SDCPP:
5823           comments(when executed with -C option) and _asm blocks
5824           were included even if they where in skipped #if block.
5825           Applied solution from GCC cpp 3.3.2
5826
5827 2003-10-31  Borut Razem <borut.razem AT siol.net>
5828
5829         * src/SDCC.lex: sdcc now understands both formats:
5830           '# <line_number> <file_name>' and
5831           '#line <line_number> <file_name>'
5832         * support/cpp2/cppmain.c: sdcpp now generates the standard
5833           '# <line_number> <file_name>' instead of former
5834           '#line <line_number> <file_name>'
5835
5836 2003-10-30  Borut Razem <borut.razem AT siol.net>
5837
5838         * support/cpp2/cpphash.h,
5839         * support/cpp2/cpplib.h
5840         * support/cpp2/cpplex.c,
5841         * support/cpp2/cppmain.c,
5842         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5843
5844 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5845
5846         Fixed a number of problems revealed by bug #827883.
5847         * src/SDCCloop.c (loopInvariants): Spill location of the
5848         result operand should be recomputed if extracted from
5849         a loop. Also, don't extract assignments of an iTemp
5850         from a literal.
5851         * src/SDCCast.c (isConformingBody): loop reversal should
5852         not occur if the control variable is involved with a
5853         relational operator.
5854
5855 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
5856
5857         * .version: bumped to 2.3.6 to reflect the big improvements
5858         made by Erik and Klaus. Thanks!
5859
5860 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
5861
5862         Replaced the livrange code.
5863         * src/SDCClrange.c: added new LR code
5864         * src/SDCCloop.c,
5865         * src/SDCCBBlock.h: removed remainig parts from old LR code
5866         * src/ds390/ralloc.c,
5867         * src/ds390/gen.c: minor fixes to make it work with new code
5868
5869 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5870
5871         * as/hc08/asm.h,
5872         * as/hc08/lkrloc.c,
5873         * src/hc08/gen.c,
5874         * src/hc08/ralloc.c: Fix various warnings related to the hc08
5875         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
5876         (tweaked fix for bug #818696)
5877
5878 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5879
5880         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
5881
5882 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5883
5884         * src/SDCCmain.c,
5885         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
5886         * src/mcs51/gen.c (gencjneshort),
5887         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
5888         more efficient (per Scott Bronson's suggestion)
5889
5890 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5891
5892         Extended the semantics of the critical keyword to include
5893         individual statements. See RFE #827755 and #799831
5894         * src/SDCC.y
5895         * src/SDCCicode.c
5896         * src/SDCCopt.c
5897         * src/SDCCast.c
5898         * support/Util/SDCCerr.c
5899         * support/Util/SDCCerr.h
5900         * src/mcs51/gen.c
5901         * src/ds390/gen.c
5902         * src/hc08/gen.c
5903
5904 2003-10-19  Borut Razem <borut.razem AT siol.net>
5905
5906         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
5907
5908 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5909
5910         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
5911         Fixed bug #818696
5912         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
5913         and predecrement operand is displayed
5914
5915 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5916
5917         * src/SDCCval.c (valMinus): fixed bug #826041
5918
5919 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5920
5921         Some hc08 related updates that I missed earlier
5922         * sim/ucsim/stypes.h
5923         * support/regression/ports/hc08/spec.mk
5924
5925 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5926
5927         New target "hc08" for the Motorola 68hc08 family of micros
5928
5929         * configure
5930         * configure.in
5931         * Makefile
5932         * src/hc08/*
5933         * src/SDCCmain.c
5934         * src/port.h
5935         * sim/ucsim/hc08.src/*
5936         * sim/ucsim/configure.in
5937         * src/ucsim/configure
5938         * sim/ucsim/packages_in.mk
5939         * as/hc08/*
5940         * as/Makefile
5941         * device/include/mc68hc908qy.h
5942         * device/lib/hc08/*
5943         * device/lib/Makefile.in
5944         * support/regression/ports/hc08/*
5945         * support/regression/Makefile
5946
5947 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5948
5949         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
5950         regression test
5951         * src/ds390/gen.c (genCast): fixed bug #821957
5952
5953 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5954
5955         * device/lib/logf.c: "fixed" overlay bug
5956         * support/regression/ports/host/spec.mk: added m library
5957         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
5958         * support/regression/tests/float_trans: added (for Eric)
5959
5960 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
5961
5962         * src/mcs51/gen.c (genCpl): fixed bug
5963         http://sf.net/mailarchive/message.php?msg_id=6263915
5964
5965 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
5966
5967         * src/SDCCast.c (decorateType): added extended constant folding
5968         * src/SDCCsymt.c (computeType): cleanup
5969         * src/SDCCval.c (valShift): minor optimization
5970         * support/regression/tests/ast_constant_folding.c: added
5971
5972 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5973
5974         * src/SDCCmain.c: removed some unintended changes
5975
5976 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5977
5978         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
5979         * src/z80/gen.c: fixed part of bug #817589
5980         * src/SDCCsymt.c (checkFunction): fixed bug #817895
5981
5982 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
5983
5984         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
5985         * src/SDCCcflow.c
5986         * src/SDCCcse.c
5987         * src/SDCCdflow.c
5988         * src/SDCClabel.c
5989         * src/SDCClrange.c
5990         * src/SDCCmem.c
5991         * src/SDCCopt.c
5992         * src/SDCCpeeph.c
5993         * src/SDCCset.c
5994         * src/avr/ralloc.c
5995         * src/ds390/ralloc.c
5996         * src/izt/ralloc.c
5997         * src/mcs51/ralloc.c
5998         * src/pic/ralloc.c
5999         * src/pic16/ralloc.c
6000         * src/xa51/ralloc.c
6001         * src/z80/ralloc.c
6002         * src/z80/gen.c: removed unused label "release:"
6003
6004 2003-10-06  Borut Razem <borut.razem AT siol.net>
6005
6006         * src/SDCC.lex: removed definition of unused variables
6007           save_optimize and save_options
6008
6009 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6010
6011         * clean.mk: removed '=' in "-maxdepth=1"
6012         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6013         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6014
6015 2003-10-06  Borut Razem <borut.razem AT siol.net>
6016
6017         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6018           my_unput() replaced by unput()
6019
6020 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6021
6022         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6023         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6024         type-punned pointer will break strict-aliasing rules"
6025         Old LR behaviour is again default; Klaus' LR can be choosen by
6026         defining the environment variable LRKLAUS
6027         * src/SDCCBBlock.h
6028         * src/SDCCloop.c
6029         * src/SDCClrange.c
6030         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6031         * clean.mk: fixed removal of files in bin/CVS/
6032         * device/lib/clean.mk: fixed removal of directories small and large
6033         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6034         * src/SDCCicode.c,
6035         * src/SDCCval.c: removed superflous test for pedantic
6036
6037 2003-10-05  Borut Razem <borut.razem AT siol.net>
6038
6039         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6040           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6041           message "unmatched #pragma SAVE and #pragma RESTORE"
6042
6043 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6044
6045         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6046           assembly, critical functions, atomic, nojtbound)
6047
6048 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6049
6050         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6051         * src/SDCCBBlock.h
6052         * src/SDCCloop.c
6053         * src/SDCCloop.h
6054         * src/SDCClrange.c
6055
6056 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6057
6058         * src/z80/gen.h,
6059         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6060         * src/mcs51/gen.h
6061         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6062         * src/ds390/gen.h
6063         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6064         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6065         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6066
6067 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6068
6069         * src/z80/gen.c (genRet): fixed bug #524753
6070         * src/z80/gen.c (genCast): fixed internal error on cast from
6071         pointer to long
6072         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6073         fix for bug #477835 to the z80
6074         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6075         for tracking iCodes in the peephole optimizer for z80
6076
6077 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6078
6079         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6080         the other part of bug #814548
6081         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6082
6083 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6084
6085         * src/SDCCcse.c: fixed part of bug #814548
6086
6087 2003-09-28  Borut Razem <borut.razem AT siol.net>
6088
6089         * src/asm.c: rewrite of printILine() to use temporary file instead
6090           a pipe
6091         * src/xa51/main.c: commented out declaration of int rewinds
6092
6093 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6094
6095         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6096
6097 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6098
6099         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6100         * src/asm.c (printILine): Fixed bug #811015
6101
6102 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6103
6104         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6105         freeing.
6106
6107 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6108
6109         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6110         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6111         to correctly handle general case of AOP_PAIRPTR
6112         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6113
6114 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6115
6116         * src/mcs51/ralloc.c (fillGaps),
6117         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6118         register positioning bug)
6119
6120 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6121
6122         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6123
6124 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6125
6126         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6127         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6128         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6129         (ralloc doesn't intentionally do this now, but perhaps later)
6130         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6131         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6132         register positioning bugs (Fixed bug #762602 and #795325)
6133         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6134         (Fixed bug #808779)
6135         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6136         lines that --i-code-in-asm generates
6137
6138 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6139
6140         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6141         trying to fclose a FILE* that was already closed.
6142
6143 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6144
6145         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6146         of const struct should be treated as if const themselves)
6147
6148 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6149
6150         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6151
6152 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6153
6154         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6155         Unix (/n) and DOS (/r/n) line terminations.
6156
6157 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6158
6159         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6160         bug #613775
6161
6162 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6163
6164         * src/mcs51/gen.c (genFunction, genEndFunction),
6165         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6166         and restore of EA so that stack offsets to parameters are
6167         correct when using both critical and reentrant/stack-auto.
6168         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6169         size (can be triggered in error if sloc is shared between
6170         different sized objects)
6171         * device/include/float.h: fixed macros to explicitly use
6172         unsigned long where needed
6173
6174 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6175
6176         Feature req. 799831: added code to allow nesting of critical functions
6177         * src/mcs51/gen.c (genFunction, genEndFunction)
6178         * src/ds390/gen.c (genFunction, genEndFunction)
6179
6180 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6181
6182         * src/SDCCsymt.c (sclsFromPtr),
6183         * src/SDCCsymt.h,
6184         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6185         support for standard C idiom of memory mapped variables; for
6186         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6187         to xdata int at 0x1234 tempvar = 1.
6188         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6189         provided by Akiya ISHIDA
6190
6191 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6192
6193         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6194         * src/SDCCval.c (constVal): added reduction from int to char
6195         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6196         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6197         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6198         to ignore the sign
6199         * support/regression/tests/shifts.c: fixed
6200
6201 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6202
6203         * src/z80/gen.c (genXor): Fixed bug #805445
6204
6205 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6206
6207         Fixed bug #621531 (const & volatile confusion in the type chain).
6208         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6209         refer to the const or volatile state of the pointer itself.
6210
6211         * src/SDCCast.c
6212         * src/SDCCglue.c
6213         * src/SDCCicode.c
6214         * src/SDCCsymt.c
6215         * src/SDCCval.c
6216         * src/SDCC.y
6217         * src/SDCCsymt.h
6218         * src/pic/gen.c
6219         * src/pic/ralloc.c
6220         * src/pic16/gen.c
6221         * src/pic16/ralloc.c
6222         * support/regression/tests/const.c
6223
6224 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6225
6226         When checking for duplicated modules, use absolute paths
6227         instead of relative paths.  Files changed:
6228
6229         * as/mcs51/lklib.c
6230         * link/z80/lklib.c
6231
6232 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6233
6234         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6235
6236 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6237
6238         * device/include/string.h: added size_t typedef, changed
6239         prototypes to use size_t, eliminated separate reentrant and
6240         non-reentrant declarations, added _memmove declaration
6241         * device/lib/_memcpy.c: changed to use size_t instead of int,
6242         changed /4 to >>2 to avoid division library call
6243         * device/lib/_memcmp.c,
6244         * device/lib/_memset.c,
6245         * device/lib/_strncat.c,
6246         * device/lib/_strncpy.c,
6247         * device/lib/_strncmp.c: changed to use size_t instead of int
6248         * device/lib/_memmove.c: new file (fixed bug #772294)
6249         * device/lib/Makefile.in: added _memmove.c
6250         * device/lib/z80/asm_strings.s: fixed bug #772290
6251         * support/regression/tests/bitfields.c: attempt to fix host assertion
6252         failure on amd64-unknown-linux2.2
6253
6254 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6255
6256         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6257         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6258         * as/z80/asmain.c (main): fixed bug #801766
6259
6260 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6261
6262         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6263         compilers
6264
6265 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6266
6267         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6268         reported in bug #800609
6269
6270 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6271
6272         * Top header beautifications in src/pic16 directory:
6273           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6274           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6275           pcoderegs.h, ralloc.c, ralloc.h
6276         * main.c: added top header and GPL license notice
6277         * pcode.c: fixed the if-conditional warning
6278
6279 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6280
6281         * device/lib/_mullong.c: replaced int by short for gcc
6282
6283 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6284
6285         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6286         and JUMPTABLE iCodes properly now (worked by accident before)
6287         * src/mcs51/gen.c (leftRightUseAcc),
6288         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6289         iCode properly now. Use getSize instead of nRegs since a & b
6290         aren't part of the nRegs tally.
6291
6292 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6293
6294         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6295         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6296           before instructions that use the _STATUS register
6297
6298 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6299
6300         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6301         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6302         fetching of the pointer
6303         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6304         copied from genNearPointerSet()
6305         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6306         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6307         If they pop r0/r1 they must be called in the opposite order than aopOp().
6308         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6309         (resp. --stack-auto), prepared for --xstack
6310
6311 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6312
6313         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6314
6315 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6316
6317         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6318         these ports have their own __sdcc_external_start()
6319
6320 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6321
6322         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6323         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6324         type for bits was changed. It resulted in bit variables becoming
6325         global, which is not permitted in PIC 14 assembly output.
6326
6327 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6328
6329         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6330
6331 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6332
6333         Z80 and MCS51 linkers complaint if a public symbol is defined
6334         in more than one library module:
6335
6336         * as/mcs51/lklib.c
6337         * link/z80/lklib.c
6338         * as/mcs51/Makefile.in
6339
6340 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6341
6342         A few small changes that speed up the peephole optimizer.
6343
6344         * src/SDCCpeeph.c
6345
6346 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6347
6348         Try to make the peephole optimizer smarter by maintaining
6349         an association between the assembly source code and the
6350         iCodes that originated them. Put this information to use
6351         with a new peephole rule condition "notVolatile" so that
6352         the rules can be aggressive yet still safe.
6353
6354         * src/SDCCpeeph.c
6355         * src/SDCCpeeph.h
6356         * src/mcs51/gen.c
6357         * src/mcs51/peeph.def
6358
6359 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6360
6361         Fixed bug #741761
6362
6363         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6364         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6365         if the left or right operand symbols have the accuse flag set.
6366
6367 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6368
6369         Changed the type of the result of the ! (NOT) operator to char;
6370         previously it returned the same type as the source. This allows
6371         us to eliminate all the genFloatNot functions (all of its target
6372         implementations were very buggy) since !float can use the same
6373         code as !long now.
6374
6375         * src/SDCCicode.c (ast2iCode): ! returns char
6376         * src/mcs51/gen.c (genNot, genNotFloat),
6377         * src/ds390/gen.c (genNot, genNotFloat),
6378         * src/z80/gen.c (genNot, genNotFloat),
6379         * src/pic/gen.c (genNot, genNotFloat),
6380         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6381
6382 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6383
6384         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6385         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6386            during interrupts. Ensure WSAVE is located at a shared bank address.
6387         2. Fixed page selection in some places
6388         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6389            the registers name strings.
6390         4. Fixed "signed / unsigned compare" compiler warnings.
6391         5. The PIC port manages its own allocation of the general purpose
6392            registers, but makes no attempt to reuse them. As a result when
6393            compiling it soon runs out of general purpose registers. Some
6394            additional code was added to the files pcode.c and device.c to walk
6395            through the function call tree and rename the registers so that they
6396            get reused.
6397
6398         * src/pic/device.c
6399         * src/pic/gen.c
6400         * src/pic/glue.c
6401         * src/pic/pcode.c
6402         * src/pic/pcode.h
6403         * src/pic/ralloc.c
6404         * src/pic/ralloc.h
6405         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6406         genPlus() & genMinus() when the result is the same as left or right
6407
6408 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6409
6410         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6411
6412 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6413
6414         Made bitfield a distinct type from bit so that bitfields
6415         convert as per ANSI C and bits retain their traditional
6416         boolean style behaviour. Implemented bitfield support in
6417         the z80 port.
6418
6419         * src/SDCCsymt.h,
6420         * src/SDCCsymt.c,
6421         * src/SDCCast.c,
6422         * src/cdbFile.c,
6423         * src/mcs51/gen.c,
6424         * src/ds390/gen.c: bit v bitfield split
6425         * src/z80/gen.c: New support for bitfields
6426         * support/regression/tests/bitfields.c: reenabled z80,
6427         added more tests
6428
6429 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6430
6431         Rules 246.x, 247.x relate to bitfields, the others speed up
6432         access to xdata mapped I/O devices.
6433
6434         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6435
6436 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6437
6438         Cleaned up genPackBits and genUnpackBits and added two helper
6439         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6440         for literal assignments in genPackBits (thanks to Frieder for
6441         reminding me).
6442
6443         * src/mcs51/gen.c
6444         * src/ds390/gen.c
6445
6446 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6447
6448         Fixed bug #748310 (pointer to function type mishandled when the
6449         function name is omitted). Also fixed a SIGSEGV when a function
6450         attribute (reentrant, etc) is used on a non-function or on a
6451         function but misplaced before the parameter list.
6452
6453         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6454         bug #748310
6455         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6456         * support/Util/SDCCerr.h,
6457         * support/Util/SDCCerr.c: Added func attr misuse error msg
6458
6459 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6460
6461         Fixed bug #787649 by anonymous
6462         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6463         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6464
6465 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6466
6467         Fixed numerous bitfield problems.
6468
6469         * src/SDCC.y: More bitfield related error checking
6470         * src/SDCCsymt.h,
6471         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6472         * support/Util/SDCCerr.h,
6473         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6474         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6475         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6476         * support/regression/tests/bitfields.c: tests added
6477
6478 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6479
6480         Made the constant following the "interrupt" keyword optional. If
6481         omitted, the function will not automatically be given an entry
6482         in the interrupt vector table (similar to #pragma NOIV, but
6483         less syntacticly kludgy). The interrupt number is also now
6484         range checked. Also fixed a bug in the high order bit example
6485         in the manual.
6486
6487         * src/SDCC.y
6488         * src/SDCCmem.c
6489         * src/SDCCglue.c
6490         * src/SDCCsymt.h
6491         * support/Util/SDCCerr.c
6492         * support/Util/SDCCerr.h
6493         * doc/sdccman.lyx
6494
6495 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6496
6497         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6498         * src/SDCCicode.c (operandOperation): rewritten some ops
6499         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6500         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6501         other type
6502         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6503         be re-activated by defining REDUCE_LITERALS)
6504         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6505         unsigned, but are signed by default
6506         * src/SDCCval.c (constVal): rearranged
6507         * src/SDCCval.c (valMod): preliminary fix
6508         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6509         * support/regression/literalop.c: added, work in progress
6510
6511 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6512
6513         Generate warnings for useless declarations like "char data;"
6514         that don't do what new users expect.
6515
6516         * src/SDCC.y
6517         * support/Util/SDCCerr.h
6518         * support/Util/SDCCerr.c
6519
6520 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6521
6522         * src/SDCCval.c (valMult): fix overflow detection of negative int
6523
6524 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6525
6526         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6527
6528         Changes to support big endian targets:
6529
6530         * src/ports.h
6531         * src/SDCCglue.c
6532         * src/avr/main.c
6533         * src/ds390/main.c
6534         * src/izt/i186.c
6535         * src/mcs51/main.c
6536         * src/pic/main.c
6537         * src/pic16/main.c
6538         * src/xa51/main.c
6539         * src/z80/main.c
6540
6541 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6542
6543         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6544         * device/lib/time.c: fixed warning "integer overflow in expression"
6545
6546 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6547
6548         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6549         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6550         constants are unsigned; added recognition of "u" flag for unsigned
6551         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6552         * src/SDCCval.c (valDiv, valMod): fixed signdness
6553         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6554         signedness of modulo, left and right shift
6555         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6556         * support/Util/SDCCerr.h: added warning W_INT_OVL
6557         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6558         * src/SDCCast.c (ast_print): improved output of constants
6559
6560 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6561
6562         Fixed some warnings when building with MSVC:
6563
6564         * as\mcs51\asdata.c
6565         * as\z80\asdata.c
6566         * as\mcs51\asm.h
6567         * as\z80\asm.h
6568         * link\z80\aslink.h
6569         * link\z80\lkdata.c
6570         * link\z80\lkeval.c
6571         * link\z80\lkgb.c
6572         * link\z80\lkihx.c
6573         * link\z80\lks19.c
6574         * link\z80\lksym.c
6575         * support\cpp2\cpplib.c
6576         * src\ds390\gen.c
6577         * src\mcs51\gen.c
6578
6579 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6580
6581         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6582
6583 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6584
6585         * support\librarian\clean.mk: Do not remove Makefile.
6586         * support\librarian\Makefile: added.
6587
6588 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6589
6590         Added librarian to MSVC build:
6591         * all.dsp
6592         * sdcc.dsw
6593         * support\librarian\librarian.dsp
6594
6595         'configure' not needed for librarian, removed:
6596         * support\librarian\configure
6597         * support\librarian\configure.in
6598         * support\librarian\config_in.h
6599         * support\librarian\Makefile.in
6600
6601         Hopefully these ones built the librarian and the rest of sdcc properly:
6602         * Makefile
6603         * Makefile.common.in
6604
6605         Messed up 'configure', so revert to previous version:
6606         * configure
6607         * configure.in
6608
6609 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6610
6611         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6612         there, while the mantissa of a double is "only" 53 bits wide.
6613
6614 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6615
6616         Adding sdcclib to the build.  MSVC project coming soon.
6617         Files added/changed:
6618
6619         * support\librarian\clean.mk
6620         * support\librarian\configure
6621         * support\librarian\configure.in
6622         * support\librarian\config_in.h
6623         * support\librarian\Makefile.bcc
6624         * support\librarian\Makefile.in
6625         * support\librarian\sdcclib.c
6626         * Makefile.bcc
6627         * Makefile
6628         * Makefile.common.in
6629         * configure
6630         * configure.in
6631
6632 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6633
6634         Linker now complaints if linked modules have conflicting options, for
6635         example, one compiled using --model-large and another one compiled with
6636         --model-small.  The following files were modified:
6637
6638         * as\mcs51\asdata.c
6639         * as\mcs51\aslink.h
6640         * as\mcs51\asm.h
6641         * as\mcs51\asmain.c
6642         * as\mcs51\asout.c
6643         * as\mcs51\i51pst.c
6644         * as\mcs51\lkdata.c
6645         * as\mcs51\lklibr.c
6646         * as\mcs51\lkmain.c
6647         * as\z80\asdata.c
6648         * as\z80\asm.h
6649         * as\z80\asmain.c
6650         * as\z80\asout.c
6651         * as\z80\z80pst.c
6652         * link\z80\aslink.h
6653         * link\z80\lkdata.c
6654         * link\z80\lklibr.c
6655         * link\z80\lkmain.c
6656         * src\SDCCglue.c
6657
6658 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6659
6660         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6661         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6662
6663 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6664
6665         * src/z80/mappings.i: fix _mul[us][int,long] entries
6666
6667 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6668
6669         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6670
6671 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6672
6673         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6674         * support/regression/tests/bitopcse.c: added
6675         fixed warning:
6676         * src/avr/gen.c:
6677         * src/pic/gen.c:
6678         * src/pic16/gen.c:
6679         * src/z80/gen.c:
6680         * src/xa51/gen.c:
6681
6682 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6683
6684         added support for new library format to z80, gbz80 linkers:
6685         *link/z80/aslink.h
6686         *link/z80/lklex.c
6687         *link/z80/lklib.c
6688         *link/z80/lklist.c
6689
6690 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6691
6692         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6693         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6694
6695 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6696
6697         added DUMMY_READ_VOLATILE:
6698         * src/SDCC.y:
6699         * src/avr/gen.c:
6700         * src/xa51/gen.c:
6701         * src/z80/gen.c:
6702         * src/pic/gen.c:
6703         * src/pic16/gen.c:
6704         * src/mcs51/gen.c:
6705         * src/ds390/gen.c:
6706         * src/SDCCcse.c (algebraicOpts): many improvements
6707         * src/SDCCcse.h: removed algebraicOpts()
6708         * src/SDCCicode.c (picDummyRead): added
6709
6710 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6711
6712         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6713         "Insufficient space in data memory".
6714
6715 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6716
6717         * src/mcs51/gen.c: fixed bug #771358
6718         * src/z80/gen.c: fixed bug #759087
6719
6720 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6721
6722         * src/pic16/glue.c: minor cleanup by Vangelis
6723
6724 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6725
6726         * device/include/regc515c.h: fixed #758477
6727         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6728         * device/lib/_gptrput.c: saved a few bytes
6729         * my tab spacing is 8, yours too?)
6730         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6731         * device/lib/serial.c: process RX bytes earlier than TX bytes
6732         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6733
6734 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6735
6736         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6737
6738 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6739
6740     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6741
6742 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6743
6744         * device/lib/Makefile.in: bad fix, reverted to 1.43
6745
6746 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6747
6748         * device/lib/Makefile.in: added missing z80 object files
6749
6750 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6751
6752         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6753         pic16 progress by Vangelis:
6754         * src/SDCCglobl.h:
6755         * src/SDCCmain.c:
6756         * src/pic/Makefile:
6757         * src/pic:
6758         * pic/Makefile:
6759         * pic16/device.c:
6760         * pic16/device.h:
6761         * pic16/gen.c:
6762         * pic16/gen.h:
6763         * pic16/genarith.c:
6764         * pic16/glue.c:
6765         * pic16/main.c:
6766         * pic16/pcode.c:
6767         * pic16/pcode.h:
6768         * pic16/pcodepeep.c:
6769         * pic16/peeph.def:
6770
6771 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6772
6773     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6774
6775 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6776
6777     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6778     added gbz80 build to MSVC project.
6779     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6780     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6781     from 8051 stuff and setup so it links using a .lnk file.
6782
6783 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6784
6785     * support/librarian/sdcclib.c: sdcc librarian.
6786     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6787     with sdcclib.
6788
6789 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6790
6791     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6792
6793 2003-07-02  Borut Razem <borut.razem AT siol.net>
6794
6795         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6796         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6797         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6798         src/xa51/main.c, src/z80/main.c:
6799         virtualization of glue() function: each port has it's own glue function,
6800         which is accessed by do_glue function pointer in PORT.general structure
6801
6802 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6803
6804         * DS800C400 fun, improved ROM interface and tinibios.
6805
6806 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6807
6808         * More support for DS80C400. Now includes beginning of interface to ROM.
6809
6810 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6811
6812         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6813
6814 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6815
6816         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6817
6818 2003-06-19  Borut Razem <borut.razem AT siol.net>
6819
6820         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6821
6822 2003-06-19  Borut Razem <borut.razem AT siol.net>
6823
6824         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6825         fixed Z80 port - crt0.o: cannot open.
6826
6827 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6828
6829         * support/Util/MySystem.c (merge_command): revert bad fix
6830
6831 2003-06-18  Borut Razem <borut.razem AT siol.net>
6832
6833         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6834
6835 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6836
6837         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6838         option --use-stdout sends errors to stdout instead of stderr.
6839
6840 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6841
6842         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6843
6844 2003-06-15  Borut Razem <borut.razem AT siol.net>
6845
6846         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
6847         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
6848         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
6849         fixed width array of pointers replaced with sets;
6850         multiple include and lib paths ared transferred to preprocessor and linker
6851         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
6852         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
6853         fixed width array of pointers
6854         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
6855         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
6856         fixupPath(), getPathDifference()
6857         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
6858         fixed width array of pointers
6859
6860 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
6861
6862         * src/pic16/ralloc.c: fix warnings
6863         * src/pic16/pcode.c: fix warning
6864
6865 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
6866
6867          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
6868         know all the details, but essentially this set of changes enable
6869         the pic16 port to generate movff instructions and generate assembler
6870         directives,
6871         * src/SDCCmain.c:
6872         * src/pic16/gen.c:
6873         * src/pic16/glue.c:
6874         * src/pic16/pcode.c:
6875         * src/pic16/device.c:
6876         * src/pic16/main.c:
6877         * src/pic16/pcode.h:
6878         * src/pic16/pcoderegs.c:
6879         * src/pic16/ralloc.c:
6880         * src/pic16/ralloc.h:
6881
6882 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6883
6884         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6885         added option --vc, so sdcc errors and warnings are compatible with
6886         Microsoft Visual Studio.
6887
6888 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6889
6890         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
6891           device/lib/libfloat.lib: added atof function.
6892
6893 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
6894
6895         * doc/sdccman.lyx: updated to Lyx 1.3
6896         * doc/cdbfileformat.lyx: updated to Lyx 1.3
6897         * doc/test_suite_spec.lyx: updated to Lyx 1.3
6898         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
6899
6900 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
6901
6902         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
6903
6904 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6905
6906         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
6907           additions to the "related tools/documentation" section
6908
6909 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
6910
6911         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
6912
6913 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
6914
6915         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
6916         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
6917
6918 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
6919
6920         * doc/sdccman.lyx: fix double dash and other minor things
6921         * doc/Makefile: fix double dash
6922
6923 2003-05-28  Karl Bongers(patches from Martin Helmling)
6924         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
6925           condition and ignore commands.
6926
6927 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6928
6929         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
6930           is in parts still quite out of date, I did changes as far as I felt makes sense
6931           for a non-native english speaker.
6932           Please feel free to add to the manual or to correct my changes.
6933         * doc/Makefile: undid touching the date of intermediate tex files.
6934
6935 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6936
6937         * doc/sdccman.lyx: Manual has an index now
6938
6939 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
6940
6941         Finalize muluint/mulsint and mululong/mulslong merging:
6942         * device/lib/_mulint.c
6943         * device/lib/_mullong.c
6944         * device/lib/gbz80/mul.s
6945         * device/lib/gbz80/stubs.s
6946         * device/lib/z80/mul.s
6947         * device/lib/z80/stubs.s
6948         * src/SDCCsymt.c (initCSupport)
6949
6950 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6951
6952         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
6953         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
6954           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
6955           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
6956           instead of /Zm500.
6957
6958 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6959
6960         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
6961           the regression tests I'm not brave enough to enable 245.b, 245.c
6962         * doc/sdccman.lyx: added latex preamble for hyperref package.
6963           Using pdflatex this will give you a hyperlinked pdf file with
6964           bookmarks. (prepend '%' before /usepackage if this breaks something)
6965
6966 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6967
6968          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
6969
6970 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
6971
6972         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
6973
6974 2003-05-21    <johan AT balder>
6975
6976         * src/SDCCglue.c (printIval): fixed bug #739934
6977
6978 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
6979
6980         Applied patch from bug 737905 (renamed yylineo to mylineno):
6981         * src/altlex.c
6982         * src/SDCCast.c
6983         * src/SDCglobl.h
6984         * src/SDCC.lex
6985         * src/SDCCsymt.c
6986         * src/SDCCval.c
6987         * src/pic16/pcode.c: Cleaned warnings
6988         * src/pic16/pcodeflow.c: Cleaned warnings
6989         * src/pic16/pcoderegs.c: Cleaned warnings
6990
6991 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
6992
6993         * src/pic16/pcode.c: Cleaned warnings
6994         * src/pic16/pcodepeep.c: Cleaned warnings
6995         * src/pic16/ralloc.c: Cleaned warnings
6996
6997 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
6998
6999         * doc/sdccman.lyx: fixed bug 739745
7000         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7001
7002 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7003
7004         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7005         it can be defined with CFLAGS when running configure
7006         * src/SDCCmain.c: fixed compiling + linking with object files
7007
7008 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7009
7010         * configure.in: configure for pic16 port,
7011             added --disable-pic16-port
7012         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7013         * src/SDCCmain.c: linkOptions is changed to set *,
7014             added if/endif conditional macros to remove options help
7015             messages from optionsTable when a port is not configured, added
7016             support for the PIc16 port in the ports table, when executing
7017             the compiler with no port specified on command line, a default
7018             port is selected with the new macro DEFAULT_PORT which is
7019             defined in port.h, in setDefaultOptions() linkOptions is removed
7020             from initialization assignment, since now it is a set,
7021             parseCmdLine uses setParseWithComma for linkOptions, in
7022             linkEdit() linkOptions are accessed with new function indexSet()
7023             which returns the i'th item of a set variable. See SDCCset.c, in
7024             linkEdit() when calling buildCmdLine(), added linkOptions as
7025             last argument. Now users can pass arguments to gplink via the
7026             -Wl option, main() uses pic16glue() to glue up pic16 programs
7027         * src/SDCCpeeph.c: various changes to support pic16
7028         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7029             return the i'th item of the set
7030         * src/SDCCset.h: added function prototype for indexSet()
7031         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7032         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7033         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7034             added macro DEFAULT_PORT
7035         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7036         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7037             generated
7038         * src/pic16/glue.c: commented out some error producing lines
7039         * src/pic16/main.c: __config directives are commented out to stop
7040             gpasm complaining and test the linkage with gplink, _linkCmd and
7041             _asmCmd changed to be more gplink and gpasm friendly
7042         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7043             produced an error when parsed, peep rule 12 is added to utilize
7044             movff, but it is commented out since the pCode does not support
7045             yet a command with 2 address arguments
7046
7047 2003-05-18    <johan AT balder>
7048
7049         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7050         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7051 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7052
7053         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7054   Added feature to script commands from file.
7055
7056 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7057
7058         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7059         * src/SDCCutil.c: include ctype.h for win32
7060
7061 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7062
7063         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7064
7065 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7066
7067         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7068   Fixed so you can set breakpoints prior to run, run does not stop
7069   on entry now.  Add tbreak.  Other enhancements and fixes for use
7070   with ddd.
7071
7072 2003-05-12  Borut Razem <borut.razem AT siol.net>
7073
7074         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7075
7076 2003-05-11  Borut Razem <borut.razem AT siol.net>
7077
7078         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7079         the path of bin directory, so that PATH is the only env. variable, which has to be set
7080         in case of standard installation.
7081         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7082         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7083         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7084
7085 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7086
7087         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7088         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7089         temp files are in the port dir; clean the gen/test directory when
7090         generating new test.c
7091         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7092         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7093         * support/regression/tests/zeropad.c: added
7094
7095 2003-05-09    <johan AT balder>
7096
7097         * src/SDCCglue.c: fixed bug #597940
7098
7099 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7100
7101         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7102   cache sfr, optimize next,step, fix off by one sourceline,
7103   support ddd list function.
7104         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7105
7106 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7107
7108         * support/regression/HTMLgen.py: added compare_s2f()
7109         * support/regression/Makefile: redo 1.27
7110         * support/regression/generate-cases.py: redo 1.5
7111
7112 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7113
7114         * support/regression/tests/float.c: workaround 33 bit hex constant
7115         * support/regression/tests/simplefloat.c: fix division for host
7116
7117 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7118
7119         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7120         that tame's the PIC's over-aggressive optimizer.
7121
7122 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7123
7124          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7125          support for MSVC.
7126
7127 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7128
7129         Initial support for DS80C400. "Hello world" runs on TINIm400
7130         (with polled I/O).
7131
7132 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7133
7134          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7135          * Some notes on ddd usage added in debugger/README
7136          Martin Helmling adding more features and fixes for ddd GUI debugger.
7137          Code added for nexti, stepi, up, down, and other adjustments.
7138
7139 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7140
7141         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7142         * src/pic/peeph.def Added two rules to optimize carry manipulation
7143         * src/pic/* removed debug printfs
7144
7145 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7146
7147         * debugger/mcs51/cmd.c: added header newalloc.h
7148
7149 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7150
7151         * as/Makefile: new EXEEXT
7152         * as/z80/Makefile: remove trailing slash of BUILDIR
7153         * as/z80/clean.mk: new EXEEXT
7154         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7155         * support/cpp2/Makefile.in: new EXEEXT
7156         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7157
7158 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7159
7160         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7161         EXEEXT was introduced to fix all related problems with targets
7162         "clean", "install" and "uninstall"; a couple of further flaws
7163         especially with "clean" have been fixed too
7164         * as/mcs51/Makefile.in
7165         * as/mcs51/clean.mk
7166         * as/z80/Makefile
7167         * Makefile
7168         * clean.mk
7169         * debugger/mcs51/Makefile.in
7170         * debugger/mcs51/clean.mk
7171         * link/z80/Makefile
7172         * link/z80/Makefile.in
7173         * link/z80/clean.mk
7174         * link/Makefile
7175         * packihx/Makefile.in
7176         * packihx/clean.mk
7177         * sim/ucsim/Makefile
7178         * sim/ucsim/clean.mk
7179         * sim/ucsim/avr.src/Makefile.in
7180         * sim/ucsim/avr.src/clean.mk
7181         * sim/ucsim/s51.src/Makefile.in
7182         * sim/ucsim/s51.src/clean.mk
7183         * sim/ucsim/xa.src/Makefile.in
7184         * sim/ucsim/xa.src/clean.mk
7185         * sim/ucsim/z80.src/Makefile.in
7186         * sim/ucsim/z80.src/clean.mk
7187         * sim/ucsim/main_in.mk
7188         * sim/ucsim/packages_in.mk
7189         * sim/ucsim/gui.src/Makefile.in
7190         * sim/ucsim/gui.src/serio.src/Makefile.in
7191         * sim/ucsim/gui.src/serio.src/clean.mk
7192         * src/Makefile.in
7193         * src/clean.mk
7194         * support/cpp2/Makefile.in
7195         * support/cpp2/clean.mk
7196         * support/makebin/Makefile
7197         * support/makebin/clean.mk
7198         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7199         * doc/sdccman.lyx: --program-suffix no longer needed
7200
7201 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7202
7203          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7204          Martin Helmling added support for ddd GUI debugger.
7205          Code added to display assembly, set variables, and other commands
7206          to interface to ddd.
7207
7208 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7209
7210         * as/Makefile: fix target clean
7211         * as/clean.mk: fix target clean
7212         * as/z80/clean.mk: fix target clean
7213
7214 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7215
7216         * Makefile.common.in: added  AT EXEEXT AT
7217         * configure.in: removed all mingw32 stuff
7218         * configure: rebuilt from configure.in
7219         * doc/sdccman.lyx: updated section "installation"
7220         * support/scripts/sdcc_mingw32: adapted to configure
7221         * support/scripts/sdcc_cygwin_mingw32: added
7222
7223 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7224
7225         * src/pic Added object file support for the PIC port
7226         * src/pic Applied patch from Craig Franklin (this started the object file support)
7227         * src/regression Updated the PIC regression tests for object files
7228
7229 2003-04-20  Borut Razem <borut.razem AT siol.net>
7230
7231         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7232           lklex.c: In function `getfid':
7233           lklex.c:203: warning: array subscript has type `char'
7234         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7235           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7236         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7237           stack handling macros
7238
7239 2003-04-19  Borut Razem <borut.razem AT siol.net>
7240
7241         * "handling space characters in file path" task:
7242         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7243         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7244         * support/Util/MySystem.h: make it self-sufficient
7245         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7246           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7247           handling space characters in file path
7248         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7249           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7250         * support/Util/MySystem.c: handling space characters in executable's path
7251
7252 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7253
7254         * as/z80/Makefile: fix permanent rebuild of z80
7255         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7256         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7257
7258 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7259
7260         * src/SDCCopt.c: add special case optimization to replace modulo by
7261           a power of two with a bitwise AND.
7262
7263 2003-04-18    <johan AT balder>
7264
7265         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7266
7267 2003-04-17    <johan AT balder>
7268
7269         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7270         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7271
7272 2003-04-13  Borut Razem <borut.razem AT siol.net>
7273
7274         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7275         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7276           fixed mingw problem in adl_NORMALIZE_PATH
7277
7278 2003-04-12  Borut Razem <borut.razem AT siol.net>
7279
7280         * fixed "#pragma SAVE/RESTORE can not be nested":
7281         * src/SDCC.lex: reworked pragma handling functions
7282         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7283         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7284
7285 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7286
7287         * src/SDCCutil.c (pathEquivalent): defined but not used
7288         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7289         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7290         * configure: rebuilt from configure.in
7291         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7292         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7293         * device/include/Makefile.in: replace sdcc_datadir
7294         * device/lib/Makefile.in: replace sdcc_datadir
7295         * Makefile.common.in: add LDFLAGS from configure
7296         * packihx/Makefile.in: use LDFLAGS
7297         * src/Makefile.in: use LDFLAGS
7298         * support/cpp2/Makefile.in: add LDFLAGS from configure
7299         * support/makebin/Makefile: use LDFLAGS
7300         * .version: bumped version number to 2.3.5
7301
7302 2003-04-12  Borut Razem <borut.razem AT siol.net>
7303
7304         * completed "different paths" task:
7305         * src/SDCCmacro.c: fixed bug in handling quotes
7306         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7307         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7308
7309 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7310
7311         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7312
7313 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7314
7315         * ds390/gen.c ds390/peeph.def: fix bug 706781
7316
7317 2003-04-11  Borut Razem <borut.razem AT siol.net>
7318
7319         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7320
7321 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7322
7323         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7324         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7325          set - this bit used to not be set...).
7326         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7327           bad code in PIC Port
7328         * src/regression/and2.c added to test bug 609268
7329         * src/regression/Makefile added and2.c to regression test
7330
7331
7332 2003-04-08    <johan AT CP255758-A>
7333
7334         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7335         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7336         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7337
7338 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7339
7340         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7341         fix bug #487815
7342         * support/cpp2/Makefile.in: fix bug #487815
7343         * configure: rebuilt from configure.in
7344         * Makefile.common.in: docdir changed, new path suffixes
7345         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7346         * sdcc_vc_in.h: reflect changes from sdccconf.h
7347         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7348         * src/SDCCutil.h: remove BINDIR hack
7349         * doc/sdccman.lyx: update new path hierarchy
7350
7351 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7352
7353         * src/SDCCpeeph.c: added okToRemoveSLOC test
7354
7355 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7356
7357         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7358
7359 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7360
7361         * src/SDCCpeeph.c: added labelIsReturnOnly test
7362         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7363
7364 2003-04-05    <johan AT balder>
7365
7366         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7367         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7368         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7369         * src/SDCCast.c: fixed a warning
7370         * src/SDCCast.h: fixed a warning
7371         * src/SDCCicode.c (operandFromAst): fixed a warning
7372
7373 2003-04-04    <johan AT balder>
7374
7375         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7376         * src/SDCCast.c (decorateType): fixed bug #715076
7377         * src/SDCC.y: fixed bug #702907
7378
7379 2003-04-03    <johan AT balder>
7380
7381         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7382         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7383         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7384         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7385         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7386
7387 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7388
7389         * _decdptr.c: fix return values
7390         * _gptrget.c: fix return values
7391         * _gptrgetc.c: fix return values
7392         * _gptrput.c: fix return values
7393         * _mulint.c: fix return values
7394         * as/z80/Makefile: fix 'make -j' problem
7395
7396 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7397
7398         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7399         * configure.in: big cleanup, updated to autoconf 2.5x
7400         * configure: rebuilt from configure.in
7401         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7402         * sdcc_vc_in.h: reflect changes from sdccconf.h
7403         * doc/Makefile: fixed a flaw in "make install"
7404
7405 2003-04-02    <johan AT balder>
7406
7407         * src/ds390/gen.c (genCmp): no comments
7408         * src/mcs51/gen.c (genCmp): no comments
7409         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7410         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7411
7412 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7413
7414         * support/regression/generate-cases.py: place generated file in given sub directory
7415         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7416         * support/regression/Makefile: improvements for 'make -j';
7417         side effect: it's simpler and faster now
7418
7419 2003-03-31  Borut Razem <borut.razem AT siol.net>
7420
7421         * src/z80/main.c: link-{port} and as-{port} defined without path
7422         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7423
7424 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7425
7426         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7427
7428 2003-03-30  Borut Razem <borut.razem AT siol.net>
7429
7430         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7431           changed type of list parameter to set
7432         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7433         * src/port.h: changed type of do_assemble() parameter to set
7434         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7435           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7436           definition of "cppoutfilename" macro with NULL value in preProcess()
7437         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7438         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7439         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7440           replaced with set *binPathSet
7441         * shash_add() deallocates the item, if allready exsists, before adding the new one
7442         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7443
7444 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7445
7446         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7447           a nested for loop bug in the PIC port
7448         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7449           for loops
7450
7451 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7452
7453         * support/Util/dbuf.h: remove C++ stuff to make it portable
7454
7455 2003-03-28  Borut Razem <borut.razem AT siol.net>
7456
7457         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7458           literal strings in stringLiteral()
7459         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7460         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7461           to the project
7462
7463 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7464
7465         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7466
7467 2003-03-26    <johan AT balder>
7468
7469         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7470         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7471         * src/SDCCast.c (decorateType): fixed " -v < 3"
7472
7473 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7474
7475         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7476         Added Lenny Story's debug infrastructure changes:
7477         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7478         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7479         * src/cdbFile.c: added
7480         * src/SDCCdebug.c: added
7481         * src/SDCCdebug.h: added
7482         * src/SDCCast.c (createFunction)
7483         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7484         * src/SDCCmain.c (parseCmdLine, main)
7485         * src/SDCCmem.c (redoStackOffsets)
7486         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7487         * src/SDCCsymt.h
7488         * src/common.h
7489         * src/avr/gen.c (genAVRCode)
7490         * src/ds390/gen.c (gen390Code)
7491         * src/mcs51/gen.c (gen51Code)
7492         * src/pic/gen.c (genpic14Code)
7493         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7494         * src/xa51/gen.c (genXA51Code)
7495         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7496
7497 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7498
7499         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7500         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7501
7502 2003-03-22    <johan AT balder>
7503
7504         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7505
7506 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7507
7508         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7509         * doc/cdbfileformat.lyx: added, written by Lenny Story
7510         * doc/Makefile: added cdbfileformat.lyx
7511         * doc/clean.mk: added cdbfileformat.lyx
7512
7513 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7514
7515         * src/mcs51/peeph.def: fix bug #705773
7516
7517 2003-03-20    <johan AT balder>
7518
7519         An sfr/sbit can have an "at #" AND an initializer
7520         * src/SDCCsymt.c (checkSClass):
7521         * src/SDCCmem.c (allocGlobal):
7522         * src/SDCCmem.c (allocLocal):
7523         * src/SDCCast.c (createBlock):
7524
7525 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7528
7529 2003-03-16    <johan AT balder>
7530
7531         Undid the hackup of const and volatile, the problem is much bigger
7532         * src/SDCC.y:1.65
7533         * src/SDCCast.c:1.171
7534         * src/SDCCglue.c:1.138
7535         * src/SDCCicode.c:1.146
7536         * src/SDCCsymt.c:1.150
7537         * src/SDCCval.c:1.65
7538
7539 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7540
7541         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7542         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7543
7544 2003-03-13    <johan AT balder>
7545
7546         Hackup const and volatile modifiers in type chains a bit:
7547         * src/SDCC.y:1.63
7548         * src/SDCCast.c:1.169
7549         * src/SDCCglue.c:1.136
7550         * src/SDCCicode.c:1.143
7551         * src/SDCCsymt.c1.146
7552         * src/SDCCsymt.h1.59
7553         * src/SDCCval.c:1.63
7554
7555 2003-03-12    <johan AT balder>
7556
7557         * src/SDCCBBlock.h: more LRH debugging junk
7558         * src/SDCCcflow.h: more LRH debugging junk
7559         * src/SDCCloop.c: more LRH debugging junk
7560         * src/SDCC.y (struct_declaration): fixed bug #697590
7561         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7562         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7563         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7564
7565 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7566         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7567         test function names must now match exactly).
7568         * src/SDCCcse.c: added special case in findCheaperOp to allow
7569         extending a short integer. Makes less awful code for bug 700121 test case.
7570
7571 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7572
7573         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7574         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7575
7576 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7577
7578         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7579         actually called (operandsNotEqual() was called for all
7580         operandsNotEqualX tests).
7581
7582 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7583
7584         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7585         with shorter literals. Fixes bug 700121.
7586
7587 2003-03-11    <johan AT balder>
7588
7589         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7590
7591 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7592
7593         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7594         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7595
7596 2003-03-10  Borut Razem <borut.razem AT siol.net>
7597
7598         * src/SDCCmain.c: pipe preprocessor's output
7599         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7600         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7601         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7602         which closes all pipes in pipeSet set
7603         * src/SDCCset.c: free deleted item in function deleteSetItem()
7604         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7605         moved from z80 to src subproject
7606         * .version: increased version number to 2.3.4
7607
7608 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7609
7610         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7611         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7612         * support/regression/ports/xa51/spec.mk: fix typo
7613
7614 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7615
7616         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7617
7618 2003-03-09  Borut Razem <borut.razem AT siol.net>
7619
7620         * src/SDCCmain.c: pipe preprocessor's output
7621         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7622         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7623         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7624         which closes all pipes in pipeSet set
7625         * src/SDCCset.c: free deleted item in function deleteSetItem()
7626         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7627         moved from z80 to src subproject
7628
7629 2003-03-09  Borut Razem <borut.razem AT siol.net>
7630
7631         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7632         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7633         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7634         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7635         * src/SDCCglobl.h: unification of WIN32 native definitions
7636
7637 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7638
7639         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7640
7641 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7642
7643         * src/configure.in:   check for endianess (even while cross-compiling)
7644         * src/configure:      check for endianess (even while cross-compiling)
7645         * src/configure_in.h: check for endianess (even while cross-compiling)
7646         * src/avr/gen.c:        remove old endianess stuff
7647         * src/mcs51/gen.c:      remove old endianess stuff
7648         * src/ds390/gen.c:      remove old endianess stuff
7649         * src/pic/gen.c:        remove old endianess stuff
7650         * src/pic/genarith.c:   remove old endianess stuff
7651         * src/pic/glue.c:       fix endianess check
7652         * src/pic16/gen.c:      remove old endianess stuff
7653         * src/pic16/genarith.c: remove old endianess stuff
7654         * src/pic16/glue.c:     fix endianess check
7655         * src/xa51/gen.c:       remove old endianess stuff
7656         * src/z80/gen.c:        fix endianess check
7657         * src/SDCCglue.c:       fix endianess check
7658         * src/ds390/peeph.def: fix bug 700036
7659
7660 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7661
7662         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7663         * src/configure: find appropriate data-types on host for SDCC's int and long
7664         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7665         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7666         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7667
7668 2003-03-07    <johan AT balder>
7669
7670         Just a big NOOP:
7671                 some minor cleanups before the big shot
7672                 OP_DEFS and OP_USES now use Kevin's protection
7673                 new option --nolabelopt
7674
7675         * src/SDCCBBlock.c:
7676         * src/SDCCast.c,:
7677         * src/SDCCcflow.c:
7678         * src/SDCCcse.c:
7679         * src/SDCCicode.c:
7680         * src/SDCCicode.h:
7681         * src/SDCClabel.c:
7682         * src/SDCCloop.c:
7683         * src/SDCCmain.c:
7684         * src/ds390/ralloc.c:
7685         * src/mcs51/ralloc.c:
7686         * src/pic/ralloc.c:
7687         * src/xa51/ralloc.c:
7688         * src/z80/ralloc.c:
7689
7690 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7691
7692         * src/pic/pcode.c (get_op): fix 64 bit warnings
7693         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7694         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7695         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7696         * support/regression/tests/malloc.c: fix 64 bit warnings
7697
7698 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7699
7700         * src/mcs51/gen.c (genMinus): fixed bug 696436
7701
7702 2003-03-02  Borut Razem <borut.razem AT siol.net>
7703
7704         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7705
7706 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7707
7708         * configure.in: test for mkstemp
7709         * sdccconf_in.h: add HAVE_MKSTEMP
7710
7711 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7712
7713         * device/include/ctype.h: removed warning while using --stack-auto
7714         * device/include/malloc.h: removed warning while using --stack-auto
7715         * device/include/string.h: removed warning while using --stack-auto
7716
7717 2003-02-23  Borut Razem <borut.razem AT siol.net>
7718
7719         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7720         because NDEBUG is defined (see man assert)
7721         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7722
7723 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7724
7725         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7726         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7727
7728 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7729
7730         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7731         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7732
7733 2003-02-18    <johan AT balder>
7734
7735         * as/mcs51/asmain.c (asmbl): module can start with a digit
7736         * as/z80/asmain.c (asmbl): module can start with a digit
7737
7738 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7739
7740         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7741         * src/asm.c: fix pipe() for Mingw32
7742
7743 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7744
7745         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7746         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7747         make -V work again; --c1mode reads now from stdin
7748         * doc/sdccman.lyx: added --c1mode
7749         * support/Util/SDCCerr.c: new messages for c1 mode
7750         * support/Util/SDCCerr.h: new messages for c1 mode
7751         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7752
7753 2003-02-15    <johan AT balder>
7754
7755         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7756
7757 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7758
7759         * doc/sdccman.lyx: Environment variables, -o and other minor things
7760
7761 2003-02-14    <johan AT balder>
7762
7763         * src/xa51/main.c: before anyone really tries to use it :)
7764
7765         * Install doc's in share/sdcc/doc
7766         * removed some obsolete files
7767         * Do a proper make distclean and uninstall
7768         M Makefile.common.in
7769         R sdccbuild.sh
7770         M as/Makefile
7771         M device/include/Makefile.in
7772         M device/lib/Makefile.in
7773         M doc/sdccman.lyx
7774         M link/Makefile
7775         M sim/ucsim/doc/Makefile.in
7776         M src/clean.mk
7777         R src/avr/peeph.rul
7778         R src/xa51/peeph.rul
7779         M support/cpp2/Makefile.in
7780         M support/makebin/Makefile
7781
7782
7783 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7784
7785         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7786
7787 2003-02-10  Borut Razem <borut.razem AT siol.net>
7788
7789         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7790         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7791         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7792         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7793         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7794         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7795         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7796         src/z80/Makefile.bcc: Borland Makefile cleanup
7797         * as/z80/Makefile.bcc: Added Borland Makefile
7798         * support/cpp2/borland.h: Removed
7799
7800 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7801
7802         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7803         * src/SDCC.lex: new pragma NOIV
7804         * src/SDCCglobl.h: new pragma NOIV
7805         * src/SDCCmem.c: new pragma NOIV
7806
7807 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7808
7809         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7810
7811 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7812
7813         * src/SDCCmain.c: signal handling is switched off by --debug
7814         * doc/Makefile: small fix for install; use clean.mk again
7815         * doc/clean.mk: clean *.pdf and *.html too
7816
7817 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7818
7819         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7820         * device/lib/printfl.c: fix a ds390 bug by making it portable
7821         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7822         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7823         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7824         * debugger/mcs51/cmd.c: converted multi-line string literals
7825         * sim/ucsim/globals.cc: converted multi-line string literals
7826         * src/SDCCmain.c: introduced signal handler to remove temp files
7827         * doc/Makefile: small tweaks, implement clean
7828         * doc: removed generated files
7829
7830 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7831
7832         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7833         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7834         Address Record is not correctly generated for DS390."
7835
7836 2003-02-02  Borut Razem <borut.razem AT siol.net>
7837
7838         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7839         * as/mcs51/asm.h: fixed compilation with Borland C
7840         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7841         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7842         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7843         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7844         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
7845         src/z80/Makefile.bcc: delete $(LIB) only if exist
7846         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
7847
7848 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
7849
7850         * device/include/malloc.h: introduced NULL
7851         * device/include/string.h: introduced NULL
7852         * device/include/stdlib.h: introduced NULL
7853         * device/lib/_memcpy.c: removed NULL
7854         * device/lib/_strcat.c: removed NULL
7855         * device/lib/_strchr.c: removed NULL
7856         * device/lib/_strcmp.c: removed NULL
7857         * device/lib/_strcpy.c: removed NULL
7858         * device/lib/_strcspn.c: removed NULL
7859         * device/lib/_strlen.c: removed NULL
7860         * device/lib/_strncat.c: removed NULL
7861         * device/lib/_strncmp.c: removed NULL
7862         * device/lib/_strncpy.c: removed NULL
7863         * device/lib/_strpbrk.c: removed NULL
7864         * device/lib/_strrchr.c: removed NULL
7865         * device/lib/_strspn.c: removed NULL
7866         * device/lib/_strstr.c: removed NULL
7867         * device/lib/_strtok.c: removed NULL
7868         * device/lib/malloc.c: removed NULL, include own header
7869
7870 2003-02-02    <johan AT balder>
7871
7872         * 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
7873         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
7874         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
7875         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
7876         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
7877         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
7878
7879 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7880
7881         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
7882         area 'DATA'"
7883
7884 2003-02-01    <johan AT balder>
7885
7886         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
7887
7888 2003-01-31    <johan AT CP255758-A>
7889
7890         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
7891
7892 2003-01-30    <johan AT balder>
7893
7894         * src/SDCCBBlock.c: automatic bug detection
7895         * src/SDCCicode.c: automatic bug detection
7896
7897 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7898
7899         * src/SDCCglobl.h:   now --xram-size 0 works
7900         * src/SDCCmain.c:    now --xram-size 0 works
7901
7902 2003-01-29    <johan AT balder>
7903
7904         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
7905
7906 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7907
7908         * as/mcs51/aslink.h: Added options --xram-size and --code-size
7909         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
7910         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
7911         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
7912         * src/SDCCglobl.h:   Added options --xram-size and --code-size
7913         * src/SDCCmain.c:    Added options --xram-size and --code-size
7914
7915 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
7916
7917         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
7918         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
7919
7920 2003-01-27    <johan AT balder>
7921
7922         * src/SDCC.y: fixed bug #613764
7923
7924 2003-01-26    <johan AT balder>
7925
7926         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
7927         * src/SDCCsymt.h: fixed bug #673374
7928         * src/SDCCglue.c: fixed bug #661910
7929         * src/SDCCast.c: fixed bug #458099 and 673374
7930
7931 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
7932
7933         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
7934         * as/mcs51/strcmpi.h: added
7935         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
7936         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
7937         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
7938         * as/mcs51/assym.c: strcmpi -> as_strcmpi
7939         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
7940         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
7941         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
7942         * as/mcs51/Makefile.aslink: new module strcmpi
7943         * as/mcs51/Makefile.asx8051: new module strcmpi
7944         * as/mcs51/Makefil.bcc: new module strcmpi
7945         * as/mcs51/Makefile.in: new module strcmpi
7946         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
7947
7948 2003-01-26    <johan AT balder>
7949
7950         * src/SDCCglue.c: reverted back to 1.124
7951         * src/SDCCast.c: reverted back to 1.156
7952         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
7953
7954 2003-01-25    <johan AT balder>
7955
7956         * src/SDCCglue.c: A better fix for bug #661910
7957         * src/SDCCast.c: A better fix for bug #661910
7958         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
7959
7960 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7961
7962         * src/Makefile.in: remove spawn.o
7963         * src/SDCCmain.c: remove spawn.h
7964         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
7965         * src/spawn.c: removed
7966         * src/spawn.h: removed
7967         * support/regression/ports/ds390/spec.mk: link with -r
7968
7969 2003-01-24    <johan AT CP255758-A>
7970
7971         * src/ds390/gen.c (aopOp): fixed bug #667458
7972         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
7973         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
7974         (createIvalCharPtr): an ival doesn't always have a storage class anymore
7975
7976 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7977
7978         * src/mcs51/peeph.def: better assembler identation by Frieder
7979         * src/mcs51/gen.c: better assembler identation by Frieder
7980
7981 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
7982
7983         * as/z80/string.h: removed for gcc 3.2
7984         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
7985         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
7986
7987 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
7988
7989         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
7990         * src/SDCCpeeph.c (replaceRule): fix bug #663503
7991         * support/regression/Makefile: separate temp files for ports
7992         * support/regression/generate-cases.py: separate temp files for ports
7993         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
7994         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
7995
7996 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
7997
7998         * moved tinitalk to device/examples/ds390
7999
8000 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8001
8002         * as/mcs51/lkmem.c: rflag is for DS390
8003         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8004         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8005                          (linkEdit): move mem- and map-files the same way as ihx-files
8006         * src/z80/main.c (_setDefaultOptions): removed --generic
8007         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8008         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8009         * src/pic/glue.c (picglue): --c1mode works again
8010         * src/pic16/glue.c (pic16glue): --c1mode works again
8011         * src/asm.c (printCLine): fix #660034
8012
8013 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8014
8015         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8016         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8017         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8018         * as/mcs51/lkmem (summary): better fix for sp problem
8019         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8020         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8021         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8022                                               remove --stack-after-data
8023
8024 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8025
8026         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8027         * src/SDCCutil.c (join): ugly bug: missing '\0'
8028         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8029
8030 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8031
8032         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8033         * src/port.h: typo
8034         * src/pic/main.c (_asmCmd): gpasm supports -o
8035         * src/z80/main.c: more general macros
8036         * device/lib/Makefile.in: remove intermediate files
8037
8038 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8039
8040         * .version: Bumped version number to 2.3.3
8041         * src/SDCCBBlock.c: new option -o
8042         * src/SDCCglobl.h: new option -o
8043         * src/SDCCglue.c: new option -o
8044         * src/SDCCmain.c: new option -o
8045         * src/asm.c: new option -o
8046         * src/ds390/main.c: new option -o
8047         * src/pic/glue.c: new option -o
8048         * src/pic/pcode.c: new option -o
8049         * src/pic/ralloc.c: new option -o
8050         * src/pic16/glue.c: new option -o
8051         * src/pic16/pcode.c: new option -o
8052         * src/pic16/ralloc.c: new option -o
8053         * src/z80/main.c: new option -o
8054         * device/lib/Makefile.in: use -o
8055         * support/regression/ports/ds390/spec.mk: use -o
8056         * support/regression/ports/gbz80/spec.mk: use -o
8057         * support/regression/ports/mcs51/spec.mk: use -o
8058         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8059         * support/regression/ports/z80/spec.mk: use -o
8060         * support/regression/ports/ucz80/spec.mk: use -o
8061         * support/regression/ports/xa51/spec.mk: use -o
8062         * support/regression/fwk/lib/timeout.c: fix usage string
8063
8064 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8065         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8066
8067 2003-01-07    <johan AT balder>
8068
8069         * src/SDCCast.c (decorateType): fixed bug #600035
8070
8071 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8072         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8073         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8074         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8075         * src/pic/pcode.c: outcommented unused variable to remove warnings
8076         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8077
8078 2003-01-06    <karl AT turbobit.com>
8079         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8080    regression tests.
8081
8082 2003-01-06    <johan AT balder>
8083
8084         * src/SDCCicode.c: fixed array add
8085
8086 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8087         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8088         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8089
8090 2003-01-04    <johan AT balder>
8091
8092         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8093
8094 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8095         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8096
8097 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8098         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8099         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8100
8101 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8102         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8103
8104 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8105         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8106
8107 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8108         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8109
8110 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8111
8112     * in \sdcc\as\mcs51\ changed these files in order to create an
8113     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8114     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8115     following files to include the previous two files: aslink.dsp,
8116     Makefile.aslink, Makefile.bcc, and Makefile.in.
8117
8118     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8119     .adb instead of .cdb
8120
8121 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8122
8123         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8124         value from option --iram-size.
8125
8126 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8127
8128         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8129         dram[] array.
8130
8131 2002-09-18    <wiml AT hhhh.org>
8132
8133         * SDCClrange.h: exposed setFromRange() and setToRange()
8134         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8135           packRegsForAccUse() (bug 542397)
8136         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8137           multiple times and emitting the fetch operations more than once
8138           added aopGetUsesAcc() function to allow binary operators to
8139           fetch their operands in the correct order; made genMinus() emit
8140           compact code for X = LITERAL - Y
8141
8142 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8143         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8144         sprintf() in line 1267.
8145
8146 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8147         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8148         like ports.
8149
8150 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8151         Changes to aslink (All the changes are marked with 'JCF'):
8152
8153         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8154         summary().
8155
8156         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8157         area BSEG.  Also moves, if possible, the DATA area down into the internal
8158         ram so more space is available.
8159
8160         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8161         sflag.
8162
8163         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8164         not bytes.  Function summary() which creates a memory usage summary
8165         file with extension .mem.  Reports of overlaping stack and small stack
8166         size.  If the space for the stack is less than 16 bytes aslink trows a
8167         warning.
8168
8169         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8170         the 8051.  Option 'y' for memory summary output file.
8171
8172         Changes to sdcc (All the changes are marked with 'JCF'):
8173
8174         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8175
8176         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8177         overlaying area for it (uses RegBankUsed[4]).
8178
8179         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8180         bank zero as used by default.  By default aslink locates the stack
8181         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8182         the creation of the .mem file.  Delegates the allocation of data area
8183         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8184         the begining of the stack area to aslink.
8185
8186         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8187         glue() in SDCCglue.c creates an area for it.
8188
8189 2002-09-03  Borut Razem <borut.razem AT siol.net>
8190         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8191         sdcc/src/pic/glue.c:
8192         introduced atexit() handler for teporay files removal in case of
8193         errors, assertions, ...
8194
8195 2002-08-29  Borut Razem <borut.razem AT siol.net>
8196         * sdcc/support/cpp2/auto-host_vc_in.h:
8197         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8198         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8199         Maybe there is a similar problem with BORLANDC? It should be checked!
8200
8201         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8202         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8203         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8204         was not executed, and the compiler (cl) launched a warning:
8205         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8206
8207 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8208         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8209
8210 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8211         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8212
8213         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8214           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8215           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8216           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8217           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8218           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8219           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8220         - added Release configuration in VS projects
8221         - review of compiler an linker options
8222         - VC .exe files are generated in bin_vc directory, not to interfere
8223           with binaries generated from other projects (cygwin, mingw, bcc ...)
8224
8225         * sdcc/src/yacc.dsp: added
8226
8227         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8228         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8229         and insert the version number definitions from .version
8230
8231         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8232
8233         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8234         added - genarate auto-host.h using auto-host_vc_in.h as template
8235
8236         * sdcc/sdcc_vc.h,
8237         removed from CVS, generated automatically
8238
8239 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8240         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8241
8242 2002-08-11  Borut Razem <borut.razem AT siol.net>
8243         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8244
8245 2002-08-10  Borut Razem <borut.razem AT siol.net>
8246         * src/SDCCmain.c (main):
8247         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8248         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8249         The consequence was that some temporary files were not removed.
8250
8251         * src/SDCCglue.c:
8252         unification of code in functions tempfilename() and tempfile():
8253         function tempnam() is defined in Visual Studio 6.0 and .NET
8254
8255         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8256
8257         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8258           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8259         - removed compiler command line option /WX: Treats all warnings as errors
8260         - update a list of source files, included into the project
8261
8262         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8263           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8264         changed project type to Generic Project so that can be correcly converted to VS.NET project
8265
8266         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8267
8268         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8269
8270         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8271
8272         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8273         added return 0 statements after assert() to make compiler happy
8274
8275         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8276         added newline in the def file to keep MSC compiler satisfied
8277
8278         * sdcc/src/z80/gen.c:
8279         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8280           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8281         - solved MSC error in function aopDump()
8282
8283         * sdcc_vc.h: define PREFIX as "\\sdcc"
8284
8285 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8286         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8287
8288 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8289         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8290         - Rewrote the register banking algorithm.
8291         - Added pCode live-range analysis to registers (for now, only non-used and
8292         singly-used registers optimized away)
8293
8294         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8295
8296         * 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.
8297
8298 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8299         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8300
8301 2002-04-22  Michael Hope  <michaelh AT vroom>
8302
8303         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8304
8305         * configure.in (DD_COPT): Added include support required for gbdk.
8306
8307         * .version: Bumped version number just to increase it.
8308
8309         * src/SDCCmain.c: Added -nostdinc to the default options.
8310
8311 2002-04-15  Michael Hope  <michaelh AT vroom>
8312
8313         * device/lib/z80/printf.c (sprintf): Added.
8314
8315         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8316
8317         * src/z80/peeph.def: Added transpose redundent load rule.
8318
8319         * src/z80/main.c: Added force callee saves for jaune.
8320
8321         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8322
8323         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8324
8325 2002-03-28  Johan Knol  <johan AT balder>
8326
8327         * src/SDCCval.c: fixed bug #532436
8328
8329 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8330         * /src/port.h:
8331         Added "char *Processor" field to the port structure.
8332
8333         * /src/SDCCmain.c:
8334         Added -p option. Allows port dependent processor to be specified.
8335
8336         * all ports:
8337         Initialized the new field char *Processor field to NULL in all ports
8338
8339         * /src/pic/*:
8340         Compiler generated registers for interrupt context saving
8341         were not getting allocated.
8342
8343 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8344
8345         * /src/SDCCast.c:
8346         Fixed left shift. Will promote the left side of a left shift
8347         if a) left shifting more than size of operand or b) when assigned
8348         to something size > size of left side
8349
8350 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8351         * src/pic/*
8352         tons of changes. Register allocation has been
8353         rewritten. Added customization for the various PICs. Flow
8354         analysis is restructured. ...
8355
8356         * src/pic/device.h:
8357         Added
8358
8359         * src/pic/device.c:
8360         Added. device.c is a PIC port hack to accomodate variations
8361         in PIC devices.
8362
8363 2002-03-13  Michael Hope  <michaelh AT vroom>
8364
8365         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8366
8367 2002-03-04  johanknol  <johanknol AT manik>
8368
8369         * /src/SDCCval.c: fixed
8370
8371         const unsigned char arr[][2] = { { 0, 1 } };
8372         t18.c:1: error: Initializer element is not constant
8373
8374 2002-03-04  bela  <bela AT manik>
8375
8376         * /device/include/mcs51reg.h:
8377         ds89c420 register definition update
8378
8379 2002-03-03    <johan AT FRIJA>
8380
8381         * support/Util/SDCCerr.c: did something, but don't no why anymore
8382
8383         * support/regression/tests/bug-524691.c: made it a little less shy
8384
8385         * src/SDCCast.c (decorateType): fixed bug #524697
8386
8387         * src/SDCCast.c: made some lineno improvements
8388
8389         * src/SDCCval.c (getNelements): changed warning to error
8390
8391         * src/SDCCglue.c (printIvalArray): changed warning to error
8392
8393         * src/SDCCicode.c: fixed a warning for mingw
8394
8395         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8396
8397         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8398
8399 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8400
8401         * src/ds390/peeph.def:
8402         Added some more peephole rules
8403
8404         * src/ds390/gen.c: Various fixes & enhancements
8405
8406         * src/SDCClrange.c, src/SDCClrange.h:
8407         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8408
8409         * src/ds390/ralloc.c:
8410         various fixes & enhancements (ds390) specific
8411
8412         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8413         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8414         from rallocs.
8415
8416         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8417
8418 2002-03-02    <johan AT FRIJA>
8419
8420         * src/SDCCast.c (decorateType): fixed bug #524708
8421
8422         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8423
8424         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8425
8426 2002-03-01  Michael Hope  <michaelh AT vroom>
8427
8428         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8429
8430         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8431
8432 2002-03-01    <johan AT FRIJA>
8433
8434         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8435
8436         * src/SDCCast.c (decorateType): fixed bug #524209
8437
8438         * src/SDCCval.c (valNot): fixed bug #524195
8439
8440 2002-02-26    <johan AT balder>
8441
8442         * src/xa51/gen.c: fixed a warning
8443
8444         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8445
8446         * src/SDCCast.c (decorateType): fixed bug #522534
8447
8448 2002-02-23    <johan AT balder>
8449
8450         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8451
8452 2002-02-22    <johan AT balder>
8453
8454         * src/SDCCast.c: fixed bug #514865
8455
8456         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8457
8458 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8459
8460         * sdcc/src/SDCCloop.c:
8461         Previous fix was not good. basic blocks that have "break" or "return" are
8462         not really partof a loop , but live ranges used in these blocks should
8463         be live thru the entire loop, so set partOfLoop but don't add them to
8464         loop region
8465
8466 2002-02-21    <johan AT FRIJA>
8467
8468         * src/SDCCcse.c: fixed bug #514308
8469
8470 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8471
8472         * src/SDCCloop.c:
8473         Fixed BUG #519583. If a conditional block ended in a return/break
8474         statement inside a loop, it was not being considered part of the loop.
8475
8476         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8477
8478 2002-02-10  Karl Bongers <karl AT turbobit.com>
8479
8480         * debugger/*:
8481         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8482         with lots of comments and notes.
8483
8484         * device/examples/test2.c:
8485         Fix bug, "red" variable not being initialized(compiler complained).
8486
8487         * device/examples/Makefile, examples/test3.c:
8488         Add Makefile in device/examples folder, compiles test3.c
8489         for use as a multiple module SDCDB test case.
8490
8491         * sim/ucsim/cmd.src/cmdset.cc:
8492         Took out debug printfs in ucsim "next" command.
8493
8494         * sim/ucsim/xa.src:
8495         Karl and Johan start ucsim XA support.  Most dissassembly working,
8496         about 75% emulation done(plenty of work remaining).
8497
8498         * sim/ucsim/z80.src:
8499         Add Z80 support to ucsim, add test-ucz80 regression test,
8500         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8501         Notice z80 compiler fails on examples/test3.c/crc code.
8502
8503 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8504
8505         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8506         Added support for --parms-in-bank1
8507
8508         * src/ds390/peeph.def:
8509         added a few more peephole optimzations
8510
8511         * src/ds390/main.c:
8512         1) added __builtin_inp & __builtin_outp used to read in data of given length
8513            from a memory mapped port
8514         2) added __builtin_memcmp
8515         3) added __builtin_swapw swap bytes of a short
8516
8517         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8518         1) handle multiple send & receives from register bank1
8519         2) ralloc can now allocate DPTR1 to some liveRanges
8520
8521         * src/SDCCsymt.c, src/SDCCsymt.h:
8522         changes to handle multiple sends & receives
8523
8524         * src/SDCCptropt.h:
8525         added some pointer arithmetic optimization
8526
8527         * src/SDCCptropt.c:
8528         added some pointer arithmetic optimizations but not stable yet so not
8529         called from anywhere (will get this working shortly)
8530
8531         * src/SDCCopt.c: fixed for multiple sends & receives
8532
8533         * src/SDCCmain.c:
8534         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8535         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8536            set preprocessor defines (depending on options)
8537
8538         * src/SDCCicode.c, src/SDCCicode.h:
8539         changes made to handle multiple sends & receives
8540
8541         * src/SDCCglobl.h:
8542         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8543
8544         * src/SDCCcse.c, src/SDCCcse.h:
8545         added function findbackward def (to be used in upcoming optimization)
8546
8547         * src/SDCCcflow.c, src/SDCCcflow.h:
8548         added function returnAtEnd - to determine if a basic block terminates with
8549         a RETURN iCode
8550
8551         * src/SDCCast.c, src/SDCCast.h:
8552         added option parms-in-bank1
8553
8554         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8555         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8556         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8557         adjusted for --parms-in-bank1 option
8558
8559         * device/include/string.h:
8560         donot redefine "reentrant" keyword
8561
8562         * device/include/ds80c390.h: Added some more SFRs
8563
8564 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8565
8566         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8567
8568 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8569
8570         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8571
8572 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8573
8574         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8575
8576 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8577
8578         * Added --xram-movc option
8579
8580 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8581
8582         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8583
8584 2002-01-11  Johan Knol
8585
8586         * Added math lib of Jesus Calvino-Fraga
8587
8588 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8589
8590         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8591         * support/regression/Makefile: new target test-mcs51-stack-auto
8592         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8593
8594 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8595
8596         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8597
8598 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8599
8600         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8601
8602 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8603
8604         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8605
8606         * src/SDCCglue.h: add definition for printIvalChar()
8607
8608 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8609
8610         * src/SDCCast.c: fix #498138 by Johan
8611
8612         * src/SDCCglue.c: fix #498138 by Johan
8613
8614 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8615
8616         * support/regression/Makefile: fix clean
8617
8618         * support/regression/ports/ds390/support.c: fix transmission of last character
8619
8620 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8621
8622         * /sdcc/src/ds390/gen.c:
8623         a) improved computing address of stack variable
8624         b) took out some #if 0 code
8625         c) improved parmBytes adjustment
8626         d) improved genPlusIncr & genMinusIncr
8627         e) genCmp could generate bad code (when left assigned to DPTR)
8628         f) Fixed bug in hasInc
8629
8630         * /sdcc/src/ds390/ralloc.c:
8631         a) packRegsForSupport could mess up live information (Fixed)
8632         b) packRegsDPTRuse could be incorrect for left & right shift
8633
8634         * /sdcc/src/mcs51/ralloc.c:
8635         packRegsForSupport could mess up the live information (Fixed)
8636
8637         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8638
8639         * /sdcc/src/SDCCast.c:
8640         can reverse a loop even if function call is present as long
8641         as the loop control variable is local & is not passed as parameter
8642
8643 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8644
8645         * /sdcc/ChangeLog: *** empty log message ***
8646
8647         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8648         More builtin function additions for TININative
8649
8650         * /sdcc/src/ds390/ralloc.c:
8651         Had broken the regression testsuite
8652
8653         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8654
8655         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8656         Added funcattr hasStackParms will be set for reentrant functions when there
8657         are paramteres on the stack, this helps in minimizing frame pointer generation
8658         typeFromStr can handle function pointers now
8659
8660         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8661         *** empty log message ***
8662
8663 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8664
8665         * /src/ds390/gen.c, /src/ds390/main.c:
8666         More builtin function additions for TININative
8667
8668         * /src/ds390/ralloc.c:
8669         Had broken the regression testsuite
8670
8671         * /src/SDCCast.c: Fixed a bug in dumptree
8672
8673         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8674         Added funcattr hasStackParms will be set for reentrant functions when there
8675         are paramteres on the stack, this helps in minimizing frame pointer generation
8676         typeFromStr can handle function pointers now
8677
8678         * /doc/builtins.txt, /doc/TININative.txt:
8679         *** empty log message ***
8680
8681
8682 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8683
8684         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8685         ALPHA version for -mTININative
8686
8687         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8688         updated to reflect changes in the port structure
8689
8690         * /src/port.h:
8691         added function do_assemble (similar to do_link) if non-null this function
8692         will be called to do assembly (-mTININative) requires a multi command
8693         assembly
8694         added function genAssemblerEnd will be called to generate assembler Epilogue
8695
8696         * /src/SDCCsymt.c:
8697         added _JavaNative to debug info printing
8698
8699         * /src/SDCCmain.c: added option --tini-libid
8700         added port->do_assemble function (-mTININative) has a multi command assemble
8701
8702         * /src/SDCCglue.c: Disabled "constExpr" check
8703         added port->genAssemblerEnd function
8704
8705         * /src/SDCCglobl.h: Added option --tini-libid value
8706
8707         * /src/SDCCast.h:
8708         tookout optimizeCompare from the header (has no external references)
8709
8710         * /src/SDCCast.c: made one more function "static"
8711
8712 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8713
8714         * src/z80/mappings.i: Added z80asm support.
8715
8716         * src/z80/main.c: Added z80asm support on --asm=z80asm
8717
8718         * src/z80/gen.c: Fixed asm portability issues.
8719
8720         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8721
8722         * src/SDCCglue.c (printExterns): Added global/extern split.
8723
8724 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8725
8726         * support/regression/Makefile: added test for mcs51 model large
8727
8728         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8729
8730         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8731
8732 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8733
8734         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8735
8736 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8737
8738         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8739
8740         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8741
8742 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8743
8744         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8745
8746         * support/regression/tests/simplefloat.c: Port to mcs51.
8747
8748 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8749         * support/regression/tests/bug-485362.c: Added.
8750
8751         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8752
8753         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8754
8755         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8756
8757         * src/z80/gen.c (aopDump): Added a dump function.
8758
8759 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8760         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8761
8762         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8763
8764         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8765
8766         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8767
8768         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8769
8770         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8771
8772         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8773
8774         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8775
8776         * support/regression/ports/ds390/support.c: Use tinibios.
8777
8778         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8779
8780 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8781
8782         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8783         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8784
8785         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8786
8787         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8788
8789 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8790
8791         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8792
8793         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8794         (packRegsForIYUse): Created and optimised.
8795
8796 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8797
8798         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8799 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8800
8801         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8802
8803         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8804
8805         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8806
8807 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8808
8809         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8810
8811         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8812
8813 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8814
8815         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8816
8817         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8818
8819         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8820
8821 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8822
8823         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8824         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8825         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8826
8827         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8828
8829         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8830         (genNotFloat): Added.
8831         (genUminusFloat): Added.
8832
8833         * device/lib/z80/Makefile: Added floating pt stubs.
8834
8835         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8836
8837         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8838
8839         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8840
8841 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8842
8843         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8844
8845         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
8846
8847         * sdcc/support/regression/Makefile: Add port ds390.
8848
8849         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
8850
8851         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
8852
8853         * sdcc/support/regression/ports/ds390/spec.mk: Added.
8854
8855         * sdcc/support/regression/ports/ds390/support.c: Added.
8856
8857         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
8858
8859         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
8860
8861         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
8862
8863 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8864
8865         * device/include/malloc.h: Added z80 and gbz80 support.
8866
8867         * device/lib/gbz80/heap.s: Added.
8868
8869         * device/lib/z80/heap.s: Added.
8870
8871         * device/lib/malloc.c: Added z80 and gbz80 support.
8872
8873         * support/regression/tests/malloc.c (testMalloc): Added.
8874
8875         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
8876
8877         * support/regression/tests/bug-478094.c: Added.
8878
8879         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
8880
8881 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
8882
8883         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
8884
8885         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
8886
8887         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
8888
8889         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
8890
8891         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
8892
8893 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8894
8895         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
8896
8897 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
8898
8899         * support/regression/tests/bug-477927.c: Added.
8900
8901         * src/z80/peeph.def: Added minor rules.
8902
8903         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
8904
8905         * src/z80/peeph.def: Added jump optimisation modification.
8906
8907 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
8908
8909         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
8910
8911 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
8912
8913         * support/regression/tests/funptrs.c: Added.
8914
8915 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
8916
8917         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
8918
8919 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
8920
8921         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
8922
8923         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
8924
8925         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
8926         (movLeft2ResultLong): Created.
8927
8928         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
8929         (joinPushes): Added.  Joins two char pushes into a word push.
8930
8931 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
8932
8933         * support/cpp2/Makefile.in (install): Added creation of dest dir.
8934
8935         * support/makebin/Makefile (install): Added creation of dest dir.
8936
8937 2001-10-24 Karl Bongers <karl AT turbobit.com>
8938
8939         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
8940
8941 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
8942
8943         * src/z80/ralloc.c: Turned off faulty pack for one use.
8944
8945         * src/z80/peeph-gbz80.def: Removed redundent restart options.
8946
8947         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
8948
8949 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
8950
8951         * support/regression/Makefile: Improved clean
8952
8953         * support/regression/ports/gbz80/spec.mk: Added clean
8954
8955         * support/regression/ports/host/spec.mk: Added clean
8956
8957         * support/regression/ports/z80/spec.mk: Added clean
8958
8959         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
8960
8961         * support/regression/ports/mcs51/timeout.c: little improvements
8962
8963 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
8964
8965         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
8966
8967         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
8968
8969         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
8970
8971 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
8972
8973         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
8974
8975         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
8976
8977 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
8978         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
8979
8980         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
8981
8982         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
8983
8984         * src/mcs51/main.c (_linkCmd): Added bin path to command.
8985
8986         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
8987
8988         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
8989
8990         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
8991
8992         * support/regression/tests/longor.c: Added.
8993
8994 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
8995
8996         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
8997
8998         * as/mcs51/aslink.h: define PATH_MAX
8999
9000         * as/mcs51/asm.h: define PATH_MAX
9001
9002         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9003
9004         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9005
9006         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9007
9008         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9009
9010         * src/SDCCglobl.h: define PATH_MAX
9011
9012         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9013
9014         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9015
9016 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9017
9018         * src/z80/gen.c (gencjneshort): Fixed
9019
9020         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9021
9022 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9023
9024         * support/regression/tests/bug-469671.c: Added.
9025
9026         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9027
9028 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9029
9030         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9031
9032         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9033
9034 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9035
9036         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9037
9038         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9039
9040         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9041
9042         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9043
9044         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9045
9046         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9047
9048         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9049
9050 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9051
9052         * 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.
9053
9054         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9055
9056         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9057
9058 2001-10-07    <johan AT FRIJA>
9059
9060         * device/lib/gets.c (gets): fixed the return value.
9061
9062 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9063         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9064
9065         * 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.
9066
9067         * 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.
9068
9069         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9070
9071         * src/pic/gen.c: Removed Safe_strdup.
9072
9073         * configure.in: Added option to enable libgc support.
9074
9075         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9076         (bitVectUnion): Optimised.
9077         (bitVectIntersect): Optimised.
9078         (bitVectBitsInCommon): Optimised.
9079         (bitVectCplAnd): Optimised.
9080
9081         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9082
9083 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9084
9085         * src/SDCCmain.c: distinguish between assembler debug and plain options
9086
9087         * src/avr/main.c:   remove standard assembler options
9088
9089         * src/ds390/main.c: remove standard assembler options
9090
9091         * src/mcs51/main.c: remove standard assembler options
9092
9093         * src/port.h: removed "PENDING" comment
9094
9095 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9096
9097         * src/device/lib/_mulint.c  : new, with assember functions
9098
9099         * src/device/lib/_mullong.c : new, with assember functions
9100
9101         * src/device/lib/_divuint.c : with assember functions
9102
9103         * src/device/lib/_divsint.c : with assember functions
9104
9105         * src/device/lib/_divulong.c: with assember functions
9106
9107         * src/device/lib/_divslong.c: with assember functions
9108
9109         * src/device/lib/_moduint.c : with assember functions
9110
9111         * src/device/lib/_modsint.c : with assember functions
9112
9113         * src/device/lib/_modulong.c: with assember functions
9114
9115         * src/device/lib/_modslong.c: with assember functions
9116
9117         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9118
9119         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9120
9121         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9122                                       replaced _mululong.c and _mulslong.c by _mullong.c
9123
9124 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9125
9126         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9127
9128 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9129
9130         * src/SDCCglue.c: test, if win32api is available for MINGW
9131
9132 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9133
9134         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9135         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9136         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9137         * support/regression/ports/host/spec.mk: removed GENERIC
9138         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9139         * support/regression/ports/z80/spec.mk: removed GENERIC
9140
9141 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9142
9143         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9144
9145         * support/regression/tests/bug-467035.c: Created.
9146
9147 2001-10-01    <johan AT FRIJA>
9148
9149         * src/SDCC.y: fixed bug #466586 part 1
9150
9151 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9152
9153         * SDCCicode.c: z80 has no generic pointers
9154         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9155
9156 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9157
9158         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9159
9160 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9161
9162         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9163
9164         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9165
9166 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9167
9168         * configure.in: Fixed up so that ucsim is only configured once.
9169
9170         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9171
9172         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9173         (getPathDifference): As above.
9174
9175         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9176
9177         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9178
9179 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9180         * .version: Updated to 2.3.1
9181
9182         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9183         Added copyright header.
9184
9185         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9186         (assemble): Added support for macro based assembler commands.
9187         (linkEdit): Added support for macro based linker commands.
9188         (preProcess): Changed the pre-processor to use macros.
9189         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9190         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9191
9192         * device/lib/z80/crt0.s: Added module name for debugging.
9193
9194 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9195
9196         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9197
9198         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9199
9200         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9201
9202         * src/Makefile.in: Added SDCCmacro and SDCCutil
9203
9204 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9205
9206         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9207
9208 2001-09-16    <johan AT FRIJA>
9209
9210         * 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.
9211
9212 2001-09-15    <johan AT FRIJA>
9213
9214         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9215         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9216
9217 2001-09-11    <johan AT FRIJA>
9218
9219         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9220
9221 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9222
9223         * support/regression/tests/bug-460444.c: Added test case.
9224
9225         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9226         (genCast): Added justification for all of the asserts.
9227
9228 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9229
9230         * support/regression/support.c: _xdata replaced by xdata
9231
9232         * support/regression/spec.mk: removed _generic
9233
9234 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9235
9236         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9237
9238         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9239         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9240
9241         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9242
9243         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9244
9245         * support/regression/tests/bug-460010.c: Added test case.
9246
9247         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9248
9249 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9250
9251         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9252
9253         * support/regression/testfwk.c: removed workaround for bug #436344
9254
9255         * support/regression/tests/bp.c: use less memory with mcs51
9256
9257         * support/regression/tests/bug-441448.c: use less memory
9258
9259         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9260
9261         * support/regression/collate-results.py: typo
9262
9263 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9264
9265         * support/regression/tests/fetchoverlap.c: Added new test case.
9266
9267         * support/regression/tests/bp.c: Added new test case.
9268
9269         * support/regression/tests/bug-448984.c: Added new test case.
9270
9271         * support/regression/tests/pow2shifts.c: Added new test case.
9272
9273         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9274         (genlshTwo): Fixed right shift for count > 8.
9275
9276         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9277
9278 2001-09-08    <johan AT FRIJA>
9279
9280         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9281
9282 2001-09-07    <johan AT FRIJA>
9283
9284         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9285
9286         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9287
9288 2001-09-06    <johan AT FRIJA>
9289
9290         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9291         * bernhard noted me at this: "() equals to (void)" (1.38)
9292
9293 2001-09-05    <johan AT FRIJA>
9294
9295         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9296
9297 2001-09-04    <johan AT FRIJA>
9298
9299         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9300
9301
9302 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9303
9304         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9305
9306 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9307
9308         * link/z80/aslink.h: Fixed path for PATH_MAX
9309
9310 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9311
9312         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9313
9314         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9315
9316         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9317
9318         * 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.
9319
9320 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9321
9322         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9323         (genCmp): Fixed up genCmp for the GB with longs.
9324
9325         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9326
9327         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9328
9329         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9330
9331         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9332
9333 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9334
9335         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9336
9337 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9338
9339         * 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.
9340
9341         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9342
9343 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9344
9345         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9346
9347         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9348
9349 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9350
9351   * sim/ucsim/configure:    little improvement of Cygwin-detection
9352   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9353   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9354   * support/regression/tests/bug-221100.c: small changes for mcs51
9355   * support/regression/tests/bug-221168.c: small changes for mcs51
9356   * support/regression/tests/bug-227710.c: small changes for mcs51
9357   * support/regression/tests/staticinit.c: small changes for mcs51
9358   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9359   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9360   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9361
9362 $Revision$